mcp-ts-template 2.9.2 → 2.9.3
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/README.md +1 -1
- package/dist/index.js +1759 -439
- package/package.json +3 -7
package/dist/index.js
CHANGED
|
@@ -129191,7 +129191,7 @@ var require_validator = __commonJS((exports, module) => {
|
|
|
129191
129191
|
module.exports.default = exports.default;
|
|
129192
129192
|
});
|
|
129193
129193
|
|
|
129194
|
-
// node_modules/tslib/tslib.js
|
|
129194
|
+
// node_modules/@supabase/functions-js/node_modules/tslib/tslib.js
|
|
129195
129195
|
var require_tslib = __commonJS((exports, module) => {
|
|
129196
129196
|
var __extends;
|
|
129197
129197
|
var __assign;
|
|
@@ -130002,6 +130002,611 @@ var require_main2 = __commonJS((exports) => {
|
|
|
130002
130002
|
} });
|
|
130003
130003
|
});
|
|
130004
130004
|
|
|
130005
|
+
// node_modules/@supabase/realtime-js/node_modules/tslib/tslib.js
|
|
130006
|
+
var require_tslib2 = __commonJS((exports, module) => {
|
|
130007
|
+
var __extends;
|
|
130008
|
+
var __assign;
|
|
130009
|
+
var __rest;
|
|
130010
|
+
var __decorate;
|
|
130011
|
+
var __param;
|
|
130012
|
+
var __esDecorate;
|
|
130013
|
+
var __runInitializers;
|
|
130014
|
+
var __propKey;
|
|
130015
|
+
var __setFunctionName;
|
|
130016
|
+
var __metadata;
|
|
130017
|
+
var __awaiter;
|
|
130018
|
+
var __generator;
|
|
130019
|
+
var __exportStar;
|
|
130020
|
+
var __values;
|
|
130021
|
+
var __read;
|
|
130022
|
+
var __spread;
|
|
130023
|
+
var __spreadArrays;
|
|
130024
|
+
var __spreadArray;
|
|
130025
|
+
var __await;
|
|
130026
|
+
var __asyncGenerator;
|
|
130027
|
+
var __asyncDelegator;
|
|
130028
|
+
var __asyncValues;
|
|
130029
|
+
var __makeTemplateObject;
|
|
130030
|
+
var __importStar;
|
|
130031
|
+
var __importDefault;
|
|
130032
|
+
var __classPrivateFieldGet;
|
|
130033
|
+
var __classPrivateFieldSet;
|
|
130034
|
+
var __classPrivateFieldIn;
|
|
130035
|
+
var __createBinding;
|
|
130036
|
+
var __addDisposableResource;
|
|
130037
|
+
var __disposeResources;
|
|
130038
|
+
var __rewriteRelativeImportExtension;
|
|
130039
|
+
(function(factory) {
|
|
130040
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
130041
|
+
if (typeof define === "function" && define.amd) {
|
|
130042
|
+
define("tslib", ["exports"], function(exports2) {
|
|
130043
|
+
factory(createExporter(root, createExporter(exports2)));
|
|
130044
|
+
});
|
|
130045
|
+
} else if (typeof module === "object" && typeof exports === "object") {
|
|
130046
|
+
factory(createExporter(root, createExporter(exports)));
|
|
130047
|
+
} else {
|
|
130048
|
+
factory(createExporter(root));
|
|
130049
|
+
}
|
|
130050
|
+
function createExporter(exports2, previous) {
|
|
130051
|
+
if (exports2 !== root) {
|
|
130052
|
+
if (typeof Object.create === "function") {
|
|
130053
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
130054
|
+
} else {
|
|
130055
|
+
exports2.__esModule = true;
|
|
130056
|
+
}
|
|
130057
|
+
}
|
|
130058
|
+
return function(id, v) {
|
|
130059
|
+
return exports2[id] = previous ? previous(id, v) : v;
|
|
130060
|
+
};
|
|
130061
|
+
}
|
|
130062
|
+
})(function(exporter) {
|
|
130063
|
+
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
130064
|
+
d.__proto__ = b;
|
|
130065
|
+
} || function(d, b) {
|
|
130066
|
+
for (var p in b)
|
|
130067
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
130068
|
+
d[p] = b[p];
|
|
130069
|
+
};
|
|
130070
|
+
__extends = function(d, b) {
|
|
130071
|
+
if (typeof b !== "function" && b !== null)
|
|
130072
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
130073
|
+
extendStatics(d, b);
|
|
130074
|
+
function __() {
|
|
130075
|
+
this.constructor = d;
|
|
130076
|
+
}
|
|
130077
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
|
|
130078
|
+
};
|
|
130079
|
+
__assign = Object.assign || function(t2) {
|
|
130080
|
+
for (var s2, i2 = 1, n = arguments.length;i2 < n; i2++) {
|
|
130081
|
+
s2 = arguments[i2];
|
|
130082
|
+
for (var p in s2)
|
|
130083
|
+
if (Object.prototype.hasOwnProperty.call(s2, p))
|
|
130084
|
+
t2[p] = s2[p];
|
|
130085
|
+
}
|
|
130086
|
+
return t2;
|
|
130087
|
+
};
|
|
130088
|
+
__rest = function(s2, e2) {
|
|
130089
|
+
var t2 = {};
|
|
130090
|
+
for (var p in s2)
|
|
130091
|
+
if (Object.prototype.hasOwnProperty.call(s2, p) && e2.indexOf(p) < 0)
|
|
130092
|
+
t2[p] = s2[p];
|
|
130093
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
|
|
130094
|
+
for (var i2 = 0, p = Object.getOwnPropertySymbols(s2);i2 < p.length; i2++) {
|
|
130095
|
+
if (e2.indexOf(p[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p[i2]))
|
|
130096
|
+
t2[p[i2]] = s2[p[i2]];
|
|
130097
|
+
}
|
|
130098
|
+
return t2;
|
|
130099
|
+
};
|
|
130100
|
+
__decorate = function(decorators, target, key, desc) {
|
|
130101
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
130102
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
130103
|
+
r2 = Reflect.decorate(decorators, target, key, desc);
|
|
130104
|
+
else
|
|
130105
|
+
for (var i2 = decorators.length - 1;i2 >= 0; i2--)
|
|
130106
|
+
if (d = decorators[i2])
|
|
130107
|
+
r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
130108
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
130109
|
+
};
|
|
130110
|
+
__param = function(paramIndex, decorator) {
|
|
130111
|
+
return function(target, key) {
|
|
130112
|
+
decorator(target, key, paramIndex);
|
|
130113
|
+
};
|
|
130114
|
+
};
|
|
130115
|
+
__esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
130116
|
+
function accept(f3) {
|
|
130117
|
+
if (f3 !== undefined && typeof f3 !== "function")
|
|
130118
|
+
throw new TypeError("Function expected");
|
|
130119
|
+
return f3;
|
|
130120
|
+
}
|
|
130121
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
130122
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
130123
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
130124
|
+
var _, done = false;
|
|
130125
|
+
for (var i2 = decorators.length - 1;i2 >= 0; i2--) {
|
|
130126
|
+
var context = {};
|
|
130127
|
+
for (var p in contextIn)
|
|
130128
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
130129
|
+
for (var p in contextIn.access)
|
|
130130
|
+
context.access[p] = contextIn.access[p];
|
|
130131
|
+
context.addInitializer = function(f3) {
|
|
130132
|
+
if (done)
|
|
130133
|
+
throw new TypeError("Cannot add initializers after decoration has completed");
|
|
130134
|
+
extraInitializers.push(accept(f3 || null));
|
|
130135
|
+
};
|
|
130136
|
+
var result = (0, decorators[i2])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
130137
|
+
if (kind === "accessor") {
|
|
130138
|
+
if (result === undefined)
|
|
130139
|
+
continue;
|
|
130140
|
+
if (result === null || typeof result !== "object")
|
|
130141
|
+
throw new TypeError("Object expected");
|
|
130142
|
+
if (_ = accept(result.get))
|
|
130143
|
+
descriptor.get = _;
|
|
130144
|
+
if (_ = accept(result.set))
|
|
130145
|
+
descriptor.set = _;
|
|
130146
|
+
if (_ = accept(result.init))
|
|
130147
|
+
initializers.unshift(_);
|
|
130148
|
+
} else if (_ = accept(result)) {
|
|
130149
|
+
if (kind === "field")
|
|
130150
|
+
initializers.unshift(_);
|
|
130151
|
+
else
|
|
130152
|
+
descriptor[key] = _;
|
|
130153
|
+
}
|
|
130154
|
+
}
|
|
130155
|
+
if (target)
|
|
130156
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
130157
|
+
done = true;
|
|
130158
|
+
};
|
|
130159
|
+
__runInitializers = function(thisArg, initializers, value) {
|
|
130160
|
+
var useValue = arguments.length > 2;
|
|
130161
|
+
for (var i2 = 0;i2 < initializers.length; i2++) {
|
|
130162
|
+
value = useValue ? initializers[i2].call(thisArg, value) : initializers[i2].call(thisArg);
|
|
130163
|
+
}
|
|
130164
|
+
return useValue ? value : undefined;
|
|
130165
|
+
};
|
|
130166
|
+
__propKey = function(x2) {
|
|
130167
|
+
return typeof x2 === "symbol" ? x2 : "".concat(x2);
|
|
130168
|
+
};
|
|
130169
|
+
__setFunctionName = function(f3, name, prefix) {
|
|
130170
|
+
if (typeof name === "symbol")
|
|
130171
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
130172
|
+
return Object.defineProperty(f3, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
130173
|
+
};
|
|
130174
|
+
__metadata = function(metadataKey, metadataValue) {
|
|
130175
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
130176
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
130177
|
+
};
|
|
130178
|
+
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
130179
|
+
function adopt(value) {
|
|
130180
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
130181
|
+
resolve(value);
|
|
130182
|
+
});
|
|
130183
|
+
}
|
|
130184
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
130185
|
+
function fulfilled(value) {
|
|
130186
|
+
try {
|
|
130187
|
+
step(generator.next(value));
|
|
130188
|
+
} catch (e2) {
|
|
130189
|
+
reject(e2);
|
|
130190
|
+
}
|
|
130191
|
+
}
|
|
130192
|
+
function rejected(value) {
|
|
130193
|
+
try {
|
|
130194
|
+
step(generator["throw"](value));
|
|
130195
|
+
} catch (e2) {
|
|
130196
|
+
reject(e2);
|
|
130197
|
+
}
|
|
130198
|
+
}
|
|
130199
|
+
function step(result) {
|
|
130200
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
130201
|
+
}
|
|
130202
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
130203
|
+
});
|
|
130204
|
+
};
|
|
130205
|
+
__generator = function(thisArg, body) {
|
|
130206
|
+
var _ = { label: 0, sent: function() {
|
|
130207
|
+
if (t2[0] & 1)
|
|
130208
|
+
throw t2[1];
|
|
130209
|
+
return t2[1];
|
|
130210
|
+
}, trys: [], ops: [] }, f3, y, t2, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
130211
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
130212
|
+
return this;
|
|
130213
|
+
}), g;
|
|
130214
|
+
function verb(n) {
|
|
130215
|
+
return function(v) {
|
|
130216
|
+
return step([n, v]);
|
|
130217
|
+
};
|
|
130218
|
+
}
|
|
130219
|
+
function step(op) {
|
|
130220
|
+
if (f3)
|
|
130221
|
+
throw new TypeError("Generator is already executing.");
|
|
130222
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
130223
|
+
try {
|
|
130224
|
+
if (f3 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
|
|
130225
|
+
return t2;
|
|
130226
|
+
if (y = 0, t2)
|
|
130227
|
+
op = [op[0] & 2, t2.value];
|
|
130228
|
+
switch (op[0]) {
|
|
130229
|
+
case 0:
|
|
130230
|
+
case 1:
|
|
130231
|
+
t2 = op;
|
|
130232
|
+
break;
|
|
130233
|
+
case 4:
|
|
130234
|
+
_.label++;
|
|
130235
|
+
return { value: op[1], done: false };
|
|
130236
|
+
case 5:
|
|
130237
|
+
_.label++;
|
|
130238
|
+
y = op[1];
|
|
130239
|
+
op = [0];
|
|
130240
|
+
continue;
|
|
130241
|
+
case 7:
|
|
130242
|
+
op = _.ops.pop();
|
|
130243
|
+
_.trys.pop();
|
|
130244
|
+
continue;
|
|
130245
|
+
default:
|
|
130246
|
+
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
130247
|
+
_ = 0;
|
|
130248
|
+
continue;
|
|
130249
|
+
}
|
|
130250
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
|
130251
|
+
_.label = op[1];
|
|
130252
|
+
break;
|
|
130253
|
+
}
|
|
130254
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
|
130255
|
+
_.label = t2[1];
|
|
130256
|
+
t2 = op;
|
|
130257
|
+
break;
|
|
130258
|
+
}
|
|
130259
|
+
if (t2 && _.label < t2[2]) {
|
|
130260
|
+
_.label = t2[2];
|
|
130261
|
+
_.ops.push(op);
|
|
130262
|
+
break;
|
|
130263
|
+
}
|
|
130264
|
+
if (t2[2])
|
|
130265
|
+
_.ops.pop();
|
|
130266
|
+
_.trys.pop();
|
|
130267
|
+
continue;
|
|
130268
|
+
}
|
|
130269
|
+
op = body.call(thisArg, _);
|
|
130270
|
+
} catch (e2) {
|
|
130271
|
+
op = [6, e2];
|
|
130272
|
+
y = 0;
|
|
130273
|
+
} finally {
|
|
130274
|
+
f3 = t2 = 0;
|
|
130275
|
+
}
|
|
130276
|
+
if (op[0] & 5)
|
|
130277
|
+
throw op[1];
|
|
130278
|
+
return { value: op[0] ? op[1] : undefined, done: true };
|
|
130279
|
+
}
|
|
130280
|
+
};
|
|
130281
|
+
__exportStar = function(m2, o) {
|
|
130282
|
+
for (var p in m2)
|
|
130283
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
130284
|
+
__createBinding(o, m2, p);
|
|
130285
|
+
};
|
|
130286
|
+
__createBinding = Object.create ? function(o, m2, k, k2) {
|
|
130287
|
+
if (k2 === undefined)
|
|
130288
|
+
k2 = k;
|
|
130289
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k);
|
|
130290
|
+
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
130291
|
+
desc = { enumerable: true, get: function() {
|
|
130292
|
+
return m2[k];
|
|
130293
|
+
} };
|
|
130294
|
+
}
|
|
130295
|
+
Object.defineProperty(o, k2, desc);
|
|
130296
|
+
} : function(o, m2, k, k2) {
|
|
130297
|
+
if (k2 === undefined)
|
|
130298
|
+
k2 = k;
|
|
130299
|
+
o[k2] = m2[k];
|
|
130300
|
+
};
|
|
130301
|
+
__values = function(o) {
|
|
130302
|
+
var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o[s2], i2 = 0;
|
|
130303
|
+
if (m2)
|
|
130304
|
+
return m2.call(o);
|
|
130305
|
+
if (o && typeof o.length === "number")
|
|
130306
|
+
return {
|
|
130307
|
+
next: function() {
|
|
130308
|
+
if (o && i2 >= o.length)
|
|
130309
|
+
o = undefined;
|
|
130310
|
+
return { value: o && o[i2++], done: !o };
|
|
130311
|
+
}
|
|
130312
|
+
};
|
|
130313
|
+
throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
130314
|
+
};
|
|
130315
|
+
__read = function(o, n) {
|
|
130316
|
+
var m2 = typeof Symbol === "function" && o[Symbol.iterator];
|
|
130317
|
+
if (!m2)
|
|
130318
|
+
return o;
|
|
130319
|
+
var i2 = m2.call(o), r2, ar = [], e2;
|
|
130320
|
+
try {
|
|
130321
|
+
while ((n === undefined || n-- > 0) && !(r2 = i2.next()).done)
|
|
130322
|
+
ar.push(r2.value);
|
|
130323
|
+
} catch (error48) {
|
|
130324
|
+
e2 = { error: error48 };
|
|
130325
|
+
} finally {
|
|
130326
|
+
try {
|
|
130327
|
+
if (r2 && !r2.done && (m2 = i2["return"]))
|
|
130328
|
+
m2.call(i2);
|
|
130329
|
+
} finally {
|
|
130330
|
+
if (e2)
|
|
130331
|
+
throw e2.error;
|
|
130332
|
+
}
|
|
130333
|
+
}
|
|
130334
|
+
return ar;
|
|
130335
|
+
};
|
|
130336
|
+
__spread = function() {
|
|
130337
|
+
for (var ar = [], i2 = 0;i2 < arguments.length; i2++)
|
|
130338
|
+
ar = ar.concat(__read(arguments[i2]));
|
|
130339
|
+
return ar;
|
|
130340
|
+
};
|
|
130341
|
+
__spreadArrays = function() {
|
|
130342
|
+
for (var s2 = 0, i2 = 0, il = arguments.length;i2 < il; i2++)
|
|
130343
|
+
s2 += arguments[i2].length;
|
|
130344
|
+
for (var r2 = Array(s2), k = 0, i2 = 0;i2 < il; i2++)
|
|
130345
|
+
for (var a = arguments[i2], j = 0, jl = a.length;j < jl; j++, k++)
|
|
130346
|
+
r2[k] = a[j];
|
|
130347
|
+
return r2;
|
|
130348
|
+
};
|
|
130349
|
+
__spreadArray = function(to, from, pack) {
|
|
130350
|
+
if (pack || arguments.length === 2)
|
|
130351
|
+
for (var i2 = 0, l = from.length, ar;i2 < l; i2++) {
|
|
130352
|
+
if (ar || !(i2 in from)) {
|
|
130353
|
+
if (!ar)
|
|
130354
|
+
ar = Array.prototype.slice.call(from, 0, i2);
|
|
130355
|
+
ar[i2] = from[i2];
|
|
130356
|
+
}
|
|
130357
|
+
}
|
|
130358
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
130359
|
+
};
|
|
130360
|
+
__await = function(v) {
|
|
130361
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
130362
|
+
};
|
|
130363
|
+
__asyncGenerator = function(thisArg, _arguments, generator) {
|
|
130364
|
+
if (!Symbol.asyncIterator)
|
|
130365
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
130366
|
+
var g = generator.apply(thisArg, _arguments || []), i2, q = [];
|
|
130367
|
+
return i2 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i2[Symbol.asyncIterator] = function() {
|
|
130368
|
+
return this;
|
|
130369
|
+
}, i2;
|
|
130370
|
+
function awaitReturn(f3) {
|
|
130371
|
+
return function(v) {
|
|
130372
|
+
return Promise.resolve(v).then(f3, reject);
|
|
130373
|
+
};
|
|
130374
|
+
}
|
|
130375
|
+
function verb(n, f3) {
|
|
130376
|
+
if (g[n]) {
|
|
130377
|
+
i2[n] = function(v) {
|
|
130378
|
+
return new Promise(function(a, b) {
|
|
130379
|
+
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
130380
|
+
});
|
|
130381
|
+
};
|
|
130382
|
+
if (f3)
|
|
130383
|
+
i2[n] = f3(i2[n]);
|
|
130384
|
+
}
|
|
130385
|
+
}
|
|
130386
|
+
function resume(n, v) {
|
|
130387
|
+
try {
|
|
130388
|
+
step(g[n](v));
|
|
130389
|
+
} catch (e2) {
|
|
130390
|
+
settle(q[0][3], e2);
|
|
130391
|
+
}
|
|
130392
|
+
}
|
|
130393
|
+
function step(r2) {
|
|
130394
|
+
r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
|
|
130395
|
+
}
|
|
130396
|
+
function fulfill(value) {
|
|
130397
|
+
resume("next", value);
|
|
130398
|
+
}
|
|
130399
|
+
function reject(value) {
|
|
130400
|
+
resume("throw", value);
|
|
130401
|
+
}
|
|
130402
|
+
function settle(f3, v) {
|
|
130403
|
+
if (f3(v), q.shift(), q.length)
|
|
130404
|
+
resume(q[0][0], q[0][1]);
|
|
130405
|
+
}
|
|
130406
|
+
};
|
|
130407
|
+
__asyncDelegator = function(o) {
|
|
130408
|
+
var i2, p;
|
|
130409
|
+
return i2 = {}, verb("next"), verb("throw", function(e2) {
|
|
130410
|
+
throw e2;
|
|
130411
|
+
}), verb("return"), i2[Symbol.iterator] = function() {
|
|
130412
|
+
return this;
|
|
130413
|
+
}, i2;
|
|
130414
|
+
function verb(n, f3) {
|
|
130415
|
+
i2[n] = o[n] ? function(v) {
|
|
130416
|
+
return (p = !p) ? { value: __await(o[n](v)), done: false } : f3 ? f3(v) : v;
|
|
130417
|
+
} : f3;
|
|
130418
|
+
}
|
|
130419
|
+
};
|
|
130420
|
+
__asyncValues = function(o) {
|
|
130421
|
+
if (!Symbol.asyncIterator)
|
|
130422
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
130423
|
+
var m2 = o[Symbol.asyncIterator], i2;
|
|
130424
|
+
return m2 ? m2.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i2 = {}, verb("next"), verb("throw"), verb("return"), i2[Symbol.asyncIterator] = function() {
|
|
130425
|
+
return this;
|
|
130426
|
+
}, i2);
|
|
130427
|
+
function verb(n) {
|
|
130428
|
+
i2[n] = o[n] && function(v) {
|
|
130429
|
+
return new Promise(function(resolve, reject) {
|
|
130430
|
+
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
130431
|
+
});
|
|
130432
|
+
};
|
|
130433
|
+
}
|
|
130434
|
+
function settle(resolve, reject, d, v) {
|
|
130435
|
+
Promise.resolve(v).then(function(v2) {
|
|
130436
|
+
resolve({ value: v2, done: d });
|
|
130437
|
+
}, reject);
|
|
130438
|
+
}
|
|
130439
|
+
};
|
|
130440
|
+
__makeTemplateObject = function(cooked, raw) {
|
|
130441
|
+
if (Object.defineProperty) {
|
|
130442
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
130443
|
+
} else {
|
|
130444
|
+
cooked.raw = raw;
|
|
130445
|
+
}
|
|
130446
|
+
return cooked;
|
|
130447
|
+
};
|
|
130448
|
+
var __setModuleDefault = Object.create ? function(o, v) {
|
|
130449
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
130450
|
+
} : function(o, v) {
|
|
130451
|
+
o["default"] = v;
|
|
130452
|
+
};
|
|
130453
|
+
var ownKeys2 = function(o) {
|
|
130454
|
+
ownKeys2 = Object.getOwnPropertyNames || function(o2) {
|
|
130455
|
+
var ar = [];
|
|
130456
|
+
for (var k in o2)
|
|
130457
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
130458
|
+
ar[ar.length] = k;
|
|
130459
|
+
return ar;
|
|
130460
|
+
};
|
|
130461
|
+
return ownKeys2(o);
|
|
130462
|
+
};
|
|
130463
|
+
__importStar = function(mod2) {
|
|
130464
|
+
if (mod2 && mod2.__esModule)
|
|
130465
|
+
return mod2;
|
|
130466
|
+
var result = {};
|
|
130467
|
+
if (mod2 != null) {
|
|
130468
|
+
for (var k = ownKeys2(mod2), i2 = 0;i2 < k.length; i2++)
|
|
130469
|
+
if (k[i2] !== "default")
|
|
130470
|
+
__createBinding(result, mod2, k[i2]);
|
|
130471
|
+
}
|
|
130472
|
+
__setModuleDefault(result, mod2);
|
|
130473
|
+
return result;
|
|
130474
|
+
};
|
|
130475
|
+
__importDefault = function(mod2) {
|
|
130476
|
+
return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
|
|
130477
|
+
};
|
|
130478
|
+
__classPrivateFieldGet = function(receiver, state, kind, f3) {
|
|
130479
|
+
if (kind === "a" && !f3)
|
|
130480
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
130481
|
+
if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver))
|
|
130482
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
130483
|
+
return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver);
|
|
130484
|
+
};
|
|
130485
|
+
__classPrivateFieldSet = function(receiver, state, value, kind, f3) {
|
|
130486
|
+
if (kind === "m")
|
|
130487
|
+
throw new TypeError("Private method is not writable");
|
|
130488
|
+
if (kind === "a" && !f3)
|
|
130489
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
130490
|
+
if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver))
|
|
130491
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
130492
|
+
return kind === "a" ? f3.call(receiver, value) : f3 ? f3.value = value : state.set(receiver, value), value;
|
|
130493
|
+
};
|
|
130494
|
+
__classPrivateFieldIn = function(state, receiver) {
|
|
130495
|
+
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
|
|
130496
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
130497
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
130498
|
+
};
|
|
130499
|
+
__addDisposableResource = function(env, value, async) {
|
|
130500
|
+
if (value !== null && value !== undefined) {
|
|
130501
|
+
if (typeof value !== "object" && typeof value !== "function")
|
|
130502
|
+
throw new TypeError("Object expected.");
|
|
130503
|
+
var dispose, inner;
|
|
130504
|
+
if (async) {
|
|
130505
|
+
if (!Symbol.asyncDispose)
|
|
130506
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
130507
|
+
dispose = value[Symbol.asyncDispose];
|
|
130508
|
+
}
|
|
130509
|
+
if (dispose === undefined) {
|
|
130510
|
+
if (!Symbol.dispose)
|
|
130511
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
130512
|
+
dispose = value[Symbol.dispose];
|
|
130513
|
+
if (async)
|
|
130514
|
+
inner = dispose;
|
|
130515
|
+
}
|
|
130516
|
+
if (typeof dispose !== "function")
|
|
130517
|
+
throw new TypeError("Object not disposable.");
|
|
130518
|
+
if (inner)
|
|
130519
|
+
dispose = function() {
|
|
130520
|
+
try {
|
|
130521
|
+
inner.call(this);
|
|
130522
|
+
} catch (e2) {
|
|
130523
|
+
return Promise.reject(e2);
|
|
130524
|
+
}
|
|
130525
|
+
};
|
|
130526
|
+
env.stack.push({ value, dispose, async });
|
|
130527
|
+
} else if (async) {
|
|
130528
|
+
env.stack.push({ async: true });
|
|
130529
|
+
}
|
|
130530
|
+
return value;
|
|
130531
|
+
};
|
|
130532
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error48, suppressed, message) {
|
|
130533
|
+
var e2 = new Error(message);
|
|
130534
|
+
return e2.name = "SuppressedError", e2.error = error48, e2.suppressed = suppressed, e2;
|
|
130535
|
+
};
|
|
130536
|
+
__disposeResources = function(env) {
|
|
130537
|
+
function fail(e2) {
|
|
130538
|
+
env.error = env.hasError ? new _SuppressedError(e2, env.error, "An error was suppressed during disposal.") : e2;
|
|
130539
|
+
env.hasError = true;
|
|
130540
|
+
}
|
|
130541
|
+
var r2, s2 = 0;
|
|
130542
|
+
function next() {
|
|
130543
|
+
while (r2 = env.stack.pop()) {
|
|
130544
|
+
try {
|
|
130545
|
+
if (!r2.async && s2 === 1)
|
|
130546
|
+
return s2 = 0, env.stack.push(r2), Promise.resolve().then(next);
|
|
130547
|
+
if (r2.dispose) {
|
|
130548
|
+
var result = r2.dispose.call(r2.value);
|
|
130549
|
+
if (r2.async)
|
|
130550
|
+
return s2 |= 2, Promise.resolve(result).then(next, function(e2) {
|
|
130551
|
+
fail(e2);
|
|
130552
|
+
return next();
|
|
130553
|
+
});
|
|
130554
|
+
} else
|
|
130555
|
+
s2 |= 1;
|
|
130556
|
+
} catch (e2) {
|
|
130557
|
+
fail(e2);
|
|
130558
|
+
}
|
|
130559
|
+
}
|
|
130560
|
+
if (s2 === 1)
|
|
130561
|
+
return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
130562
|
+
if (env.hasError)
|
|
130563
|
+
throw env.error;
|
|
130564
|
+
}
|
|
130565
|
+
return next();
|
|
130566
|
+
};
|
|
130567
|
+
__rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
130568
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
130569
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m2, tsx, d, ext, cm) {
|
|
130570
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m2 : d + ext + "." + cm.toLowerCase() + "js";
|
|
130571
|
+
});
|
|
130572
|
+
}
|
|
130573
|
+
return path;
|
|
130574
|
+
};
|
|
130575
|
+
exporter("__extends", __extends);
|
|
130576
|
+
exporter("__assign", __assign);
|
|
130577
|
+
exporter("__rest", __rest);
|
|
130578
|
+
exporter("__decorate", __decorate);
|
|
130579
|
+
exporter("__param", __param);
|
|
130580
|
+
exporter("__esDecorate", __esDecorate);
|
|
130581
|
+
exporter("__runInitializers", __runInitializers);
|
|
130582
|
+
exporter("__propKey", __propKey);
|
|
130583
|
+
exporter("__setFunctionName", __setFunctionName);
|
|
130584
|
+
exporter("__metadata", __metadata);
|
|
130585
|
+
exporter("__awaiter", __awaiter);
|
|
130586
|
+
exporter("__generator", __generator);
|
|
130587
|
+
exporter("__exportStar", __exportStar);
|
|
130588
|
+
exporter("__createBinding", __createBinding);
|
|
130589
|
+
exporter("__values", __values);
|
|
130590
|
+
exporter("__read", __read);
|
|
130591
|
+
exporter("__spread", __spread);
|
|
130592
|
+
exporter("__spreadArrays", __spreadArrays);
|
|
130593
|
+
exporter("__spreadArray", __spreadArray);
|
|
130594
|
+
exporter("__await", __await);
|
|
130595
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
|
130596
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
|
130597
|
+
exporter("__asyncValues", __asyncValues);
|
|
130598
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
130599
|
+
exporter("__importStar", __importStar);
|
|
130600
|
+
exporter("__importDefault", __importDefault);
|
|
130601
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
130602
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
130603
|
+
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
|
130604
|
+
exporter("__addDisposableResource", __addDisposableResource);
|
|
130605
|
+
exporter("__disposeResources", __disposeResources);
|
|
130606
|
+
exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
|
|
130607
|
+
});
|
|
130608
|
+
});
|
|
130609
|
+
|
|
130005
130610
|
// node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js
|
|
130006
130611
|
var require_websocket_factory = __commonJS((exports) => {
|
|
130007
130612
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -130099,7 +130704,7 @@ Suggested solution: ${env.workaround}`;
|
|
|
130099
130704
|
var require_version62 = __commonJS((exports) => {
|
|
130100
130705
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
130101
130706
|
exports.version = undefined;
|
|
130102
|
-
exports.version = "2.
|
|
130707
|
+
exports.version = "2.96.0";
|
|
130103
130708
|
});
|
|
130104
130709
|
|
|
130105
130710
|
// node_modules/@supabase/realtime-js/dist/main/lib/constants.js
|
|
@@ -130765,7 +131370,7 @@ var require_RealtimePresence = __commonJS((exports) => {
|
|
|
130765
131370
|
var require_RealtimeChannel = __commonJS((exports) => {
|
|
130766
131371
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
130767
131372
|
exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_LISTEN_TYPES = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = undefined;
|
|
130768
|
-
var tslib_1 =
|
|
131373
|
+
var tslib_1 = require_tslib2();
|
|
130769
131374
|
var constants_1 = require_constants26();
|
|
130770
131375
|
var push_1 = tslib_1.__importDefault(require_push());
|
|
130771
131376
|
var timer_1 = tslib_1.__importDefault(require_timer());
|
|
@@ -131260,7 +131865,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
|
|
|
131260
131865
|
// node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js
|
|
131261
131866
|
var require_RealtimeClient = __commonJS((exports) => {
|
|
131262
131867
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
131263
|
-
var tslib_1 =
|
|
131868
|
+
var tslib_1 = require_tslib2();
|
|
131264
131869
|
var websocket_factory_1 = tslib_1.__importDefault(require_websocket_factory());
|
|
131265
131870
|
var constants_1 = require_constants26();
|
|
131266
131871
|
var serializer_1 = tslib_1.__importDefault(require_serializer());
|
|
@@ -131403,9 +132008,6 @@ var require_RealtimeClient = __commonJS((exports) => {
|
|
|
131403
132008
|
}
|
|
131404
132009
|
async removeChannel(channel) {
|
|
131405
132010
|
const status = await channel.unsubscribe();
|
|
131406
|
-
if (status === "ok") {
|
|
131407
|
-
this._remove(channel);
|
|
131408
|
-
}
|
|
131409
132011
|
if (this.channels.length === 0) {
|
|
131410
132012
|
this.disconnect();
|
|
131411
132013
|
}
|
|
@@ -131467,413 +132069,1018 @@ var require_RealtimeClient = __commonJS((exports) => {
|
|
|
131467
132069
|
this.sendBuffer.push(callback);
|
|
131468
132070
|
}
|
|
131469
132071
|
}
|
|
131470
|
-
async setAuth(token = null) {
|
|
131471
|
-
this._authPromise = this._performAuth(token);
|
|
131472
|
-
try {
|
|
131473
|
-
await this._authPromise;
|
|
131474
|
-
} finally {
|
|
131475
|
-
this._authPromise = null;
|
|
132072
|
+
async setAuth(token = null) {
|
|
132073
|
+
this._authPromise = this._performAuth(token);
|
|
132074
|
+
try {
|
|
132075
|
+
await this._authPromise;
|
|
132076
|
+
} finally {
|
|
132077
|
+
this._authPromise = null;
|
|
132078
|
+
}
|
|
132079
|
+
}
|
|
132080
|
+
_isManualToken() {
|
|
132081
|
+
return this._manuallySetToken;
|
|
132082
|
+
}
|
|
132083
|
+
async sendHeartbeat() {
|
|
132084
|
+
var _a2;
|
|
132085
|
+
if (!this.isConnected()) {
|
|
132086
|
+
try {
|
|
132087
|
+
this.heartbeatCallback("disconnected");
|
|
132088
|
+
} catch (e2) {
|
|
132089
|
+
this.log("error", "error in heartbeat callback", e2);
|
|
132090
|
+
}
|
|
132091
|
+
return;
|
|
132092
|
+
}
|
|
132093
|
+
if (this.pendingHeartbeatRef) {
|
|
132094
|
+
this.pendingHeartbeatRef = null;
|
|
132095
|
+
this._heartbeatSentAt = null;
|
|
132096
|
+
this.log("transport", "heartbeat timeout. Attempting to re-establish connection");
|
|
132097
|
+
try {
|
|
132098
|
+
this.heartbeatCallback("timeout");
|
|
132099
|
+
} catch (e2) {
|
|
132100
|
+
this.log("error", "error in heartbeat callback", e2);
|
|
132101
|
+
}
|
|
132102
|
+
this._wasManualDisconnect = false;
|
|
132103
|
+
(_a2 = this.conn) === null || _a2 === undefined || _a2.close(constants_1.WS_CLOSE_NORMAL, "heartbeat timeout");
|
|
132104
|
+
setTimeout(() => {
|
|
132105
|
+
var _a3;
|
|
132106
|
+
if (!this.isConnected()) {
|
|
132107
|
+
(_a3 = this.reconnectTimer) === null || _a3 === undefined || _a3.scheduleTimeout();
|
|
132108
|
+
}
|
|
132109
|
+
}, CONNECTION_TIMEOUTS.HEARTBEAT_TIMEOUT_FALLBACK);
|
|
132110
|
+
return;
|
|
132111
|
+
}
|
|
132112
|
+
this._heartbeatSentAt = Date.now();
|
|
132113
|
+
this.pendingHeartbeatRef = this._makeRef();
|
|
132114
|
+
this.push({
|
|
132115
|
+
topic: "phoenix",
|
|
132116
|
+
event: "heartbeat",
|
|
132117
|
+
payload: {},
|
|
132118
|
+
ref: this.pendingHeartbeatRef
|
|
132119
|
+
});
|
|
132120
|
+
try {
|
|
132121
|
+
this.heartbeatCallback("sent");
|
|
132122
|
+
} catch (e2) {
|
|
132123
|
+
this.log("error", "error in heartbeat callback", e2);
|
|
132124
|
+
}
|
|
132125
|
+
this._setAuthSafely("heartbeat");
|
|
132126
|
+
}
|
|
132127
|
+
onHeartbeat(callback) {
|
|
132128
|
+
this.heartbeatCallback = callback;
|
|
132129
|
+
}
|
|
132130
|
+
flushSendBuffer() {
|
|
132131
|
+
if (this.isConnected() && this.sendBuffer.length > 0) {
|
|
132132
|
+
this.sendBuffer.forEach((callback) => callback());
|
|
132133
|
+
this.sendBuffer = [];
|
|
132134
|
+
}
|
|
132135
|
+
}
|
|
132136
|
+
_makeRef() {
|
|
132137
|
+
let newRef = this.ref + 1;
|
|
132138
|
+
if (newRef === this.ref) {
|
|
132139
|
+
this.ref = 0;
|
|
132140
|
+
} else {
|
|
132141
|
+
this.ref = newRef;
|
|
132142
|
+
}
|
|
132143
|
+
return this.ref.toString();
|
|
132144
|
+
}
|
|
132145
|
+
_leaveOpenTopic(topic) {
|
|
132146
|
+
let dupChannel = this.channels.find((c) => c.topic === topic && (c._isJoined() || c._isJoining()));
|
|
132147
|
+
if (dupChannel) {
|
|
132148
|
+
this.log("transport", `leaving duplicate topic "${topic}"`);
|
|
132149
|
+
dupChannel.unsubscribe();
|
|
132150
|
+
}
|
|
132151
|
+
}
|
|
132152
|
+
_remove(channel) {
|
|
132153
|
+
this.channels = this.channels.filter((c) => c.topic !== channel.topic);
|
|
132154
|
+
}
|
|
132155
|
+
_onConnMessage(rawMessage) {
|
|
132156
|
+
this.decode(rawMessage.data, (msg) => {
|
|
132157
|
+
if (msg.topic === "phoenix" && msg.event === "phx_reply" && msg.ref && msg.ref === this.pendingHeartbeatRef) {
|
|
132158
|
+
const latency = this._heartbeatSentAt ? Date.now() - this._heartbeatSentAt : undefined;
|
|
132159
|
+
try {
|
|
132160
|
+
this.heartbeatCallback(msg.payload.status === "ok" ? "ok" : "error", latency);
|
|
132161
|
+
} catch (e2) {
|
|
132162
|
+
this.log("error", "error in heartbeat callback", e2);
|
|
132163
|
+
}
|
|
132164
|
+
this._heartbeatSentAt = null;
|
|
132165
|
+
this.pendingHeartbeatRef = null;
|
|
132166
|
+
}
|
|
132167
|
+
const { topic, event, payload, ref } = msg;
|
|
132168
|
+
const refString = ref ? `(${ref})` : "";
|
|
132169
|
+
const status = payload.status || "";
|
|
132170
|
+
this.log("receive", `${status} ${topic} ${event} ${refString}`.trim(), payload);
|
|
132171
|
+
this.channels.filter((channel) => channel._isMember(topic)).forEach((channel) => channel._trigger(event, payload, ref));
|
|
132172
|
+
this._triggerStateCallbacks("message", msg);
|
|
132173
|
+
});
|
|
132174
|
+
}
|
|
132175
|
+
_clearTimer(timer) {
|
|
132176
|
+
var _a2;
|
|
132177
|
+
if (timer === "heartbeat" && this.heartbeatTimer) {
|
|
132178
|
+
clearInterval(this.heartbeatTimer);
|
|
132179
|
+
this.heartbeatTimer = undefined;
|
|
132180
|
+
} else if (timer === "reconnect") {
|
|
132181
|
+
(_a2 = this.reconnectTimer) === null || _a2 === undefined || _a2.reset();
|
|
132182
|
+
}
|
|
132183
|
+
}
|
|
132184
|
+
_clearAllTimers() {
|
|
132185
|
+
this._clearTimer("heartbeat");
|
|
132186
|
+
this._clearTimer("reconnect");
|
|
132187
|
+
}
|
|
132188
|
+
_setupConnectionHandlers() {
|
|
132189
|
+
if (!this.conn)
|
|
132190
|
+
return;
|
|
132191
|
+
if ("binaryType" in this.conn) {
|
|
132192
|
+
this.conn.binaryType = "arraybuffer";
|
|
132193
|
+
}
|
|
132194
|
+
this.conn.onopen = () => this._onConnOpen();
|
|
132195
|
+
this.conn.onerror = (error48) => this._onConnError(error48);
|
|
132196
|
+
this.conn.onmessage = (event) => this._onConnMessage(event);
|
|
132197
|
+
this.conn.onclose = (event) => this._onConnClose(event);
|
|
132198
|
+
if (this.conn.readyState === constants_1.SOCKET_STATES.open) {
|
|
132199
|
+
this._onConnOpen();
|
|
132200
|
+
}
|
|
132201
|
+
}
|
|
132202
|
+
_teardownConnection() {
|
|
132203
|
+
if (this.conn) {
|
|
132204
|
+
if (this.conn.readyState === constants_1.SOCKET_STATES.open || this.conn.readyState === constants_1.SOCKET_STATES.connecting) {
|
|
132205
|
+
try {
|
|
132206
|
+
this.conn.close();
|
|
132207
|
+
} catch (e2) {
|
|
132208
|
+
this.log("error", "Error closing connection", e2);
|
|
132209
|
+
}
|
|
132210
|
+
}
|
|
132211
|
+
this.conn.onopen = null;
|
|
132212
|
+
this.conn.onerror = null;
|
|
132213
|
+
this.conn.onmessage = null;
|
|
132214
|
+
this.conn.onclose = null;
|
|
132215
|
+
this.conn = null;
|
|
132216
|
+
}
|
|
132217
|
+
this._clearAllTimers();
|
|
132218
|
+
this._terminateWorker();
|
|
132219
|
+
this.channels.forEach((channel) => channel.teardown());
|
|
132220
|
+
}
|
|
132221
|
+
_onConnOpen() {
|
|
132222
|
+
this._setConnectionState("connected");
|
|
132223
|
+
this.log("transport", `connected to ${this.endpointURL()}`);
|
|
132224
|
+
const authPromise = this._authPromise || (this.accessToken && !this.accessTokenValue ? this.setAuth() : Promise.resolve());
|
|
132225
|
+
authPromise.then(() => {
|
|
132226
|
+
this.flushSendBuffer();
|
|
132227
|
+
}).catch((e2) => {
|
|
132228
|
+
this.log("error", "error waiting for auth on connect", e2);
|
|
132229
|
+
this.flushSendBuffer();
|
|
132230
|
+
});
|
|
132231
|
+
this._clearTimer("reconnect");
|
|
132232
|
+
if (!this.worker) {
|
|
132233
|
+
this._startHeartbeat();
|
|
132234
|
+
} else {
|
|
132235
|
+
if (!this.workerRef) {
|
|
132236
|
+
this._startWorkerHeartbeat();
|
|
132237
|
+
}
|
|
132238
|
+
}
|
|
132239
|
+
this._triggerStateCallbacks("open");
|
|
132240
|
+
}
|
|
132241
|
+
_startHeartbeat() {
|
|
132242
|
+
this.heartbeatTimer && clearInterval(this.heartbeatTimer);
|
|
132243
|
+
this.heartbeatTimer = setInterval(() => this.sendHeartbeat(), this.heartbeatIntervalMs);
|
|
132244
|
+
}
|
|
132245
|
+
_startWorkerHeartbeat() {
|
|
132246
|
+
if (this.workerUrl) {
|
|
132247
|
+
this.log("worker", `starting worker for from ${this.workerUrl}`);
|
|
132248
|
+
} else {
|
|
132249
|
+
this.log("worker", `starting default worker`);
|
|
132250
|
+
}
|
|
132251
|
+
const objectUrl = this._workerObjectUrl(this.workerUrl);
|
|
132252
|
+
this.workerRef = new Worker(objectUrl);
|
|
132253
|
+
this.workerRef.onerror = (error48) => {
|
|
132254
|
+
this.log("worker", "worker error", error48.message);
|
|
132255
|
+
this._terminateWorker();
|
|
132256
|
+
};
|
|
132257
|
+
this.workerRef.onmessage = (event) => {
|
|
132258
|
+
if (event.data.event === "keepAlive") {
|
|
132259
|
+
this.sendHeartbeat();
|
|
132260
|
+
}
|
|
132261
|
+
};
|
|
132262
|
+
this.workerRef.postMessage({
|
|
132263
|
+
event: "start",
|
|
132264
|
+
interval: this.heartbeatIntervalMs
|
|
132265
|
+
});
|
|
132266
|
+
}
|
|
132267
|
+
_terminateWorker() {
|
|
132268
|
+
if (this.workerRef) {
|
|
132269
|
+
this.log("worker", "terminating worker");
|
|
132270
|
+
this.workerRef.terminate();
|
|
132271
|
+
this.workerRef = undefined;
|
|
132272
|
+
}
|
|
132273
|
+
}
|
|
132274
|
+
_onConnClose(event) {
|
|
132275
|
+
var _a2;
|
|
132276
|
+
this._setConnectionState("disconnected");
|
|
132277
|
+
this.log("transport", "close", event);
|
|
132278
|
+
this._triggerChanError();
|
|
132279
|
+
this._clearTimer("heartbeat");
|
|
132280
|
+
if (!this._wasManualDisconnect) {
|
|
132281
|
+
(_a2 = this.reconnectTimer) === null || _a2 === undefined || _a2.scheduleTimeout();
|
|
132282
|
+
}
|
|
132283
|
+
this._triggerStateCallbacks("close", event);
|
|
132284
|
+
}
|
|
132285
|
+
_onConnError(error48) {
|
|
132286
|
+
this._setConnectionState("disconnected");
|
|
132287
|
+
this.log("transport", `${error48}`);
|
|
132288
|
+
this._triggerChanError();
|
|
132289
|
+
this._triggerStateCallbacks("error", error48);
|
|
132290
|
+
try {
|
|
132291
|
+
this.heartbeatCallback("error");
|
|
132292
|
+
} catch (e2) {
|
|
132293
|
+
this.log("error", "error in heartbeat callback", e2);
|
|
132294
|
+
}
|
|
132295
|
+
}
|
|
132296
|
+
_triggerChanError() {
|
|
132297
|
+
this.channels.forEach((channel) => channel._trigger(constants_1.CHANNEL_EVENTS.error));
|
|
132298
|
+
}
|
|
132299
|
+
_appendParams(url2, params) {
|
|
132300
|
+
if (Object.keys(params).length === 0) {
|
|
132301
|
+
return url2;
|
|
132302
|
+
}
|
|
132303
|
+
const prefix = url2.match(/\?/) ? "&" : "?";
|
|
132304
|
+
const query = new URLSearchParams(params);
|
|
132305
|
+
return `${url2}${prefix}${query}`;
|
|
132306
|
+
}
|
|
132307
|
+
_workerObjectUrl(url2) {
|
|
132308
|
+
let result_url;
|
|
132309
|
+
if (url2) {
|
|
132310
|
+
result_url = url2;
|
|
132311
|
+
} else {
|
|
132312
|
+
const blob = new Blob([WORKER_SCRIPT], { type: "application/javascript" });
|
|
132313
|
+
result_url = URL.createObjectURL(blob);
|
|
132314
|
+
}
|
|
132315
|
+
return result_url;
|
|
132316
|
+
}
|
|
132317
|
+
_setConnectionState(state, manual = false) {
|
|
132318
|
+
this._connectionState = state;
|
|
132319
|
+
if (state === "connecting") {
|
|
132320
|
+
this._wasManualDisconnect = false;
|
|
132321
|
+
} else if (state === "disconnecting") {
|
|
132322
|
+
this._wasManualDisconnect = manual;
|
|
132323
|
+
}
|
|
132324
|
+
}
|
|
132325
|
+
async _performAuth(token = null) {
|
|
132326
|
+
let tokenToSend;
|
|
132327
|
+
let isManualToken = false;
|
|
132328
|
+
if (token) {
|
|
132329
|
+
tokenToSend = token;
|
|
132330
|
+
isManualToken = true;
|
|
132331
|
+
} else if (this.accessToken) {
|
|
132332
|
+
try {
|
|
132333
|
+
tokenToSend = await this.accessToken();
|
|
132334
|
+
} catch (e2) {
|
|
132335
|
+
this.log("error", "Error fetching access token from callback", e2);
|
|
132336
|
+
tokenToSend = this.accessTokenValue;
|
|
132337
|
+
}
|
|
132338
|
+
} else {
|
|
132339
|
+
tokenToSend = this.accessTokenValue;
|
|
132340
|
+
}
|
|
132341
|
+
if (isManualToken) {
|
|
132342
|
+
this._manuallySetToken = true;
|
|
132343
|
+
} else if (this.accessToken) {
|
|
132344
|
+
this._manuallySetToken = false;
|
|
132345
|
+
}
|
|
132346
|
+
if (this.accessTokenValue != tokenToSend) {
|
|
132347
|
+
this.accessTokenValue = tokenToSend;
|
|
132348
|
+
this.channels.forEach((channel) => {
|
|
132349
|
+
const payload = {
|
|
132350
|
+
access_token: tokenToSend,
|
|
132351
|
+
version: constants_1.DEFAULT_VERSION
|
|
132352
|
+
};
|
|
132353
|
+
tokenToSend && channel.updateJoinPayload(payload);
|
|
132354
|
+
if (channel.joinedOnce && channel._isJoined()) {
|
|
132355
|
+
channel._push(constants_1.CHANNEL_EVENTS.access_token, {
|
|
132356
|
+
access_token: tokenToSend
|
|
132357
|
+
});
|
|
132358
|
+
}
|
|
132359
|
+
});
|
|
132360
|
+
}
|
|
132361
|
+
}
|
|
132362
|
+
async _waitForAuthIfNeeded() {
|
|
132363
|
+
if (this._authPromise) {
|
|
132364
|
+
await this._authPromise;
|
|
132365
|
+
}
|
|
132366
|
+
}
|
|
132367
|
+
_setAuthSafely(context = "general") {
|
|
132368
|
+
if (!this._isManualToken()) {
|
|
132369
|
+
this.setAuth().catch((e2) => {
|
|
132370
|
+
this.log("error", `Error setting auth in ${context}`, e2);
|
|
132371
|
+
});
|
|
132372
|
+
}
|
|
132373
|
+
}
|
|
132374
|
+
_triggerStateCallbacks(event, data) {
|
|
132375
|
+
try {
|
|
132376
|
+
this.stateChangeCallbacks[event].forEach((callback) => {
|
|
132377
|
+
try {
|
|
132378
|
+
callback(data);
|
|
132379
|
+
} catch (e2) {
|
|
132380
|
+
this.log("error", `error in ${event} callback`, e2);
|
|
132381
|
+
}
|
|
132382
|
+
});
|
|
132383
|
+
} catch (e2) {
|
|
132384
|
+
this.log("error", `error triggering ${event} callbacks`, e2);
|
|
132385
|
+
}
|
|
132386
|
+
}
|
|
132387
|
+
_setupReconnectionTimer() {
|
|
132388
|
+
this.reconnectTimer = new timer_1.default(async () => {
|
|
132389
|
+
setTimeout(async () => {
|
|
132390
|
+
await this._waitForAuthIfNeeded();
|
|
132391
|
+
if (!this.isConnected()) {
|
|
132392
|
+
this.connect();
|
|
132393
|
+
}
|
|
132394
|
+
}, CONNECTION_TIMEOUTS.RECONNECT_DELAY);
|
|
132395
|
+
}, this.reconnectAfterMs);
|
|
132396
|
+
}
|
|
132397
|
+
_initializeOptions(options) {
|
|
132398
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
132399
|
+
this.transport = (_a2 = options === null || options === undefined ? undefined : options.transport) !== null && _a2 !== undefined ? _a2 : null;
|
|
132400
|
+
this.timeout = (_b = options === null || options === undefined ? undefined : options.timeout) !== null && _b !== undefined ? _b : constants_1.DEFAULT_TIMEOUT;
|
|
132401
|
+
this.heartbeatIntervalMs = (_c = options === null || options === undefined ? undefined : options.heartbeatIntervalMs) !== null && _c !== undefined ? _c : CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL;
|
|
132402
|
+
this.worker = (_d = options === null || options === undefined ? undefined : options.worker) !== null && _d !== undefined ? _d : false;
|
|
132403
|
+
this.accessToken = (_e = options === null || options === undefined ? undefined : options.accessToken) !== null && _e !== undefined ? _e : null;
|
|
132404
|
+
this.heartbeatCallback = (_f = options === null || options === undefined ? undefined : options.heartbeatCallback) !== null && _f !== undefined ? _f : noop2;
|
|
132405
|
+
this.vsn = (_g = options === null || options === undefined ? undefined : options.vsn) !== null && _g !== undefined ? _g : constants_1.DEFAULT_VSN;
|
|
132406
|
+
if (options === null || options === undefined ? undefined : options.params)
|
|
132407
|
+
this.params = options.params;
|
|
132408
|
+
if (options === null || options === undefined ? undefined : options.logger)
|
|
132409
|
+
this.logger = options.logger;
|
|
132410
|
+
if ((options === null || options === undefined ? undefined : options.logLevel) || (options === null || options === undefined ? undefined : options.log_level)) {
|
|
132411
|
+
this.logLevel = options.logLevel || options.log_level;
|
|
132412
|
+
this.params = Object.assign(Object.assign({}, this.params), { log_level: this.logLevel });
|
|
132413
|
+
}
|
|
132414
|
+
this.reconnectAfterMs = (_h = options === null || options === undefined ? undefined : options.reconnectAfterMs) !== null && _h !== undefined ? _h : (tries) => {
|
|
132415
|
+
return RECONNECT_INTERVALS[tries - 1] || DEFAULT_RECONNECT_FALLBACK;
|
|
132416
|
+
};
|
|
132417
|
+
switch (this.vsn) {
|
|
132418
|
+
case constants_1.VSN_1_0_0:
|
|
132419
|
+
this.encode = (_j = options === null || options === undefined ? undefined : options.encode) !== null && _j !== undefined ? _j : (payload, callback) => {
|
|
132420
|
+
return callback(JSON.stringify(payload));
|
|
132421
|
+
};
|
|
132422
|
+
this.decode = (_k = options === null || options === undefined ? undefined : options.decode) !== null && _k !== undefined ? _k : (payload, callback) => {
|
|
132423
|
+
return callback(JSON.parse(payload));
|
|
132424
|
+
};
|
|
132425
|
+
break;
|
|
132426
|
+
case constants_1.VSN_2_0_0:
|
|
132427
|
+
this.encode = (_l = options === null || options === undefined ? undefined : options.encode) !== null && _l !== undefined ? _l : this.serializer.encode.bind(this.serializer);
|
|
132428
|
+
this.decode = (_m = options === null || options === undefined ? undefined : options.decode) !== null && _m !== undefined ? _m : this.serializer.decode.bind(this.serializer);
|
|
132429
|
+
break;
|
|
132430
|
+
default:
|
|
132431
|
+
throw new Error(`Unsupported serializer version: ${this.vsn}`);
|
|
132432
|
+
}
|
|
132433
|
+
if (this.worker) {
|
|
132434
|
+
if (typeof window !== "undefined" && !window.Worker) {
|
|
132435
|
+
throw new Error("Web Worker is not supported");
|
|
132436
|
+
}
|
|
132437
|
+
this.workerUrl = options === null || options === undefined ? undefined : options.workerUrl;
|
|
132438
|
+
}
|
|
132439
|
+
}
|
|
132440
|
+
}
|
|
132441
|
+
exports.default = RealtimeClient;
|
|
132442
|
+
});
|
|
132443
|
+
|
|
132444
|
+
// node_modules/@supabase/realtime-js/dist/main/index.js
|
|
132445
|
+
var require_main3 = __commonJS((exports) => {
|
|
132446
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
132447
|
+
exports.WebSocketFactory = exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_PRESENCE_LISTEN_EVENTS = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.REALTIME_LISTEN_TYPES = exports.RealtimeClient = exports.RealtimeChannel = exports.RealtimePresence = undefined;
|
|
132448
|
+
var tslib_1 = require_tslib2();
|
|
132449
|
+
var RealtimeClient_1 = tslib_1.__importDefault(require_RealtimeClient());
|
|
132450
|
+
exports.RealtimeClient = RealtimeClient_1.default;
|
|
132451
|
+
var RealtimeChannel_1 = tslib_1.__importStar(require_RealtimeChannel());
|
|
132452
|
+
exports.RealtimeChannel = RealtimeChannel_1.default;
|
|
132453
|
+
Object.defineProperty(exports, "REALTIME_LISTEN_TYPES", { enumerable: true, get: function() {
|
|
132454
|
+
return RealtimeChannel_1.REALTIME_LISTEN_TYPES;
|
|
132455
|
+
} });
|
|
132456
|
+
Object.defineProperty(exports, "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT", { enumerable: true, get: function() {
|
|
132457
|
+
return RealtimeChannel_1.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
|
|
132458
|
+
} });
|
|
132459
|
+
Object.defineProperty(exports, "REALTIME_SUBSCRIBE_STATES", { enumerable: true, get: function() {
|
|
132460
|
+
return RealtimeChannel_1.REALTIME_SUBSCRIBE_STATES;
|
|
132461
|
+
} });
|
|
132462
|
+
Object.defineProperty(exports, "REALTIME_CHANNEL_STATES", { enumerable: true, get: function() {
|
|
132463
|
+
return RealtimeChannel_1.REALTIME_CHANNEL_STATES;
|
|
132464
|
+
} });
|
|
132465
|
+
var RealtimePresence_1 = tslib_1.__importStar(require_RealtimePresence());
|
|
132466
|
+
exports.RealtimePresence = RealtimePresence_1.default;
|
|
132467
|
+
Object.defineProperty(exports, "REALTIME_PRESENCE_LISTEN_EVENTS", { enumerable: true, get: function() {
|
|
132468
|
+
return RealtimePresence_1.REALTIME_PRESENCE_LISTEN_EVENTS;
|
|
132469
|
+
} });
|
|
132470
|
+
var websocket_factory_1 = tslib_1.__importDefault(require_websocket_factory());
|
|
132471
|
+
exports.WebSocketFactory = websocket_factory_1.default;
|
|
132472
|
+
});
|
|
132473
|
+
|
|
132474
|
+
// node_modules/@supabase/auth-js/node_modules/tslib/tslib.js
|
|
132475
|
+
var require_tslib3 = __commonJS((exports, module) => {
|
|
132476
|
+
var __extends;
|
|
132477
|
+
var __assign;
|
|
132478
|
+
var __rest;
|
|
132479
|
+
var __decorate;
|
|
132480
|
+
var __param;
|
|
132481
|
+
var __esDecorate;
|
|
132482
|
+
var __runInitializers;
|
|
132483
|
+
var __propKey;
|
|
132484
|
+
var __setFunctionName;
|
|
132485
|
+
var __metadata;
|
|
132486
|
+
var __awaiter;
|
|
132487
|
+
var __generator;
|
|
132488
|
+
var __exportStar;
|
|
132489
|
+
var __values;
|
|
132490
|
+
var __read;
|
|
132491
|
+
var __spread;
|
|
132492
|
+
var __spreadArrays;
|
|
132493
|
+
var __spreadArray;
|
|
132494
|
+
var __await;
|
|
132495
|
+
var __asyncGenerator;
|
|
132496
|
+
var __asyncDelegator;
|
|
132497
|
+
var __asyncValues;
|
|
132498
|
+
var __makeTemplateObject;
|
|
132499
|
+
var __importStar;
|
|
132500
|
+
var __importDefault;
|
|
132501
|
+
var __classPrivateFieldGet;
|
|
132502
|
+
var __classPrivateFieldSet;
|
|
132503
|
+
var __classPrivateFieldIn;
|
|
132504
|
+
var __createBinding;
|
|
132505
|
+
var __addDisposableResource;
|
|
132506
|
+
var __disposeResources;
|
|
132507
|
+
var __rewriteRelativeImportExtension;
|
|
132508
|
+
(function(factory) {
|
|
132509
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
132510
|
+
if (typeof define === "function" && define.amd) {
|
|
132511
|
+
define("tslib", ["exports"], function(exports2) {
|
|
132512
|
+
factory(createExporter(root, createExporter(exports2)));
|
|
132513
|
+
});
|
|
132514
|
+
} else if (typeof module === "object" && typeof exports === "object") {
|
|
132515
|
+
factory(createExporter(root, createExporter(exports)));
|
|
132516
|
+
} else {
|
|
132517
|
+
factory(createExporter(root));
|
|
132518
|
+
}
|
|
132519
|
+
function createExporter(exports2, previous) {
|
|
132520
|
+
if (exports2 !== root) {
|
|
132521
|
+
if (typeof Object.create === "function") {
|
|
132522
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
132523
|
+
} else {
|
|
132524
|
+
exports2.__esModule = true;
|
|
132525
|
+
}
|
|
132526
|
+
}
|
|
132527
|
+
return function(id, v) {
|
|
132528
|
+
return exports2[id] = previous ? previous(id, v) : v;
|
|
132529
|
+
};
|
|
132530
|
+
}
|
|
132531
|
+
})(function(exporter) {
|
|
132532
|
+
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
132533
|
+
d.__proto__ = b;
|
|
132534
|
+
} || function(d, b) {
|
|
132535
|
+
for (var p in b)
|
|
132536
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
132537
|
+
d[p] = b[p];
|
|
132538
|
+
};
|
|
132539
|
+
__extends = function(d, b) {
|
|
132540
|
+
if (typeof b !== "function" && b !== null)
|
|
132541
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
132542
|
+
extendStatics(d, b);
|
|
132543
|
+
function __() {
|
|
132544
|
+
this.constructor = d;
|
|
131476
132545
|
}
|
|
131477
|
-
|
|
131478
|
-
|
|
131479
|
-
|
|
131480
|
-
|
|
131481
|
-
|
|
131482
|
-
|
|
131483
|
-
|
|
131484
|
-
|
|
131485
|
-
this.heartbeatCallback("disconnected");
|
|
131486
|
-
} catch (e2) {
|
|
131487
|
-
this.log("error", "error in heartbeat callback", e2);
|
|
131488
|
-
}
|
|
131489
|
-
return;
|
|
132546
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
|
|
132547
|
+
};
|
|
132548
|
+
__assign = Object.assign || function(t2) {
|
|
132549
|
+
for (var s2, i2 = 1, n = arguments.length;i2 < n; i2++) {
|
|
132550
|
+
s2 = arguments[i2];
|
|
132551
|
+
for (var p in s2)
|
|
132552
|
+
if (Object.prototype.hasOwnProperty.call(s2, p))
|
|
132553
|
+
t2[p] = s2[p];
|
|
131490
132554
|
}
|
|
131491
|
-
|
|
131492
|
-
|
|
131493
|
-
|
|
131494
|
-
|
|
131495
|
-
|
|
131496
|
-
|
|
131497
|
-
|
|
131498
|
-
|
|
132555
|
+
return t2;
|
|
132556
|
+
};
|
|
132557
|
+
__rest = function(s2, e2) {
|
|
132558
|
+
var t2 = {};
|
|
132559
|
+
for (var p in s2)
|
|
132560
|
+
if (Object.prototype.hasOwnProperty.call(s2, p) && e2.indexOf(p) < 0)
|
|
132561
|
+
t2[p] = s2[p];
|
|
132562
|
+
if (s2 != null && typeof Object.getOwnPropertySymbols === "function")
|
|
132563
|
+
for (var i2 = 0, p = Object.getOwnPropertySymbols(s2);i2 < p.length; i2++) {
|
|
132564
|
+
if (e2.indexOf(p[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p[i2]))
|
|
132565
|
+
t2[p[i2]] = s2[p[i2]];
|
|
131499
132566
|
}
|
|
131500
|
-
|
|
131501
|
-
|
|
131502
|
-
|
|
131503
|
-
|
|
131504
|
-
|
|
131505
|
-
|
|
131506
|
-
|
|
131507
|
-
|
|
131508
|
-
|
|
131509
|
-
|
|
131510
|
-
|
|
131511
|
-
|
|
131512
|
-
|
|
131513
|
-
|
|
131514
|
-
|
|
131515
|
-
|
|
131516
|
-
|
|
131517
|
-
|
|
131518
|
-
|
|
131519
|
-
|
|
131520
|
-
|
|
131521
|
-
|
|
132567
|
+
return t2;
|
|
132568
|
+
};
|
|
132569
|
+
__decorate = function(decorators, target, key, desc) {
|
|
132570
|
+
var c = arguments.length, r2 = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
132571
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
132572
|
+
r2 = Reflect.decorate(decorators, target, key, desc);
|
|
132573
|
+
else
|
|
132574
|
+
for (var i2 = decorators.length - 1;i2 >= 0; i2--)
|
|
132575
|
+
if (d = decorators[i2])
|
|
132576
|
+
r2 = (c < 3 ? d(r2) : c > 3 ? d(target, key, r2) : d(target, key)) || r2;
|
|
132577
|
+
return c > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
132578
|
+
};
|
|
132579
|
+
__param = function(paramIndex, decorator) {
|
|
132580
|
+
return function(target, key) {
|
|
132581
|
+
decorator(target, key, paramIndex);
|
|
132582
|
+
};
|
|
132583
|
+
};
|
|
132584
|
+
__esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
132585
|
+
function accept(f3) {
|
|
132586
|
+
if (f3 !== undefined && typeof f3 !== "function")
|
|
132587
|
+
throw new TypeError("Function expected");
|
|
132588
|
+
return f3;
|
|
131522
132589
|
}
|
|
131523
|
-
|
|
131524
|
-
|
|
131525
|
-
|
|
131526
|
-
|
|
131527
|
-
|
|
131528
|
-
|
|
131529
|
-
|
|
131530
|
-
|
|
131531
|
-
|
|
132590
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
132591
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
132592
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
132593
|
+
var _, done = false;
|
|
132594
|
+
for (var i2 = decorators.length - 1;i2 >= 0; i2--) {
|
|
132595
|
+
var context = {};
|
|
132596
|
+
for (var p in contextIn)
|
|
132597
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
132598
|
+
for (var p in contextIn.access)
|
|
132599
|
+
context.access[p] = contextIn.access[p];
|
|
132600
|
+
context.addInitializer = function(f3) {
|
|
132601
|
+
if (done)
|
|
132602
|
+
throw new TypeError("Cannot add initializers after decoration has completed");
|
|
132603
|
+
extraInitializers.push(accept(f3 || null));
|
|
132604
|
+
};
|
|
132605
|
+
var result = (0, decorators[i2])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
132606
|
+
if (kind === "accessor") {
|
|
132607
|
+
if (result === undefined)
|
|
132608
|
+
continue;
|
|
132609
|
+
if (result === null || typeof result !== "object")
|
|
132610
|
+
throw new TypeError("Object expected");
|
|
132611
|
+
if (_ = accept(result.get))
|
|
132612
|
+
descriptor.get = _;
|
|
132613
|
+
if (_ = accept(result.set))
|
|
132614
|
+
descriptor.set = _;
|
|
132615
|
+
if (_ = accept(result.init))
|
|
132616
|
+
initializers.unshift(_);
|
|
132617
|
+
} else if (_ = accept(result)) {
|
|
132618
|
+
if (kind === "field")
|
|
132619
|
+
initializers.unshift(_);
|
|
132620
|
+
else
|
|
132621
|
+
descriptor[key] = _;
|
|
132622
|
+
}
|
|
131532
132623
|
}
|
|
131533
|
-
|
|
131534
|
-
|
|
131535
|
-
|
|
131536
|
-
|
|
131537
|
-
|
|
131538
|
-
|
|
131539
|
-
|
|
132624
|
+
if (target)
|
|
132625
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
132626
|
+
done = true;
|
|
132627
|
+
};
|
|
132628
|
+
__runInitializers = function(thisArg, initializers, value) {
|
|
132629
|
+
var useValue = arguments.length > 2;
|
|
132630
|
+
for (var i2 = 0;i2 < initializers.length; i2++) {
|
|
132631
|
+
value = useValue ? initializers[i2].call(thisArg, value) : initializers[i2].call(thisArg);
|
|
131540
132632
|
}
|
|
131541
|
-
return
|
|
131542
|
-
}
|
|
131543
|
-
|
|
131544
|
-
|
|
131545
|
-
|
|
131546
|
-
|
|
131547
|
-
|
|
132633
|
+
return useValue ? value : undefined;
|
|
132634
|
+
};
|
|
132635
|
+
__propKey = function(x2) {
|
|
132636
|
+
return typeof x2 === "symbol" ? x2 : "".concat(x2);
|
|
132637
|
+
};
|
|
132638
|
+
__setFunctionName = function(f3, name, prefix) {
|
|
132639
|
+
if (typeof name === "symbol")
|
|
132640
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
132641
|
+
return Object.defineProperty(f3, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
132642
|
+
};
|
|
132643
|
+
__metadata = function(metadataKey, metadataValue) {
|
|
132644
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
132645
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
132646
|
+
};
|
|
132647
|
+
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
132648
|
+
function adopt(value) {
|
|
132649
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
132650
|
+
resolve(value);
|
|
132651
|
+
});
|
|
131548
132652
|
}
|
|
131549
|
-
|
|
131550
|
-
|
|
131551
|
-
this.channels = this.channels.filter((c) => c.topic !== channel.topic);
|
|
131552
|
-
}
|
|
131553
|
-
_onConnMessage(rawMessage) {
|
|
131554
|
-
this.decode(rawMessage.data, (msg) => {
|
|
131555
|
-
if (msg.topic === "phoenix" && msg.event === "phx_reply" && msg.ref && msg.ref === this.pendingHeartbeatRef) {
|
|
131556
|
-
const latency = this._heartbeatSentAt ? Date.now() - this._heartbeatSentAt : undefined;
|
|
132653
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
132654
|
+
function fulfilled(value) {
|
|
131557
132655
|
try {
|
|
131558
|
-
|
|
132656
|
+
step(generator.next(value));
|
|
131559
132657
|
} catch (e2) {
|
|
131560
|
-
|
|
132658
|
+
reject(e2);
|
|
131561
132659
|
}
|
|
131562
|
-
this._heartbeatSentAt = null;
|
|
131563
|
-
this.pendingHeartbeatRef = null;
|
|
131564
132660
|
}
|
|
131565
|
-
|
|
131566
|
-
const refString = ref ? `(${ref})` : "";
|
|
131567
|
-
const status = payload.status || "";
|
|
131568
|
-
this.log("receive", `${status} ${topic} ${event} ${refString}`.trim(), payload);
|
|
131569
|
-
this.channels.filter((channel) => channel._isMember(topic)).forEach((channel) => channel._trigger(event, payload, ref));
|
|
131570
|
-
this._triggerStateCallbacks("message", msg);
|
|
131571
|
-
});
|
|
131572
|
-
}
|
|
131573
|
-
_clearTimer(timer) {
|
|
131574
|
-
var _a2;
|
|
131575
|
-
if (timer === "heartbeat" && this.heartbeatTimer) {
|
|
131576
|
-
clearInterval(this.heartbeatTimer);
|
|
131577
|
-
this.heartbeatTimer = undefined;
|
|
131578
|
-
} else if (timer === "reconnect") {
|
|
131579
|
-
(_a2 = this.reconnectTimer) === null || _a2 === undefined || _a2.reset();
|
|
131580
|
-
}
|
|
131581
|
-
}
|
|
131582
|
-
_clearAllTimers() {
|
|
131583
|
-
this._clearTimer("heartbeat");
|
|
131584
|
-
this._clearTimer("reconnect");
|
|
131585
|
-
}
|
|
131586
|
-
_setupConnectionHandlers() {
|
|
131587
|
-
if (!this.conn)
|
|
131588
|
-
return;
|
|
131589
|
-
if ("binaryType" in this.conn) {
|
|
131590
|
-
this.conn.binaryType = "arraybuffer";
|
|
131591
|
-
}
|
|
131592
|
-
this.conn.onopen = () => this._onConnOpen();
|
|
131593
|
-
this.conn.onerror = (error48) => this._onConnError(error48);
|
|
131594
|
-
this.conn.onmessage = (event) => this._onConnMessage(event);
|
|
131595
|
-
this.conn.onclose = (event) => this._onConnClose(event);
|
|
131596
|
-
if (this.conn.readyState === constants_1.SOCKET_STATES.open) {
|
|
131597
|
-
this._onConnOpen();
|
|
131598
|
-
}
|
|
131599
|
-
}
|
|
131600
|
-
_teardownConnection() {
|
|
131601
|
-
if (this.conn) {
|
|
131602
|
-
if (this.conn.readyState === constants_1.SOCKET_STATES.open || this.conn.readyState === constants_1.SOCKET_STATES.connecting) {
|
|
132661
|
+
function rejected(value) {
|
|
131603
132662
|
try {
|
|
131604
|
-
|
|
132663
|
+
step(generator["throw"](value));
|
|
131605
132664
|
} catch (e2) {
|
|
131606
|
-
|
|
132665
|
+
reject(e2);
|
|
131607
132666
|
}
|
|
131608
132667
|
}
|
|
131609
|
-
|
|
131610
|
-
|
|
131611
|
-
this.conn.onmessage = null;
|
|
131612
|
-
this.conn.onclose = null;
|
|
131613
|
-
this.conn = null;
|
|
131614
|
-
}
|
|
131615
|
-
this._clearAllTimers();
|
|
131616
|
-
this._terminateWorker();
|
|
131617
|
-
this.channels.forEach((channel) => channel.teardown());
|
|
131618
|
-
}
|
|
131619
|
-
_onConnOpen() {
|
|
131620
|
-
this._setConnectionState("connected");
|
|
131621
|
-
this.log("transport", `connected to ${this.endpointURL()}`);
|
|
131622
|
-
const authPromise = this._authPromise || (this.accessToken && !this.accessTokenValue ? this.setAuth() : Promise.resolve());
|
|
131623
|
-
authPromise.then(() => {
|
|
131624
|
-
this.flushSendBuffer();
|
|
131625
|
-
}).catch((e2) => {
|
|
131626
|
-
this.log("error", "error waiting for auth on connect", e2);
|
|
131627
|
-
this.flushSendBuffer();
|
|
131628
|
-
});
|
|
131629
|
-
this._clearTimer("reconnect");
|
|
131630
|
-
if (!this.worker) {
|
|
131631
|
-
this._startHeartbeat();
|
|
131632
|
-
} else {
|
|
131633
|
-
if (!this.workerRef) {
|
|
131634
|
-
this._startWorkerHeartbeat();
|
|
131635
|
-
}
|
|
131636
|
-
}
|
|
131637
|
-
this._triggerStateCallbacks("open");
|
|
131638
|
-
}
|
|
131639
|
-
_startHeartbeat() {
|
|
131640
|
-
this.heartbeatTimer && clearInterval(this.heartbeatTimer);
|
|
131641
|
-
this.heartbeatTimer = setInterval(() => this.sendHeartbeat(), this.heartbeatIntervalMs);
|
|
131642
|
-
}
|
|
131643
|
-
_startWorkerHeartbeat() {
|
|
131644
|
-
if (this.workerUrl) {
|
|
131645
|
-
this.log("worker", `starting worker for from ${this.workerUrl}`);
|
|
131646
|
-
} else {
|
|
131647
|
-
this.log("worker", `starting default worker`);
|
|
131648
|
-
}
|
|
131649
|
-
const objectUrl = this._workerObjectUrl(this.workerUrl);
|
|
131650
|
-
this.workerRef = new Worker(objectUrl);
|
|
131651
|
-
this.workerRef.onerror = (error48) => {
|
|
131652
|
-
this.log("worker", "worker error", error48.message);
|
|
131653
|
-
this._terminateWorker();
|
|
131654
|
-
};
|
|
131655
|
-
this.workerRef.onmessage = (event) => {
|
|
131656
|
-
if (event.data.event === "keepAlive") {
|
|
131657
|
-
this.sendHeartbeat();
|
|
132668
|
+
function step(result) {
|
|
132669
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
131658
132670
|
}
|
|
131659
|
-
|
|
131660
|
-
this.workerRef.postMessage({
|
|
131661
|
-
event: "start",
|
|
131662
|
-
interval: this.heartbeatIntervalMs
|
|
132671
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
131663
132672
|
});
|
|
131664
|
-
}
|
|
131665
|
-
|
|
131666
|
-
|
|
131667
|
-
|
|
131668
|
-
|
|
131669
|
-
|
|
132673
|
+
};
|
|
132674
|
+
__generator = function(thisArg, body) {
|
|
132675
|
+
var _ = { label: 0, sent: function() {
|
|
132676
|
+
if (t2[0] & 1)
|
|
132677
|
+
throw t2[1];
|
|
132678
|
+
return t2[1];
|
|
132679
|
+
}, trys: [], ops: [] }, f3, y, t2, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
132680
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
132681
|
+
return this;
|
|
132682
|
+
}), g;
|
|
132683
|
+
function verb(n) {
|
|
132684
|
+
return function(v) {
|
|
132685
|
+
return step([n, v]);
|
|
132686
|
+
};
|
|
131670
132687
|
}
|
|
131671
|
-
|
|
131672
|
-
|
|
131673
|
-
|
|
131674
|
-
|
|
131675
|
-
|
|
131676
|
-
|
|
131677
|
-
|
|
131678
|
-
|
|
131679
|
-
|
|
132688
|
+
function step(op) {
|
|
132689
|
+
if (f3)
|
|
132690
|
+
throw new TypeError("Generator is already executing.");
|
|
132691
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
132692
|
+
try {
|
|
132693
|
+
if (f3 = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
|
|
132694
|
+
return t2;
|
|
132695
|
+
if (y = 0, t2)
|
|
132696
|
+
op = [op[0] & 2, t2.value];
|
|
132697
|
+
switch (op[0]) {
|
|
132698
|
+
case 0:
|
|
132699
|
+
case 1:
|
|
132700
|
+
t2 = op;
|
|
132701
|
+
break;
|
|
132702
|
+
case 4:
|
|
132703
|
+
_.label++;
|
|
132704
|
+
return { value: op[1], done: false };
|
|
132705
|
+
case 5:
|
|
132706
|
+
_.label++;
|
|
132707
|
+
y = op[1];
|
|
132708
|
+
op = [0];
|
|
132709
|
+
continue;
|
|
132710
|
+
case 7:
|
|
132711
|
+
op = _.ops.pop();
|
|
132712
|
+
_.trys.pop();
|
|
132713
|
+
continue;
|
|
132714
|
+
default:
|
|
132715
|
+
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
132716
|
+
_ = 0;
|
|
132717
|
+
continue;
|
|
132718
|
+
}
|
|
132719
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
|
132720
|
+
_.label = op[1];
|
|
132721
|
+
break;
|
|
132722
|
+
}
|
|
132723
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
|
132724
|
+
_.label = t2[1];
|
|
132725
|
+
t2 = op;
|
|
132726
|
+
break;
|
|
132727
|
+
}
|
|
132728
|
+
if (t2 && _.label < t2[2]) {
|
|
132729
|
+
_.label = t2[2];
|
|
132730
|
+
_.ops.push(op);
|
|
132731
|
+
break;
|
|
132732
|
+
}
|
|
132733
|
+
if (t2[2])
|
|
132734
|
+
_.ops.pop();
|
|
132735
|
+
_.trys.pop();
|
|
132736
|
+
continue;
|
|
132737
|
+
}
|
|
132738
|
+
op = body.call(thisArg, _);
|
|
132739
|
+
} catch (e2) {
|
|
132740
|
+
op = [6, e2];
|
|
132741
|
+
y = 0;
|
|
132742
|
+
} finally {
|
|
132743
|
+
f3 = t2 = 0;
|
|
132744
|
+
}
|
|
132745
|
+
if (op[0] & 5)
|
|
132746
|
+
throw op[1];
|
|
132747
|
+
return { value: op[0] ? op[1] : undefined, done: true };
|
|
131680
132748
|
}
|
|
131681
|
-
|
|
131682
|
-
|
|
131683
|
-
|
|
131684
|
-
|
|
131685
|
-
|
|
131686
|
-
|
|
131687
|
-
|
|
131688
|
-
|
|
131689
|
-
|
|
131690
|
-
|
|
131691
|
-
|
|
132749
|
+
};
|
|
132750
|
+
__exportStar = function(m2, o) {
|
|
132751
|
+
for (var p in m2)
|
|
132752
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
132753
|
+
__createBinding(o, m2, p);
|
|
132754
|
+
};
|
|
132755
|
+
__createBinding = Object.create ? function(o, m2, k, k2) {
|
|
132756
|
+
if (k2 === undefined)
|
|
132757
|
+
k2 = k;
|
|
132758
|
+
var desc = Object.getOwnPropertyDescriptor(m2, k);
|
|
132759
|
+
if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
|
|
132760
|
+
desc = { enumerable: true, get: function() {
|
|
132761
|
+
return m2[k];
|
|
132762
|
+
} };
|
|
131692
132763
|
}
|
|
131693
|
-
|
|
131694
|
-
|
|
131695
|
-
|
|
131696
|
-
|
|
131697
|
-
|
|
131698
|
-
|
|
131699
|
-
|
|
132764
|
+
Object.defineProperty(o, k2, desc);
|
|
132765
|
+
} : function(o, m2, k, k2) {
|
|
132766
|
+
if (k2 === undefined)
|
|
132767
|
+
k2 = k;
|
|
132768
|
+
o[k2] = m2[k];
|
|
132769
|
+
};
|
|
132770
|
+
__values = function(o) {
|
|
132771
|
+
var s2 = typeof Symbol === "function" && Symbol.iterator, m2 = s2 && o[s2], i2 = 0;
|
|
132772
|
+
if (m2)
|
|
132773
|
+
return m2.call(o);
|
|
132774
|
+
if (o && typeof o.length === "number")
|
|
132775
|
+
return {
|
|
132776
|
+
next: function() {
|
|
132777
|
+
if (o && i2 >= o.length)
|
|
132778
|
+
o = undefined;
|
|
132779
|
+
return { value: o && o[i2++], done: !o };
|
|
132780
|
+
}
|
|
132781
|
+
};
|
|
132782
|
+
throw new TypeError(s2 ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
132783
|
+
};
|
|
132784
|
+
__read = function(o, n) {
|
|
132785
|
+
var m2 = typeof Symbol === "function" && o[Symbol.iterator];
|
|
132786
|
+
if (!m2)
|
|
132787
|
+
return o;
|
|
132788
|
+
var i2 = m2.call(o), r2, ar = [], e2;
|
|
132789
|
+
try {
|
|
132790
|
+
while ((n === undefined || n-- > 0) && !(r2 = i2.next()).done)
|
|
132791
|
+
ar.push(r2.value);
|
|
132792
|
+
} catch (error48) {
|
|
132793
|
+
e2 = { error: error48 };
|
|
132794
|
+
} finally {
|
|
132795
|
+
try {
|
|
132796
|
+
if (r2 && !r2.done && (m2 = i2["return"]))
|
|
132797
|
+
m2.call(i2);
|
|
132798
|
+
} finally {
|
|
132799
|
+
if (e2)
|
|
132800
|
+
throw e2.error;
|
|
132801
|
+
}
|
|
131700
132802
|
}
|
|
131701
|
-
|
|
131702
|
-
|
|
131703
|
-
|
|
131704
|
-
|
|
131705
|
-
|
|
131706
|
-
|
|
131707
|
-
|
|
131708
|
-
|
|
131709
|
-
|
|
131710
|
-
|
|
131711
|
-
|
|
132803
|
+
return ar;
|
|
132804
|
+
};
|
|
132805
|
+
__spread = function() {
|
|
132806
|
+
for (var ar = [], i2 = 0;i2 < arguments.length; i2++)
|
|
132807
|
+
ar = ar.concat(__read(arguments[i2]));
|
|
132808
|
+
return ar;
|
|
132809
|
+
};
|
|
132810
|
+
__spreadArrays = function() {
|
|
132811
|
+
for (var s2 = 0, i2 = 0, il = arguments.length;i2 < il; i2++)
|
|
132812
|
+
s2 += arguments[i2].length;
|
|
132813
|
+
for (var r2 = Array(s2), k = 0, i2 = 0;i2 < il; i2++)
|
|
132814
|
+
for (var a = arguments[i2], j = 0, jl = a.length;j < jl; j++, k++)
|
|
132815
|
+
r2[k] = a[j];
|
|
132816
|
+
return r2;
|
|
132817
|
+
};
|
|
132818
|
+
__spreadArray = function(to, from, pack) {
|
|
132819
|
+
if (pack || arguments.length === 2)
|
|
132820
|
+
for (var i2 = 0, l = from.length, ar;i2 < l; i2++) {
|
|
132821
|
+
if (ar || !(i2 in from)) {
|
|
132822
|
+
if (!ar)
|
|
132823
|
+
ar = Array.prototype.slice.call(from, 0, i2);
|
|
132824
|
+
ar[i2] = from[i2];
|
|
132825
|
+
}
|
|
132826
|
+
}
|
|
132827
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
132828
|
+
};
|
|
132829
|
+
__await = function(v) {
|
|
132830
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
132831
|
+
};
|
|
132832
|
+
__asyncGenerator = function(thisArg, _arguments, generator) {
|
|
132833
|
+
if (!Symbol.asyncIterator)
|
|
132834
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
132835
|
+
var g = generator.apply(thisArg, _arguments || []), i2, q = [];
|
|
132836
|
+
return i2 = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i2[Symbol.asyncIterator] = function() {
|
|
132837
|
+
return this;
|
|
132838
|
+
}, i2;
|
|
132839
|
+
function awaitReturn(f3) {
|
|
132840
|
+
return function(v) {
|
|
132841
|
+
return Promise.resolve(v).then(f3, reject);
|
|
132842
|
+
};
|
|
131712
132843
|
}
|
|
131713
|
-
|
|
131714
|
-
|
|
131715
|
-
|
|
131716
|
-
|
|
131717
|
-
|
|
131718
|
-
|
|
131719
|
-
|
|
131720
|
-
|
|
132844
|
+
function verb(n, f3) {
|
|
132845
|
+
if (g[n]) {
|
|
132846
|
+
i2[n] = function(v) {
|
|
132847
|
+
return new Promise(function(a, b) {
|
|
132848
|
+
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
132849
|
+
});
|
|
132850
|
+
};
|
|
132851
|
+
if (f3)
|
|
132852
|
+
i2[n] = f3(i2[n]);
|
|
132853
|
+
}
|
|
131721
132854
|
}
|
|
131722
|
-
|
|
131723
|
-
async _performAuth(token = null) {
|
|
131724
|
-
let tokenToSend;
|
|
131725
|
-
let isManualToken = false;
|
|
131726
|
-
if (token) {
|
|
131727
|
-
tokenToSend = token;
|
|
131728
|
-
isManualToken = true;
|
|
131729
|
-
} else if (this.accessToken) {
|
|
132855
|
+
function resume(n, v) {
|
|
131730
132856
|
try {
|
|
131731
|
-
|
|
132857
|
+
step(g[n](v));
|
|
131732
132858
|
} catch (e2) {
|
|
131733
|
-
|
|
131734
|
-
tokenToSend = this.accessTokenValue;
|
|
132859
|
+
settle(q[0][3], e2);
|
|
131735
132860
|
}
|
|
131736
|
-
} else {
|
|
131737
|
-
tokenToSend = this.accessTokenValue;
|
|
131738
132861
|
}
|
|
131739
|
-
|
|
131740
|
-
|
|
131741
|
-
} else if (this.accessToken) {
|
|
131742
|
-
this._manuallySetToken = false;
|
|
132862
|
+
function step(r2) {
|
|
132863
|
+
r2.value instanceof __await ? Promise.resolve(r2.value.v).then(fulfill, reject) : settle(q[0][2], r2);
|
|
131743
132864
|
}
|
|
131744
|
-
|
|
131745
|
-
|
|
131746
|
-
this.channels.forEach((channel) => {
|
|
131747
|
-
const payload = {
|
|
131748
|
-
access_token: tokenToSend,
|
|
131749
|
-
version: constants_1.DEFAULT_VERSION
|
|
131750
|
-
};
|
|
131751
|
-
tokenToSend && channel.updateJoinPayload(payload);
|
|
131752
|
-
if (channel.joinedOnce && channel._isJoined()) {
|
|
131753
|
-
channel._push(constants_1.CHANNEL_EVENTS.access_token, {
|
|
131754
|
-
access_token: tokenToSend
|
|
131755
|
-
});
|
|
131756
|
-
}
|
|
131757
|
-
});
|
|
132865
|
+
function fulfill(value) {
|
|
132866
|
+
resume("next", value);
|
|
131758
132867
|
}
|
|
131759
|
-
|
|
131760
|
-
|
|
131761
|
-
if (this._authPromise) {
|
|
131762
|
-
await this._authPromise;
|
|
132868
|
+
function reject(value) {
|
|
132869
|
+
resume("throw", value);
|
|
131763
132870
|
}
|
|
131764
|
-
|
|
131765
|
-
|
|
131766
|
-
|
|
131767
|
-
this.setAuth().catch((e2) => {
|
|
131768
|
-
this.log("error", `Error setting auth in ${context}`, e2);
|
|
131769
|
-
});
|
|
132871
|
+
function settle(f3, v) {
|
|
132872
|
+
if (f3(v), q.shift(), q.length)
|
|
132873
|
+
resume(q[0][0], q[0][1]);
|
|
131770
132874
|
}
|
|
131771
|
-
}
|
|
131772
|
-
|
|
131773
|
-
|
|
131774
|
-
|
|
131775
|
-
|
|
131776
|
-
|
|
131777
|
-
|
|
131778
|
-
|
|
131779
|
-
|
|
131780
|
-
|
|
131781
|
-
|
|
131782
|
-
|
|
132875
|
+
};
|
|
132876
|
+
__asyncDelegator = function(o) {
|
|
132877
|
+
var i2, p;
|
|
132878
|
+
return i2 = {}, verb("next"), verb("throw", function(e2) {
|
|
132879
|
+
throw e2;
|
|
132880
|
+
}), verb("return"), i2[Symbol.iterator] = function() {
|
|
132881
|
+
return this;
|
|
132882
|
+
}, i2;
|
|
132883
|
+
function verb(n, f3) {
|
|
132884
|
+
i2[n] = o[n] ? function(v) {
|
|
132885
|
+
return (p = !p) ? { value: __await(o[n](v)), done: false } : f3 ? f3(v) : v;
|
|
132886
|
+
} : f3;
|
|
131783
132887
|
}
|
|
131784
|
-
}
|
|
131785
|
-
|
|
131786
|
-
|
|
131787
|
-
|
|
131788
|
-
|
|
131789
|
-
|
|
131790
|
-
|
|
131791
|
-
|
|
131792
|
-
|
|
131793
|
-
|
|
131794
|
-
|
|
131795
|
-
|
|
131796
|
-
|
|
131797
|
-
|
|
131798
|
-
this.timeout = (_b = options === null || options === undefined ? undefined : options.timeout) !== null && _b !== undefined ? _b : constants_1.DEFAULT_TIMEOUT;
|
|
131799
|
-
this.heartbeatIntervalMs = (_c = options === null || options === undefined ? undefined : options.heartbeatIntervalMs) !== null && _c !== undefined ? _c : CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL;
|
|
131800
|
-
this.worker = (_d = options === null || options === undefined ? undefined : options.worker) !== null && _d !== undefined ? _d : false;
|
|
131801
|
-
this.accessToken = (_e = options === null || options === undefined ? undefined : options.accessToken) !== null && _e !== undefined ? _e : null;
|
|
131802
|
-
this.heartbeatCallback = (_f = options === null || options === undefined ? undefined : options.heartbeatCallback) !== null && _f !== undefined ? _f : noop2;
|
|
131803
|
-
this.vsn = (_g = options === null || options === undefined ? undefined : options.vsn) !== null && _g !== undefined ? _g : constants_1.DEFAULT_VSN;
|
|
131804
|
-
if (options === null || options === undefined ? undefined : options.params)
|
|
131805
|
-
this.params = options.params;
|
|
131806
|
-
if (options === null || options === undefined ? undefined : options.logger)
|
|
131807
|
-
this.logger = options.logger;
|
|
131808
|
-
if ((options === null || options === undefined ? undefined : options.logLevel) || (options === null || options === undefined ? undefined : options.log_level)) {
|
|
131809
|
-
this.logLevel = options.logLevel || options.log_level;
|
|
131810
|
-
this.params = Object.assign(Object.assign({}, this.params), { log_level: this.logLevel });
|
|
132888
|
+
};
|
|
132889
|
+
__asyncValues = function(o) {
|
|
132890
|
+
if (!Symbol.asyncIterator)
|
|
132891
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
132892
|
+
var m2 = o[Symbol.asyncIterator], i2;
|
|
132893
|
+
return m2 ? m2.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i2 = {}, verb("next"), verb("throw"), verb("return"), i2[Symbol.asyncIterator] = function() {
|
|
132894
|
+
return this;
|
|
132895
|
+
}, i2);
|
|
132896
|
+
function verb(n) {
|
|
132897
|
+
i2[n] = o[n] && function(v) {
|
|
132898
|
+
return new Promise(function(resolve, reject) {
|
|
132899
|
+
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
132900
|
+
});
|
|
132901
|
+
};
|
|
131811
132902
|
}
|
|
131812
|
-
|
|
131813
|
-
|
|
132903
|
+
function settle(resolve, reject, d, v) {
|
|
132904
|
+
Promise.resolve(v).then(function(v2) {
|
|
132905
|
+
resolve({ value: v2, done: d });
|
|
132906
|
+
}, reject);
|
|
132907
|
+
}
|
|
132908
|
+
};
|
|
132909
|
+
__makeTemplateObject = function(cooked, raw) {
|
|
132910
|
+
if (Object.defineProperty) {
|
|
132911
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
132912
|
+
} else {
|
|
132913
|
+
cooked.raw = raw;
|
|
132914
|
+
}
|
|
132915
|
+
return cooked;
|
|
132916
|
+
};
|
|
132917
|
+
var __setModuleDefault = Object.create ? function(o, v) {
|
|
132918
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
132919
|
+
} : function(o, v) {
|
|
132920
|
+
o["default"] = v;
|
|
132921
|
+
};
|
|
132922
|
+
var ownKeys3 = function(o) {
|
|
132923
|
+
ownKeys3 = Object.getOwnPropertyNames || function(o2) {
|
|
132924
|
+
var ar = [];
|
|
132925
|
+
for (var k in o2)
|
|
132926
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
132927
|
+
ar[ar.length] = k;
|
|
132928
|
+
return ar;
|
|
131814
132929
|
};
|
|
131815
|
-
|
|
131816
|
-
|
|
131817
|
-
|
|
131818
|
-
|
|
131819
|
-
|
|
131820
|
-
|
|
131821
|
-
|
|
132930
|
+
return ownKeys3(o);
|
|
132931
|
+
};
|
|
132932
|
+
__importStar = function(mod2) {
|
|
132933
|
+
if (mod2 && mod2.__esModule)
|
|
132934
|
+
return mod2;
|
|
132935
|
+
var result = {};
|
|
132936
|
+
if (mod2 != null) {
|
|
132937
|
+
for (var k = ownKeys3(mod2), i2 = 0;i2 < k.length; i2++)
|
|
132938
|
+
if (k[i2] !== "default")
|
|
132939
|
+
__createBinding(result, mod2, k[i2]);
|
|
132940
|
+
}
|
|
132941
|
+
__setModuleDefault(result, mod2);
|
|
132942
|
+
return result;
|
|
132943
|
+
};
|
|
132944
|
+
__importDefault = function(mod2) {
|
|
132945
|
+
return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
|
|
132946
|
+
};
|
|
132947
|
+
__classPrivateFieldGet = function(receiver, state, kind, f3) {
|
|
132948
|
+
if (kind === "a" && !f3)
|
|
132949
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
132950
|
+
if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver))
|
|
132951
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
132952
|
+
return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver);
|
|
132953
|
+
};
|
|
132954
|
+
__classPrivateFieldSet = function(receiver, state, value, kind, f3) {
|
|
132955
|
+
if (kind === "m")
|
|
132956
|
+
throw new TypeError("Private method is not writable");
|
|
132957
|
+
if (kind === "a" && !f3)
|
|
132958
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
132959
|
+
if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver))
|
|
132960
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
132961
|
+
return kind === "a" ? f3.call(receiver, value) : f3 ? f3.value = value : state.set(receiver, value), value;
|
|
132962
|
+
};
|
|
132963
|
+
__classPrivateFieldIn = function(state, receiver) {
|
|
132964
|
+
if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
|
|
132965
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
132966
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
132967
|
+
};
|
|
132968
|
+
__addDisposableResource = function(env, value, async) {
|
|
132969
|
+
if (value !== null && value !== undefined) {
|
|
132970
|
+
if (typeof value !== "object" && typeof value !== "function")
|
|
132971
|
+
throw new TypeError("Object expected.");
|
|
132972
|
+
var dispose, inner;
|
|
132973
|
+
if (async) {
|
|
132974
|
+
if (!Symbol.asyncDispose)
|
|
132975
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
132976
|
+
dispose = value[Symbol.asyncDispose];
|
|
132977
|
+
}
|
|
132978
|
+
if (dispose === undefined) {
|
|
132979
|
+
if (!Symbol.dispose)
|
|
132980
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
132981
|
+
dispose = value[Symbol.dispose];
|
|
132982
|
+
if (async)
|
|
132983
|
+
inner = dispose;
|
|
132984
|
+
}
|
|
132985
|
+
if (typeof dispose !== "function")
|
|
132986
|
+
throw new TypeError("Object not disposable.");
|
|
132987
|
+
if (inner)
|
|
132988
|
+
dispose = function() {
|
|
132989
|
+
try {
|
|
132990
|
+
inner.call(this);
|
|
132991
|
+
} catch (e2) {
|
|
132992
|
+
return Promise.reject(e2);
|
|
132993
|
+
}
|
|
131822
132994
|
};
|
|
131823
|
-
|
|
131824
|
-
|
|
131825
|
-
|
|
131826
|
-
this.decode = (_m = options === null || options === undefined ? undefined : options.decode) !== null && _m !== undefined ? _m : this.serializer.decode.bind(this.serializer);
|
|
131827
|
-
break;
|
|
131828
|
-
default:
|
|
131829
|
-
throw new Error(`Unsupported serializer version: ${this.vsn}`);
|
|
132995
|
+
env.stack.push({ value, dispose, async });
|
|
132996
|
+
} else if (async) {
|
|
132997
|
+
env.stack.push({ async: true });
|
|
131830
132998
|
}
|
|
131831
|
-
|
|
131832
|
-
|
|
131833
|
-
|
|
132999
|
+
return value;
|
|
133000
|
+
};
|
|
133001
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error48, suppressed, message) {
|
|
133002
|
+
var e2 = new Error(message);
|
|
133003
|
+
return e2.name = "SuppressedError", e2.error = error48, e2.suppressed = suppressed, e2;
|
|
133004
|
+
};
|
|
133005
|
+
__disposeResources = function(env) {
|
|
133006
|
+
function fail(e2) {
|
|
133007
|
+
env.error = env.hasError ? new _SuppressedError(e2, env.error, "An error was suppressed during disposal.") : e2;
|
|
133008
|
+
env.hasError = true;
|
|
133009
|
+
}
|
|
133010
|
+
var r2, s2 = 0;
|
|
133011
|
+
function next() {
|
|
133012
|
+
while (r2 = env.stack.pop()) {
|
|
133013
|
+
try {
|
|
133014
|
+
if (!r2.async && s2 === 1)
|
|
133015
|
+
return s2 = 0, env.stack.push(r2), Promise.resolve().then(next);
|
|
133016
|
+
if (r2.dispose) {
|
|
133017
|
+
var result = r2.dispose.call(r2.value);
|
|
133018
|
+
if (r2.async)
|
|
133019
|
+
return s2 |= 2, Promise.resolve(result).then(next, function(e2) {
|
|
133020
|
+
fail(e2);
|
|
133021
|
+
return next();
|
|
133022
|
+
});
|
|
133023
|
+
} else
|
|
133024
|
+
s2 |= 1;
|
|
133025
|
+
} catch (e2) {
|
|
133026
|
+
fail(e2);
|
|
133027
|
+
}
|
|
131834
133028
|
}
|
|
131835
|
-
|
|
133029
|
+
if (s2 === 1)
|
|
133030
|
+
return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
133031
|
+
if (env.hasError)
|
|
133032
|
+
throw env.error;
|
|
131836
133033
|
}
|
|
131837
|
-
|
|
131838
|
-
|
|
131839
|
-
|
|
131840
|
-
|
|
131841
|
-
|
|
131842
|
-
|
|
131843
|
-
|
|
131844
|
-
|
|
131845
|
-
|
|
131846
|
-
|
|
131847
|
-
|
|
131848
|
-
|
|
131849
|
-
|
|
131850
|
-
|
|
131851
|
-
|
|
131852
|
-
|
|
131853
|
-
|
|
131854
|
-
|
|
131855
|
-
|
|
131856
|
-
|
|
131857
|
-
|
|
131858
|
-
|
|
131859
|
-
|
|
131860
|
-
|
|
131861
|
-
|
|
131862
|
-
|
|
131863
|
-
|
|
131864
|
-
|
|
131865
|
-
|
|
131866
|
-
|
|
131867
|
-
|
|
131868
|
-
|
|
131869
|
-
|
|
133034
|
+
return next();
|
|
133035
|
+
};
|
|
133036
|
+
__rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
133037
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
133038
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m2, tsx, d, ext, cm) {
|
|
133039
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m2 : d + ext + "." + cm.toLowerCase() + "js";
|
|
133040
|
+
});
|
|
133041
|
+
}
|
|
133042
|
+
return path;
|
|
133043
|
+
};
|
|
133044
|
+
exporter("__extends", __extends);
|
|
133045
|
+
exporter("__assign", __assign);
|
|
133046
|
+
exporter("__rest", __rest);
|
|
133047
|
+
exporter("__decorate", __decorate);
|
|
133048
|
+
exporter("__param", __param);
|
|
133049
|
+
exporter("__esDecorate", __esDecorate);
|
|
133050
|
+
exporter("__runInitializers", __runInitializers);
|
|
133051
|
+
exporter("__propKey", __propKey);
|
|
133052
|
+
exporter("__setFunctionName", __setFunctionName);
|
|
133053
|
+
exporter("__metadata", __metadata);
|
|
133054
|
+
exporter("__awaiter", __awaiter);
|
|
133055
|
+
exporter("__generator", __generator);
|
|
133056
|
+
exporter("__exportStar", __exportStar);
|
|
133057
|
+
exporter("__createBinding", __createBinding);
|
|
133058
|
+
exporter("__values", __values);
|
|
133059
|
+
exporter("__read", __read);
|
|
133060
|
+
exporter("__spread", __spread);
|
|
133061
|
+
exporter("__spreadArrays", __spreadArrays);
|
|
133062
|
+
exporter("__spreadArray", __spreadArray);
|
|
133063
|
+
exporter("__await", __await);
|
|
133064
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
|
133065
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
|
133066
|
+
exporter("__asyncValues", __asyncValues);
|
|
133067
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
133068
|
+
exporter("__importStar", __importStar);
|
|
133069
|
+
exporter("__importDefault", __importDefault);
|
|
133070
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
133071
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
133072
|
+
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
|
133073
|
+
exporter("__addDisposableResource", __addDisposableResource);
|
|
133074
|
+
exporter("__disposeResources", __disposeResources);
|
|
133075
|
+
exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
|
|
133076
|
+
});
|
|
131870
133077
|
});
|
|
131871
133078
|
|
|
131872
133079
|
// node_modules/@supabase/auth-js/dist/main/lib/version.js
|
|
131873
133080
|
var require_version63 = __commonJS((exports) => {
|
|
131874
133081
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
131875
133082
|
exports.version = undefined;
|
|
131876
|
-
exports.version = "2.
|
|
133083
|
+
exports.version = "2.96.0";
|
|
131877
133084
|
});
|
|
131878
133085
|
|
|
131879
133086
|
// node_modules/@supabase/auth-js/dist/main/lib/constants.js
|
|
@@ -132568,7 +133775,7 @@ var require_fetch2 = __commonJS((exports) => {
|
|
|
132568
133775
|
exports._ssoResponse = _ssoResponse;
|
|
132569
133776
|
exports._generateLinkResponse = _generateLinkResponse;
|
|
132570
133777
|
exports._noResolveJsonResponse = _noResolveJsonResponse;
|
|
132571
|
-
var tslib_1 =
|
|
133778
|
+
var tslib_1 = require_tslib3();
|
|
132572
133779
|
var constants_1 = require_constants27();
|
|
132573
133780
|
var helpers_1 = require_helpers3();
|
|
132574
133781
|
var errors_1 = require_errors2();
|
|
@@ -132719,7 +133926,7 @@ var require_types17 = __commonJS((exports) => {
|
|
|
132719
133926
|
// node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
|
|
132720
133927
|
var require_GoTrueAdminApi = __commonJS((exports) => {
|
|
132721
133928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
132722
|
-
var tslib_1 =
|
|
133929
|
+
var tslib_1 = require_tslib3();
|
|
132723
133930
|
var fetch_1 = require_fetch2();
|
|
132724
133931
|
var helpers_1 = require_helpers3();
|
|
132725
133932
|
var types_1 = require_types17();
|
|
@@ -133101,74 +134308,101 @@ var require_locks = __commonJS((exports) => {
|
|
|
133101
134308
|
}
|
|
133102
134309
|
}, acquireTimeout);
|
|
133103
134310
|
}
|
|
133104
|
-
|
|
133105
|
-
|
|
133106
|
-
|
|
133107
|
-
|
|
133108
|
-
|
|
133109
|
-
|
|
133110
|
-
|
|
133111
|
-
|
|
133112
|
-
|
|
133113
|
-
|
|
133114
|
-
}
|
|
133115
|
-
try {
|
|
133116
|
-
return await fn();
|
|
133117
|
-
} finally {
|
|
134311
|
+
await Promise.resolve();
|
|
134312
|
+
try {
|
|
134313
|
+
return await globalThis.navigator.locks.request(name, acquireTimeout === 0 ? {
|
|
134314
|
+
mode: "exclusive",
|
|
134315
|
+
ifAvailable: true
|
|
134316
|
+
} : {
|
|
134317
|
+
mode: "exclusive",
|
|
134318
|
+
signal: abortController.signal
|
|
134319
|
+
}, async (lock) => {
|
|
134320
|
+
if (lock) {
|
|
133118
134321
|
if (exports.internals.debug) {
|
|
133119
|
-
console.log("@supabase/gotrue-js: navigatorLock:
|
|
134322
|
+
console.log("@supabase/gotrue-js: navigatorLock: acquired", name, lock.name);
|
|
133120
134323
|
}
|
|
133121
|
-
|
|
133122
|
-
|
|
133123
|
-
|
|
133124
|
-
|
|
133125
|
-
|
|
134324
|
+
try {
|
|
134325
|
+
return await fn();
|
|
134326
|
+
} finally {
|
|
134327
|
+
if (exports.internals.debug) {
|
|
134328
|
+
console.log("@supabase/gotrue-js: navigatorLock: released", name, lock.name);
|
|
134329
|
+
}
|
|
133126
134330
|
}
|
|
133127
|
-
throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`);
|
|
133128
134331
|
} else {
|
|
133129
|
-
if (
|
|
133130
|
-
|
|
133131
|
-
|
|
133132
|
-
|
|
133133
|
-
|
|
133134
|
-
|
|
134332
|
+
if (acquireTimeout === 0) {
|
|
134333
|
+
if (exports.internals.debug) {
|
|
134334
|
+
console.log("@supabase/gotrue-js: navigatorLock: not immediately available", name);
|
|
134335
|
+
}
|
|
134336
|
+
throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`);
|
|
134337
|
+
} else {
|
|
134338
|
+
if (exports.internals.debug) {
|
|
134339
|
+
try {
|
|
134340
|
+
const result = await globalThis.navigator.locks.query();
|
|
134341
|
+
console.log("@supabase/gotrue-js: Navigator LockManager state", JSON.stringify(result, null, " "));
|
|
134342
|
+
} catch (e2) {
|
|
134343
|
+
console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state", e2);
|
|
134344
|
+
}
|
|
133135
134345
|
}
|
|
134346
|
+
console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request");
|
|
134347
|
+
return await fn();
|
|
133136
134348
|
}
|
|
133137
|
-
console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request");
|
|
133138
|
-
return await fn();
|
|
133139
134349
|
}
|
|
134350
|
+
});
|
|
134351
|
+
} catch (e2) {
|
|
134352
|
+
if ((e2 === null || e2 === undefined ? undefined : e2.name) === "AbortError") {
|
|
134353
|
+
throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" timed out waiting ${acquireTimeout}ms`);
|
|
133140
134354
|
}
|
|
133141
|
-
|
|
134355
|
+
throw e2;
|
|
134356
|
+
}
|
|
133142
134357
|
}
|
|
133143
134358
|
var PROCESS_LOCKS = {};
|
|
133144
134359
|
async function processLock(name, acquireTimeout, fn) {
|
|
133145
134360
|
var _a2;
|
|
133146
134361
|
const previousOperation = (_a2 = PROCESS_LOCKS[name]) !== null && _a2 !== undefined ? _a2 : Promise.resolve();
|
|
133147
|
-
const
|
|
133148
|
-
|
|
134362
|
+
const previousOperationHandled = (async () => {
|
|
134363
|
+
try {
|
|
134364
|
+
await previousOperation;
|
|
134365
|
+
return null;
|
|
134366
|
+
} catch (e2) {
|
|
133149
134367
|
return null;
|
|
133150
|
-
}),
|
|
133151
|
-
acquireTimeout >= 0 ? new Promise((_, reject) => {
|
|
133152
|
-
setTimeout(() => {
|
|
133153
|
-
console.warn(`@supabase/gotrue-js: Lock "${name}" acquisition timed out after ${acquireTimeout}ms. ` + "This may be caused by another operation holding the lock. " + "Consider increasing lockAcquireTimeout or checking for stuck operations.");
|
|
133154
|
-
reject(new ProcessLockAcquireTimeoutError(`Acquiring process lock with name "${name}" timed out`));
|
|
133155
|
-
}, acquireTimeout);
|
|
133156
|
-
}) : null
|
|
133157
|
-
].filter((x2) => x2)).catch((e2) => {
|
|
133158
|
-
if (e2 && e2.isAcquireTimeout) {
|
|
133159
|
-
throw e2;
|
|
133160
134368
|
}
|
|
133161
|
-
|
|
133162
|
-
|
|
134369
|
+
})();
|
|
134370
|
+
const currentOperation = (async () => {
|
|
134371
|
+
let timeoutId = null;
|
|
134372
|
+
try {
|
|
134373
|
+
const timeoutPromise = acquireTimeout >= 0 ? new Promise((_, reject) => {
|
|
134374
|
+
timeoutId = setTimeout(() => {
|
|
134375
|
+
console.warn(`@supabase/gotrue-js: Lock "${name}" acquisition timed out after ${acquireTimeout}ms. ` + "This may be caused by another operation holding the lock. " + "Consider increasing lockAcquireTimeout or checking for stuck operations.");
|
|
134376
|
+
reject(new ProcessLockAcquireTimeoutError(`Acquiring process lock with name "${name}" timed out`));
|
|
134377
|
+
}, acquireTimeout);
|
|
134378
|
+
}) : null;
|
|
134379
|
+
await Promise.race([previousOperationHandled, timeoutPromise].filter((x2) => x2));
|
|
134380
|
+
if (timeoutId !== null) {
|
|
134381
|
+
clearTimeout(timeoutId);
|
|
134382
|
+
}
|
|
134383
|
+
} catch (e2) {
|
|
134384
|
+
if (timeoutId !== null) {
|
|
134385
|
+
clearTimeout(timeoutId);
|
|
134386
|
+
}
|
|
134387
|
+
if (e2 && e2.isAcquireTimeout) {
|
|
134388
|
+
throw e2;
|
|
134389
|
+
}
|
|
134390
|
+
}
|
|
133163
134391
|
return await fn();
|
|
133164
|
-
});
|
|
133165
|
-
PROCESS_LOCKS[name] =
|
|
133166
|
-
|
|
133167
|
-
await
|
|
133168
|
-
|
|
134392
|
+
})();
|
|
134393
|
+
PROCESS_LOCKS[name] = (async () => {
|
|
134394
|
+
try {
|
|
134395
|
+
return await currentOperation;
|
|
134396
|
+
} catch (e2) {
|
|
134397
|
+
if (e2 && e2.isAcquireTimeout) {
|
|
134398
|
+
try {
|
|
134399
|
+
await previousOperation;
|
|
134400
|
+
} catch (prevError) {}
|
|
134401
|
+
return null;
|
|
134402
|
+
}
|
|
134403
|
+
throw e2;
|
|
133169
134404
|
}
|
|
133170
|
-
|
|
133171
|
-
});
|
|
134405
|
+
})();
|
|
133172
134406
|
return await currentOperation;
|
|
133173
134407
|
}
|
|
133174
134408
|
});
|
|
@@ -133467,7 +134701,7 @@ var require_webauthn = __commonJS((exports) => {
|
|
|
133467
134701
|
exports.getCredential = getCredential;
|
|
133468
134702
|
exports.mergeCredentialCreationOptions = mergeCredentialCreationOptions;
|
|
133469
134703
|
exports.mergeCredentialRequestOptions = mergeCredentialRequestOptions;
|
|
133470
|
-
var tslib_1 =
|
|
134704
|
+
var tslib_1 = require_tslib3();
|
|
133471
134705
|
var base64url_1 = require_base64url();
|
|
133472
134706
|
var errors_1 = require_errors2();
|
|
133473
134707
|
var helpers_1 = require_helpers3();
|
|
@@ -133910,7 +135144,7 @@ var require_webauthn = __commonJS((exports) => {
|
|
|
133910
135144
|
// node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
|
|
133911
135145
|
var require_GoTrueClient = __commonJS((exports) => {
|
|
133912
135146
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
133913
|
-
var tslib_1 =
|
|
135147
|
+
var tslib_1 = require_tslib3();
|
|
133914
135148
|
var GoTrueAdminApi_1 = tslib_1.__importDefault(require_GoTrueAdminApi());
|
|
133915
135149
|
var constants_1 = require_constants27();
|
|
133916
135150
|
var errors_1 = require_errors2();
|
|
@@ -136143,7 +137377,7 @@ var require_GoTrueClient = __commonJS((exports) => {
|
|
|
136143
137377
|
// node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
|
|
136144
137378
|
var require_AuthAdminApi = __commonJS((exports) => {
|
|
136145
137379
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
136146
|
-
var tslib_1 =
|
|
137380
|
+
var tslib_1 = require_tslib3();
|
|
136147
137381
|
var GoTrueAdminApi_1 = tslib_1.__importDefault(require_GoTrueAdminApi());
|
|
136148
137382
|
var AuthAdminApi = GoTrueAdminApi_1.default;
|
|
136149
137383
|
exports.default = AuthAdminApi;
|
|
@@ -136152,7 +137386,7 @@ var require_AuthAdminApi = __commonJS((exports) => {
|
|
|
136152
137386
|
// node_modules/@supabase/auth-js/dist/main/AuthClient.js
|
|
136153
137387
|
var require_AuthClient = __commonJS((exports) => {
|
|
136154
137388
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
136155
|
-
var tslib_1 =
|
|
137389
|
+
var tslib_1 = require_tslib3();
|
|
136156
137390
|
var GoTrueClient_1 = tslib_1.__importDefault(require_GoTrueClient());
|
|
136157
137391
|
var AuthClient = GoTrueClient_1.default;
|
|
136158
137392
|
exports.default = AuthClient;
|
|
@@ -136162,7 +137396,7 @@ var require_AuthClient = __commonJS((exports) => {
|
|
|
136162
137396
|
var require_main4 = __commonJS((exports) => {
|
|
136163
137397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
136164
137398
|
exports.processLock = exports.lockInternals = exports.NavigatorLockAcquireTimeoutError = exports.navigatorLock = exports.AuthClient = exports.AuthAdminApi = exports.GoTrueClient = exports.GoTrueAdminApi = undefined;
|
|
136165
|
-
var tslib_1 =
|
|
137399
|
+
var tslib_1 = require_tslib3();
|
|
136166
137400
|
var GoTrueAdminApi_1 = tslib_1.__importDefault(require_GoTrueAdminApi());
|
|
136167
137401
|
exports.GoTrueAdminApi = GoTrueAdminApi_1.default;
|
|
136168
137402
|
var GoTrueClient_1 = tslib_1.__importDefault(require_GoTrueClient());
|
|
@@ -141021,7 +142255,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
|
141021
142255
|
};
|
|
141022
142256
|
});
|
|
141023
142257
|
|
|
141024
|
-
// node_modules/json-schema-traverse/index.js
|
|
142258
|
+
// node_modules/@modelcontextprotocol/sdk/node_modules/ajv/node_modules/json-schema-traverse/index.js
|
|
141025
142259
|
var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
141026
142260
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
141027
142261
|
if (typeof opts == "function") {
|
|
@@ -147334,13 +148568,96 @@ var require_subschema2 = __commonJS((exports) => {
|
|
|
147334
148568
|
exports.extendSubschemaMode = extendSubschemaMode;
|
|
147335
148569
|
});
|
|
147336
148570
|
|
|
148571
|
+
// node_modules/ajv-formats/node_modules/ajv/node_modules/json-schema-traverse/index.js
|
|
148572
|
+
var require_json_schema_traverse2 = __commonJS((exports, module) => {
|
|
148573
|
+
var traverse = module.exports = function(schema, opts, cb) {
|
|
148574
|
+
if (typeof opts == "function") {
|
|
148575
|
+
cb = opts;
|
|
148576
|
+
opts = {};
|
|
148577
|
+
}
|
|
148578
|
+
cb = opts.cb || cb;
|
|
148579
|
+
var pre = typeof cb == "function" ? cb : cb.pre || function() {};
|
|
148580
|
+
var post2 = cb.post || function() {};
|
|
148581
|
+
_traverse(opts, pre, post2, schema, "", schema);
|
|
148582
|
+
};
|
|
148583
|
+
traverse.keywords = {
|
|
148584
|
+
additionalItems: true,
|
|
148585
|
+
items: true,
|
|
148586
|
+
contains: true,
|
|
148587
|
+
additionalProperties: true,
|
|
148588
|
+
propertyNames: true,
|
|
148589
|
+
not: true,
|
|
148590
|
+
if: true,
|
|
148591
|
+
then: true,
|
|
148592
|
+
else: true
|
|
148593
|
+
};
|
|
148594
|
+
traverse.arrayKeywords = {
|
|
148595
|
+
items: true,
|
|
148596
|
+
allOf: true,
|
|
148597
|
+
anyOf: true,
|
|
148598
|
+
oneOf: true
|
|
148599
|
+
};
|
|
148600
|
+
traverse.propsKeywords = {
|
|
148601
|
+
$defs: true,
|
|
148602
|
+
definitions: true,
|
|
148603
|
+
properties: true,
|
|
148604
|
+
patternProperties: true,
|
|
148605
|
+
dependencies: true
|
|
148606
|
+
};
|
|
148607
|
+
traverse.skipKeywords = {
|
|
148608
|
+
default: true,
|
|
148609
|
+
enum: true,
|
|
148610
|
+
const: true,
|
|
148611
|
+
required: true,
|
|
148612
|
+
maximum: true,
|
|
148613
|
+
minimum: true,
|
|
148614
|
+
exclusiveMaximum: true,
|
|
148615
|
+
exclusiveMinimum: true,
|
|
148616
|
+
multipleOf: true,
|
|
148617
|
+
maxLength: true,
|
|
148618
|
+
minLength: true,
|
|
148619
|
+
pattern: true,
|
|
148620
|
+
format: true,
|
|
148621
|
+
maxItems: true,
|
|
148622
|
+
minItems: true,
|
|
148623
|
+
uniqueItems: true,
|
|
148624
|
+
maxProperties: true,
|
|
148625
|
+
minProperties: true
|
|
148626
|
+
};
|
|
148627
|
+
function _traverse(opts, pre, post2, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
148628
|
+
if (schema && typeof schema == "object" && !Array.isArray(schema)) {
|
|
148629
|
+
pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
148630
|
+
for (var key in schema) {
|
|
148631
|
+
var sch = schema[key];
|
|
148632
|
+
if (Array.isArray(sch)) {
|
|
148633
|
+
if (key in traverse.arrayKeywords) {
|
|
148634
|
+
for (var i2 = 0;i2 < sch.length; i2++)
|
|
148635
|
+
_traverse(opts, pre, post2, sch[i2], jsonPtr + "/" + key + "/" + i2, rootSchema, jsonPtr, key, schema, i2);
|
|
148636
|
+
}
|
|
148637
|
+
} else if (key in traverse.propsKeywords) {
|
|
148638
|
+
if (sch && typeof sch == "object") {
|
|
148639
|
+
for (var prop in sch)
|
|
148640
|
+
_traverse(opts, pre, post2, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
148641
|
+
}
|
|
148642
|
+
} else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
|
|
148643
|
+
_traverse(opts, pre, post2, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
|
|
148644
|
+
}
|
|
148645
|
+
}
|
|
148646
|
+
post2(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
148647
|
+
}
|
|
148648
|
+
}
|
|
148649
|
+
function escapeJsonPtr(str2) {
|
|
148650
|
+
return str2.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
148651
|
+
}
|
|
148652
|
+
});
|
|
148653
|
+
|
|
147337
148654
|
// node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js
|
|
147338
148655
|
var require_resolve2 = __commonJS((exports) => {
|
|
147339
148656
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147340
148657
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
|
|
147341
148658
|
var util_1 = require_util9();
|
|
147342
148659
|
var equal = require_fast_deep_equal();
|
|
147343
|
-
var traverse =
|
|
148660
|
+
var traverse = require_json_schema_traverse2();
|
|
147344
148661
|
var SIMPLE_INLINED = new Set([
|
|
147345
148662
|
"type",
|
|
147346
148663
|
"format",
|
|
@@ -164401,7 +165718,7 @@ config(en_default());
|
|
|
164401
165718
|
// package.json
|
|
164402
165719
|
var package_default = {
|
|
164403
165720
|
name: "mcp-ts-template",
|
|
164404
|
-
version: "2.9.
|
|
165721
|
+
version: "2.9.3",
|
|
164405
165722
|
mcpName: "io.github.cyanheads/mcp-ts-template",
|
|
164406
165723
|
description: "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
164407
165724
|
main: "dist/index.js",
|
|
@@ -164460,7 +165777,7 @@ var package_default = {
|
|
|
164460
165777
|
"coverage:commit": "bun run scripts/update-coverage.ts --commit",
|
|
164461
165778
|
audit: "bun audit",
|
|
164462
165779
|
"audit:fix": "bun audit --fix",
|
|
164463
|
-
"publish-mcp": "
|
|
165780
|
+
"publish-mcp": "bunx mcp-publisher publish"
|
|
164464
165781
|
},
|
|
164465
165782
|
resolutions: {
|
|
164466
165783
|
"@hono/node-server": "1.19.9",
|
|
@@ -164571,10 +165888,7 @@ var package_default = {
|
|
|
164571
165888
|
"@opentelemetry/sdk-node": "^0.212.0",
|
|
164572
165889
|
"@opentelemetry/sdk-trace-node": "^2.5.1",
|
|
164573
165890
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
164574
|
-
"@supabase/supabase-js": "^2.
|
|
164575
|
-
ajv: "^8.18.0",
|
|
164576
|
-
"ajv-formats": "^3.0.1",
|
|
164577
|
-
axios: "^1.13.5",
|
|
165891
|
+
"@supabase/supabase-js": "^2.96.0",
|
|
164578
165892
|
"chrono-node": "^2.9.0",
|
|
164579
165893
|
dotenv: "^17.3.1",
|
|
164580
165894
|
"fast-xml-parser": "^5.3.6",
|
|
@@ -164590,7 +165904,6 @@ var package_default = {
|
|
|
164590
165904
|
"pino-pretty": "^13.1.3",
|
|
164591
165905
|
"sanitize-html": "^2.17.0",
|
|
164592
165906
|
surrealdb: "^1.3.2",
|
|
164593
|
-
tslib: "^2.8.1",
|
|
164594
165907
|
unpdf: "^1.4.0",
|
|
164595
165908
|
validator: "13.15.26",
|
|
164596
165909
|
zod: "^4.3.6"
|
|
@@ -165809,6 +167122,9 @@ class Logger {
|
|
|
165809
167122
|
operation: "loggerSetLevel"
|
|
165810
167123
|
}));
|
|
165811
167124
|
}
|
|
167125
|
+
async[Symbol.asyncDispose]() {
|
|
167126
|
+
return this.close();
|
|
167127
|
+
}
|
|
165812
167128
|
async close() {
|
|
165813
167129
|
if (!this.initialized)
|
|
165814
167130
|
return Promise.resolve();
|
|
@@ -168539,6 +169855,10 @@ var BaseApiClient = class {
|
|
|
168539
169855
|
this.shouldThrowOnError = true;
|
|
168540
169856
|
return this;
|
|
168541
169857
|
}
|
|
169858
|
+
setHeader(name, value) {
|
|
169859
|
+
this.headers = _objectSpread22(_objectSpread22({}, this.headers), {}, { [name]: value });
|
|
169860
|
+
return this;
|
|
169861
|
+
}
|
|
168542
169862
|
async handleOperation(operation) {
|
|
168543
169863
|
var _this = this;
|
|
168544
169864
|
try {
|
|
@@ -168888,7 +170208,7 @@ var StorageFileApi = class extends BaseApiClient {
|
|
|
168888
170208
|
return params.join("&");
|
|
168889
170209
|
}
|
|
168890
170210
|
};
|
|
168891
|
-
var version2 = "2.
|
|
170211
|
+
var version2 = "2.96.0";
|
|
168892
170212
|
var DEFAULT_HEADERS = { "X-Client-Info": `storage-js/${version2}` };
|
|
168893
170213
|
var StorageBucketApi = class extends BaseApiClient {
|
|
168894
170214
|
constructor(url2, headers = {}, fetch$1, opts) {
|
|
@@ -169271,7 +170591,7 @@ var StorageClient = class extends StorageBucketApi {
|
|
|
169271
170591
|
var import_auth_js = __toESM(require_main4(), 1);
|
|
169272
170592
|
__reExport(exports_dist3, __toESM(require_main3(), 1));
|
|
169273
170593
|
__reExport(exports_dist3, __toESM(require_main4(), 1));
|
|
169274
|
-
var version3 = "2.
|
|
170594
|
+
var version3 = "2.96.0";
|
|
169275
170595
|
var JS_ENV = "";
|
|
169276
170596
|
if (typeof Deno !== "undefined")
|
|
169277
170597
|
JS_ENV = "deno";
|