glitch-javascript-sdk 0.6.7 → 0.6.8
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 +32 -63
- 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
|
|
|
@@ -3906,10 +3890,6 @@ function base64DetectIncompleteChar(buffer) {
|
|
|
3906
3890
|
|
|
3907
3891
|
Readable.ReadableState = ReadableState;
|
|
3908
3892
|
|
|
3909
|
-
text_min.debuglog = function(empty) {
|
|
3910
|
-
|
|
3911
|
-
}
|
|
3912
|
-
|
|
3913
3893
|
var debug$2 = text_min.debuglog('stream');
|
|
3914
3894
|
text_min.inherits(Readable, EventEmitter);
|
|
3915
3895
|
|
|
@@ -5600,7 +5580,7 @@ var _polyfillNode_stream = /*#__PURE__*/Object.freeze({
|
|
|
5600
5580
|
default: Stream$3
|
|
5601
5581
|
});
|
|
5602
5582
|
|
|
5603
|
-
var require$$3 = /*@__PURE__*/
|
|
5583
|
+
var require$$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_stream);
|
|
5604
5584
|
|
|
5605
5585
|
var Stream$2 = require$$3.Stream;
|
|
5606
5586
|
var util$2 = text_min;
|
|
@@ -6167,7 +6147,7 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
|
6167
6147
|
sep: sep
|
|
6168
6148
|
});
|
|
6169
6149
|
|
|
6170
|
-
var require$$2$1 = /*@__PURE__*/
|
|
6150
|
+
var require$$2$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_path$1);
|
|
6171
6151
|
|
|
6172
6152
|
var hasFetch = isFunction$1(global$1.fetch) && isFunction$1(global$1.ReadableStream);
|
|
6173
6153
|
|
|
@@ -8037,7 +8017,7 @@ var _polyfillNode_http = /*#__PURE__*/Object.freeze({
|
|
|
8037
8017
|
request: request$1
|
|
8038
8018
|
});
|
|
8039
8019
|
|
|
8040
|
-
var require$$1 = /*@__PURE__*/
|
|
8020
|
+
var require$$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_http);
|
|
8041
8021
|
|
|
8042
8022
|
function request(opts, cb) {
|
|
8043
8023
|
if (typeof opts === 'string')
|
|
@@ -8185,9 +8165,9 @@ var _polyfillNode_https = /*#__PURE__*/Object.freeze({
|
|
|
8185
8165
|
request: request
|
|
8186
8166
|
});
|
|
8187
8167
|
|
|
8188
|
-
var require$$2 = /*@__PURE__*/
|
|
8168
|
+
var require$$2 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_https);
|
|
8189
8169
|
|
|
8190
|
-
var require$$0$3 = /*@__PURE__*/
|
|
8170
|
+
var require$$0$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_url);
|
|
8191
8171
|
|
|
8192
8172
|
var _polyfillNode_fs = {};
|
|
8193
8173
|
|
|
@@ -8196,7 +8176,7 @@ var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({
|
|
|
8196
8176
|
default: _polyfillNode_fs
|
|
8197
8177
|
});
|
|
8198
8178
|
|
|
8199
|
-
var require$$6 = /*@__PURE__*/
|
|
8179
|
+
var require$$6 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_fs$1);
|
|
8200
8180
|
|
|
8201
8181
|
var mimeTypes = {};
|
|
8202
8182
|
|
|
@@ -21768,7 +21748,7 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
|
|
|
21768
21748
|
throws: throws
|
|
21769
21749
|
});
|
|
21770
21750
|
|
|
21771
|
-
var require$$4 = /*@__PURE__*/
|
|
21751
|
+
var require$$4 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_assert);
|
|
21772
21752
|
|
|
21773
21753
|
var src = {exports: {}};
|
|
21774
21754
|
|
|
@@ -21803,7 +21783,7 @@ var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({
|
|
|
21803
21783
|
isatty: isatty
|
|
21804
21784
|
});
|
|
21805
21785
|
|
|
21806
|
-
var require$$0$1 = /*@__PURE__*/
|
|
21786
|
+
var require$$0$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_tty$1);
|
|
21807
21787
|
|
|
21808
21788
|
/*
|
|
21809
21789
|
The MIT License (MIT)
|
|
@@ -21954,7 +21934,7 @@ var _polyfillNode_os$1 = /*#__PURE__*/Object.freeze({
|
|
|
21954
21934
|
uptime: uptime
|
|
21955
21935
|
});
|
|
21956
21936
|
|
|
21957
|
-
var require$$0 = /*@__PURE__*/
|
|
21937
|
+
var require$$0 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_os$1);
|
|
21958
21938
|
|
|
21959
21939
|
var hasFlag;
|
|
21960
21940
|
var hasRequiredHasFlag;
|
|
@@ -21963,7 +21943,7 @@ function requireHasFlag () {
|
|
|
21963
21943
|
if (hasRequiredHasFlag) return hasFlag;
|
|
21964
21944
|
hasRequiredHasFlag = 1;
|
|
21965
21945
|
hasFlag = (flag, argv) => {
|
|
21966
|
-
argv = argv ||
|
|
21946
|
+
argv = argv || browser$1$1.argv;
|
|
21967
21947
|
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
21968
21948
|
const pos = argv.indexOf(prefix + flag);
|
|
21969
21949
|
const terminatorPos = argv.indexOf('--');
|
|
@@ -21981,7 +21961,7 @@ function requireSupportsColor () {
|
|
|
21981
21961
|
const os = require$$0;
|
|
21982
21962
|
const hasFlag = requireHasFlag();
|
|
21983
21963
|
|
|
21984
|
-
const env =
|
|
21964
|
+
const env = browser$1$1.env;
|
|
21985
21965
|
|
|
21986
21966
|
let forceColor;
|
|
21987
21967
|
if (hasFlag('no-color') ||
|
|
@@ -22032,7 +22012,7 @@ function requireSupportsColor () {
|
|
|
22032
22012
|
|
|
22033
22013
|
const min = forceColor ? 1 : 0;
|
|
22034
22014
|
|
|
22035
|
-
if (
|
|
22015
|
+
if (browser$1$1.platform === 'win32') {
|
|
22036
22016
|
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22037
22017
|
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22038
22018
|
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
@@ -22041,7 +22021,7 @@ function requireSupportsColor () {
|
|
|
22041
22021
|
// that supports 16m/TrueColor.
|
|
22042
22022
|
const osRelease = os.release().split('.');
|
|
22043
22023
|
if (
|
|
22044
|
-
Number(
|
|
22024
|
+
Number(browser$1$1.versions.node.split('.')[0]) >= 8 &&
|
|
22045
22025
|
Number(osRelease[0]) >= 10 &&
|
|
22046
22026
|
Number(osRelease[2]) >= 10586
|
|
22047
22027
|
) {
|
|
@@ -22105,8 +22085,8 @@ function requireSupportsColor () {
|
|
|
22105
22085
|
|
|
22106
22086
|
supportsColor_1 = {
|
|
22107
22087
|
supportsColor: getSupportLevel,
|
|
22108
|
-
stdout: getSupportLevel(
|
|
22109
|
-
stderr: getSupportLevel(
|
|
22088
|
+
stdout: getSupportLevel(browser$1$1.stdout),
|
|
22089
|
+
stderr: getSupportLevel(browser$1$1.stderr)
|
|
22110
22090
|
};
|
|
22111
22091
|
return supportsColor_1;
|
|
22112
22092
|
}
|
|
@@ -22564,10 +22544,6 @@ function requireCommon () {
|
|
|
22564
22544
|
return common;
|
|
22565
22545
|
}
|
|
22566
22546
|
|
|
22567
|
-
/**
|
|
22568
|
-
* Module dependencies.
|
|
22569
|
-
*/
|
|
22570
|
-
|
|
22571
22547
|
var hasRequiredNode;
|
|
22572
22548
|
|
|
22573
22549
|
function requireNode () {
|
|
@@ -22693,7 +22669,7 @@ function requireNode () {
|
|
|
22693
22669
|
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22694
22670
|
*/
|
|
22695
22671
|
|
|
22696
|
-
exports.inspectOpts = Object.keys(
|
|
22672
|
+
exports.inspectOpts = Object.keys(browser$1$1.env).filter(key => {
|
|
22697
22673
|
return /^debug_/i.test(key);
|
|
22698
22674
|
}).reduce((obj, key) => {
|
|
22699
22675
|
// Camel-case
|
|
@@ -22705,7 +22681,7 @@ function requireNode () {
|
|
|
22705
22681
|
});
|
|
22706
22682
|
|
|
22707
22683
|
// Coerce string value into JS value
|
|
22708
|
-
let val =
|
|
22684
|
+
let val = browser$1$1.env[key];
|
|
22709
22685
|
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22710
22686
|
val = true;
|
|
22711
22687
|
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
@@ -22727,7 +22703,7 @@ function requireNode () {
|
|
|
22727
22703
|
function useColors() {
|
|
22728
22704
|
return 'colors' in exports.inspectOpts ?
|
|
22729
22705
|
Boolean(exports.inspectOpts.colors) :
|
|
22730
|
-
tty.isatty(
|
|
22706
|
+
tty.isatty(browser$1$1.stderr.fd);
|
|
22731
22707
|
}
|
|
22732
22708
|
|
|
22733
22709
|
/**
|
|
@@ -22763,7 +22739,7 @@ function requireNode () {
|
|
|
22763
22739
|
*/
|
|
22764
22740
|
|
|
22765
22741
|
function log(...args) {
|
|
22766
|
-
return
|
|
22742
|
+
return browser$1$1.stderr.write(util.format(...args) + '\n');
|
|
22767
22743
|
}
|
|
22768
22744
|
|
|
22769
22745
|
/**
|
|
@@ -22774,11 +22750,11 @@ function requireNode () {
|
|
|
22774
22750
|
*/
|
|
22775
22751
|
function save(namespaces) {
|
|
22776
22752
|
if (namespaces) {
|
|
22777
|
-
|
|
22753
|
+
browser$1$1.env.DEBUG = namespaces;
|
|
22778
22754
|
} else {
|
|
22779
22755
|
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22780
22756
|
// string 'null' or 'undefined'. Just delete instead.
|
|
22781
|
-
delete
|
|
22757
|
+
delete browser$1$1.env.DEBUG;
|
|
22782
22758
|
}
|
|
22783
22759
|
}
|
|
22784
22760
|
|
|
@@ -22790,7 +22766,7 @@ function requireNode () {
|
|
|
22790
22766
|
*/
|
|
22791
22767
|
|
|
22792
22768
|
function load() {
|
|
22793
|
-
return
|
|
22769
|
+
return browser$1$1.env.DEBUG;
|
|
22794
22770
|
}
|
|
22795
22771
|
|
|
22796
22772
|
/**
|
|
@@ -22839,8 +22815,6 @@ function requireNode () {
|
|
|
22839
22815
|
|
|
22840
22816
|
var browser = {exports: {}};
|
|
22841
22817
|
|
|
22842
|
-
/* eslint-env browser */
|
|
22843
|
-
|
|
22844
22818
|
var hasRequiredBrowser;
|
|
22845
22819
|
|
|
22846
22820
|
function requireBrowser () {
|
|
@@ -23070,8 +23044,8 @@ function requireBrowser () {
|
|
|
23070
23044
|
}
|
|
23071
23045
|
|
|
23072
23046
|
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23073
|
-
if (!r && typeof
|
|
23074
|
-
r =
|
|
23047
|
+
if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) {
|
|
23048
|
+
r = browser$1$1.env.DEBUG;
|
|
23075
23049
|
}
|
|
23076
23050
|
|
|
23077
23051
|
return r;
|
|
@@ -23118,17 +23092,12 @@ function requireBrowser () {
|
|
|
23118
23092
|
return browser.exports;
|
|
23119
23093
|
}
|
|
23120
23094
|
|
|
23121
|
-
/**
|
|
23122
|
-
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
23123
|
-
* treat as a browser.
|
|
23124
|
-
*/
|
|
23125
|
-
|
|
23126
23095
|
var hasRequiredSrc;
|
|
23127
23096
|
|
|
23128
23097
|
function requireSrc () {
|
|
23129
23098
|
if (hasRequiredSrc) return src.exports;
|
|
23130
23099
|
hasRequiredSrc = 1;
|
|
23131
|
-
if (typeof
|
|
23100
|
+
if (typeof browser$1$1 === 'undefined' || browser$1$1.type === 'renderer' || browser$1$1.browser === true || browser$1$1.__nwjs) {
|
|
23132
23101
|
src.exports = requireBrowser();
|
|
23133
23102
|
} else {
|
|
23134
23103
|
src.exports = requireNode();
|