poe-code 10.0.4 → 11.0.1
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/index.js +73 -136
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +2 -2
- package/packages/safejs/dist/chunks/{chunk-SA7XBTIL.js → chunk-ARFGEQTM.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-JLYBD3E6.js → chunk-DKXGPEOM.js} +71 -134
- package/packages/safejs/dist/chunks/{chunk-JLYBD3E6.js.map → chunk-DKXGPEOM.js.map} +2 -2
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/interpreter.js +73 -127
- package/packages/safejs/dist/interp/scope.js +3 -3
- package/packages/safejs/dist/snapshot/dump-format.d.ts +1 -1
- package/packages/safejs/dist/snapshot/dump-format.js +1 -1
- package/packages/safejs/dist/snapshot/migration.js +2 -2
- package/packages/safejs/dist/snapshot/validation.js +0 -4
- package/packages/safejs/dist/chunks/chunk-NI4WFFTL.js +0 -5701
- package/packages/safejs/dist/chunks/chunk-NI4WFFTL.js.map +0 -7
- package/packages/safejs/dist/chunks/inMemory-RLZ4QGDZ.js +0 -48
- package/packages/safejs/dist/chunks/inMemory-RLZ4QGDZ.js.map +0 -7
- package/packages/safejs/dist/chunks/server-3SNT3RE2.js +0 -12518
- package/packages/safejs/dist/chunks/server-3SNT3RE2.js.map +0 -7
- package/packages/safejs/dist/chunks/types-BTF37PZ6.js +0 -348
- package/packages/safejs/dist/chunks/types-BTF37PZ6.js.map +0 -7
- /package/packages/safejs/dist/chunks/{chunk-SA7XBTIL.js.map → chunk-ARFGEQTM.js.map} +0 -0
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
parseMcpConfig,
|
|
20
20
|
splitFrontmatter,
|
|
21
21
|
withBrokenPipeGuard
|
|
22
|
-
} from "./chunks/chunk-
|
|
22
|
+
} from "./chunks/chunk-ARFGEQTM.js";
|
|
23
23
|
import {
|
|
24
24
|
Budget,
|
|
25
25
|
SandboxError,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
replaceErrorStack,
|
|
32
32
|
restore,
|
|
33
33
|
run
|
|
34
|
-
} from "./chunks/chunk-
|
|
34
|
+
} from "./chunks/chunk-DKXGPEOM.js";
|
|
35
35
|
import "./chunks/chunk-4YIDX44G.js";
|
|
36
36
|
|
|
37
37
|
// packages/safejs/src/cli.ts
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runWithSpawnUsageAccumulator,
|
|
27
27
|
splitFrontmatter,
|
|
28
28
|
supportsSpawnMode
|
|
29
|
-
} from "./chunks/chunk-
|
|
29
|
+
} from "./chunks/chunk-ARFGEQTM.js";
|
|
30
30
|
import {
|
|
31
31
|
Budget,
|
|
32
32
|
FileSnapshotBackend,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
registerPendingHostCallPolicy,
|
|
49
49
|
restore,
|
|
50
50
|
run
|
|
51
|
-
} from "./chunks/chunk-
|
|
51
|
+
} from "./chunks/chunk-DKXGPEOM.js";
|
|
52
52
|
import "./chunks/chunk-4YIDX44G.js";
|
|
53
53
|
|
|
54
54
|
// packages/safejs/src/runner/run-harness.ts
|
|
@@ -422,32 +422,30 @@ async function evaluateAssignmentExpression(node, context) {
|
|
|
422
422
|
error: createError("UNSUPPORTED_NODE", node, `Unsupported assignment target '${node.left.type}'.`)
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
const binding = context.scope.lookup(node.left.name);
|
|
426
|
-
if (
|
|
425
|
+
const binding = node.operator === "=" ? undefined : context.scope.lookup(node.left.name);
|
|
426
|
+
if (binding?.found === false) {
|
|
427
427
|
throw new ReferenceError(`Cannot assign to undeclared binding '${node.left.name}'.`);
|
|
428
428
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
432
|
-
if (node.operator === "&&=" && !isTruthy(binding.value)) {
|
|
429
|
+
const current = binding?.value;
|
|
430
|
+
if (node.operator === "&&=" && !isTruthy(current)) {
|
|
433
431
|
return {
|
|
434
432
|
kind: "normal",
|
|
435
433
|
hasValue: true,
|
|
436
|
-
value:
|
|
434
|
+
value: current
|
|
437
435
|
};
|
|
438
436
|
}
|
|
439
|
-
if (node.operator === "||=" && isTruthy(
|
|
437
|
+
if (node.operator === "||=" && isTruthy(current)) {
|
|
440
438
|
return {
|
|
441
439
|
kind: "normal",
|
|
442
440
|
hasValue: true,
|
|
443
|
-
value:
|
|
441
|
+
value: current
|
|
444
442
|
};
|
|
445
443
|
}
|
|
446
|
-
if (node.operator === "??=" &&
|
|
444
|
+
if (node.operator === "??=" && current !== null && current !== undefined) {
|
|
447
445
|
return {
|
|
448
446
|
kind: "normal",
|
|
449
447
|
hasValue: true,
|
|
450
|
-
value:
|
|
448
|
+
value: current
|
|
451
449
|
};
|
|
452
450
|
}
|
|
453
451
|
const right = await evaluateNode(node.right, context);
|
|
@@ -459,7 +457,7 @@ async function evaluateAssignmentExpression(node, context) {
|
|
|
459
457
|
node.operator === "||=" ||
|
|
460
458
|
node.operator === "??="
|
|
461
459
|
? right.value
|
|
462
|
-
: applyCompoundAssignmentOperator(node.operator,
|
|
460
|
+
: await applyCompoundAssignmentOperator(node.operator, current, right.value, context);
|
|
463
461
|
context.scope.assign(node.left.name, value);
|
|
464
462
|
return {
|
|
465
463
|
kind: "normal",
|
|
@@ -481,55 +479,38 @@ async function evaluateMemberAssignmentExpression(node, context) {
|
|
|
481
479
|
if (member.kind === "nullish") {
|
|
482
480
|
throw new TypeError("Cannot assign properties of null or undefined.");
|
|
483
481
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
throw new TypeError("RegExp properties only support direct assignment.");
|
|
487
|
-
}
|
|
488
|
-
const right = await evaluateNode(node.right, context);
|
|
489
|
-
if (right.kind !== "normal")
|
|
490
|
-
return right;
|
|
491
|
-
setRegexMember(member.object, member.property, right.value);
|
|
492
|
-
return { kind: "normal", hasValue: true, value: right.value };
|
|
493
|
-
}
|
|
494
|
-
if (!isIndexableSandboxValue(member.object)) {
|
|
495
|
-
throw new TypeError("Assignment expressions require a sandbox object property.");
|
|
496
|
-
}
|
|
497
|
-
if (node.operator === "&&=" &&
|
|
498
|
-
!isTruthy(getMemberValue(member.object, member.property, context))) {
|
|
482
|
+
const current = node.operator === "=" ? undefined : getPropertyValue(member.object, member.property, context);
|
|
483
|
+
if (node.operator === "&&=" && !isTruthy(current)) {
|
|
499
484
|
return {
|
|
500
485
|
kind: "normal",
|
|
501
486
|
hasValue: true,
|
|
502
|
-
value:
|
|
487
|
+
value: current
|
|
503
488
|
};
|
|
504
489
|
}
|
|
505
|
-
if (node.operator === "||=" &&
|
|
506
|
-
isTruthy(getMemberValue(member.object, member.property, context))) {
|
|
490
|
+
if (node.operator === "||=" && isTruthy(current)) {
|
|
507
491
|
return {
|
|
508
492
|
kind: "normal",
|
|
509
493
|
hasValue: true,
|
|
510
|
-
value:
|
|
494
|
+
value: current
|
|
511
495
|
};
|
|
512
496
|
}
|
|
513
|
-
if (node.operator === "??=" &&
|
|
514
|
-
getMemberValue(member.object, member.property, context) !== null &&
|
|
515
|
-
getMemberValue(member.object, member.property, context) !== undefined) {
|
|
497
|
+
if (node.operator === "??=" && current !== null && current !== undefined) {
|
|
516
498
|
return {
|
|
517
499
|
kind: "normal",
|
|
518
500
|
hasValue: true,
|
|
519
|
-
value:
|
|
501
|
+
value: current
|
|
520
502
|
};
|
|
521
503
|
}
|
|
522
504
|
const right = await evaluateNode(node.right, context);
|
|
523
505
|
if (right.kind !== "normal") {
|
|
524
506
|
return right;
|
|
525
507
|
}
|
|
526
|
-
const current = getMemberValue(member.object, member.property, context);
|
|
527
508
|
const value = node.operator === "=" ||
|
|
528
509
|
node.operator === "&&=" ||
|
|
529
510
|
node.operator === "||=" ||
|
|
530
511
|
node.operator === "??="
|
|
531
512
|
? right.value
|
|
532
|
-
: applyCompoundAssignmentOperator(node.operator, current, right.value, context);
|
|
513
|
+
: await applyCompoundAssignmentOperator(node.operator, current, right.value, context);
|
|
533
514
|
setSandboxProperty(member.object, member.property, value);
|
|
534
515
|
return {
|
|
535
516
|
kind: "normal",
|
|
@@ -1493,10 +1474,7 @@ async function evaluateIdentifierUpdateExpression(node, context) {
|
|
|
1493
1474
|
error: createError("UNBOUND_IDENTIFIER", node.argument, `Identifier '${node.argument.name}' is not defined.`)
|
|
1494
1475
|
};
|
|
1495
1476
|
}
|
|
1496
|
-
|
|
1497
|
-
throw new TypeError(`Cannot assign to const '${node.argument.name}'`);
|
|
1498
|
-
}
|
|
1499
|
-
const current = Number(binding.value);
|
|
1477
|
+
const current = toNumber(await toNumericPrimitive(binding.value, context));
|
|
1500
1478
|
const next = node.operator === "++" ? current + 1 : current - 1;
|
|
1501
1479
|
context.scope.assign(node.argument.name, next);
|
|
1502
1480
|
return {
|
|
@@ -1519,10 +1497,7 @@ async function evaluateMemberUpdateExpression(node, context) {
|
|
|
1519
1497
|
if (member.kind === "nullish") {
|
|
1520
1498
|
throw new TypeError("Cannot update properties of null or undefined.");
|
|
1521
1499
|
}
|
|
1522
|
-
|
|
1523
|
-
throw new TypeError("Update expressions require a sandbox object property.");
|
|
1524
|
-
}
|
|
1525
|
-
const current = Number(getMemberValue(member.object, member.property, context));
|
|
1500
|
+
const current = toNumber(await toNumericPrimitive(getPropertyValue(member.object, member.property, context), context));
|
|
1526
1501
|
const next = node.operator === "++" ? current + 1 : current - 1;
|
|
1527
1502
|
setSandboxProperty(member.object, member.property, next);
|
|
1528
1503
|
return {
|
|
@@ -1533,94 +1508,45 @@ async function evaluateMemberUpdateExpression(node, context) {
|
|
|
1533
1508
|
}
|
|
1534
1509
|
async function evaluateMemberExpression(node, context) {
|
|
1535
1510
|
const member = await evaluateMemberAccess(node, context);
|
|
1536
|
-
if (member.kind === "error")
|
|
1511
|
+
if (member.kind === "error")
|
|
1537
1512
|
return member;
|
|
1538
|
-
|
|
1539
|
-
if (member.kind === "completion") {
|
|
1513
|
+
if (member.kind === "completion")
|
|
1540
1514
|
return member.result;
|
|
1541
|
-
}
|
|
1542
1515
|
if (member.kind === "nullish") {
|
|
1543
|
-
if (node.optional)
|
|
1544
|
-
return {
|
|
1545
|
-
kind: "normal",
|
|
1546
|
-
hasValue: true,
|
|
1547
|
-
value: undefined
|
|
1548
|
-
};
|
|
1549
|
-
}
|
|
1516
|
+
if (node.optional)
|
|
1517
|
+
return { kind: "normal", hasValue: true, value: undefined };
|
|
1550
1518
|
throw new TypeError("Cannot read properties of null or undefined.");
|
|
1551
1519
|
}
|
|
1552
|
-
if (typeof member.object === "string") {
|
|
1553
|
-
return {
|
|
1554
|
-
kind: "normal",
|
|
1555
|
-
hasValue: true,
|
|
1556
|
-
value: getStringMember(member.object, member.property, context.budget)
|
|
1557
|
-
};
|
|
1558
|
-
}
|
|
1559
|
-
if (typeof member.object === "number") {
|
|
1560
|
-
return {
|
|
1561
|
-
kind: "normal",
|
|
1562
|
-
hasValue: true,
|
|
1563
|
-
value: getNumberMember(member.object, member.property, context.budget)
|
|
1564
|
-
};
|
|
1565
|
-
}
|
|
1566
|
-
if (Array.isArray(member.object)) {
|
|
1567
|
-
return {
|
|
1568
|
-
kind: "normal",
|
|
1569
|
-
hasValue: true,
|
|
1570
|
-
value: getArrayMemberValue(member.object, member.property, context)
|
|
1571
|
-
};
|
|
1572
|
-
}
|
|
1573
|
-
if (isSandboxMap(member.object)) {
|
|
1574
|
-
return {
|
|
1575
|
-
kind: "normal",
|
|
1576
|
-
hasValue: true,
|
|
1577
|
-
value: getMapMember(member.object, member.property, createMapMethodOptions(context))
|
|
1578
|
-
};
|
|
1579
|
-
}
|
|
1580
|
-
if (isSandboxSet(member.object)) {
|
|
1581
|
-
return {
|
|
1582
|
-
kind: "normal",
|
|
1583
|
-
hasValue: true,
|
|
1584
|
-
value: getSetMember(member.object, member.property, createSetMethodOptions(context))
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
if (isSandboxGenerator(member.object)) {
|
|
1588
|
-
return {
|
|
1589
|
-
kind: "normal",
|
|
1590
|
-
hasValue: true,
|
|
1591
|
-
value: getGeneratorMember(member.object, member.property, context.budget)
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
if (isSandboxClosure(member.object)) {
|
|
1595
|
-
return {
|
|
1596
|
-
kind: "normal",
|
|
1597
|
-
hasValue: true,
|
|
1598
|
-
value: getClosureMemberValue(member.object, member.property, context)
|
|
1599
|
-
};
|
|
1600
|
-
}
|
|
1601
|
-
if (isSandboxPromise(member.object)) {
|
|
1602
|
-
return {
|
|
1603
|
-
kind: "normal",
|
|
1604
|
-
hasValue: true,
|
|
1605
|
-
value: getPromiseMember(member.property, context.budget)
|
|
1606
|
-
};
|
|
1607
|
-
}
|
|
1608
|
-
if (isSandboxRegex(member.object)) {
|
|
1609
|
-
return {
|
|
1610
|
-
kind: "normal",
|
|
1611
|
-
hasValue: true,
|
|
1612
|
-
value: getRegexMember(member.object, member.property)
|
|
1613
|
-
};
|
|
1614
|
-
}
|
|
1615
|
-
if (!isIndexableSandboxValue(member.object)) {
|
|
1616
|
-
throw new TypeError("Attempted to read a property from a non-object value.");
|
|
1617
|
-
}
|
|
1618
1520
|
return {
|
|
1619
1521
|
kind: "normal",
|
|
1620
1522
|
hasValue: true,
|
|
1621
|
-
value:
|
|
1523
|
+
value: getPropertyValue(member.object, member.property, context)
|
|
1622
1524
|
};
|
|
1623
1525
|
}
|
|
1526
|
+
function getPropertyValue(target, property, context) {
|
|
1527
|
+
if (typeof target === "string")
|
|
1528
|
+
return getStringMember(target, property, context.budget);
|
|
1529
|
+
if (typeof target === "number")
|
|
1530
|
+
return getNumberMember(target, property, context.budget);
|
|
1531
|
+
if (typeof target === "boolean")
|
|
1532
|
+
return undefined;
|
|
1533
|
+
if (isSandboxMap(target))
|
|
1534
|
+
return getMapMember(target, property, createMapMethodOptions(context));
|
|
1535
|
+
if (isSandboxSet(target))
|
|
1536
|
+
return getSetMember(target, property, createSetMethodOptions(context));
|
|
1537
|
+
if (isSandboxGenerator(target))
|
|
1538
|
+
return getGeneratorMember(target, property, context.budget);
|
|
1539
|
+
if (isSandboxClosure(target))
|
|
1540
|
+
return getClosureMemberValue(target, property, context);
|
|
1541
|
+
if (isSandboxPromise(target))
|
|
1542
|
+
return getPromiseMember(property, context.budget);
|
|
1543
|
+
if (isSandboxRegex(target))
|
|
1544
|
+
return getRegexMember(target, property);
|
|
1545
|
+
if (!isIndexableSandboxValue(target)) {
|
|
1546
|
+
throw new TypeError("Attempted to read a property from a non-object value.");
|
|
1547
|
+
}
|
|
1548
|
+
return getMemberValue(target, property, context);
|
|
1549
|
+
}
|
|
1624
1550
|
async function evaluateCallExpression(node, context) {
|
|
1625
1551
|
if (node.callee.type === "MemberExpression") {
|
|
1626
1552
|
context.budget.visitNode();
|
|
@@ -2033,7 +1959,9 @@ function applyBinaryOperator(node, left, right, context) {
|
|
|
2033
1959
|
throw createError("UNSUPPORTED_NODE", node, "Binary operator 'in' is not supported.");
|
|
2034
1960
|
}
|
|
2035
1961
|
}
|
|
2036
|
-
function applyCompoundAssignmentOperator(operator, left, right, context) {
|
|
1962
|
+
async function applyCompoundAssignmentOperator(operator, left, right, context) {
|
|
1963
|
+
left = await toNumericPrimitive(left, context);
|
|
1964
|
+
right = await toNumericPrimitive(right, context);
|
|
2037
1965
|
switch (operator) {
|
|
2038
1966
|
case "+=":
|
|
2039
1967
|
return applyAdditionOperator(left, right, context);
|
|
@@ -2160,6 +2088,9 @@ async function toNumericPrimitive(value, context) {
|
|
|
2160
2088
|
if (isIndexableSandboxValue(value)) {
|
|
2161
2089
|
for (const methodName of ["valueOf", "toString"]) {
|
|
2162
2090
|
const method = getMemberValue(value, methodName, context);
|
|
2091
|
+
if (methodName === "toString" && method === undefined && !Object.hasOwn(value, methodName)) {
|
|
2092
|
+
return toString(value);
|
|
2093
|
+
}
|
|
2163
2094
|
if (!isSandboxClosure(method)) {
|
|
2164
2095
|
continue;
|
|
2165
2096
|
}
|
|
@@ -2168,6 +2099,7 @@ async function toNumericPrimitive(value, context) {
|
|
|
2168
2099
|
return result;
|
|
2169
2100
|
}
|
|
2170
2101
|
}
|
|
2102
|
+
throw new TypeError("Cannot convert object to primitive value.");
|
|
2171
2103
|
}
|
|
2172
2104
|
return toString(value);
|
|
2173
2105
|
}
|
|
@@ -2231,17 +2163,31 @@ function getArrayMemberValue(target, property, context) {
|
|
|
2231
2163
|
return getArrayMember(target, property, createArrayMethodOptions(context));
|
|
2232
2164
|
}
|
|
2233
2165
|
function setSandboxProperty(target, property, value) {
|
|
2166
|
+
if (isSandboxRegex(target)) {
|
|
2167
|
+
setRegexMember(target, property, value);
|
|
2168
|
+
return;
|
|
2169
|
+
}
|
|
2170
|
+
if (!isIndexableSandboxValue(target)) {
|
|
2171
|
+
throw new TypeError("Assignment expressions require a sandbox object property.");
|
|
2172
|
+
}
|
|
2173
|
+
const key = String(property);
|
|
2234
2174
|
if (Array.isArray(target)) {
|
|
2235
2175
|
assertCollectionMutable(target);
|
|
2236
|
-
const key = String(property);
|
|
2237
2176
|
if (key === "length" || isArrayIndexKey(key)) {
|
|
2238
2177
|
target[key] = value;
|
|
2239
2178
|
return;
|
|
2240
2179
|
}
|
|
2180
|
+
}
|
|
2181
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
2182
|
+
if (descriptor !== undefined) {
|
|
2183
|
+
if (descriptor.writable !== true) {
|
|
2184
|
+
throw new TypeError(`Cannot assign to read only property '${key}'.`);
|
|
2185
|
+
}
|
|
2186
|
+
Object.defineProperty(target, key, { value });
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2241
2189
|
defineSandboxProperty(target, key, value);
|
|
2242
|
-
return;
|
|
2243
2190
|
}
|
|
2244
|
-
defineSandboxProperty(target, String(property), value);
|
|
2245
2191
|
}
|
|
2246
2192
|
function deleteSandboxProperty(target, property) {
|
|
2247
2193
|
if (Array.isArray(target)) {
|
|
@@ -126,15 +126,15 @@ export class Scope {
|
|
|
126
126
|
throw new ReferenceError(`Cannot assign to undeclared binding '${name}'.`);
|
|
127
127
|
}
|
|
128
128
|
const binding = scope.#bindings.get(name);
|
|
129
|
-
if (binding?.kind === "const") {
|
|
130
|
-
throw new TypeError(`Cannot assign to const binding '${name}'.`);
|
|
131
|
-
}
|
|
132
129
|
if (binding === undefined) {
|
|
133
130
|
throw new ReferenceError(`Cannot assign to undeclared binding '${name}'.`);
|
|
134
131
|
}
|
|
135
132
|
if (binding.value === uninitialized) {
|
|
136
133
|
throw new ReferenceError(`Cannot access '${name}' before initialization.`);
|
|
137
134
|
}
|
|
135
|
+
if (binding.kind === "const") {
|
|
136
|
+
throw new TypeError(`Cannot assign to const binding '${name}'.`);
|
|
137
|
+
}
|
|
138
138
|
scope.#bindings.set(name, {
|
|
139
139
|
kind: binding.kind,
|
|
140
140
|
value
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const DUMP_FORMAT_VERSION = 1;
|
|
2
|
-
export const EXECUTION_SEMANTICS = "jobs-
|
|
2
|
+
export const EXECUTION_SEMANTICS = "jobs-v6";
|
|
3
3
|
import { assertSnapshotGraphDepth } from "../graph-depth.js";
|
|
4
4
|
import { sandboxErrorTypes } from "../error/shape.js";
|
|
5
5
|
import { getSandboxArgumentEntries, isSandboxArguments } from "../interp/arguments.js";
|
|
@@ -2,8 +2,8 @@ import { HostCallJournal } from "../interp/host-call.js";
|
|
|
2
2
|
import { decodeReplayData } from "./replay-data.js";
|
|
3
3
|
import { validateSnapshotData } from "./validation.js";
|
|
4
4
|
export function validateMigrationSemantics(value) {
|
|
5
|
-
if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5"].includes(value))
|
|
6
|
-
throw new TypeError("Migration requires a supported execution-semantics marker (jobs-v1 through jobs-
|
|
5
|
+
if (!["jobs-v1", "jobs-v2", "jobs-v3", "jobs-v4", "jobs-v5", "jobs-v6"].includes(value))
|
|
6
|
+
throw new TypeError("Migration requires a supported execution-semantics marker (jobs-v1 through jobs-v6).");
|
|
7
7
|
}
|
|
8
8
|
export function validateMigrationJournal(sourceHash, replay, hostCalls = []) {
|
|
9
9
|
if (replay === undefined)
|
|
@@ -481,10 +481,6 @@ function validateGenericValue(value, path, depth, state) {
|
|
|
481
481
|
requireString(value, path, state.limits);
|
|
482
482
|
state.dataSize += value.length;
|
|
483
483
|
}
|
|
484
|
-
else if (typeof value === "number") {
|
|
485
|
-
if (Number.isInteger(value) && !Number.isSafeInteger(value))
|
|
486
|
-
fail("invalidValue", path, "integer must be safe");
|
|
487
|
-
}
|
|
488
484
|
else if (Array.isArray(value)) {
|
|
489
485
|
if (value.length > state.limits.maxEntries)
|
|
490
486
|
fail("budgetExceeded", path, "array is too large");
|