@datapos/datapos-development 0.3.174 → 0.3.176
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 +3 -2
- package/dist/datapos-development.es.js +170 -164
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -71,7 +71,9 @@ The following table lists top-level production and peer dependencies. All these
|
|
|
71
71
|
| Name | Type | Installed | Latest | Latest Modified |
|
|
72
72
|
| :---------------------- | :--: | :-------: | :-----: | :----------------------- |
|
|
73
73
|
| @datapos/datapos-shared | MIT | 0.3.252 | 0.3.252 | 2025-11-25T16:48:28.532Z |
|
|
74
|
-
|
|
|
74
|
+
| acorn | MIT | 8.15.0 | 8.15.0 | 2025-06-09T04:08:15.567Z |
|
|
75
|
+
| acorn-typescript | MIT | 1.4.13 | 1.4.13 | 2024-01-03T02:25:10.152Z |
|
|
76
|
+
| acorn-walk | MIT | 8.3.4 | 8.3.4 | 2024-09-09T08:40:59.131Z |
|
|
75
77
|
|
|
76
78
|
<!-- DEPENDENCY_LICENSES_END -->
|
|
77
79
|
|
|
@@ -103,7 +105,6 @@ For detailed implementation, see the `scripts` section in the `package.json` fil
|
|
|
103
105
|
## TODO
|
|
104
106
|
|
|
105
107
|
1. Enhance `uploadDirectoryToR2`to batch upload files so more efficient and performant.
|
|
106
|
-
1. Replace regex with TypeScript AST in `buildConnectorConfig`. Extracting method names from index.ts via regex is fragile — breaks with decorators, comments, or new syntax (e.g., class fields). AST parsing (via @babel/parser or typescript) would be safer.
|
|
107
108
|
1. Implement zod to validate config schemas.
|
|
108
109
|
|
|
109
110
|
## License
|
|
@@ -131,11 +131,11 @@ var h = {
|
|
|
131
131
|
_typeof: D("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
132
|
_void: D("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
133
|
_delete: D("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
-
},
|
|
134
|
+
}, Z = /\r\n?|\n|\u2028|\u2029/, He = new RegExp(Z.source, "g");
|
|
135
135
|
function Tt(t) {
|
|
136
136
|
return t === 10 || t === 13 || t === 8232 || t === 8233;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ke(t, e, r) {
|
|
139
139
|
r === void 0 && (r = t.length);
|
|
140
140
|
for (var a = e; a < r; a++) {
|
|
141
141
|
var u = t.charCodeAt(a);
|
|
@@ -144,7 +144,7 @@ function We(t, e, r) {
|
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
var xe = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
|
|
147
|
+
var xe = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, X = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, We = Object.prototype, Fi = We.hasOwnProperty, Bi = We.toString, wt = Object.hasOwn || (function(t, e) {
|
|
148
148
|
return Fi.call(t, e);
|
|
149
149
|
}), Ie = Array.isArray || (function(t) {
|
|
150
150
|
return Bi.call(t) === "[object Array]";
|
|
@@ -166,7 +166,7 @@ var Ft = function(e, r, a) {
|
|
|
166
166
|
};
|
|
167
167
|
function ve(t, e) {
|
|
168
168
|
for (var r = 1, a = 0; ; ) {
|
|
169
|
-
var u =
|
|
169
|
+
var u = Ke(t, a, e);
|
|
170
170
|
if (u < 0)
|
|
171
171
|
return new At(r, e - a);
|
|
172
172
|
++r, a = u;
|
|
@@ -297,15 +297,15 @@ var Vt = 1, Et = 2, ge = 4, ze = 8, be = 16, Je = 32, Yt = 64, Ge = 128, Pt = 25
|
|
|
297
297
|
function Se(t, e) {
|
|
298
298
|
return Et | (t ? ge : 0) | (e ? ze : 0);
|
|
299
299
|
}
|
|
300
|
-
var Jt = 0, Te = 1, xt = 2, $e = 3, Xe = 4, Qe = 5,
|
|
300
|
+
var Jt = 0, Te = 1, xt = 2, $e = 3, Xe = 4, Qe = 5, K = function(e, r, a) {
|
|
301
301
|
this.options = e = Ui(e), this.sourceFile = e.sourceFile, this.keywords = bt(Ri[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
302
302
|
var u = "";
|
|
303
303
|
e.allowReserved !== !0 && (u = oe[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (u += " await")), this.reservedWords = bt(u);
|
|
304
304
|
var l = (u ? u + " " : "") + oe.strict;
|
|
305
305
|
this.reservedWordsStrict = bt(l), this.reservedWordsStrictBind = bt(l + " " + oe.strictBind), this.input = String(r), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
306
|
-
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
306
|
+
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Z).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = h.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Vt), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, lt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
308
|
-
|
|
308
|
+
K.prototype.parse = function() {
|
|
309
309
|
var e = this.options.program || this.startNode();
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(e);
|
|
311
311
|
};
|
|
@@ -349,83 +349,83 @@ lt.allowNewDotTarget.get = function() {
|
|
|
349
349
|
lt.inClassStaticBlock.get = function() {
|
|
350
350
|
return (this.currentVarScope().flags & Pt) > 0;
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
K.extend = function() {
|
|
353
353
|
for (var e = [], r = arguments.length; r--; ) e[r] = arguments[r];
|
|
354
354
|
for (var a = this, u = 0; u < e.length; u++)
|
|
355
355
|
a = e[u](a);
|
|
356
356
|
return a;
|
|
357
357
|
};
|
|
358
|
-
|
|
358
|
+
K.parse = function(e, r) {
|
|
359
359
|
return new this(r, e).parse();
|
|
360
360
|
};
|
|
361
|
-
|
|
361
|
+
K.parseExpressionAt = function(e, r, a) {
|
|
362
362
|
var u = new this(a, e, r);
|
|
363
363
|
return u.nextToken(), u.parseExpression();
|
|
364
364
|
};
|
|
365
|
-
|
|
365
|
+
K.tokenizer = function(e, r) {
|
|
366
366
|
return new this(r, e);
|
|
367
367
|
};
|
|
368
|
-
Object.defineProperties(
|
|
369
|
-
var
|
|
370
|
-
|
|
368
|
+
Object.defineProperties(K.prototype, lt);
|
|
369
|
+
var tt = K.prototype, Hi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
|
+
tt.strictDirective = function(t) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
374
|
-
|
|
374
|
+
X.lastIndex = t, t += X.exec(this.input)[0].length;
|
|
375
375
|
var e = Hi.exec(this.input.slice(t));
|
|
376
376
|
if (!e)
|
|
377
377
|
return !1;
|
|
378
378
|
if ((e[1] || e[2]) === "use strict") {
|
|
379
|
-
|
|
380
|
-
var r =
|
|
381
|
-
return u === ";" || u === "}" ||
|
|
379
|
+
X.lastIndex = t + e[0].length;
|
|
380
|
+
var r = X.exec(this.input), a = r.index + r[0].length, u = this.input.charAt(a);
|
|
381
|
+
return u === ";" || u === "}" || Z.test(r[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(u) || u === "!" && this.input.charAt(a + 1) === "=");
|
|
382
382
|
}
|
|
383
|
-
t += e[0].length,
|
|
383
|
+
t += e[0].length, X.lastIndex = t, t += X.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
tt.eat = function(t) {
|
|
387
387
|
return this.type === t ? (this.next(), !0) : !1;
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
tt.isContextual = function(t) {
|
|
390
390
|
return this.type === h.name && this.value === t && !this.containsEsc;
|
|
391
391
|
};
|
|
392
|
-
|
|
392
|
+
tt.eatContextual = function(t) {
|
|
393
393
|
return this.isContextual(t) ? (this.next(), !0) : !1;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
tt.expectContextual = function(t) {
|
|
396
396
|
this.eatContextual(t) || this.unexpected();
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === h.eof || this.type === h.braceR ||
|
|
398
|
+
tt.canInsertSemicolon = function() {
|
|
399
|
+
return this.type === h.eof || this.type === h.braceR || Z.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
tt.insertSemicolon = function() {
|
|
402
402
|
if (this.canInsertSemicolon())
|
|
403
403
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
tt.semicolon = function() {
|
|
406
406
|
!this.eat(h.semi) && !this.insertSemicolon() && this.unexpected();
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
tt.afterTrailingComma = function(t, e) {
|
|
409
409
|
if (this.type === t)
|
|
410
410
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), e || this.next(), !0;
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
tt.expect = function(t) {
|
|
413
413
|
this.eat(t) || this.unexpected();
|
|
414
414
|
};
|
|
415
|
-
|
|
415
|
+
tt.unexpected = function(t) {
|
|
416
416
|
this.raise(t ?? this.start, "Unexpected token");
|
|
417
417
|
};
|
|
418
418
|
var te = function() {
|
|
419
419
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
tt.checkPatternErrors = function(t, e) {
|
|
422
422
|
if (t) {
|
|
423
423
|
t.trailingComma > -1 && this.raiseRecoverable(t.trailingComma, "Comma is not permitted after the rest element");
|
|
424
424
|
var r = e ? t.parenthesizedAssign : t.parenthesizedBind;
|
|
425
425
|
r > -1 && this.raiseRecoverable(r, e ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
428
|
+
tt.checkExpressionErrors = function(t, e) {
|
|
429
429
|
if (!t)
|
|
430
430
|
return !1;
|
|
431
431
|
var r = t.shorthandAssign, a = t.doubleProto;
|
|
@@ -433,13 +433,13 @@ Z.checkExpressionErrors = function(t, e) {
|
|
|
433
433
|
return r >= 0 || a >= 0;
|
|
434
434
|
r >= 0 && this.raise(r, "Shorthand property assignments are valid only in destructuring patterns"), a >= 0 && this.raiseRecoverable(a, "Redefinition of __proto__ property");
|
|
435
435
|
};
|
|
436
|
-
|
|
436
|
+
tt.checkYieldAwaitInDefaultParams = function() {
|
|
437
437
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
438
438
|
};
|
|
439
|
-
|
|
439
|
+
tt.isSimpleAssignTarget = function(t) {
|
|
440
440
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
|
-
var k =
|
|
442
|
+
var k = K.prototype;
|
|
443
443
|
k.parseTopLevel = function(t) {
|
|
444
444
|
var e = /* @__PURE__ */ Object.create(null);
|
|
445
445
|
for (t.body || (t.body = []); this.type !== h.eof; ) {
|
|
@@ -453,12 +453,12 @@ k.parseTopLevel = function(t) {
|
|
|
453
453
|
}
|
|
454
454
|
return this.adaptDirectivePrologue(t.body), this.next(), t.sourceType = this.options.sourceType, this.finishNode(t, "Program");
|
|
455
455
|
};
|
|
456
|
-
var Pe = { kind: "loop" },
|
|
456
|
+
var Pe = { kind: "loop" }, Ki = { kind: "switch" };
|
|
457
457
|
k.isLet = function(t) {
|
|
458
458
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
459
459
|
return !1;
|
|
460
|
-
|
|
461
|
-
var e =
|
|
460
|
+
X.lastIndex = this.pos;
|
|
461
|
+
var e = X.exec(this.input), r = this.pos + e[0].length, a = this.input.charCodeAt(r);
|
|
462
462
|
if (a === 91 || a === 92)
|
|
463
463
|
return !0;
|
|
464
464
|
if (t)
|
|
@@ -479,24 +479,24 @@ k.isLet = function(t) {
|
|
|
479
479
|
k.isAsyncFunction = function() {
|
|
480
480
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
481
481
|
return !1;
|
|
482
|
-
|
|
483
|
-
var t =
|
|
484
|
-
return !
|
|
482
|
+
X.lastIndex = this.pos;
|
|
483
|
+
var t = X.exec(this.input), e = this.pos + t[0].length, r;
|
|
484
|
+
return !Z.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(dt(r = this.input.charCodeAt(e + 8)) || r > 55295 && r < 56320));
|
|
485
485
|
};
|
|
486
486
|
k.isUsingKeyword = function(t, e) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
|
-
|
|
490
|
-
var r =
|
|
491
|
-
if (
|
|
489
|
+
X.lastIndex = this.pos;
|
|
490
|
+
var r = X.exec(this.input), a = this.pos + r[0].length;
|
|
491
|
+
if (Z.test(this.input.slice(this.pos, a)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (t) {
|
|
494
494
|
var u = a + 5, l;
|
|
495
495
|
if (this.input.slice(a, u) !== "using" || u === this.input.length || dt(l = this.input.charCodeAt(u)) || l > 55295 && l < 56320)
|
|
496
496
|
return !1;
|
|
497
|
-
|
|
498
|
-
var d =
|
|
499
|
-
if (d &&
|
|
497
|
+
X.lastIndex = u;
|
|
498
|
+
var d = X.exec(this.input);
|
|
499
|
+
if (d && Z.test(this.input.slice(u, u + d[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
if (e) {
|
|
@@ -553,8 +553,8 @@ k.parseStatement = function(t, e, r) {
|
|
|
553
553
|
case h._export:
|
|
554
554
|
case h._import:
|
|
555
555
|
if (this.options.ecmaVersion > 10 && a === h._import) {
|
|
556
|
-
|
|
557
|
-
var d =
|
|
556
|
+
X.lastIndex = this.pos;
|
|
557
|
+
var d = X.exec(this.input), v = this.pos + d[0].length, g = this.input.charCodeAt(v);
|
|
558
558
|
if (g === 40 || g === 46)
|
|
559
559
|
return this.parseExpressionStatement(u, this.parseExpression());
|
|
560
560
|
}
|
|
@@ -621,7 +621,7 @@ k.parseReturnStatement = function(t) {
|
|
|
621
621
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(h.semi) || this.insertSemicolon() ? t.argument = null : (t.argument = this.parseExpression(), this.semicolon()), this.finishNode(t, "ReturnStatement");
|
|
622
622
|
};
|
|
623
623
|
k.parseSwitchStatement = function(t) {
|
|
624
|
-
this.next(), t.discriminant = this.parseParenExpression(), t.cases = [], this.expect(h.braceL), this.labels.push(
|
|
624
|
+
this.next(), t.discriminant = this.parseParenExpression(), t.cases = [], this.expect(h.braceL), this.labels.push(Ki), this.enterScope(0);
|
|
625
625
|
for (var e, r = !1; this.type !== h.braceR; )
|
|
626
626
|
if (this.type === h._case || this.type === h._default) {
|
|
627
627
|
var a = this.type === h._case;
|
|
@@ -631,9 +631,9 @@ k.parseSwitchStatement = function(t) {
|
|
|
631
631
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
632
632
|
};
|
|
633
633
|
k.parseThrowStatement = function(t) {
|
|
634
|
-
return this.next(),
|
|
634
|
+
return this.next(), Z.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
635
635
|
};
|
|
636
|
-
var
|
|
636
|
+
var Wi = [];
|
|
637
637
|
k.parseCatchClauseParam = function() {
|
|
638
638
|
var t = this.parseBindingAtom(), e = t.type === "Identifier";
|
|
639
639
|
return this.enterScope(e ? Je : 0), this.checkLValPattern(t, e ? Xe : xt), this.expect(h.parenR), t;
|
|
@@ -881,7 +881,7 @@ k.parseExportSpecifiers = function(t) {
|
|
|
881
881
|
return e;
|
|
882
882
|
};
|
|
883
883
|
k.parseImport = function(t) {
|
|
884
|
-
return this.next(), this.type === h.string ? (t.specifiers =
|
|
884
|
+
return this.next(), this.type === h.string ? (t.specifiers = Wi, t.source = this.parseExprAtom()) : (t.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), t.source = this.type === h.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (t.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(t, "ImportDeclaration");
|
|
885
885
|
};
|
|
886
886
|
k.parseImportSpecifier = function() {
|
|
887
887
|
var t = this.startNode();
|
|
@@ -944,7 +944,7 @@ k.isDirectiveCandidate = function(t) {
|
|
|
944
944
|
return this.options.ecmaVersion >= 5 && t.type === "ExpressionStatement" && t.expression.type === "Literal" && typeof t.expression.value == "string" && // Reject parenthesized strings.
|
|
945
945
|
(this.input[t.start] === '"' || this.input[t.start] === "'");
|
|
946
946
|
};
|
|
947
|
-
var ct =
|
|
947
|
+
var ct = K.prototype;
|
|
948
948
|
ct.toAssignable = function(t, e, r) {
|
|
949
949
|
if (this.options.ecmaVersion >= 6 && t)
|
|
950
950
|
switch (t.type) {
|
|
@@ -1101,22 +1101,22 @@ ct.checkLValInnerPattern = function(t, e, r) {
|
|
|
1101
1101
|
this.checkLValPattern(t, e, r);
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
var
|
|
1104
|
+
var Y = function(e, r, a, u, l) {
|
|
1105
1105
|
this.token = e, this.isExpr = !!r, this.preserveSpace = !!a, this.override = u, this.generator = !!l;
|
|
1106
1106
|
}, j = {
|
|
1107
|
-
b_stat: new
|
|
1108
|
-
b_expr: new
|
|
1109
|
-
b_tmpl: new
|
|
1110
|
-
p_stat: new
|
|
1111
|
-
p_expr: new
|
|
1112
|
-
q_tmpl: new
|
|
1107
|
+
b_stat: new Y("{", !1),
|
|
1108
|
+
b_expr: new Y("{", !0),
|
|
1109
|
+
b_tmpl: new Y("${", !1),
|
|
1110
|
+
p_stat: new Y("(", !1),
|
|
1111
|
+
p_expr: new Y("(", !0),
|
|
1112
|
+
q_tmpl: new Y("`", !0, !0, function(t) {
|
|
1113
1113
|
return t.tryReadTemplateToken();
|
|
1114
1114
|
}),
|
|
1115
|
-
f_stat: new
|
|
1116
|
-
f_expr: new
|
|
1117
|
-
f_expr_gen: new
|
|
1118
|
-
f_gen: new
|
|
1119
|
-
}, It =
|
|
1115
|
+
f_stat: new Y("function", !1),
|
|
1116
|
+
f_expr: new Y("function", !0),
|
|
1117
|
+
f_expr_gen: new Y("function", !0, !1, null, !0),
|
|
1118
|
+
f_gen: new Y("function", !1, !1, null, !0)
|
|
1119
|
+
}, It = K.prototype;
|
|
1120
1120
|
It.initialContext = function() {
|
|
1121
1121
|
return [j.b_stat];
|
|
1122
1122
|
};
|
|
@@ -1125,7 +1125,7 @@ It.curContext = function() {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
It.braceIsBlock = function(t) {
|
|
1127
1127
|
var e = this.curContext();
|
|
1128
|
-
return e === j.f_expr || e === j.f_stat ? !0 : t === h.colon && (e === j.b_stat || e === j.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ?
|
|
1128
|
+
return e === j.f_expr || e === j.f_stat ? !0 : t === h.colon && (e === j.b_stat || e === j.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ? Z.test(this.input.slice(this.lastTokEnd, this.start)) : t === h._else || t === h.semi || t === h.eof || t === h.parenR || t === h.arrow ? !0 : t === h.braceL ? e === j.b_stat : t === h._var || t === h._const || t === h.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
1130
|
It.inGeneratorContext = function() {
|
|
1131
1131
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
@@ -1163,7 +1163,7 @@ h.parenL.updateContext = function(t) {
|
|
|
1163
1163
|
h.incDec.updateContext = function() {
|
|
1164
1164
|
};
|
|
1165
1165
|
h._function.updateContext = h._class.updateContext = function(t) {
|
|
1166
|
-
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== j.p_stat) && !(t === h._return &&
|
|
1166
|
+
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== j.p_stat) && !(t === h._return && Z.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === h.colon || t === h.braceL) && this.curContext() === j.b_stat) ? this.context.push(j.f_expr) : this.context.push(j.f_stat), this.exprAllowed = !1;
|
|
1167
1167
|
};
|
|
1168
1168
|
h.colon.updateContext = function() {
|
|
1169
1169
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1182,7 +1182,7 @@ h.name.updateContext = function(t) {
|
|
|
1182
1182
|
var e = !1;
|
|
1183
1183
|
this.options.ecmaVersion >= 6 && t !== h.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (e = !0), this.exprAllowed = e;
|
|
1184
1184
|
};
|
|
1185
|
-
var _ =
|
|
1185
|
+
var _ = K.prototype;
|
|
1186
1186
|
_.checkPropClash = function(t, e, r) {
|
|
1187
1187
|
if (!(this.options.ecmaVersion >= 9 && t.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (t.computed || t.method || t.shorthand))) {
|
|
1188
1188
|
var a = t.key, u;
|
|
@@ -1349,8 +1349,8 @@ _.parseSubscript = function(t, e, r, a, u, l, d) {
|
|
|
1349
1349
|
I.callee = t, I.arguments = st, v && (I.optional = g), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
1351
1351
|
(g || l) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1352
|
+
var $ = this.startNodeAt(e, r);
|
|
1353
|
+
$.tag = t, $.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode($, "TaggedTemplateExpression");
|
|
1354
1354
|
}
|
|
1355
1355
|
return t;
|
|
1356
1356
|
};
|
|
@@ -1467,8 +1467,8 @@ _.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1470
|
+
var $ = this.startNodeAt(r, a);
|
|
1471
|
+
return $.expression = u, this.finishNode($, "ParenthesizedExpression");
|
|
1472
1472
|
} else
|
|
1473
1473
|
return u;
|
|
1474
1474
|
};
|
|
@@ -1515,7 +1515,7 @@ _.parseTemplate = function(t) {
|
|
|
1515
1515
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
1517
|
_.isAsyncProp = function(t) {
|
|
1518
|
-
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !
|
|
1518
|
+
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !Z.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
1520
|
_.parseObj = function(t, e) {
|
|
1521
1521
|
var r = this.startNode(), a = !0, u = {};
|
|
@@ -1635,7 +1635,7 @@ _.parseAwait = function(t) {
|
|
|
1635
1635
|
var e = this.startNode();
|
|
1636
1636
|
return this.next(), e.argument = this.parseMaybeUnary(null, !0, !1, t), this.finishNode(e, "AwaitExpression");
|
|
1637
1637
|
};
|
|
1638
|
-
var $t =
|
|
1638
|
+
var $t = K.prototype;
|
|
1639
1639
|
$t.raise = function(t, e) {
|
|
1640
1640
|
var r = ve(this.input, t);
|
|
1641
1641
|
e += " (" + r.line + ":" + r.column + ")", this.sourceFile && (e += " in " + this.sourceFile);
|
|
@@ -1647,7 +1647,7 @@ $t.curPosition = function() {
|
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
1648
|
return new At(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
|
-
var St =
|
|
1650
|
+
var St = K.prototype, Gi = function(e) {
|
|
1651
1651
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
1652
1652
|
};
|
|
1653
1653
|
St.enterScope = function(t) {
|
|
@@ -1704,7 +1704,7 @@ St.currentThisScope = function() {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
var jt = function(e, r, a) {
|
|
1706
1706
|
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new Ft(e, a)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [r, 0]);
|
|
1707
|
-
}, Ut =
|
|
1707
|
+
}, Ut = K.prototype;
|
|
1708
1708
|
Ut.startNode = function() {
|
|
1709
1709
|
return new jt(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
@@ -1763,7 +1763,7 @@ for (var ue = 0, Oe = [9, 10, 11, 12, 13, 14]; ue < Oe.length; ue += 1) {
|
|
|
1763
1763
|
var ss = Oe[ue];
|
|
1764
1764
|
is(ss);
|
|
1765
1765
|
}
|
|
1766
|
-
var P =
|
|
1766
|
+
var P = K.prototype, Xt = function(e, r) {
|
|
1767
1767
|
this.parent = e, this.base = r || this;
|
|
1768
1768
|
};
|
|
1769
1769
|
Xt.prototype.separatedFrom = function(e) {
|
|
@@ -2595,7 +2595,7 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2595
2595
|
};
|
|
2596
2596
|
var ie = function(e) {
|
|
2597
2597
|
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ft(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
|
-
}, M =
|
|
2598
|
+
}, M = K.prototype;
|
|
2599
2599
|
M.next = function(t) {
|
|
2600
2600
|
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ie(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2601
2601
|
};
|
|
@@ -2635,7 +2635,7 @@ M.fullCharCodeAtPos = function() {
|
|
|
2635
2635
|
M.skipBlockComment = function() {
|
|
2636
2636
|
var t = this.options.onComment && this.curPosition(), e = this.pos, r = this.input.indexOf("*/", this.pos += 2);
|
|
2637
2637
|
if (r === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = r + 2, this.options.locations)
|
|
2638
|
-
for (var a = void 0, u = e; (a =
|
|
2638
|
+
for (var a = void 0, u = e; (a = Ke(this.input, u, this.pos)) > -1; )
|
|
2639
2639
|
++this.curLine, u = this.lineStart = a;
|
|
2640
2640
|
this.options.onComment && this.options.onComment(
|
|
2641
2641
|
!0,
|
|
@@ -2731,7 +2731,7 @@ M.readToken_caret = function() {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
M.readToken_plus_min = function(t) {
|
|
2733
2733
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2734
|
-
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2734
|
+
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Z.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
2736
|
M.readToken_lt_gt = function(t) {
|
|
2737
2737
|
var e = this.input.charCodeAt(this.pos + 1), r = 1;
|
|
@@ -2862,7 +2862,7 @@ M.readRegexp = function() {
|
|
|
2862
2862
|
for (var t, e, r = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(r, "Unterminated regular expression");
|
|
2864
2864
|
var a = this.input.charAt(this.pos);
|
|
2865
|
-
if (
|
|
2865
|
+
if (Z.test(a) && this.raise(r, "Unterminated regular expression"), t)
|
|
2866
2866
|
t = !1;
|
|
2867
2867
|
else {
|
|
2868
2868
|
if (a === "[")
|
|
@@ -3098,8 +3098,8 @@ M.readWord = function() {
|
|
|
3098
3098
|
return this.keywords.test(t) && (e = kt[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
3100
3100
|
var Si = "8.15.0";
|
|
3101
|
-
|
|
3102
|
-
Parser:
|
|
3101
|
+
K.acorn = {
|
|
3102
|
+
Parser: K,
|
|
3103
3103
|
version: Si,
|
|
3104
3104
|
defaultOptions: zt,
|
|
3105
3105
|
Position: At,
|
|
@@ -3109,32 +3109,32 @@ W.acorn = {
|
|
|
3109
3109
|
TokenType: O,
|
|
3110
3110
|
tokTypes: h,
|
|
3111
3111
|
keywordTypes: kt,
|
|
3112
|
-
TokContext:
|
|
3112
|
+
TokContext: Y,
|
|
3113
3113
|
tokContexts: j,
|
|
3114
3114
|
isIdentifierChar: dt,
|
|
3115
3115
|
isIdentifierStart: pt,
|
|
3116
3116
|
Token: ie,
|
|
3117
3117
|
isNewLine: Tt,
|
|
3118
|
-
lineBreak:
|
|
3118
|
+
lineBreak: Z,
|
|
3119
3119
|
lineBreakG: He,
|
|
3120
3120
|
nonASCIIwhitespace: xe
|
|
3121
3121
|
};
|
|
3122
3122
|
function ms(t, e) {
|
|
3123
|
-
return
|
|
3123
|
+
return K.parse(t, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
function ys(t, e, r) {
|
|
3126
|
-
return
|
|
3126
|
+
return K.parseExpressionAt(t, e, r);
|
|
3127
3127
|
}
|
|
3128
3128
|
function xs(t, e) {
|
|
3129
|
-
return
|
|
3129
|
+
return K.tokenizer(t, e);
|
|
3130
3130
|
}
|
|
3131
3131
|
const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
3133
|
Node: jt,
|
|
3134
|
-
Parser:
|
|
3134
|
+
Parser: K,
|
|
3135
3135
|
Position: At,
|
|
3136
3136
|
SourceLocation: Ft,
|
|
3137
|
-
TokContext:
|
|
3137
|
+
TokContext: Y,
|
|
3138
3138
|
Token: ie,
|
|
3139
3139
|
TokenType: O,
|
|
3140
3140
|
defaultOptions: zt,
|
|
@@ -3143,7 +3143,7 @@ const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3143
3143
|
isIdentifierStart: pt,
|
|
3144
3144
|
isNewLine: Tt,
|
|
3145
3145
|
keywordTypes: kt,
|
|
3146
|
-
lineBreak:
|
|
3146
|
+
lineBreak: Z,
|
|
3147
3147
|
lineBreakG: He,
|
|
3148
3148
|
nonASCIIwhitespace: xe,
|
|
3149
3149
|
parse: ms,
|
|
@@ -3178,7 +3178,7 @@ function Qt() {
|
|
|
3178
3178
|
return t;
|
|
3179
3179
|
}, Qt.apply(this, arguments);
|
|
3180
3180
|
}
|
|
3181
|
-
function
|
|
3181
|
+
function Wt(t, e) {
|
|
3182
3182
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, me(t, e);
|
|
3183
3183
|
}
|
|
3184
3184
|
function me(t, e) {
|
|
@@ -3218,7 +3218,7 @@ var gs = /* @__PURE__ */ new WeakMap();
|
|
|
3218
3218
|
function bs(t) {
|
|
3219
3219
|
var e = gs.get(t.Parser.acorn || t);
|
|
3220
3220
|
if (!e) {
|
|
3221
|
-
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new
|
|
3221
|
+
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new Y("<tag", !1, !1), tc_cTag: new Y("</tag", !1, !1), tc_expr: new Y("<tag>...</tag>", !0, !0) }, l = new RegExp("^(?:" + Object.keys(r).join("|") + ")$");
|
|
3222
3222
|
a.jsxTagStart.updateContext = function() {
|
|
3223
3223
|
this.context.push(u.tc_expr), this.context.push(u.tc_oTag), this.exprAllowed = !1;
|
|
3224
3224
|
}, a.jsxTagEnd.updateContext = function(d) {
|
|
@@ -3319,22 +3319,22 @@ function je(t) {
|
|
|
3319
3319
|
function Is(t) {
|
|
3320
3320
|
var e = {}, r = e.dts, a = r !== void 0 && r, u = e.allowSatisfies, l = u !== void 0 && u;
|
|
3321
3321
|
return function(d) {
|
|
3322
|
-
var v = d.acorn || vs, g = bs(v), o = v.tokTypes, w = v.keywordTypes, L = v.isIdentifierStart, F = v.lineBreak, z = v.isNewLine, G = v.tokContexts, st = v.isIdentifierChar, I = g.tokTypes,
|
|
3323
|
-
function wi(T, et,
|
|
3324
|
-
|
|
3325
|
-
for (var
|
|
3326
|
-
var V = T.charCodeAt(
|
|
3327
|
-
if (z(V)) return
|
|
3322
|
+
var v = d.acorn || vs, g = bs(v), o = v.tokTypes, w = v.keywordTypes, L = v.isIdentifierStart, F = v.lineBreak, z = v.isNewLine, G = v.tokContexts, st = v.isIdentifierChar, I = g.tokTypes, $ = g.tokContexts, se = g.keywordsRegExp, Pi = g.tokenIsLiteralPropertyName, Ci = g.tokenIsTemplate, ki = g.tokenIsTSDeclarationStart, B = g.tokenIsIdentifier, qt = g.tokenIsKeywordOrIdentifier, Ai = g.tokenIsTSTypeOperator;
|
|
3323
|
+
function wi(T, et, Q) {
|
|
3324
|
+
Q === void 0 && (Q = T.length);
|
|
3325
|
+
for (var W = et; W < Q; W++) {
|
|
3326
|
+
var V = T.charCodeAt(W);
|
|
3327
|
+
if (z(V)) return W < Q - 1 && V === 13 && T.charCodeAt(W + 1) === 10 ? W + 2 : W + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
d = (function(T, et,
|
|
3332
|
-
var
|
|
3331
|
+
d = (function(T, et, Q) {
|
|
3332
|
+
var W = Q.tokTypes, V = et.tokTypes;
|
|
3333
3333
|
return (function(p) {
|
|
3334
3334
|
function i() {
|
|
3335
3335
|
return p.apply(this, arguments) || this;
|
|
3336
3336
|
}
|
|
3337
|
-
|
|
3337
|
+
Wt(i, p);
|
|
3338
3338
|
var s = i.prototype;
|
|
3339
3339
|
return s.takeDecorators = function(n) {
|
|
3340
3340
|
var c = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3344,37 +3344,37 @@ function Is(t) {
|
|
|
3344
3344
|
var f = this.parseDecorator();
|
|
3345
3345
|
c.push(f);
|
|
3346
3346
|
}
|
|
3347
|
-
this.match(
|
|
3347
|
+
this.match(W._export) ? n || this.unexpected() : this.canHaveLeadingDecorator() || this.raise(this.start, "Leading decorators must be attached to a class declaration.");
|
|
3348
3348
|
}, s.parseDecorator = function() {
|
|
3349
3349
|
var n = this.startNode();
|
|
3350
3350
|
this.next(), this.decoratorStack.push([]);
|
|
3351
3351
|
var c, f = this.start, m = this.startLoc;
|
|
3352
|
-
if (this.match(
|
|
3352
|
+
if (this.match(W.parenL)) {
|
|
3353
3353
|
var y = this.start, x = this.startLoc;
|
|
3354
|
-
if (this.next(), c = this.parseExpression(), this.expect(
|
|
3354
|
+
if (this.next(), c = this.parseExpression(), this.expect(W.parenR), this.options.preserveParens) {
|
|
3355
3355
|
var b = this.startNodeAt(y, x);
|
|
3356
3356
|
b.expression = c, c = this.finishNode(b, "ParenthesizedExpression");
|
|
3357
3357
|
}
|
|
3358
|
-
} else for (c = this.parseIdent(!1); this.eat(
|
|
3358
|
+
} else for (c = this.parseIdent(!1); this.eat(W.dot); ) {
|
|
3359
3359
|
var S = this.startNodeAt(f, m);
|
|
3360
3360
|
S.object = c, S.property = this.parseIdent(!0), S.computed = !1, c = this.finishNode(S, "MemberExpression");
|
|
3361
3361
|
}
|
|
3362
3362
|
return n.expression = this.parseMaybeDecoratorArguments(c), this.decoratorStack.pop(), this.finishNode(n, "Decorator");
|
|
3363
3363
|
}, s.parseMaybeDecoratorArguments = function(n) {
|
|
3364
|
-
if (this.eat(
|
|
3364
|
+
if (this.eat(W.parenL)) {
|
|
3365
3365
|
var c = this.startNodeAtNode(n);
|
|
3366
|
-
return c.callee = n, c.arguments = this.parseExprList(
|
|
3366
|
+
return c.callee = n, c.arguments = this.parseExprList(W.parenR, !1), this.finishNode(c, "CallExpression");
|
|
3367
3367
|
}
|
|
3368
3368
|
return n;
|
|
3369
3369
|
}, i;
|
|
3370
3370
|
})(T);
|
|
3371
|
-
})(d, g, v), d = (function(T, et,
|
|
3371
|
+
})(d, g, v), d = (function(T, et, Q, W) {
|
|
3372
3372
|
var V = T.tokTypes, p = et.tokTypes, i = T.isNewLine, s = T.isIdentifierChar, n = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(c) {
|
|
3374
3374
|
function f() {
|
|
3375
3375
|
return c.apply(this, arguments) || this;
|
|
3376
3376
|
}
|
|
3377
|
-
|
|
3377
|
+
Wt(f, c);
|
|
3378
3378
|
var m = f.prototype;
|
|
3379
3379
|
return m.jsx_readToken = function() {
|
|
3380
3380
|
for (var y = "", x = this.pos; ; ) {
|
|
@@ -3500,17 +3500,17 @@ function Is(t) {
|
|
|
3500
3500
|
var y = this.start, x = this.startLoc;
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(y, x);
|
|
3502
3502
|
}, f;
|
|
3503
|
-
})(
|
|
3504
|
-
})(v, g, d), d = (function(T, et,
|
|
3505
|
-
var
|
|
3503
|
+
})(Q);
|
|
3504
|
+
})(v, g, d), d = (function(T, et, Q) {
|
|
3505
|
+
var W = et.tokTypes, V = Q.tokTypes;
|
|
3506
3506
|
return (function(p) {
|
|
3507
3507
|
function i() {
|
|
3508
3508
|
return p.apply(this, arguments) || this;
|
|
3509
3509
|
}
|
|
3510
|
-
|
|
3510
|
+
Wt(i, p);
|
|
3511
3511
|
var s = i.prototype;
|
|
3512
3512
|
return s.parseMaybeImportAttributes = function(n) {
|
|
3513
|
-
if (this.type === V._with || this.type ===
|
|
3513
|
+
if (this.type === V._with || this.type === W.assert) {
|
|
3514
3514
|
this.next();
|
|
3515
3515
|
var c = this.parseImportAttributes();
|
|
3516
3516
|
c && (n.attributes = c);
|
|
@@ -3538,18 +3538,18 @@ function Is(t) {
|
|
|
3538
3538
|
return f;
|
|
3539
3539
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
3540
3540
|
}
|
|
3541
|
-
|
|
3542
|
-
var
|
|
3541
|
+
Wt(et, T);
|
|
3542
|
+
var Q, W, V, p = et.prototype;
|
|
3543
3543
|
return p.getTokenFromCodeInType = function(i) {
|
|
3544
3544
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
3545
3545
|
}, p.readToken = function(i) {
|
|
3546
3546
|
if (!this.inType) {
|
|
3547
3547
|
var s = this.curContext();
|
|
3548
|
-
if (s ===
|
|
3549
|
-
if (s ===
|
|
3548
|
+
if (s === $.tc_expr) return this.jsx_readToken();
|
|
3549
|
+
if (s === $.tc_oTag || s === $.tc_cTag) {
|
|
3550
3550
|
if (L(i)) return this.jsx_readWord();
|
|
3551
3551
|
if (i == 62) return ++this.pos, this.finishToken(I.jsxTagEnd);
|
|
3552
|
-
if ((i === 34 || i === 39) && s ==
|
|
3552
|
+
if ((i === 34 || i === 39) && s == $.tc_oTag) return this.jsx_readString(i);
|
|
3553
3553
|
}
|
|
3554
3554
|
if (i === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(I.jsxTagStart);
|
|
3555
3555
|
}
|
|
@@ -4873,21 +4873,21 @@ function Is(t) {
|
|
|
4873
4873
|
var ke = x.tsTryParseGenericAsyncArrowFunction(s, n, y);
|
|
4874
4874
|
if (ke) return i = ke;
|
|
4875
4875
|
}
|
|
4876
|
-
var
|
|
4877
|
-
if (!
|
|
4876
|
+
var Kt = x.tsParseTypeArgumentsInExpression();
|
|
4877
|
+
if (!Kt) return i;
|
|
4878
4878
|
if (E && !x.match(o.parenL)) return N = x.curPosition(), i;
|
|
4879
4879
|
if (Ci(x.type) || x.type === o.backQuote) {
|
|
4880
4880
|
var Ae = x.parseTaggedTemplateExpression(i, s, n, b);
|
|
4881
|
-
return Ae.typeParameters =
|
|
4881
|
+
return Ae.typeParameters = Kt, Ae;
|
|
4882
4882
|
}
|
|
4883
4883
|
if (!c && x.eat(o.parenL)) {
|
|
4884
4884
|
var we = new Ot(), Ct = x.startNodeAt(s, n);
|
|
4885
|
-
return Ct.callee = i, Ct.arguments = x.parseExprList(o.parenR, x.options.ecmaVersion >= 8, !1, we), x.tsCheckForInvalidTypeCasts(Ct.arguments), Ct.typeParameters =
|
|
4885
|
+
return Ct.callee = i, Ct.arguments = x.parseExprList(o.parenR, x.options.ecmaVersion >= 8, !1, we), x.tsCheckForInvalidTypeCasts(Ct.arguments), Ct.typeParameters = Kt, b && (Ct.optional = E), x.checkExpressionErrors(we, !0), i = x.finishNode(Ct, "CallExpression");
|
|
4886
4886
|
}
|
|
4887
4887
|
var ae = x.type;
|
|
4888
4888
|
if (!(x.tsMatchRightRelational() || ae === o.bitShift || ae !== o.parenL && (Ee = ae, !!Ee.startsExpr) && !x.hasPrecedingLineBreak())) {
|
|
4889
4889
|
var Ee, ne = x.startNodeAt(s, n);
|
|
4890
|
-
return ne.expression = i, ne.typeParameters =
|
|
4890
|
+
return ne.expression = i, ne.typeParameters = Kt, x.finishNode(ne, "TSInstantiationExpression");
|
|
4891
4891
|
}
|
|
4892
4892
|
});
|
|
4893
4893
|
if (N && this.unexpected(N), C) return C.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = C;
|
|
@@ -5008,10 +5008,10 @@ function Is(t) {
|
|
|
5008
5008
|
var s = this.type;
|
|
5009
5009
|
if (s == o.braceL) {
|
|
5010
5010
|
var n = this.curContext();
|
|
5011
|
-
n ==
|
|
5011
|
+
n == $.tc_oTag ? this.context.push(G.b_expr) : n == $.tc_expr ? this.context.push(G.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (s !== o.slash || i !== I.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5014
|
-
this.context.length -= 2, this.context.push(
|
|
5014
|
+
this.context.length -= 2, this.context.push($.tc_cTag), this.exprAllowed = !1;
|
|
5015
5015
|
}
|
|
5016
5016
|
}, p.jsx_parseOpeningElementAt = function(i, s) {
|
|
5017
5017
|
var n = this, c = this.startNodeAt(i, s), f = this.jsx_parseElementName();
|
|
@@ -5056,17 +5056,17 @@ function Is(t) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
T.prototype.checkLocalExport.call(this, i);
|
|
5058
5058
|
}
|
|
5059
|
-
},
|
|
5059
|
+
}, Q = et, V = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return g;
|
|
5061
|
-
} }], (
|
|
5061
|
+
} }], (W = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return g;
|
|
5063
|
-
} }]) && Re(
|
|
5063
|
+
} }]) && Re(Q.prototype, W), V && Re(Q, V), Object.defineProperty(Q, "prototype", { writable: !1 }), et;
|
|
5064
5064
|
})(d);
|
|
5065
5065
|
return Ei;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const _s = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ns = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Dt = Ni(Ii);
|
|
5069
|
-
async function
|
|
5068
|
+
const _s = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ns = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Ls = ["critical", "high", "moderate", "low", "unknown"], Dt = Ni(Ii);
|
|
5069
|
+
async function Bs() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
5072
5072
|
const t = JSON.parse(await R.readFile("package.json", "utf8")), e = JSON.parse(await R.readFile("config.json", "utf8"));
|
|
@@ -5075,7 +5075,7 @@ async function Fs() {
|
|
|
5075
5075
|
console.error("❌ Error building configuration.", t);
|
|
5076
5076
|
}
|
|
5077
5077
|
}
|
|
5078
|
-
async function
|
|
5078
|
+
async function js(t) {
|
|
5079
5079
|
try {
|
|
5080
5080
|
console.info(`🚀 Building public directory index for identifier '${t}'...`);
|
|
5081
5081
|
const e = {};
|
|
@@ -5109,20 +5109,20 @@ async function Bs(t) {
|
|
|
5109
5109
|
console.error("❌ Error building public directory index.", e);
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
|
-
async function
|
|
5112
|
+
async function Us() {
|
|
5113
5113
|
try {
|
|
5114
5114
|
console.info("🚀 Building connector configuration...");
|
|
5115
5115
|
const [t, e, r] = await Promise.all([
|
|
5116
5116
|
R.readFile("package.json", "utf8").then((l) => JSON.parse(l)),
|
|
5117
5117
|
R.readFile("config.json", "utf8").then((l) => JSON.parse(l)),
|
|
5118
5118
|
R.readFile("src/index.ts", "utf8")
|
|
5119
|
-
]), a =
|
|
5119
|
+
]), a = Os(r), u = Rs(a);
|
|
5120
5120
|
a.operations.length > 0 ? console.info(`ℹ️ Implements ${a.operations.length} operations.`) : console.warn("⚠️ Implements no operations."), u === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${u}' usage.`), e.id = t.name ?? e.id, e.version = t.version ?? e.version, e.operations = a.operations, e.usageId = u, await R.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
5121
5121
|
} catch (t) {
|
|
5122
5122
|
console.error("❌ Error building connector configuration.", t);
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
|
-
async function
|
|
5125
|
+
async function qs() {
|
|
5126
5126
|
try {
|
|
5127
5127
|
console.info("🚀 Building context configuration...");
|
|
5128
5128
|
const [t, e, r] = await Promise.all([
|
|
@@ -5135,7 +5135,7 @@ async function Us() {
|
|
|
5135
5135
|
console.error("❌ Error building context configuration.", t);
|
|
5136
5136
|
}
|
|
5137
5137
|
}
|
|
5138
|
-
async function
|
|
5138
|
+
async function Hs() {
|
|
5139
5139
|
try {
|
|
5140
5140
|
console.info("🚀 Building presenter configuration...");
|
|
5141
5141
|
const [t, e, r] = await Promise.all([
|
|
@@ -5148,7 +5148,7 @@ async function qs() {
|
|
|
5148
5148
|
console.error("❌ Error building context configuration.", t);
|
|
5149
5149
|
}
|
|
5150
5150
|
}
|
|
5151
|
-
async function
|
|
5151
|
+
async function Ks(t = "./") {
|
|
5152
5152
|
try {
|
|
5153
5153
|
console.info("🚀 Bumping version...");
|
|
5154
5154
|
const e = JSON.parse(await R.readFile(`${t}package.json`, "utf8"));
|
|
@@ -5165,7 +5165,7 @@ async function Hs(t = "./") {
|
|
|
5165
5165
|
function Ws(t) {
|
|
5166
5166
|
console.error(`❌ ${t} script not implemented.`);
|
|
5167
5167
|
}
|
|
5168
|
-
async function
|
|
5168
|
+
async function zs() {
|
|
5169
5169
|
const t = "<!-- DEPENDENCY_LICENSES_START -->", e = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
5170
5170
|
try {
|
|
5171
5171
|
const a = (await R.readFile("./licenses.md", "utf8")).trim(), u = await R.readFile("./README.md", "utf8"), l = u.indexOf(t), d = u.indexOf(e);
|
|
@@ -5181,7 +5181,7 @@ async function Ks() {
|
|
|
5181
5181
|
console.error("❌ Error updating readme file.", r);
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
5184
|
-
async function
|
|
5184
|
+
async function Js() {
|
|
5185
5185
|
const t = "<!-- OWASP_BADGE_START -->", e = "<!-- OWASP_BADGE_END -->";
|
|
5186
5186
|
try {
|
|
5187
5187
|
const r = JSON.parse(await R.readFile("./dependency-check-reports/dependency-check-report.json", "utf8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
@@ -5189,7 +5189,11 @@ async function zs() {
|
|
|
5189
5189
|
if (z.vulnerabilities != null)
|
|
5190
5190
|
for (const G of z.vulnerabilities) {
|
|
5191
5191
|
const st = G.severity?.toLowerCase() ?? "unknown";
|
|
5192
|
-
st in a
|
|
5192
|
+
if (st in a) {
|
|
5193
|
+
const I = Ls.find(($) => $ === st);
|
|
5194
|
+
a[I ?? "unknown"]++;
|
|
5195
|
+
} else
|
|
5196
|
+
a.unknown++;
|
|
5193
5197
|
}
|
|
5194
5198
|
const u = {
|
|
5195
5199
|
critical: { color: "D32F2F", label: "critical" },
|
|
@@ -5218,7 +5222,7 @@ async function zs() {
|
|
|
5218
5222
|
console.error("❌ Error updating README with OWASP badges:", r);
|
|
5219
5223
|
}
|
|
5220
5224
|
}
|
|
5221
|
-
async function
|
|
5225
|
+
async function Gs() {
|
|
5222
5226
|
try {
|
|
5223
5227
|
console.info("🚀 Sending deployment notice...");
|
|
5224
5228
|
const t = JSON.parse(await R.readFile("config.json", "utf8")), e = {
|
|
@@ -5232,7 +5236,7 @@ async function Js() {
|
|
|
5232
5236
|
console.error("❌ Error sending deployment notice.", t);
|
|
5233
5237
|
}
|
|
5234
5238
|
}
|
|
5235
|
-
async function
|
|
5239
|
+
async function $s() {
|
|
5236
5240
|
try {
|
|
5237
5241
|
console.info("🚀 Synchronising with GitHub....");
|
|
5238
5242
|
const t = JSON.parse(await R.readFile("package.json", "utf8"));
|
|
@@ -5241,7 +5245,7 @@ async function Gs() {
|
|
|
5241
5245
|
console.error("❌ Error synchronising with GitHub.", t);
|
|
5242
5246
|
}
|
|
5243
5247
|
}
|
|
5244
|
-
async function
|
|
5248
|
+
async function Xs(t, e) {
|
|
5245
5249
|
try {
|
|
5246
5250
|
console.info("🚀 Uploading directory to R2....");
|
|
5247
5251
|
async function r(u, l, d) {
|
|
@@ -5263,7 +5267,7 @@ async function $s(t, e) {
|
|
|
5263
5267
|
console.error("❌ Error uploading directory to R2.", r);
|
|
5264
5268
|
}
|
|
5265
5269
|
}
|
|
5266
|
-
async function
|
|
5270
|
+
async function Qs() {
|
|
5267
5271
|
try {
|
|
5268
5272
|
console.info("🚀 Uploading module configuration....");
|
|
5269
5273
|
const t = JSON.parse(await R.readFile("config.json", "utf8")), e = t.id, r = {
|
|
@@ -5277,7 +5281,7 @@ async function Xs() {
|
|
|
5277
5281
|
console.error("❌ Error uploading module configuration.", t);
|
|
5278
5282
|
}
|
|
5279
5283
|
}
|
|
5280
|
-
async function
|
|
5284
|
+
async function Ys(t) {
|
|
5281
5285
|
try {
|
|
5282
5286
|
console.info("🚀 Uploading module to R2...");
|
|
5283
5287
|
const r = `v${JSON.parse(await R.readFile("package.json", "utf8")).version}`;
|
|
@@ -5297,8 +5301,8 @@ async function Qs(t) {
|
|
|
5297
5301
|
console.error("❌ Error uploading module to R2.", e);
|
|
5298
5302
|
}
|
|
5299
5303
|
}
|
|
5300
|
-
function
|
|
5301
|
-
const r =
|
|
5304
|
+
function Os(t) {
|
|
5305
|
+
const r = K.extend(Is()).parse(t, {
|
|
5302
5306
|
ecmaVersion: "latest",
|
|
5303
5307
|
sourceType: "module",
|
|
5304
5308
|
locations: !0
|
|
@@ -5306,11 +5310,13 @@ function Ls(t) {
|
|
|
5306
5310
|
let u = !1, l = !1;
|
|
5307
5311
|
return ye(r, (d) => {
|
|
5308
5312
|
if (d.type !== "MethodDefinition") return;
|
|
5309
|
-
const v = d,
|
|
5313
|
+
const v = d, g = v.key;
|
|
5314
|
+
if (g.type !== "Identifier") return;
|
|
5315
|
+
const o = g.name;
|
|
5310
5316
|
o && o !== "constructor" && v.accessibility !== "private" && (a.push(o), Ns.includes(o) && (u = !0), _s.includes(o) && (l = !0));
|
|
5311
5317
|
}), { operations: a, sourceOps: u, destinationOps: l };
|
|
5312
5318
|
}
|
|
5313
|
-
function
|
|
5319
|
+
function Rs(t) {
|
|
5314
5320
|
return t.sourceOps && t.destinationOps ? "bidirectional" : t.sourceOps ? "source" : t.destinationOps ? "destination" : "unknown";
|
|
5315
5321
|
}
|
|
5316
5322
|
function ye(t, e) {
|
|
@@ -5327,18 +5333,18 @@ function ye(t, e) {
|
|
|
5327
5333
|
}
|
|
5328
5334
|
}
|
|
5329
5335
|
export {
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
+
Bs as buildConfig,
|
|
5337
|
+
Us as buildConnectorConfig,
|
|
5338
|
+
qs as buildContextConfig,
|
|
5339
|
+
Hs as buildPresenterConfig,
|
|
5340
|
+
js as buildPublicDirectoryIndex,
|
|
5341
|
+
Ks as bumpVersion,
|
|
5336
5342
|
Ws as echoScriptNotImplemented,
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5343
|
+
zs as insertLicensesIntoReadme,
|
|
5344
|
+
Js as insertOWASPDependencyCheckBadgeIntoReadme,
|
|
5345
|
+
Gs as sendDeploymentNotice,
|
|
5346
|
+
$s as syncWithGitHub,
|
|
5347
|
+
Xs as uploadDirectoryToR2,
|
|
5348
|
+
Qs as uploadModuleConfigToDO,
|
|
5349
|
+
Ys as uploadModuleToR2
|
|
5344
5350
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-development",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.176",
|
|
4
4
|
"description": "A library of utilities for managing the Data Positioning repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"nanoid": "^5.1.6",
|
|
49
49
|
"npm-check-updates": "^19.1.2",
|
|
50
50
|
"owasp-dependency-check": "^1.0.0",
|
|
51
|
-
"prettier": "^3.7.
|
|
51
|
+
"prettier": "^3.7.2",
|
|
52
52
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
53
53
|
"ts-to-zod": "^5.1.0",
|
|
54
54
|
"type-fest": "^5.2.0",
|