glitch-javascript-sdk 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +33 -60
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -3127,33 +3127,17 @@ function getDefaultExportFromCjs (x) {
|
|
|
3127
3127
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3128
3128
|
}
|
|
3129
3129
|
|
|
3130
|
-
function
|
|
3131
|
-
|
|
3132
|
-
var f = n.default;
|
|
3133
|
-
if (typeof f == "function") {
|
|
3134
|
-
var a = function a () {
|
|
3135
|
-
if (this instanceof a) {
|
|
3136
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
3137
|
-
}
|
|
3138
|
-
return f.apply(this, arguments);
|
|
3139
|
-
};
|
|
3140
|
-
a.prototype = f.prototype;
|
|
3141
|
-
} else a = {};
|
|
3142
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
3143
|
-
Object.keys(n).forEach(function (k) {
|
|
3144
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
3145
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
3146
|
-
enumerable: true,
|
|
3147
|
-
get: function () {
|
|
3148
|
-
return n[k];
|
|
3149
|
-
}
|
|
3150
|
-
});
|
|
3151
|
-
});
|
|
3152
|
-
return a;
|
|
3130
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
3131
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
3153
3132
|
}
|
|
3154
3133
|
|
|
3155
3134
|
var text_min = {};
|
|
3156
3135
|
|
|
3136
|
+
text_min.inherits = inherits;
|
|
3137
|
+
text_min.debuglog = function(empty) {
|
|
3138
|
+
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3157
3141
|
(function(scope) {function B(r,e){var f;return r instanceof Buffer?f=r:f=Buffer.from(r.buffer,r.byteOffset,r.byteLength),f.toString(e)}var w=function(r){return Buffer.from(r)};function h(r){for(var e=0,f=Math.min(256*256,r.length+1),n=new Uint16Array(f),i=[],o=0;;){var t=e<r.length;if(!t||o>=f-1){var s=n.subarray(0,o),m=s;if(i.push(String.fromCharCode.apply(null,m)),!t)return i.join("");r=r.subarray(e),e=0,o=0;}var a=r[e++];if((a&128)===0)n[o++]=a;else if((a&224)===192){var d=r[e++]&63;n[o++]=(a&31)<<6|d;}else if((a&240)===224){var d=r[e++]&63,l=r[e++]&63;n[o++]=(a&31)<<12|d<<6|l;}else if((a&248)===240){var d=r[e++]&63,l=r[e++]&63,R=r[e++]&63,c=(a&7)<<18|d<<12|l<<6|R;c>65535&&(c-=65536,n[o++]=c>>>10&1023|55296,c=56320|c&1023),n[o++]=c;}}}function F(r){for(var e=0,f=r.length,n=0,i=Math.max(32,f+(f>>>1)+7),o=new Uint8Array(i>>>3<<3);e<f;){var t=r.charCodeAt(e++);if(t>=55296&&t<=56319){if(e<f){var s=r.charCodeAt(e);(s&64512)===56320&&(++e,t=((t&1023)<<10)+(s&1023)+65536);}if(t>=55296&&t<=56319)continue}if(n+4>o.length){i+=8,i*=1+e/r.length*2,i=i>>>3<<3;var m=new Uint8Array(i);m.set(o),o=m;}if((t&4294967168)===0){o[n++]=t;continue}else if((t&4294965248)===0)o[n++]=t>>>6&31|192;else if((t&4294901760)===0)o[n++]=t>>>12&15|224,o[n++]=t>>>6&63|128;else if((t&4292870144)===0)o[n++]=t>>>18&7|240,o[n++]=t>>>12&63|128,o[n++]=t>>>6&63|128;else continue;o[n++]=t&63|128;}return o.slice?o.slice(0,n):o.subarray(0,n)}var u="Failed to ",p=function(r,e,f){if(r)throw new Error("".concat(u).concat(e,": the '").concat(f,"' option is unsupported."))};var x=typeof Buffer=="function"&&Buffer.from;var A=x?w:F;function v(){this.encoding="utf-8";}v.prototype.encode=function(r,e){return p(e&&e.stream,"encode","stream"),A(r)};function U(r){var e;try{var f=new Blob([r],{type:"text/plain;charset=UTF-8"});e=URL.createObjectURL(f);var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(),n.responseText}finally{e&&URL.revokeObjectURL(e);}}var O=!x&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",S=["utf-8","utf8","unicode-1-1-utf-8"],T=h;x?T=B:O&&(T=function(r){try{return U(r)}catch(e){return h(r)}});var y="construct 'TextDecoder'",E="".concat(u," ").concat(y,": the ");function g(r,e){p(e&&e.fatal,y,"fatal"),r=r||"utf-8";var f;if(x?f=Buffer.isEncoding(r):f=S.indexOf(r.toLowerCase())!==-1,!f)throw new RangeError("".concat(E," encoding label provided ('").concat(r,"') is invalid."));this.encoding=r,this.fatal=!1,this.ignoreBOM=!1;}g.prototype.decode=function(r,e){p(e&&e.stream,"decode","stream");var f;return r instanceof Uint8Array?f=r:r.buffer instanceof ArrayBuffer?f=new Uint8Array(r.buffer):f=new Uint8Array(r),T(f,this.encoding)};scope.TextEncoder=scope.TextEncoder||v;scope.TextDecoder=scope.TextDecoder||g;
|
|
3158
3142
|
}(typeof window !== 'undefined' ? window : (typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal)));
|
|
3159
3143
|
|
|
@@ -3907,7 +3891,7 @@ function base64DetectIncompleteChar(buffer) {
|
|
|
3907
3891
|
Readable.ReadableState = ReadableState;
|
|
3908
3892
|
|
|
3909
3893
|
text_min.debuglog = function(empty) {
|
|
3910
|
-
|
|
3894
|
+
|
|
3911
3895
|
}
|
|
3912
3896
|
|
|
3913
3897
|
var debug$2 = text_min.debuglog('stream');
|
|
@@ -5600,7 +5584,7 @@ var _polyfillNode_stream = /*#__PURE__*/Object.freeze({
|
|
|
5600
5584
|
default: Stream$3
|
|
5601
5585
|
});
|
|
5602
5586
|
|
|
5603
|
-
var require$$3 = /*@__PURE__*/
|
|
5587
|
+
var require$$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_stream);
|
|
5604
5588
|
|
|
5605
5589
|
var Stream$2 = require$$3.Stream;
|
|
5606
5590
|
var util$2 = text_min;
|
|
@@ -6167,7 +6151,7 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
|
6167
6151
|
sep: sep
|
|
6168
6152
|
});
|
|
6169
6153
|
|
|
6170
|
-
var require$$2$1 = /*@__PURE__*/
|
|
6154
|
+
var require$$2$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_path$1);
|
|
6171
6155
|
|
|
6172
6156
|
var hasFetch = isFunction$1(global$1.fetch) && isFunction$1(global$1.ReadableStream);
|
|
6173
6157
|
|
|
@@ -8037,7 +8021,7 @@ var _polyfillNode_http = /*#__PURE__*/Object.freeze({
|
|
|
8037
8021
|
request: request$1
|
|
8038
8022
|
});
|
|
8039
8023
|
|
|
8040
|
-
var require$$1 = /*@__PURE__*/
|
|
8024
|
+
var require$$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_http);
|
|
8041
8025
|
|
|
8042
8026
|
function request(opts, cb) {
|
|
8043
8027
|
if (typeof opts === 'string')
|
|
@@ -8185,9 +8169,9 @@ var _polyfillNode_https = /*#__PURE__*/Object.freeze({
|
|
|
8185
8169
|
request: request
|
|
8186
8170
|
});
|
|
8187
8171
|
|
|
8188
|
-
var require$$2 = /*@__PURE__*/
|
|
8172
|
+
var require$$2 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_https);
|
|
8189
8173
|
|
|
8190
|
-
var require$$0$3 = /*@__PURE__*/
|
|
8174
|
+
var require$$0$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_url);
|
|
8191
8175
|
|
|
8192
8176
|
var _polyfillNode_fs = {};
|
|
8193
8177
|
|
|
@@ -8196,7 +8180,7 @@ var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({
|
|
|
8196
8180
|
default: _polyfillNode_fs
|
|
8197
8181
|
});
|
|
8198
8182
|
|
|
8199
|
-
var require$$6 = /*@__PURE__*/
|
|
8183
|
+
var require$$6 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_fs$1);
|
|
8200
8184
|
|
|
8201
8185
|
var mimeTypes = {};
|
|
8202
8186
|
|
|
@@ -21768,7 +21752,7 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
|
|
|
21768
21752
|
throws: throws
|
|
21769
21753
|
});
|
|
21770
21754
|
|
|
21771
|
-
var require$$4 = /*@__PURE__*/
|
|
21755
|
+
var require$$4 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_assert);
|
|
21772
21756
|
|
|
21773
21757
|
var src = {exports: {}};
|
|
21774
21758
|
|
|
@@ -21803,7 +21787,7 @@ var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
|
21803
21787
|
isatty: isatty
|
|
21804
21788
|
});
|
|
21805
21789
|
|
|
21806
|
-
var require$$0$1 = /*@__PURE__*/
|
|
21790
|
+
var require$$0$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_tty$1);
|
|
21807
21791
|
|
|
21808
21792
|
/*
|
|
21809
21793
|
The MIT License (MIT)
|
|
@@ -21954,7 +21938,7 @@ var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
|
|
|
21954
21938
|
uptime: uptime
|
|
21955
21939
|
});
|
|
21956
21940
|
|
|
21957
|
-
var require$$0 = /*@__PURE__*/
|
|
21941
|
+
var require$$0 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_os$1);
|
|
21958
21942
|
|
|
21959
21943
|
var hasFlag;
|
|
21960
21944
|
var hasRequiredHasFlag;
|
|
@@ -21963,7 +21947,7 @@ function requireHasFlag () {
|
|
|
21963
21947
|
if (hasRequiredHasFlag) return hasFlag;
|
|
21964
21948
|
hasRequiredHasFlag = 1;
|
|
21965
21949
|
hasFlag = (flag, argv) => {
|
|
21966
|
-
argv = argv ||
|
|
21950
|
+
argv = argv || browser$1$1.argv;
|
|
21967
21951
|
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
21968
21952
|
const pos = argv.indexOf(prefix + flag);
|
|
21969
21953
|
const terminatorPos = argv.indexOf('--');
|
|
@@ -21981,7 +21965,7 @@ function requireSupportsColor () {
|
|
|
21981
21965
|
const os = require$$0;
|
|
21982
21966
|
const hasFlag = requireHasFlag();
|
|
21983
21967
|
|
|
21984
|
-
const env =
|
|
21968
|
+
const env = browser$1$1.env;
|
|
21985
21969
|
|
|
21986
21970
|
let forceColor;
|
|
21987
21971
|
if (hasFlag('no-color') ||
|
|
@@ -22032,7 +22016,7 @@ function requireSupportsColor () {
|
|
|
22032
22016
|
|
|
22033
22017
|
const min = forceColor ? 1 : 0;
|
|
22034
22018
|
|
|
22035
|
-
if (
|
|
22019
|
+
if (browser$1$1.platform === 'win32') {
|
|
22036
22020
|
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22037
22021
|
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22038
22022
|
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
@@ -22041,7 +22025,7 @@ function requireSupportsColor () {
|
|
|
22041
22025
|
// that supports 16m/TrueColor.
|
|
22042
22026
|
const osRelease = os.release().split('.');
|
|
22043
22027
|
if (
|
|
22044
|
-
Number(
|
|
22028
|
+
Number(browser$1$1.versions.node.split('.')[0]) >= 8 &&
|
|
22045
22029
|
Number(osRelease[0]) >= 10 &&
|
|
22046
22030
|
Number(osRelease[2]) >= 10586
|
|
22047
22031
|
) {
|
|
@@ -22105,8 +22089,8 @@ function requireSupportsColor () {
|
|
|
22105
22089
|
|
|
22106
22090
|
supportsColor_1 = {
|
|
22107
22091
|
supportsColor: getSupportLevel,
|
|
22108
|
-
stdout: getSupportLevel(
|
|
22109
|
-
stderr: getSupportLevel(
|
|
22092
|
+
stdout: getSupportLevel(browser$1$1.stdout),
|
|
22093
|
+
stderr: getSupportLevel(browser$1$1.stderr)
|
|
22110
22094
|
};
|
|
22111
22095
|
return supportsColor_1;
|
|
22112
22096
|
}
|
|
@@ -22564,10 +22548,6 @@ function requireCommon () {
|
|
|
22564
22548
|
return common;
|
|
22565
22549
|
}
|
|
22566
22550
|
|
|
22567
|
-
/**
|
|
22568
|
-
* Module dependencies.
|
|
22569
|
-
*/
|
|
22570
|
-
|
|
22571
22551
|
var hasRequiredNode;
|
|
22572
22552
|
|
|
22573
22553
|
function requireNode () {
|
|
@@ -22693,7 +22673,7 @@ function requireNode () {
|
|
|
22693
22673
|
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22694
22674
|
*/
|
|
22695
22675
|
|
|
22696
|
-
exports.inspectOpts = Object.keys(
|
|
22676
|
+
exports.inspectOpts = Object.keys(browser$1$1.env).filter(key => {
|
|
22697
22677
|
return /^debug_/i.test(key);
|
|
22698
22678
|
}).reduce((obj, key) => {
|
|
22699
22679
|
// Camel-case
|
|
@@ -22705,7 +22685,7 @@ function requireNode () {
|
|
|
22705
22685
|
});
|
|
22706
22686
|
|
|
22707
22687
|
// Coerce string value into JS value
|
|
22708
|
-
let val =
|
|
22688
|
+
let val = browser$1$1.env[key];
|
|
22709
22689
|
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22710
22690
|
val = true;
|
|
22711
22691
|
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
@@ -22727,7 +22707,7 @@ function requireNode () {
|
|
|
22727
22707
|
function useColors() {
|
|
22728
22708
|
return 'colors' in exports.inspectOpts ?
|
|
22729
22709
|
Boolean(exports.inspectOpts.colors) :
|
|
22730
|
-
tty.isatty(
|
|
22710
|
+
tty.isatty(browser$1$1.stderr.fd);
|
|
22731
22711
|
}
|
|
22732
22712
|
|
|
22733
22713
|
/**
|
|
@@ -22763,7 +22743,7 @@ function requireNode () {
|
|
|
22763
22743
|
*/
|
|
22764
22744
|
|
|
22765
22745
|
function log(...args) {
|
|
22766
|
-
return
|
|
22746
|
+
return browser$1$1.stderr.write(util.format(...args) + '\n');
|
|
22767
22747
|
}
|
|
22768
22748
|
|
|
22769
22749
|
/**
|
|
@@ -22774,11 +22754,11 @@ function requireNode () {
|
|
|
22774
22754
|
*/
|
|
22775
22755
|
function save(namespaces) {
|
|
22776
22756
|
if (namespaces) {
|
|
22777
|
-
|
|
22757
|
+
browser$1$1.env.DEBUG = namespaces;
|
|
22778
22758
|
} else {
|
|
22779
22759
|
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22780
22760
|
// string 'null' or 'undefined'. Just delete instead.
|
|
22781
|
-
delete
|
|
22761
|
+
delete browser$1$1.env.DEBUG;
|
|
22782
22762
|
}
|
|
22783
22763
|
}
|
|
22784
22764
|
|
|
@@ -22790,7 +22770,7 @@ function requireNode () {
|
|
|
22790
22770
|
*/
|
|
22791
22771
|
|
|
22792
22772
|
function load() {
|
|
22793
|
-
return
|
|
22773
|
+
return browser$1$1.env.DEBUG;
|
|
22794
22774
|
}
|
|
22795
22775
|
|
|
22796
22776
|
/**
|
|
@@ -22839,8 +22819,6 @@ function requireNode () {
|
|
|
22839
22819
|
|
|
22840
22820
|
var browser = {exports: {}};
|
|
22841
22821
|
|
|
22842
|
-
/* eslint-env browser */
|
|
22843
|
-
|
|
22844
22822
|
var hasRequiredBrowser;
|
|
22845
22823
|
|
|
22846
22824
|
function requireBrowser () {
|
|
@@ -23070,8 +23048,8 @@ function requireBrowser () {
|
|
|
23070
23048
|
}
|
|
23071
23049
|
|
|
23072
23050
|
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23073
|
-
if (!r && typeof
|
|
23074
|
-
r =
|
|
23051
|
+
if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) {
|
|
23052
|
+
r = browser$1$1.env.DEBUG;
|
|
23075
23053
|
}
|
|
23076
23054
|
|
|
23077
23055
|
return r;
|
|
@@ -23118,17 +23096,12 @@ function requireBrowser () {
|
|
|
23118
23096
|
return browser.exports;
|
|
23119
23097
|
}
|
|
23120
23098
|
|
|
23121
|
-
/**
|
|
23122
|
-
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
23123
|
-
* treat as a browser.
|
|
23124
|
-
*/
|
|
23125
|
-
|
|
23126
23099
|
var hasRequiredSrc;
|
|
23127
23100
|
|
|
23128
23101
|
function requireSrc () {
|
|
23129
23102
|
if (hasRequiredSrc) return src.exports;
|
|
23130
23103
|
hasRequiredSrc = 1;
|
|
23131
|
-
if (typeof
|
|
23104
|
+
if (typeof browser$1$1 === 'undefined' || browser$1$1.type === 'renderer' || browser$1$1.browser === true || browser$1$1.__nwjs) {
|
|
23132
23105
|
src.exports = requireBrowser();
|
|
23133
23106
|
} else {
|
|
23134
23107
|
src.exports = requireNode();
|