@poe-platform/safe-js 0.1.730 → 0.1.732
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 +5 -5
- package/dist/safe-js/chunks/{chunk-SJZWSPWD.js → chunk-2GVBG23M.js} +1 -1
- package/dist/safe-js/chunks/{chunk-SJZWSPWD.js.map → chunk-2GVBG23M.js.map} +1 -1
- package/dist/safe-js/chunks/{chunk-MW2QLYVN.js → chunk-3ITVV2R6.js} +77 -66
- package/dist/safe-js/chunks/chunk-3ITVV2R6.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-VIMROAQA.js → chunk-E4XLBT7R.js} +2 -2
- package/dist/safe-js/chunks/chunk-F6CV74HU.js +114 -0
- package/dist/safe-js/chunks/chunk-F6CV74HU.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-OZLTLIHX.js → chunk-G6WTEIJJ.js} +2 -2
- package/dist/safe-js/chunks/{chunk-XX57YCGZ.js → chunk-GNEORAQI.js} +55 -50
- package/dist/safe-js/chunks/chunk-GNEORAQI.js.map +7 -0
- package/dist/safe-js/chunks/chunk-GVKXZW53.js +76 -0
- package/dist/safe-js/chunks/chunk-GVKXZW53.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-MRULOD5J.js → chunk-K4T4EBED.js} +59 -38
- package/dist/safe-js/chunks/chunk-K4T4EBED.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-MFCEBCGV.js → chunk-KETIFEA7.js} +17 -8
- package/dist/safe-js/chunks/chunk-KETIFEA7.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-S5YDMMM3.js → chunk-MDIWQFYU.js} +95 -169
- package/dist/safe-js/chunks/{chunk-S5YDMMM3.js.map → chunk-MDIWQFYU.js.map} +4 -4
- package/dist/safe-js/chunks/{chunk-EN724VH3.js → chunk-O4IDRXW7.js} +4 -4
- package/dist/safe-js/chunks/{chunk-3LSNBW5N.js → chunk-P64CQIUA.js} +4 -4
- package/dist/safe-js/chunks/{chunk-EA7AHM2X.js → chunk-PSVV3IG2.js} +3 -3
- package/dist/safe-js/chunks/{chunk-Y5EZYHU6.js → chunk-QKO4FATZ.js} +33 -5
- package/dist/safe-js/chunks/chunk-QKO4FATZ.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-EG3QWREA.js → chunk-RULU2F5J.js} +2 -2
- package/dist/safe-js/chunks/chunk-UQPYTZOZ.js +72 -0
- package/dist/safe-js/chunks/chunk-UQPYTZOZ.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-LRSWTDIV.js → chunk-W4SWUHCQ.js} +58 -23
- package/dist/safe-js/chunks/chunk-W4SWUHCQ.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-W3IY6FKO.js → chunk-WS2FJBH6.js} +2 -2
- package/dist/safe-js/chunks/{chunk-MVLDRXWS.js → chunk-X3CKAZQ4.js} +3 -3
- package/dist/safe-js/chunks/chunk-YUQFFRUF.js +26 -0
- package/dist/safe-js/chunks/chunk-YUQFFRUF.js.map +7 -0
- package/dist/safe-js/chunks/{cli-runtime-WSVW5DNT.js → cli-runtime-ZSOTNIVC.js} +51 -30
- package/dist/safe-js/chunks/cli-runtime-ZSOTNIVC.js.map +7 -0
- package/dist/safe-js/chunks/{dump-UNYK24YS.js → dump-RGRC3CG3.js} +5 -4
- package/dist/safe-js/chunks/harness-UMOMFXDT.js +11 -0
- package/dist/safe-js/chunks/mcp-2Z4XWHKW.js +12 -0
- package/dist/safe-js/chunks/migration-file-KRXQYI3Q.js +15 -0
- package/dist/safe-js/chunks/restore-GEO7VN2R.js +14 -0
- package/dist/safe-js/chunks/run-ZSFX66RN.js +20 -0
- package/dist/safe-js/chunks/runtime-modules-A3U2DKFL.js +11 -0
- package/dist/safe-js/chunks/source-files-L3SGK63Z.js +10 -0
- package/dist/safe-js/cli-runtime.d.ts +2 -0
- package/dist/safe-js/cli.js +4 -4
- package/dist/safe-js/core.d.ts +1 -0
- package/dist/safe-js/core.js +15 -8
- package/dist/safe-js/error/shape.js +170 -0
- package/dist/safe-js/index.js +42 -33
- package/dist/safe-js/index.js.map +2 -2
- package/dist/safe-js/interp/budget.js +600 -0
- package/dist/safe-js/interp/internal-symbols.js +1 -0
- package/dist/safe-js/interp/promise-replay.d.ts +1 -1
- package/dist/safe-js/interp/template-cache.js +7 -0
- package/dist/safe-js/migration-file.d.ts +2 -0
- package/dist/safe-js/modules/fs-config.d.ts +3 -1
- package/dist/safe-js/modules/fs.d.ts +8 -4
- package/dist/safe-js/modules/fs.js +16 -0
- package/dist/safe-js/modules/source-files.d.ts +3 -2
- package/dist/safe-js/platform/context.js +58 -0
- package/dist/safe-js/platform/node.js +64 -0
- package/dist/safe-js/platform/types.js +63 -0
- package/dist/safe-js/platform/workerd.js +39 -0
- package/dist/safe-js/runner/run-harness.d.ts +2 -0
- package/dist/safe-js/snapshot/backend.d.ts +2 -0
- package/package.json +9 -2
- package/dist/safe-js/chunks/chunk-FCCA27RC.js +0 -69
- package/dist/safe-js/chunks/chunk-FCCA27RC.js.map +0 -7
- package/dist/safe-js/chunks/chunk-LRSWTDIV.js.map +0 -7
- package/dist/safe-js/chunks/chunk-MFCEBCGV.js.map +0 -7
- package/dist/safe-js/chunks/chunk-MRULOD5J.js.map +0 -7
- package/dist/safe-js/chunks/chunk-MW2QLYVN.js.map +0 -7
- package/dist/safe-js/chunks/chunk-XX57YCGZ.js.map +0 -7
- package/dist/safe-js/chunks/chunk-Y5EZYHU6.js.map +0 -7
- package/dist/safe-js/chunks/cli-runtime-WSVW5DNT.js.map +0 -7
- package/dist/safe-js/chunks/fs-AOV77RQC.js +0 -13
- package/dist/safe-js/chunks/harness-ZIEO7NAV.js +0 -10
- package/dist/safe-js/chunks/mcp-E2AJXEQM.js +0 -11
- package/dist/safe-js/chunks/migration-file-3SWGNDS2.js +0 -12
- package/dist/safe-js/chunks/restore-FCTWPLU3.js +0 -13
- package/dist/safe-js/chunks/run-ESJHEXCE.js +0 -17
- package/dist/safe-js/chunks/runtime-modules-7V6BWCRK.js +0 -10
- package/dist/safe-js/chunks/source-files-73OHLNGH.js +0 -8
- /package/dist/safe-js/chunks/{chunk-VIMROAQA.js.map → chunk-E4XLBT7R.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-OZLTLIHX.js.map → chunk-G6WTEIJJ.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-EN724VH3.js.map → chunk-O4IDRXW7.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-3LSNBW5N.js.map → chunk-P64CQIUA.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-EA7AHM2X.js.map → chunk-PSVV3IG2.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-EG3QWREA.js.map → chunk-RULU2F5J.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-W3IY6FKO.js.map → chunk-WS2FJBH6.js.map} +0 -0
- /package/dist/safe-js/chunks/{chunk-MVLDRXWS.js.map → chunk-X3CKAZQ4.js.map} +0 -0
- /package/dist/safe-js/chunks/{dump-UNYK24YS.js.map → dump-RGRC3CG3.js.map} +0 -0
- /package/dist/safe-js/chunks/{fs-AOV77RQC.js.map → harness-UMOMFXDT.js.map} +0 -0
- /package/dist/safe-js/chunks/{harness-ZIEO7NAV.js.map → mcp-2Z4XWHKW.js.map} +0 -0
- /package/dist/safe-js/chunks/{mcp-E2AJXEQM.js.map → migration-file-KRXQYI3Q.js.map} +0 -0
- /package/dist/safe-js/chunks/{migration-file-3SWGNDS2.js.map → restore-GEO7VN2R.js.map} +0 -0
- /package/dist/safe-js/chunks/{restore-FCTWPLU3.js.map → run-ZSFX66RN.js.map} +0 -0
- /package/dist/safe-js/chunks/{run-ESJHEXCE.js.map → runtime-modules-A3U2DKFL.js.map} +0 -0
- /package/dist/safe-js/chunks/{runtime-modules-7V6BWCRK.js.map → source-files-L3SGK63Z.js.map} +0 -0
- /package/dist/safe-js/{chunks/source-files-73OHLNGH.js.map → modules/fs.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
hashParsedAst,
|
|
3
3
|
hashSource,
|
|
4
4
|
validateSnapshotMigration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PSVV3IG2.js";
|
|
6
6
|
import {
|
|
7
7
|
SnapshotValidationError,
|
|
8
8
|
assertSnapshotInactive,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
validateGuestFunctionAst,
|
|
16
16
|
validateRuntimeSnapshotDescriptors,
|
|
17
17
|
validateTemplateObjects
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MDIWQFYU.js";
|
|
19
19
|
import {
|
|
20
20
|
ParseError,
|
|
21
21
|
parseExecutableModule,
|
|
22
22
|
parseModule,
|
|
23
23
|
replaceErrorStack
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QKO4FATZ.js";
|
|
25
25
|
|
|
26
26
|
// packages/safe-js/src/restore.ts
|
|
27
27
|
var SnapshotMismatchError = class extends Error {
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
SnapshotMismatchError,
|
|
112
112
|
restore
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-O4IDRXW7.js.map
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
McpError,
|
|
3
3
|
connectMcpTransport,
|
|
4
4
|
normalizeMcpOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3ITVV2R6.js";
|
|
6
6
|
import {
|
|
7
7
|
declareHostOperation,
|
|
8
8
|
runResources
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MDIWQFYU.js";
|
|
10
10
|
import {
|
|
11
11
|
hostErrorData
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QKO4FATZ.js";
|
|
13
13
|
|
|
14
14
|
// packages/safe-js/src/modules/mcp.ts
|
|
15
15
|
var DEFAULT_TOOL_BATCH_CONCURRENCY = 4;
|
|
@@ -402,4 +402,4 @@ function isPlainObjectRecord(value) {
|
|
|
402
402
|
export {
|
|
403
403
|
makeMcpModule
|
|
404
404
|
};
|
|
405
|
-
//# sourceMappingURL=chunk-
|
|
405
|
+
//# sourceMappingURL=chunk-P64CQIUA.js.map
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
HostCallJournal,
|
|
3
3
|
decodeReplayData,
|
|
4
4
|
validateSnapshotData
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MDIWQFYU.js";
|
|
6
6
|
import {
|
|
7
7
|
CompileScope,
|
|
8
8
|
SandboxError,
|
|
9
9
|
functionSources,
|
|
10
10
|
parse,
|
|
11
11
|
parseModule
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QKO4FATZ.js";
|
|
13
13
|
|
|
14
14
|
// packages/safe-js/src/parse/hash.ts
|
|
15
15
|
var FNV_OFFSET_BASIS = 2166136261;
|
|
@@ -219,4 +219,4 @@ export {
|
|
|
219
219
|
validateMigrationReconciliation,
|
|
220
220
|
validateSnapshotMigration
|
|
221
221
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-PSVV3IG2.js.map
|
|
@@ -686,13 +686,13 @@ var Budget = class _Budget {
|
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
function normalizeDeadline(deadline) {
|
|
689
|
-
if (deadline === void 0) {
|
|
689
|
+
if (deadline === void 0 || deadline === Infinity) {
|
|
690
690
|
return void 0;
|
|
691
691
|
}
|
|
692
692
|
return deadline instanceof Date ? deadline.getTime() : deadline;
|
|
693
693
|
}
|
|
694
694
|
function normalizeLimit(name, value) {
|
|
695
|
-
if (value === void 0) {
|
|
695
|
+
if (value === void 0 || value === Infinity) {
|
|
696
696
|
return void 0;
|
|
697
697
|
}
|
|
698
698
|
if (!Number.isInteger(value) || value < 0) {
|
|
@@ -701,7 +701,7 @@ function normalizeLimit(name, value) {
|
|
|
701
701
|
return value;
|
|
702
702
|
}
|
|
703
703
|
function normalizeRegexLimit(name, value) {
|
|
704
|
-
if (value === void 0) return void 0;
|
|
704
|
+
if (value === void 0 || value === Infinity) return void 0;
|
|
705
705
|
if (!Number.isSafeInteger(value) || value < 1)
|
|
706
706
|
throw new RangeError(`${name} must be a positive safe integer.`);
|
|
707
707
|
return value;
|
|
@@ -2001,6 +2001,33 @@ function validatePrivateNames(root, inheritedNames) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
2003
|
|
|
2004
|
+
// packages/safe-js/src/platform/types.ts
|
|
2005
|
+
var getter = (prototype, key) => Object.getOwnPropertyDescriptor(prototype, key).get;
|
|
2006
|
+
var regexpPrototype = RegExp.prototype;
|
|
2007
|
+
var regexpSource = getter(regexpPrototype, "source");
|
|
2008
|
+
var booleanValue = Boolean.prototype.valueOf;
|
|
2009
|
+
var numberValue = Number.prototype.valueOf;
|
|
2010
|
+
var stringValue = String.prototype.valueOf;
|
|
2011
|
+
var bigintValue = BigInt.prototype.valueOf;
|
|
2012
|
+
var symbolValue = Symbol.prototype.valueOf;
|
|
2013
|
+
var dateValue = Date.prototype.getTime;
|
|
2014
|
+
var asyncFunctionPrototype = Object.getPrototypeOf(async function() {
|
|
2015
|
+
});
|
|
2016
|
+
var generatorFunctionPrototype = Object.getPrototypeOf(function* () {
|
|
2017
|
+
});
|
|
2018
|
+
var arrayBufferLength = getter(ArrayBuffer.prototype, "byteLength");
|
|
2019
|
+
var dataViewBuffer = getter(DataView.prototype, "buffer");
|
|
2020
|
+
var mapSize = getter(Map.prototype, "size");
|
|
2021
|
+
var promiseThen = Promise.prototype.then;
|
|
2022
|
+
var NativeError = Error;
|
|
2023
|
+
var nativeIsError = Reflect.get(NativeError, "isError");
|
|
2024
|
+
var proxies = /* @__PURE__ */ new WeakSet();
|
|
2025
|
+
function createTrackedProxy(target, handler) {
|
|
2026
|
+
const proxy = new Proxy(target, handler);
|
|
2027
|
+
proxies.add(proxy);
|
|
2028
|
+
return proxy;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2004
2031
|
// packages/safe-js/src/parse/compact-tokens.ts
|
|
2005
2032
|
var types = [
|
|
2006
2033
|
"identifier",
|
|
@@ -2052,7 +2079,7 @@ var CompactTokens = class {
|
|
|
2052
2079
|
parserToken;
|
|
2053
2080
|
// Only indexing, iteration, length, push and at are used by the lexer/parser.
|
|
2054
2081
|
// Historical tokens are materialized on demand in a bounded cache.
|
|
2055
|
-
indexed =
|
|
2082
|
+
indexed = createTrackedProxy([], {
|
|
2056
2083
|
get: (target, key, receiver) => {
|
|
2057
2084
|
if (key === "length") return this.values.length;
|
|
2058
2085
|
if (key === "push") return this.push;
|
|
@@ -8685,6 +8712,7 @@ export {
|
|
|
8685
8712
|
boundIdentifiers,
|
|
8686
8713
|
containsParameterExpression,
|
|
8687
8714
|
hoistedVarDeclarations,
|
|
8715
|
+
createTrackedProxy,
|
|
8688
8716
|
CompileScope,
|
|
8689
8717
|
RegexCompileGuard,
|
|
8690
8718
|
regexCompiledData,
|
|
@@ -8718,4 +8746,4 @@ export {
|
|
|
8718
8746
|
Float16Array2 as Float16Array,
|
|
8719
8747
|
numericTypedArrayConstructors
|
|
8720
8748
|
};
|
|
8721
|
-
//# sourceMappingURL=chunk-
|
|
8749
|
+
//# sourceMappingURL=chunk-QKO4FATZ.js.map
|