@poe-platform/safe-js 0.1.241 → 0.1.243
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/safe-js/chunks/{chunk-DND27FSF.js → chunk-AVVWPQWG.js} +2 -2
- package/dist/safe-js/chunks/{chunk-L2JX3HPQ.js → chunk-NM7QH5TW.js} +16 -47
- package/dist/safe-js/chunks/chunk-NM7QH5TW.js.map +7 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/dist/safe-js/parse/parser.d.ts +1 -0
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-L2JX3HPQ.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-DND27FSF.js.map → chunk-AVVWPQWG.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NM7QH5TW.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-AVVWPQWG.js.map
|
|
@@ -3350,7 +3350,12 @@ var Parser = class {
|
|
|
3350
3350
|
if (token.type === "keyword" && token.value === "while") return this.parseWhileStatement(labels);
|
|
3351
3351
|
if (token.type === "keyword" && token.value === "do") return this.parseDoWhileStatement(labels);
|
|
3352
3352
|
if (token.type === "punctuator" && token.value === "{") return { ...this.parseBlockStatement(), labels };
|
|
3353
|
-
|
|
3353
|
+
if (["let", "const", "class", "function", "import", "export"].includes(token.value) || this.isAsyncFunctionDeclarationStart())
|
|
3354
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3355
|
+
const statement = this.parseStatement();
|
|
3356
|
+
if (statement.type === "ImportDeclaration" || statement.type === "ExportDefaultDeclaration" || statement.type === "ExportNamedDeclaration")
|
|
3357
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3358
|
+
return { ...statement, labels, span: createSpan2(firstLabelToken.start, statement.span.end) };
|
|
3354
3359
|
} finally {
|
|
3355
3360
|
for (const label of labels) this.activeLabels.delete(label);
|
|
3356
3361
|
}
|
|
@@ -15199,6 +15204,8 @@ async function evaluateNode(node, context) {
|
|
|
15199
15204
|
compilation,
|
|
15200
15205
|
context.compilation
|
|
15201
15206
|
);
|
|
15207
|
+
if (result.kind === "break" && result.label !== void 0 && "labels" in node && node.labels?.includes(result.label))
|
|
15208
|
+
return { kind: "normal", hasValue: false, value: void 0 };
|
|
15202
15209
|
return result;
|
|
15203
15210
|
} catch (error) {
|
|
15204
15211
|
if (error instanceof HostCallResumabilityError) {
|
|
@@ -16014,8 +16021,6 @@ async function evaluateBlockStatement(node, context) {
|
|
|
16014
16021
|
continue;
|
|
16015
16022
|
}
|
|
16016
16023
|
const result = await evaluateNode(statement, blockContext);
|
|
16017
|
-
if (result.kind === "break" && result.label !== void 0 && node.labels?.includes(result.label))
|
|
16018
|
-
return { kind: "normal", hasValue: false, value: void 0 };
|
|
16019
16024
|
if (result.kind !== "normal") {
|
|
16020
16025
|
return result;
|
|
16021
16026
|
}
|
|
@@ -16176,6 +16181,11 @@ async function evaluateSwitchStatement(node, context) {
|
|
|
16176
16181
|
}
|
|
16177
16182
|
}
|
|
16178
16183
|
async function evaluateIfStatement(node, context) {
|
|
16184
|
+
if (context.generatorResume !== void 0 && context.generatorResume.completed !== true) {
|
|
16185
|
+
const target = /* @__PURE__ */ new Set([context.generatorResume.yieldNodeId]);
|
|
16186
|
+
if (containsResumeTarget(node.consequent, target)) return evaluateNode(node.consequent, context);
|
|
16187
|
+
if (node.alternate !== void 0 && containsResumeTarget(node.alternate, target)) return evaluateNode(node.alternate, context);
|
|
16188
|
+
}
|
|
16179
16189
|
const test = await evaluateNode(node.test, context);
|
|
16180
16190
|
if (test.kind !== "normal") {
|
|
16181
16191
|
return test;
|
|
@@ -26294,13 +26304,8 @@ var AS001Scanner = class {
|
|
|
26294
26304
|
braceContextStack,
|
|
26295
26305
|
nextSignificantChar
|
|
26296
26306
|
);
|
|
26297
|
-
|
|
26298
|
-
|
|
26299
|
-
"label",
|
|
26300
|
-
token.start,
|
|
26301
|
-
this.positionWithinSource(token.start.offset + token.value.length)
|
|
26302
|
-
);
|
|
26303
|
-
} else if (!isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26307
|
+
const isLabel = canStartStatement && nextSignificantChar === ":" && token.type === "identifier";
|
|
26308
|
+
if (!isLabel && !isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26304
26309
|
this.reportForbiddenIdentifier(token);
|
|
26305
26310
|
if (token.value === "class") {
|
|
26306
26311
|
pendingClassBody = true;
|
|
@@ -26550,29 +26555,6 @@ var AS001Scanner = class {
|
|
|
26550
26555
|
const nextIndex = this.skipTriviaFrom(this.index);
|
|
26551
26556
|
return nextIndex >= this.source.length ? void 0 : this.source[nextIndex];
|
|
26552
26557
|
}
|
|
26553
|
-
isSupportedLabelStart() {
|
|
26554
|
-
let index = this.skipTriviaFrom(this.index);
|
|
26555
|
-
if (this.source[index] !== ":") {
|
|
26556
|
-
return false;
|
|
26557
|
-
}
|
|
26558
|
-
index = this.skipTriviaFrom(index + 1);
|
|
26559
|
-
while (index < this.source.length) {
|
|
26560
|
-
if (this.source[index] === "{") return true;
|
|
26561
|
-
const identifier = readIdentifierAt(this.source, index);
|
|
26562
|
-
if (identifier === void 0) {
|
|
26563
|
-
return false;
|
|
26564
|
-
}
|
|
26565
|
-
if (identifier.value === "for" || identifier.value === "while" || identifier.value === "do") {
|
|
26566
|
-
return true;
|
|
26567
|
-
}
|
|
26568
|
-
const nextIndex = this.skipTriviaFrom(identifier.end);
|
|
26569
|
-
if (this.source[nextIndex] !== ":") {
|
|
26570
|
-
return false;
|
|
26571
|
-
}
|
|
26572
|
-
index = this.skipTriviaFrom(nextIndex + 1);
|
|
26573
|
-
}
|
|
26574
|
-
return false;
|
|
26575
|
-
}
|
|
26576
26558
|
skipTriviaFrom(start) {
|
|
26577
26559
|
let index = start;
|
|
26578
26560
|
while (index < this.source.length) {
|
|
@@ -26782,19 +26764,6 @@ function isIdentifierStart2(char) {
|
|
|
26782
26764
|
function isIdentifierPart2(char) {
|
|
26783
26765
|
return isIdentifierStart2(char) || isDecimalDigit4(char);
|
|
26784
26766
|
}
|
|
26785
|
-
function readIdentifierAt(source, start) {
|
|
26786
|
-
if (!isIdentifierStart2(source[start] ?? "")) {
|
|
26787
|
-
return void 0;
|
|
26788
|
-
}
|
|
26789
|
-
let end = start + 1;
|
|
26790
|
-
while (end < source.length && isIdentifierPart2(source[end] ?? "")) {
|
|
26791
|
-
end += 1;
|
|
26792
|
-
}
|
|
26793
|
-
return {
|
|
26794
|
-
value: source.slice(start, end),
|
|
26795
|
-
end
|
|
26796
|
-
};
|
|
26797
|
-
}
|
|
26798
26767
|
function isAsciiLetter3(char) {
|
|
26799
26768
|
return char >= "a" && char <= "z" || char >= "A" && char <= "Z";
|
|
26800
26769
|
}
|
|
@@ -39336,4 +39305,4 @@ export {
|
|
|
39336
39305
|
FileSnapshotBackend,
|
|
39337
39306
|
run
|
|
39338
39307
|
};
|
|
39339
|
-
//# sourceMappingURL=chunk-
|
|
39308
|
+
//# sourceMappingURL=chunk-NM7QH5TW.js.map
|