Closed artdevgame closed 4 years ago
I don't understand the build errors, any chance someone can help me figure them out please?
Sorry for the delay, lost interest in this a year ago and it's fallen into disarray lol Looking into the build failures now. It's failing while trying to build the type definitions, specifically using the github api to pull the source files from obs-websocket. It might just be a matter of environment variable exposure between forks and the main repo...
Apparently it's getting rate limited. I would assume it's because of the matrix builds running 2 each for both the pr and push jobs?
'x-ratelimit-limit': '60',
'x-ratelimit-remaining': '53',
I'll look at if caching the response can take care of that. In the meantime though let me know if a umd
does what you want.
Exporting as a pure CommonJS prevents the window level import. A UMD does the following to switch based on the environment.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["OBSWebSocket"] = factory();
else
root["OBSWebSocket"] = factory();
})(window, function() {
Forks don't get the secrets so maybe it's getting thrown in with other requests on travis. That or I'm just misreading the error and the issue is simply passing an undefined token.
Just added a commit to remove the header for non-token builds. Might just watch it and see if that's sufficient.
@Lange you probably have much better knowledge about all the module types and how that jazz works. If you don't foresee any issues with a umd I'd want to merge this in and try to tag a release. Want to verify that my npm tokens are still valid.
v4.0.0 is available in npm and bower now.
Related Issue (if applicable):
170
Description:
The dist version can now be imported using static imports. Previously this was not working for me.