@poe-platform/safe-js 0.1.242 → 0.1.244
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-FMIETDHG.js → chunk-IBQE6MEC.js} +2 -2
- package/dist/safe-js/chunks/{chunk-HL454CBB.js → chunk-LQ57UIVW.js} +17 -47
- package/dist/safe-js/chunks/chunk-LQ57UIVW.js.map +7 -0
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/error/shape.d.ts +2 -2
- 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-HL454CBB.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-FMIETDHG.js.map → chunk-IBQE6MEC.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LQ57UIVW.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-IBQE6MEC.js.map
|
|
@@ -6,6 +6,8 @@ var sandboxErrorNames = [
|
|
|
6
6
|
"RangeError",
|
|
7
7
|
"ReferenceError",
|
|
8
8
|
"SyntaxError",
|
|
9
|
+
"URIError",
|
|
10
|
+
"EvalError",
|
|
9
11
|
"AbortError",
|
|
10
12
|
"AggregateError",
|
|
11
13
|
"HarnessFailure"
|
|
@@ -3350,7 +3352,12 @@ var Parser = class {
|
|
|
3350
3352
|
if (token.type === "keyword" && token.value === "while") return this.parseWhileStatement(labels);
|
|
3351
3353
|
if (token.type === "keyword" && token.value === "do") return this.parseDoWhileStatement(labels);
|
|
3352
3354
|
if (token.type === "punctuator" && token.value === "{") return { ...this.parseBlockStatement(), labels };
|
|
3353
|
-
|
|
3355
|
+
if (["let", "const", "class", "function", "import", "export"].includes(token.value) || this.isAsyncFunctionDeclarationStart())
|
|
3356
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3357
|
+
const statement = this.parseStatement();
|
|
3358
|
+
if (statement.type === "ImportDeclaration" || statement.type === "ExportDefaultDeclaration" || statement.type === "ExportNamedDeclaration")
|
|
3359
|
+
throw new DisallowedSyntaxError("labeled declaration", firstLabelToken.start);
|
|
3360
|
+
return { ...statement, labels, span: createSpan2(firstLabelToken.start, statement.span.end) };
|
|
3354
3361
|
} finally {
|
|
3355
3362
|
for (const label of labels) this.activeLabels.delete(label);
|
|
3356
3363
|
}
|
|
@@ -14628,6 +14635,8 @@ var errorNames = [
|
|
|
14628
14635
|
"RangeError",
|
|
14629
14636
|
"ReferenceError",
|
|
14630
14637
|
"SyntaxError",
|
|
14638
|
+
"URIError",
|
|
14639
|
+
"EvalError",
|
|
14631
14640
|
"AggregateError"
|
|
14632
14641
|
];
|
|
14633
14642
|
function createErrorGlobals(options) {
|
|
@@ -15199,6 +15208,8 @@ async function evaluateNode(node, context) {
|
|
|
15199
15208
|
compilation,
|
|
15200
15209
|
context.compilation
|
|
15201
15210
|
);
|
|
15211
|
+
if (result.kind === "break" && result.label !== void 0 && "labels" in node && node.labels?.includes(result.label))
|
|
15212
|
+
return { kind: "normal", hasValue: false, value: void 0 };
|
|
15202
15213
|
return result;
|
|
15203
15214
|
} catch (error) {
|
|
15204
15215
|
if (error instanceof HostCallResumabilityError) {
|
|
@@ -16014,8 +16025,6 @@ async function evaluateBlockStatement(node, context) {
|
|
|
16014
16025
|
continue;
|
|
16015
16026
|
}
|
|
16016
16027
|
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
16028
|
if (result.kind !== "normal") {
|
|
16020
16029
|
return result;
|
|
16021
16030
|
}
|
|
@@ -26299,13 +26308,8 @@ var AS001Scanner = class {
|
|
|
26299
26308
|
braceContextStack,
|
|
26300
26309
|
nextSignificantChar
|
|
26301
26310
|
);
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
"label",
|
|
26305
|
-
token.start,
|
|
26306
|
-
this.positionWithinSource(token.start.offset + token.value.length)
|
|
26307
|
-
);
|
|
26308
|
-
} else if (!isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26311
|
+
const isLabel = canStartStatement && nextSignificantChar === ":" && token.type === "identifier";
|
|
26312
|
+
if (!isLabel && !isMemberProperty && !isPropertyKey && !isMemberName) {
|
|
26309
26313
|
this.reportForbiddenIdentifier(token);
|
|
26310
26314
|
if (token.value === "class") {
|
|
26311
26315
|
pendingClassBody = true;
|
|
@@ -26555,29 +26559,6 @@ var AS001Scanner = class {
|
|
|
26555
26559
|
const nextIndex = this.skipTriviaFrom(this.index);
|
|
26556
26560
|
return nextIndex >= this.source.length ? void 0 : this.source[nextIndex];
|
|
26557
26561
|
}
|
|
26558
|
-
isSupportedLabelStart() {
|
|
26559
|
-
let index = this.skipTriviaFrom(this.index);
|
|
26560
|
-
if (this.source[index] !== ":") {
|
|
26561
|
-
return false;
|
|
26562
|
-
}
|
|
26563
|
-
index = this.skipTriviaFrom(index + 1);
|
|
26564
|
-
while (index < this.source.length) {
|
|
26565
|
-
if (this.source[index] === "{") return true;
|
|
26566
|
-
const identifier = readIdentifierAt(this.source, index);
|
|
26567
|
-
if (identifier === void 0) {
|
|
26568
|
-
return false;
|
|
26569
|
-
}
|
|
26570
|
-
if (identifier.value === "for" || identifier.value === "while" || identifier.value === "do") {
|
|
26571
|
-
return true;
|
|
26572
|
-
}
|
|
26573
|
-
const nextIndex = this.skipTriviaFrom(identifier.end);
|
|
26574
|
-
if (this.source[nextIndex] !== ":") {
|
|
26575
|
-
return false;
|
|
26576
|
-
}
|
|
26577
|
-
index = this.skipTriviaFrom(nextIndex + 1);
|
|
26578
|
-
}
|
|
26579
|
-
return false;
|
|
26580
|
-
}
|
|
26581
26562
|
skipTriviaFrom(start) {
|
|
26582
26563
|
let index = start;
|
|
26583
26564
|
while (index < this.source.length) {
|
|
@@ -26787,19 +26768,6 @@ function isIdentifierStart2(char) {
|
|
|
26787
26768
|
function isIdentifierPart2(char) {
|
|
26788
26769
|
return isIdentifierStart2(char) || isDecimalDigit4(char);
|
|
26789
26770
|
}
|
|
26790
|
-
function readIdentifierAt(source, start) {
|
|
26791
|
-
if (!isIdentifierStart2(source[start] ?? "")) {
|
|
26792
|
-
return void 0;
|
|
26793
|
-
}
|
|
26794
|
-
let end = start + 1;
|
|
26795
|
-
while (end < source.length && isIdentifierPart2(source[end] ?? "")) {
|
|
26796
|
-
end += 1;
|
|
26797
|
-
}
|
|
26798
|
-
return {
|
|
26799
|
-
value: source.slice(start, end),
|
|
26800
|
-
end
|
|
26801
|
-
};
|
|
26802
|
-
}
|
|
26803
26771
|
function isAsciiLetter3(char) {
|
|
26804
26772
|
return char >= "a" && char <= "z" || char >= "A" && char <= "Z";
|
|
26805
26773
|
}
|
|
@@ -26840,6 +26808,7 @@ var KNOWN_RUNTIME_GLOBALS = [
|
|
|
26840
26808
|
"BigInt",
|
|
26841
26809
|
"Date",
|
|
26842
26810
|
"Error",
|
|
26811
|
+
"EvalError",
|
|
26843
26812
|
"Infinity",
|
|
26844
26813
|
"isFinite",
|
|
26845
26814
|
"isNaN",
|
|
@@ -26862,6 +26831,7 @@ var KNOWN_RUNTIME_GLOBALS = [
|
|
|
26862
26831
|
"structuredClone",
|
|
26863
26832
|
"SyntaxError",
|
|
26864
26833
|
"TypeError",
|
|
26834
|
+
"URIError",
|
|
26865
26835
|
"console"
|
|
26866
26836
|
];
|
|
26867
26837
|
|
|
@@ -39341,4 +39311,4 @@ export {
|
|
|
39341
39311
|
FileSnapshotBackend,
|
|
39342
39312
|
run
|
|
39343
39313
|
};
|
|
39344
|
-
//# sourceMappingURL=chunk-
|
|
39314
|
+
//# sourceMappingURL=chunk-LQ57UIVW.js.map
|