@poe-platform/safe-js 0.1.429 → 0.1.431
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-OTAJ3S3N.js → chunk-35AKWKAL.js} +19 -9
- package/dist/safe-js/chunks/chunk-35AKWKAL.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-AE2AANZZ.js → chunk-HBSJ2KM3.js} +2 -2
- 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/package.json +2 -2
- package/dist/safe-js/chunks/chunk-OTAJ3S3N.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-AE2AANZZ.js.map → chunk-HBSJ2KM3.js.map} +0 -0
|
@@ -914,7 +914,6 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
914
914
|
"true",
|
|
915
915
|
"false",
|
|
916
916
|
"null",
|
|
917
|
-
"undefined",
|
|
918
917
|
"typeof",
|
|
919
918
|
"void",
|
|
920
919
|
"delete",
|
|
@@ -923,7 +922,7 @@ var KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
923
922
|
"in",
|
|
924
923
|
"of"
|
|
925
924
|
]);
|
|
926
|
-
var EXPRESSION_ENDING_KEYWORDS = /* @__PURE__ */ new Set(["true", "false", "null"
|
|
925
|
+
var EXPRESSION_ENDING_KEYWORDS = /* @__PURE__ */ new Set(["true", "false", "null"]);
|
|
927
926
|
var CONTROL_FLOW_PAREN_KEYWORDS = /* @__PURE__ */ new Set(["if", "while", "for", "catch"]);
|
|
928
927
|
var MAX_UNICODE_CODE_POINT = 1114111;
|
|
929
928
|
var IDENTIFIER_START_PATTERN = new RegExp("^\\p{ID_Start}$", "u");
|
|
@@ -11743,6 +11742,10 @@ function isPromiseLike2(value) {
|
|
|
11743
11742
|
// packages/safe-js/src/interp/promise-state.ts
|
|
11744
11743
|
var promiseStates = /* @__PURE__ */ new WeakMap();
|
|
11745
11744
|
|
|
11745
|
+
// packages/safe-js/src/snapshot/not-ready.ts
|
|
11746
|
+
var SnapshotNotReadyError = class extends TypeError {
|
|
11747
|
+
};
|
|
11748
|
+
|
|
11746
11749
|
// packages/safe-js/src/interp/closure-origin.ts
|
|
11747
11750
|
var origins = /* @__PURE__ */ new WeakMap();
|
|
11748
11751
|
var generatorOrigins = /* @__PURE__ */ new WeakMap();
|
|
@@ -11939,6 +11942,7 @@ var Scope = class _Scope {
|
|
|
11939
11942
|
assign(name, value) {
|
|
11940
11943
|
const scope = this.resolveScope(name);
|
|
11941
11944
|
if (scope === void 0) {
|
|
11945
|
+
if (name === "undefined") throw new TypeError("Cannot assign to const binding 'undefined'.");
|
|
11942
11946
|
throw new ReferenceError(`Cannot assign to undeclared binding '${name}'.`);
|
|
11943
11947
|
}
|
|
11944
11948
|
const binding = scope.#bindings.get(name);
|
|
@@ -11969,6 +11973,7 @@ var Scope = class _Scope {
|
|
|
11969
11973
|
if (this.parent !== void 0) {
|
|
11970
11974
|
return this.parent.lookup(name);
|
|
11971
11975
|
}
|
|
11976
|
+
if (name === "undefined") return { found: true, kind: "const", value: void 0 };
|
|
11972
11977
|
return { found: false };
|
|
11973
11978
|
}
|
|
11974
11979
|
snapshot() {
|
|
@@ -12099,10 +12104,6 @@ function defineSnapshotBinding(target, name, value) {
|
|
|
12099
12104
|
});
|
|
12100
12105
|
}
|
|
12101
12106
|
|
|
12102
|
-
// packages/safe-js/src/snapshot/not-ready.ts
|
|
12103
|
-
var SnapshotNotReadyError = class extends TypeError {
|
|
12104
|
-
};
|
|
12105
|
-
|
|
12106
12107
|
// packages/safe-js/src/interp/symbol-registry.ts
|
|
12107
12108
|
var symbolRegistryOrigins = /* @__PURE__ */ new WeakMap();
|
|
12108
12109
|
|
|
@@ -19109,6 +19110,9 @@ function collectContainerStats(value, stats, ancestors, guestValues, trustedRunR
|
|
|
19109
19110
|
stat2.expanded = true;
|
|
19110
19111
|
ancestors.add(value);
|
|
19111
19112
|
const guestEntries = [];
|
|
19113
|
+
const driver = trustedRunReplay ? asyncGeneratorDrivers.get(value) : void 0;
|
|
19114
|
+
if (driver !== void 0 && driver.requests.some((request) => requiresPromiseReplay(request.capability.promise)))
|
|
19115
|
+
throw new SnapshotNotReadyError("Cannot snapshot an async generator with a replay-only request.");
|
|
19112
19116
|
const replayPromise = isSandboxPromise(value) ? value : isPromiseResolvingFunction(value) ? promiseResolvingFunctions.get(value)?.promise : void 0;
|
|
19113
19117
|
const replayMetadata = trustedRunReplay && replayPromise !== void 0 && requiresPromiseReplay(replayPromise);
|
|
19114
19118
|
if (isSandboxDataView(value)) guestEntries.push(dataViewBuffer(value));
|
|
@@ -33755,7 +33759,7 @@ function hashParsedAst(ast, includeFunctionSource = true) {
|
|
|
33755
33759
|
let hash = FNV_OFFSET_BASIS;
|
|
33756
33760
|
visit(ast);
|
|
33757
33761
|
return hash.toString(16).padStart(8, "0");
|
|
33758
|
-
function visit(value, includeTemplateRaw = false, enclosingSource) {
|
|
33762
|
+
function visit(value, includeTemplateRaw = false, enclosingSource, identifierName = false) {
|
|
33759
33763
|
if (value === null) {
|
|
33760
33764
|
write("null");
|
|
33761
33765
|
return;
|
|
@@ -33785,6 +33789,10 @@ function hashParsedAst(ast, includeFunctionSource = true) {
|
|
|
33785
33789
|
return;
|
|
33786
33790
|
case "object": {
|
|
33787
33791
|
const record4 = value;
|
|
33792
|
+
if (record4.type === "Identifier" && record4.name === "undefined" && !identifierName) {
|
|
33793
|
+
visit({ type: "UndefinedLiteral", value: void 0 });
|
|
33794
|
+
return;
|
|
33795
|
+
}
|
|
33788
33796
|
const source = includeFunctionSource ? functionSources.get(value) : void 0;
|
|
33789
33797
|
if (source !== void 0 && !(enclosingSource !== void 0 && source.text === enclosingSource.text && source.start >= enclosingSource.start && source.end <= enclosingSource.end)) {
|
|
33790
33798
|
write("function-source:");
|
|
@@ -33800,7 +33808,8 @@ function hashParsedAst(ast, includeFunctionSource = true) {
|
|
|
33800
33808
|
visit(
|
|
33801
33809
|
record4[key],
|
|
33802
33810
|
shouldIncludeTemplateRaw(record4, key, includeTemplateRaw),
|
|
33803
|
-
source ?? enclosingSource
|
|
33811
|
+
source ?? enclosingSource,
|
|
33812
|
+
key === "property" && record4.type === "MemberExpression" && !record4.computed || key === "key" && !record4.computed || (key === "imported" || key === "local") && record4.type === "ImportSpecifier" || key === "exported" && record4.type === "ExportSpecifier"
|
|
33804
33813
|
);
|
|
33805
33814
|
write(",");
|
|
33806
33815
|
}
|
|
@@ -34699,6 +34708,7 @@ var KNOWN_RUNTIME_GLOBALS = [
|
|
|
34699
34708
|
"SyntaxError",
|
|
34700
34709
|
"TypeError",
|
|
34701
34710
|
"URIError",
|
|
34711
|
+
"undefined",
|
|
34702
34712
|
"console"
|
|
34703
34713
|
];
|
|
34704
34714
|
|
|
@@ -47185,4 +47195,4 @@ export {
|
|
|
47185
47195
|
FileSnapshotBackend,
|
|
47186
47196
|
run
|
|
47187
47197
|
};
|
|
47188
|
-
//# sourceMappingURL=chunk-
|
|
47198
|
+
//# sourceMappingURL=chunk-35AKWKAL.js.map
|