@datapos/datapos-development 0.3.244 → 0.3.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +92 -90
- package/package.json +1 -1
|
@@ -34,16 +34,16 @@ var V = function(t, i) {
|
|
|
34
34
|
function be(e, t) {
|
|
35
35
|
return new V(e, { beforeExpr: !0, binop: t });
|
|
36
36
|
}
|
|
37
|
-
var ke = { beforeExpr: !0 },
|
|
37
|
+
var ke = { beforeExpr: !0 }, le = { startsExpr: !0 }, rt = {};
|
|
38
38
|
function F(e, t) {
|
|
39
39
|
return t === void 0 && (t = {}), t.keyword = e, rt[e] = new V(e, t);
|
|
40
40
|
}
|
|
41
41
|
var p = {
|
|
42
|
-
num: new V("num",
|
|
43
|
-
regexp: new V("regexp",
|
|
44
|
-
string: new V("string",
|
|
45
|
-
name: new V("name",
|
|
46
|
-
privateId: new V("privateId",
|
|
42
|
+
num: new V("num", le),
|
|
43
|
+
regexp: new V("regexp", le),
|
|
44
|
+
string: new V("string", le),
|
|
45
|
+
name: new V("name", le),
|
|
46
|
+
privateId: new V("privateId", le),
|
|
47
47
|
eof: new V("eof"),
|
|
48
48
|
// Punctuation token types.
|
|
49
49
|
bracketL: new V("[", { beforeExpr: !0, startsExpr: !0 }),
|
|
@@ -62,7 +62,7 @@ var p = {
|
|
|
62
62
|
template: new V("template"),
|
|
63
63
|
invalidTemplate: new V("invalidTemplate"),
|
|
64
64
|
ellipsis: new V("...", ke),
|
|
65
|
-
backQuote: new V("`",
|
|
65
|
+
backQuote: new V("`", le),
|
|
66
66
|
dollarBraceL: new V("${", { beforeExpr: !0, startsExpr: !0 }),
|
|
67
67
|
// Operators. These carry several kinds of properties to help the
|
|
68
68
|
// parser use them properly (the presence of these properties is
|
|
@@ -106,7 +106,7 @@ var p = {
|
|
|
106
106
|
_else: F("else", ke),
|
|
107
107
|
_finally: F("finally"),
|
|
108
108
|
_for: F("for", { isLoop: !0 }),
|
|
109
|
-
_function: F("function",
|
|
109
|
+
_function: F("function", le),
|
|
110
110
|
_if: F("if"),
|
|
111
111
|
_return: F("return", ke),
|
|
112
112
|
_switch: F("switch"),
|
|
@@ -117,21 +117,21 @@ var p = {
|
|
|
117
117
|
_while: F("while", { isLoop: !0 }),
|
|
118
118
|
_with: F("with"),
|
|
119
119
|
_new: F("new", { beforeExpr: !0, startsExpr: !0 }),
|
|
120
|
-
_this: F("this",
|
|
121
|
-
_super: F("super",
|
|
122
|
-
_class: F("class",
|
|
120
|
+
_this: F("this", le),
|
|
121
|
+
_super: F("super", le),
|
|
122
|
+
_class: F("class", le),
|
|
123
123
|
_extends: F("extends", ke),
|
|
124
124
|
_export: F("export"),
|
|
125
|
-
_import: F("import",
|
|
126
|
-
_null: F("null",
|
|
127
|
-
_true: F("true",
|
|
128
|
-
_false: F("false",
|
|
125
|
+
_import: F("import", le),
|
|
126
|
+
_null: F("null", le),
|
|
127
|
+
_true: F("true", le),
|
|
128
|
+
_false: F("false", le),
|
|
129
129
|
_in: F("in", { beforeExpr: !0, binop: 7 }),
|
|
130
130
|
_instanceof: F("instanceof", { beforeExpr: !0, binop: 7 }),
|
|
131
131
|
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
132
|
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
133
|
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
-
},
|
|
134
|
+
}, ue = /\r\n?|\n|\u2028|\u2029/, ks = new RegExp(ue.source, "g");
|
|
135
135
|
function Je(e) {
|
|
136
136
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
137
137
|
}
|
|
@@ -303,7 +303,7 @@ var Rt = 0, bi = 1, je = 2, As = 3, Cs = 4, Es = 5, J = function(t, i, s) {
|
|
|
303
303
|
t.allowReserved !== !0 && (a = ei[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (a += " await")), this.reservedWords = Ue(a);
|
|
304
304
|
var o = (a ? a + " " : "") + ei.strict;
|
|
305
305
|
this.reservedWordsStrict = Ue(o), this.reservedWordsStrictBind = Ue(o + " " + ei.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(`
|
|
306
|
-
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
306
|
+
`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(ue).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = p.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 = t.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 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(gt), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, Ie = { 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
|
J.prototype.parse = function() {
|
|
309
309
|
var t = this.options.program || this.startNode();
|
|
@@ -366,8 +366,8 @@ J.tokenizer = function(t, i) {
|
|
|
366
366
|
return new this(i, t);
|
|
367
367
|
};
|
|
368
368
|
Object.defineProperties(J.prototype, Ie);
|
|
369
|
-
var
|
|
370
|
-
|
|
369
|
+
var ce = J.prototype, Hr = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
|
+
ce.strictDirective = function(e) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
@@ -378,54 +378,54 @@ ue.strictDirective = function(e) {
|
|
|
378
378
|
if ((t[1] || t[2]) === "use strict") {
|
|
379
379
|
re.lastIndex = e + t[0].length;
|
|
380
380
|
var i = re.exec(this.input), s = i.index + i[0].length, a = this.input.charAt(s);
|
|
381
|
-
return a === ";" || a === "}" ||
|
|
381
|
+
return a === ";" || a === "}" || ue.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(a) || a === "!" && this.input.charAt(s + 1) === "=");
|
|
382
382
|
}
|
|
383
383
|
e += t[0].length, re.lastIndex = e, e += re.exec(this.input)[0].length, this.input[e] === ";" && e++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
ce.eat = function(e) {
|
|
387
387
|
return this.type === e ? (this.next(), !0) : !1;
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
ce.isContextual = function(e) {
|
|
390
390
|
return this.type === p.name && this.value === e && !this.containsEsc;
|
|
391
391
|
};
|
|
392
|
-
|
|
392
|
+
ce.eatContextual = function(e) {
|
|
393
393
|
return this.isContextual(e) ? (this.next(), !0) : !1;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
ce.expectContextual = function(e) {
|
|
396
396
|
this.eatContextual(e) || this.unexpected();
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === p.eof || this.type === p.braceR ||
|
|
398
|
+
ce.canInsertSemicolon = function() {
|
|
399
|
+
return this.type === p.eof || this.type === p.braceR || ue.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
ce.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
|
+
ce.semicolon = function() {
|
|
406
406
|
!this.eat(p.semi) && !this.insertSemicolon() && this.unexpected();
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
ce.afterTrailingComma = function(e, t) {
|
|
409
409
|
if (this.type === e)
|
|
410
410
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0;
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
ce.expect = function(e) {
|
|
413
413
|
this.eat(e) || this.unexpected();
|
|
414
414
|
};
|
|
415
|
-
|
|
415
|
+
ce.unexpected = function(e) {
|
|
416
416
|
this.raise(e ?? this.start, "Unexpected token");
|
|
417
417
|
};
|
|
418
418
|
var qt = function() {
|
|
419
419
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
ce.checkPatternErrors = function(e, t) {
|
|
422
422
|
if (e) {
|
|
423
423
|
e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element");
|
|
424
424
|
var i = t ? e.parenthesizedAssign : e.parenthesizedBind;
|
|
425
425
|
i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
428
|
+
ce.checkExpressionErrors = function(e, t) {
|
|
429
429
|
if (!e)
|
|
430
430
|
return !1;
|
|
431
431
|
var i = e.shorthandAssign, s = e.doubleProto;
|
|
@@ -433,10 +433,10 @@ ue.checkExpressionErrors = function(e, t) {
|
|
|
433
433
|
return i >= 0 || s >= 0;
|
|
434
434
|
i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property");
|
|
435
435
|
};
|
|
436
|
-
|
|
436
|
+
ce.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
|
+
ce.isSimpleAssignTarget = function(e) {
|
|
440
440
|
return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
442
|
var C = J.prototype;
|
|
@@ -481,14 +481,14 @@ C.isAsyncFunction = function() {
|
|
|
481
481
|
return !1;
|
|
482
482
|
re.lastIndex = this.pos;
|
|
483
483
|
var e = re.exec(this.input), t = this.pos + e[0].length, i;
|
|
484
|
-
return !
|
|
484
|
+
return !ue.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(Re(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320));
|
|
485
485
|
};
|
|
486
486
|
C.isUsingKeyword = function(e, t) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
489
|
re.lastIndex = this.pos;
|
|
490
490
|
var i = re.exec(this.input), s = this.pos + i[0].length;
|
|
491
|
-
if (
|
|
491
|
+
if (ue.test(this.input.slice(this.pos, s)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (e) {
|
|
494
494
|
var a = s + 5, o;
|
|
@@ -496,7 +496,7 @@ C.isUsingKeyword = function(e, t) {
|
|
|
496
496
|
return !1;
|
|
497
497
|
re.lastIndex = a;
|
|
498
498
|
var h = re.exec(this.input);
|
|
499
|
-
if (h &&
|
|
499
|
+
if (h && ue.test(this.input.slice(a, a + h[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
if (t) {
|
|
@@ -631,7 +631,7 @@ C.parseSwitchStatement = function(e) {
|
|
|
631
631
|
return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement");
|
|
632
632
|
};
|
|
633
633
|
C.parseThrowStatement = function(e) {
|
|
634
|
-
return this.next(),
|
|
634
|
+
return this.next(), ue.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
635
635
|
};
|
|
636
636
|
var Kr = [];
|
|
637
637
|
C.parseCatchClauseParam = function() {
|
|
@@ -1125,7 +1125,7 @@ lt.curContext = function() {
|
|
|
1125
1125
|
};
|
|
1126
1126
|
lt.braceIsBlock = function(e) {
|
|
1127
1127
|
var t = this.curContext();
|
|
1128
|
-
return t === Z.f_expr || t === Z.f_stat ? !0 : e === p.colon && (t === Z.b_stat || t === Z.b_expr) ? !t.isExpr : e === p._return || e === p.name && this.exprAllowed ?
|
|
1128
|
+
return t === Z.f_expr || t === Z.f_stat ? !0 : e === p.colon && (t === Z.b_stat || t === Z.b_expr) ? !t.isExpr : e === p._return || e === p.name && this.exprAllowed ? ue.test(this.input.slice(this.lastTokEnd, this.start)) : e === p._else || e === p.semi || e === p.eof || e === p.parenR || e === p.arrow ? !0 : e === p.braceL ? t === Z.b_stat : e === p._var || e === p._const || e === p.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
1130
|
lt.inGeneratorContext = function() {
|
|
1131
1131
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
@@ -1163,7 +1163,7 @@ p.parenL.updateContext = function(e) {
|
|
|
1163
1163
|
p.incDec.updateContext = function() {
|
|
1164
1164
|
};
|
|
1165
1165
|
p._function.updateContext = p._class.updateContext = function(e) {
|
|
1166
|
-
e.beforeExpr && e !== p._else && !(e === p.semi && this.curContext() !== Z.p_stat) && !(e === p._return &&
|
|
1166
|
+
e.beforeExpr && e !== p._else && !(e === p.semi && this.curContext() !== Z.p_stat) && !(e === p._return && ue.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === p.colon || e === p.braceL) && this.curContext() === Z.b_stat) ? this.context.push(Z.f_expr) : this.context.push(Z.f_stat), this.exprAllowed = !1;
|
|
1167
1167
|
};
|
|
1168
1168
|
p.colon.updateContext = function() {
|
|
1169
1169
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1339,12 +1339,12 @@ D.parseSubscript = function(e, t, i, s, a, o, h) {
|
|
|
1339
1339
|
var T = this.startNodeAt(t, i);
|
|
1340
1340
|
T.object = e, u ? (T.property = this.parseExpression(), this.expect(p.bracketR)) : this.type === p.privateId && e.type !== "Super" ? T.property = this.parsePrivateIdent() : T.property = this.parseIdent(this.options.allowReserved !== "never"), T.computed = !!u, d && (T.optional = y), e = this.finishNode(T, "MemberExpression");
|
|
1341
1341
|
} else if (!s && this.eat(p.parenL)) {
|
|
1342
|
-
var I = new qt(), R = this.yieldPos, W = this.awaitPos,
|
|
1342
|
+
var I = new qt(), R = this.yieldPos, W = this.awaitPos, he = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
1344
|
var Me = this.parseExprList(p.parenR, this.options.ecmaVersion >= 8, !1, I);
|
|
1345
1345
|
if (a && !y && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = R, this.awaitPos = W, this.awaitIdentPos =
|
|
1347
|
-
this.checkExpressionErrors(I, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = W || this.awaitPos, this.awaitIdentPos =
|
|
1346
|
+
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = R, this.awaitPos = W, this.awaitIdentPos = he, this.parseSubscriptAsyncArrow(t, i, Me, h);
|
|
1347
|
+
this.checkExpressionErrors(I, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = W || this.awaitPos, this.awaitIdentPos = he || this.awaitIdentPos;
|
|
1348
1348
|
var M = this.startNodeAt(t, i);
|
|
1349
1349
|
M.callee = e, M.arguments = Me, d && (M.optional = y), e = this.finishNode(M, "CallExpression");
|
|
1350
1350
|
} else if (this.type === p.backQuote) {
|
|
@@ -1447,13 +1447,13 @@ D.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
1447
1447
|
var i = this.start, s = this.startLoc, a, o = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var h = this.start, d = this.startLoc, y = [], u = !0, T = !1, I = new qt(), R = this.yieldPos, W = this.awaitPos,
|
|
1450
|
+
var h = this.start, d = this.startLoc, y = [], u = !0, T = !1, I = new qt(), R = this.yieldPos, W = this.awaitPos, he;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== p.parenR; )
|
|
1452
1452
|
if (u ? u = !1 : this.expect(p.comma), o && this.afterTrailingComma(p.parenR, !0)) {
|
|
1453
1453
|
T = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === p.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
he = this.start, y.push(this.parseParenItem(this.parseRestBinding())), this.type === p.comma && this.raiseRecoverable(
|
|
1457
1457
|
this.start,
|
|
1458
1458
|
"Comma is not permitted after the rest element"
|
|
1459
1459
|
);
|
|
@@ -1463,7 +1463,7 @@ D.parseParenAndDistinguishExpression = function(e, t) {
|
|
|
1463
1463
|
var Me = this.lastTokEnd, M = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(p.parenR), e && this.shouldParseArrow(y) && this.eat(p.arrow))
|
|
1465
1465
|
return this.checkPatternErrors(I, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = R, this.awaitPos = W, this.parseParenArrowList(i, s, y, t);
|
|
1466
|
-
(!y.length || T) && this.unexpected(this.lastTokStart),
|
|
1466
|
+
(!y.length || T) && this.unexpected(this.lastTokStart), he && this.unexpected(he), this.checkExpressionErrors(I, !0), this.yieldPos = R || this.yieldPos, this.awaitPos = W || this.awaitPos, y.length > 1 ? (a = this.startNodeAt(h, d), a.expressions = y, this.finishNodeAt(a, "SequenceExpression", Me, M)) : a = y[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
a = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
@@ -1515,7 +1515,7 @@ D.parseTemplate = function(e) {
|
|
|
1515
1515
|
return this.next(), this.finishNode(i, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
1517
|
D.isAsyncProp = function(e) {
|
|
1518
|
-
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === p.name || this.type === p.num || this.type === p.string || this.type === p.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === p.star) && !
|
|
1518
|
+
return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === p.name || this.type === p.num || this.type === p.string || this.type === p.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === p.star) && !ue.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
1520
|
D.parseObj = function(e, t) {
|
|
1521
1521
|
var i = this.startNode(), s = !0, a = {};
|
|
@@ -2731,7 +2731,7 @@ j.readToken_caret = function() {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
j.readToken_plus_min = function(e) {
|
|
2733
2733
|
var t = this.input.charCodeAt(this.pos + 1);
|
|
2734
|
-
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2734
|
+
return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || ue.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(p.incDec, 2) : t === 61 ? this.finishOp(p.assign, 2) : this.finishOp(p.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
2736
|
j.readToken_lt_gt = function(e) {
|
|
2737
2737
|
var t = this.input.charCodeAt(this.pos + 1), i = 1;
|
|
@@ -2862,7 +2862,7 @@ j.readRegexp = function() {
|
|
|
2862
2862
|
for (var e, t, i = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(i, "Unterminated regular expression");
|
|
2864
2864
|
var s = this.input.charAt(this.pos);
|
|
2865
|
-
if (
|
|
2865
|
+
if (ue.test(s) && this.raise(i, "Unterminated regular expression"), e)
|
|
2866
2866
|
e = !1;
|
|
2867
2867
|
else {
|
|
2868
2868
|
if (s === "[")
|
|
@@ -3115,7 +3115,7 @@ J.acorn = {
|
|
|
3115
3115
|
isIdentifierStart: Ae,
|
|
3116
3116
|
Token: Wt,
|
|
3117
3117
|
isNewLine: Je,
|
|
3118
|
-
lineBreak:
|
|
3118
|
+
lineBreak: ue,
|
|
3119
3119
|
lineBreakG: ks,
|
|
3120
3120
|
nonASCIIwhitespace: mi
|
|
3121
3121
|
};
|
|
@@ -3143,7 +3143,7 @@ const ka = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3143
3143
|
isIdentifierStart: Ae,
|
|
3144
3144
|
isNewLine: Je,
|
|
3145
3145
|
keywordTypes: rt,
|
|
3146
|
-
lineBreak:
|
|
3146
|
+
lineBreak: ue,
|
|
3147
3147
|
lineBreakG: ks,
|
|
3148
3148
|
nonASCIIwhitespace: mi,
|
|
3149
3149
|
parse: xa,
|
|
@@ -3319,17 +3319,17 @@ function Hi(e) {
|
|
|
3319
3319
|
function La(e) {
|
|
3320
3320
|
var t = {}, i = t.dts, s = i !== void 0 && i, a = t.allowSatisfies, o = a !== void 0 && a;
|
|
3321
3321
|
return function(h) {
|
|
3322
|
-
var d = h.acorn || ka, y = Ta(d), u = d.tokTypes, T = d.keywordTypes, I = d.isIdentifierStart, R = d.lineBreak, W = d.isNewLine,
|
|
3323
|
-
function Er(_,
|
|
3322
|
+
var d = h.acorn || ka, y = Ta(d), u = d.tokTypes, T = d.keywordTypes, I = d.isIdentifierStart, R = d.lineBreak, W = d.isNewLine, he = d.tokContexts, Me = d.isIdentifierChar, M = y.tokTypes, se = y.tokContexts, de = y.keywordsRegExp, ge = y.tokenIsLiteralPropertyName, Ge = y.tokenIsTemplate, Ar = y.tokenIsTSDeclarationStart, U = y.tokenIsIdentifier, Pt = y.tokenIsKeywordOrIdentifier, Cr = y.tokenIsTSTypeOperator;
|
|
3323
|
+
function Er(_, pe, ae) {
|
|
3324
3324
|
ae === void 0 && (ae = _.length);
|
|
3325
|
-
for (var ee =
|
|
3325
|
+
for (var ee = pe; ee < ae; ee++) {
|
|
3326
3326
|
var B = _.charCodeAt(ee);
|
|
3327
3327
|
if (W(B)) return ee < ae - 1 && B === 13 && _.charCodeAt(ee + 1) === 10 ? ee + 2 : ee + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
h = (function(_,
|
|
3332
|
-
var ee = ae.tokTypes, B =
|
|
3331
|
+
h = (function(_, pe, ae) {
|
|
3332
|
+
var ee = ae.tokTypes, B = pe.tokTypes;
|
|
3333
3333
|
return (function(f) {
|
|
3334
3334
|
function r() {
|
|
3335
3335
|
return f.apply(this, arguments) || this;
|
|
@@ -3368,8 +3368,8 @@ function La(e) {
|
|
|
3368
3368
|
return c;
|
|
3369
3369
|
}, r;
|
|
3370
3370
|
})(_);
|
|
3371
|
-
})(h, y, d), h = (function(_,
|
|
3372
|
-
var B = _.tokTypes, f =
|
|
3371
|
+
})(h, y, d), h = (function(_, pe, ae, ee) {
|
|
3372
|
+
var B = _.tokTypes, f = pe.tokTypes, r = _.isNewLine, n = _.isIdentifierChar, c = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(l) {
|
|
3374
3374
|
function m() {
|
|
3375
3375
|
return l.apply(this, arguments) || this;
|
|
@@ -3501,8 +3501,8 @@ function La(e) {
|
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(x, b);
|
|
3502
3502
|
}, m;
|
|
3503
3503
|
})(ae);
|
|
3504
|
-
})(d, y, h), h = (function(_,
|
|
3505
|
-
var ee =
|
|
3504
|
+
})(d, y, h), h = (function(_, pe, ae) {
|
|
3505
|
+
var ee = pe.tokTypes, B = ae.tokTypes;
|
|
3506
3506
|
return (function(f) {
|
|
3507
3507
|
function r() {
|
|
3508
3508
|
return f.apply(this, arguments) || this;
|
|
@@ -3531,15 +3531,15 @@ function La(e) {
|
|
|
3531
3531
|
})(_);
|
|
3532
3532
|
})(h, y, d);
|
|
3533
3533
|
var Ir = /* @__PURE__ */ (function(_) {
|
|
3534
|
-
function
|
|
3534
|
+
function pe(r, n, c) {
|
|
3535
3535
|
var l;
|
|
3536
3536
|
return (l = _.call(this, r, n, c) || this).preValue = null, l.preToken = null, l.isLookahead = !1, l.isAmbientContext = !1, l.inAbstractClass = !1, l.inType = !1, l.inDisallowConditionalTypesContext = !1, l.maybeInArrowParameters = !1, l.shouldParseArrowReturnType = void 0, l.shouldParseAsyncArrowReturnType = void 0, l.decoratorStack = [[]], l.importsStack = [[]], l.importOrExportOuterKind = void 0, l.tsParseConstModifier = l.tsParseModifiers.bind((function(m) {
|
|
3537
3537
|
if (m === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3538
3538
|
return m;
|
|
3539
3539
|
})(l), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: E.InvalidModifierOnTypeParameterPositions }), l;
|
|
3540
3540
|
}
|
|
3541
|
-
Et(
|
|
3542
|
-
var ae, ee, B, f =
|
|
3541
|
+
Et(pe, _);
|
|
3542
|
+
var ae, ee, B, f = pe.prototype;
|
|
3543
3543
|
return f.getTokenFromCodeInType = function(r) {
|
|
3544
3544
|
return r === 62 || r === 60 ? this.finishOp(u.relational, 1) : _.prototype.getTokenFromCode.call(this, r);
|
|
3545
3545
|
}, f.readToken = function(r) {
|
|
@@ -4494,7 +4494,7 @@ function La(e) {
|
|
|
4494
4494
|
if (this.type === M.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var l = this.potentialArrowAt === this.start, m = this.start, v = this.startLoc, x = this.containsEsc, b = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !x && b.name === "async" && !this.canInsertSemicolon() && this.eat(u._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !x && b.name === "async" && !this.canInsertSemicolon() && this.eat(u._function)) return this.overrideContext(he.f_expr), this.parseFunction(this.startNodeAt(m, v), 0, !1, !0, n);
|
|
4498
4498
|
if (l && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(u.arrow)) return this.parseArrowExpression(this.startNodeAt(m, v), [b], !1, n);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && b.name === "async" && this.type === u.name && !x && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return b = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(u.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(m, v), [b], !0, n);
|
|
@@ -4963,12 +4963,12 @@ function La(e) {
|
|
|
4963
4963
|
this.raise(m.start, E.AbstractMethodHasImplementation({ methodName: S.type !== "Identifier" || m.computed ? "[" + this.input.slice(S.start, S.end) + "]" : S.name }));
|
|
4964
4964
|
}
|
|
4965
4965
|
return this.finishNode(v, "FunctionExpression");
|
|
4966
|
-
},
|
|
4966
|
+
}, pe.parse = function(r, n) {
|
|
4967
4967
|
if (n.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
4968
4968
|
n.locations = !0;
|
|
4969
4969
|
var c = new this(n, r);
|
|
4970
4970
|
return s && (c.isAmbientContext = !0), c.parse();
|
|
4971
|
-
},
|
|
4971
|
+
}, pe.parseExpressionAt = function(r, n, c) {
|
|
4972
4972
|
if (c.locations === !1) throw new Error("You have to enable options.locations while using acorn-typescript");
|
|
4973
4973
|
c.locations = !0;
|
|
4974
4974
|
var l = new this(c, r, n);
|
|
@@ -5008,7 +5008,7 @@ function La(e) {
|
|
|
5008
5008
|
var n = this.type;
|
|
5009
5009
|
if (n == u.braceL) {
|
|
5010
5010
|
var c = this.curContext();
|
|
5011
|
-
c == se.tc_oTag ? this.context.push(
|
|
5011
|
+
c == se.tc_oTag ? this.context.push(he.b_expr) : c == se.tc_expr ? this.context.push(he.b_tmpl) : _.prototype.updateContext.call(this, r), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (n !== u.slash || r !== M.jsxTagStart) return _.prototype.updateContext.call(this, r);
|
|
5014
5014
|
this.context.length -= 2, this.context.push(se.tc_cTag), this.exprAllowed = !1;
|
|
@@ -5056,11 +5056,11 @@ function La(e) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
_.prototype.checkLocalExport.call(this, r);
|
|
5058
5058
|
}
|
|
5059
|
-
}, ae =
|
|
5059
|
+
}, ae = pe, B = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return y;
|
|
5061
5061
|
} }], (ee = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return y;
|
|
5063
|
-
} }]) && Fi(ae.prototype, ee), B && Fi(ae, B), Object.defineProperty(ae, "prototype", { writable: !1 }),
|
|
5063
|
+
} }]) && Fi(ae.prototype, ee), B && Fi(ae, B), Object.defineProperty(ae, "prototype", { writable: !1 }), pe;
|
|
5064
5064
|
})(h);
|
|
5065
5065
|
return Ir;
|
|
5066
5066
|
};
|
|
@@ -5082,7 +5082,7 @@ function wi(e) {
|
|
|
5082
5082
|
}
|
|
5083
5083
|
async function Te(e, t, i = [], s) {
|
|
5084
5084
|
const a = `${t} ${i.join(" ")}`;
|
|
5085
|
-
e !== void 0 &&
|
|
5085
|
+
e !== void 0 && oe(`${e} - exec(${a})`);
|
|
5086
5086
|
const { stdout: o, stderr: h } = await Oa(a);
|
|
5087
5087
|
s === void 0 ? o.trim() && console.log(o.trim()) : await Pe.writeFile(s, o.trim(), "utf8"), h.trim() && console.error(h.trim());
|
|
5088
5088
|
}
|
|
@@ -5090,7 +5090,7 @@ async function Ma(e, t) {
|
|
|
5090
5090
|
return Pe.readdir(e, t);
|
|
5091
5091
|
}
|
|
5092
5092
|
async function Ra() {
|
|
5093
|
-
|
|
5093
|
+
oe("Load environment variables"), (await import("dotenv")).config();
|
|
5094
5094
|
}
|
|
5095
5095
|
function Le(e) {
|
|
5096
5096
|
const t = "\x1B[36m", i = "\x1B[0m", s = "─".repeat(Math.max(e.length + 60, 60));
|
|
@@ -5102,7 +5102,7 @@ function Fe(e) {
|
|
|
5102
5102
|
✅ ${e}
|
|
5103
5103
|
`);
|
|
5104
5104
|
}
|
|
5105
|
-
function
|
|
5105
|
+
function oe(e) {
|
|
5106
5106
|
console.info(`
|
|
5107
5107
|
${e}
|
|
5108
5108
|
`);
|
|
@@ -5114,7 +5114,7 @@ async function nt(e) {
|
|
|
5114
5114
|
return await Pe.readFile(e, "utf8");
|
|
5115
5115
|
}
|
|
5116
5116
|
async function Ee(e, t, i = [], s = !1) {
|
|
5117
|
-
return
|
|
5117
|
+
return oe(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((a, o) => {
|
|
5118
5118
|
Mr(t, i, { stdio: "inherit" }).on("close", (d) => {
|
|
5119
5119
|
d === 0 || s ? a() : o(new Error(`${t} exited with code ${d}`));
|
|
5120
5120
|
});
|
|
@@ -6311,7 +6311,7 @@ const Co = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
|
6311
6311
|
}), Eo = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
|
|
6312
6312
|
Co.init(e, t);
|
|
6313
6313
|
const i = e._zod.parse, s = Ti(() => vr(t)), a = (I) => {
|
|
6314
|
-
const R = new Gn(["shape", "payload", "ctx"]), W = s.value,
|
|
6314
|
+
const R = new Gn(["shape", "payload", "ctx"]), W = s.value, he = (de) => {
|
|
6315
6315
|
const ge = Ki(de);
|
|
6316
6316
|
return `shape[${ge}]._zod.run({ value: input[${ge}], issues: [] }, ctx)`;
|
|
6317
6317
|
};
|
|
@@ -6323,7 +6323,7 @@ const Co = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
|
6323
6323
|
R.write("const newResult = {};");
|
|
6324
6324
|
for (const de of W.keys) {
|
|
6325
6325
|
const ge = Me[de], Ge = Ki(de);
|
|
6326
|
-
R.write(`const ${ge} = ${
|
|
6326
|
+
R.write(`const ${ge} = ${he(de)};`), R.write(`
|
|
6327
6327
|
if (${ge}.issues.length) {
|
|
6328
6328
|
payload.issues = payload.issues.concat(${ge}.issues.map(iss => ({
|
|
6329
6329
|
...iss,
|
|
@@ -7750,15 +7750,17 @@ async function ep(e = !1) {
|
|
|
7750
7750
|
await Ee("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${t.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]);
|
|
7751
7751
|
const a = Bh(s);
|
|
7752
7752
|
if (s === "app")
|
|
7753
|
-
|
|
7753
|
+
oe("7️⃣ Register module"), await Mh();
|
|
7754
7754
|
else if (s === "engine")
|
|
7755
|
-
|
|
7756
|
-
else if (a
|
|
7757
|
-
|
|
7755
|
+
oe("7️⃣ Register module"), await ys(), await vs("datapos-engine-eu");
|
|
7756
|
+
else if (a === void 0)
|
|
7757
|
+
oe("7️⃣ Registration not required.");
|
|
7758
|
+
else {
|
|
7759
|
+
oe("7️⃣ Register module"), await ys();
|
|
7758
7760
|
const o = i.id.slice(Math.max(0, i.id.lastIndexOf("-") + 1));
|
|
7759
7761
|
await vs(`datapos-engine-eu/${a}/${o}`);
|
|
7760
7762
|
}
|
|
7761
|
-
await Ee("
|
|
7763
|
+
await Ee("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]), Fe(`Project version '${t.version}' released.`);
|
|
7762
7764
|
} catch (t) {
|
|
7763
7765
|
console.error("❌ Error releasing project.", t), process.exit(1);
|
|
7764
7766
|
}
|
|
@@ -7771,7 +7773,7 @@ async function tp() {
|
|
|
7771
7773
|
try {
|
|
7772
7774
|
Le("Synchronise Project with GitHub");
|
|
7773
7775
|
const e = await Ce("package.json");
|
|
7774
|
-
|
|
7776
|
+
oe("Bump project version"), await Pr("1️⃣", e), await Te("2️⃣ Stage changes", "git", ["add", "."]), await Te("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Fe(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7775
7777
|
} catch (e) {
|
|
7776
7778
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7777
7779
|
}
|
|
@@ -7786,12 +7788,12 @@ function ip() {
|
|
|
7786
7788
|
}
|
|
7787
7789
|
}
|
|
7788
7790
|
async function Dh(e, t) {
|
|
7789
|
-
|
|
7791
|
+
oe(`${e} Build project configuration`);
|
|
7790
7792
|
const i = await Ce("config.json");
|
|
7791
7793
|
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ot("config.json", i);
|
|
7792
7794
|
}
|
|
7793
7795
|
async function zh(e, t) {
|
|
7794
|
-
|
|
7796
|
+
oe(`${e} Build connector project configuration`);
|
|
7795
7797
|
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = fh.safeParse(i);
|
|
7796
7798
|
if (!a.success) {
|
|
7797
7799
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
@@ -7801,7 +7803,7 @@ async function zh(e, t) {
|
|
|
7801
7803
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, i.usageId = h, await ot("config.json", i);
|
|
7802
7804
|
}
|
|
7803
7805
|
async function Vh(e, t) {
|
|
7804
|
-
|
|
7806
|
+
oe(`${e} Build context project configuration`);
|
|
7805
7807
|
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Th.safeParse(i);
|
|
7806
7808
|
if (!a.success) {
|
|
7807
7809
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
@@ -7811,7 +7813,7 @@ async function Vh(e, t) {
|
|
|
7811
7813
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, await ot("config.json", i);
|
|
7812
7814
|
}
|
|
7813
7815
|
async function jh(e, t) {
|
|
7814
|
-
|
|
7816
|
+
oe(`${e} Build presenter project configuration`);
|
|
7815
7817
|
const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Oh.safeParse(i);
|
|
7816
7818
|
if (!a.success) {
|
|
7817
7819
|
console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
|
|
@@ -7821,7 +7823,7 @@ async function jh(e, t) {
|
|
|
7821
7823
|
o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = o, await ot("config.json", i);
|
|
7822
7824
|
}
|
|
7823
7825
|
async function Pr(e, t, i = "./") {
|
|
7824
|
-
if (
|
|
7826
|
+
if (oe(`${e} Bump project version`), t.version == null)
|
|
7825
7827
|
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await ot(`${i}package.json`, t);
|
|
7826
7828
|
else {
|
|
7827
7829
|
const s = t.version, a = t.version.split(".");
|
|
@@ -7865,7 +7867,7 @@ async function sp() {
|
|
|
7865
7867
|
"--nodePackageSkipDevDependencies",
|
|
7866
7868
|
"--nvdApiKey",
|
|
7867
7869
|
process.env.NVD_API_KEY ?? ""
|
|
7868
|
-
]),
|
|
7870
|
+
]), oe("Insert OWASP Badge(s) into 'README.md'"), await Zh(), await Ee("", "npm", ["audit"]), Fe("Dependencies audited.");
|
|
7869
7871
|
} catch (e) {
|
|
7870
7872
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
7871
7873
|
}
|
|
@@ -7877,7 +7879,7 @@ async function Zh() {
|
|
|
7877
7879
|
for (const I of T.vulnerabilities) {
|
|
7878
7880
|
const R = I.severity?.toLowerCase() ?? "unknown";
|
|
7879
7881
|
if (R in s) {
|
|
7880
|
-
const W = $h.find((
|
|
7882
|
+
const W = $h.find((he) => he === R);
|
|
7881
7883
|
s[W ?? "unknown"]++;
|
|
7882
7884
|
} else
|
|
7883
7885
|
s.unknown++;
|
|
@@ -7931,7 +7933,7 @@ async function ap(e) {
|
|
|
7931
7933
|
}
|
|
7932
7934
|
}
|
|
7933
7935
|
async function Wh(e) {
|
|
7934
|
-
|
|
7936
|
+
oe(`${e} Insert licenses into 'README.md'`);
|
|
7935
7937
|
const i = (await nt("./licenses.md")).trim(), s = await nt("./README.md"), a = s.indexOf(xs), o = s.indexOf(Hh);
|
|
7936
7938
|
if (a === -1 || o === -1) {
|
|
7937
7939
|
console.error("❌ No dependency license markers found in 'README.md'.");
|
package/package.json
CHANGED