poe-code 11.0.20 → 11.0.22
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 +6 -6
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-7IOZFASL.js → chunk-IB5DSFBQ.js} +6 -6
- package/packages/safejs/dist/chunks/{chunk-7IOZFASL.js.map → chunk-IB5DSFBQ.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-JFP4YVY2.js → chunk-K3DCXHEE.js} +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/host-bridge.js +5 -4
- package/packages/safejs/dist/interp/methods/string.js +3 -2
- /package/packages/safejs/dist/chunks/{chunk-JFP4YVY2.js.map → chunk-K3DCXHEE.js.map} +0 -0
package/package.json
CHANGED
|
@@ -22060,7 +22060,6 @@ function wrapCallerInjectedFunction(name, value, options, state) {
|
|
|
22060
22060
|
sourceFunctions: /* @__PURE__ */ new Map(),
|
|
22061
22061
|
active: /* @__PURE__ */ new Set(),
|
|
22062
22062
|
seen: /* @__PURE__ */ new WeakMap(),
|
|
22063
|
-
nextInvocation: 0,
|
|
22064
22063
|
restored: []
|
|
22065
22064
|
};
|
|
22066
22065
|
const hostArgs = deepCopyFromSandbox([...args], {
|
|
@@ -22237,7 +22236,6 @@ function executeHostCall(record2, restored, invoke, stackFrames, options, span,
|
|
|
22237
22236
|
);
|
|
22238
22237
|
}
|
|
22239
22238
|
if (restored && record2.policy === "read-side-effect" && record2.lifecycle !== "created") {
|
|
22240
|
-
if (callbacks !== void 0) callbacks.nextInvocation = callbacks.restored.length;
|
|
22241
22239
|
const context = callbacks === void 0 ? void 0 : {
|
|
22242
22240
|
callbacks: new Map(callbacks.hostFunctions),
|
|
22243
22241
|
replayed: callbacks.restored.map((invocation) => ({
|
|
@@ -22250,6 +22248,7 @@ function executeHostCall(record2, restored, invoke, stackFrames, options, span,
|
|
|
22250
22248
|
};
|
|
22251
22249
|
return createHostCallPromise(record2, hostCalls.reconcile(record2, context), hostCalls);
|
|
22252
22250
|
}
|
|
22251
|
+
if (restored && callbacks !== void 0) callbacks.nextReissuedInvocation = 0;
|
|
22253
22252
|
hostCalls.start(record2);
|
|
22254
22253
|
let result;
|
|
22255
22254
|
try {
|
|
@@ -22444,7 +22443,7 @@ function wrapSandboxClosureForHost(closure, stackFrames, budget, callbacks) {
|
|
|
22444
22443
|
{ seen: /* @__PURE__ */ new WeakMap() },
|
|
22445
22444
|
"<callback>"
|
|
22446
22445
|
);
|
|
22447
|
-
const restored = callbacks === void 0 ? void 0 : callbacks.restored[callbacks.
|
|
22446
|
+
const restored = callbacks?.nextReissuedInvocation === void 0 ? void 0 : callbacks.restored[callbacks.nextReissuedInvocation++];
|
|
22448
22447
|
if (restored !== void 0) {
|
|
22449
22448
|
if (restored.id !== id || JSON.stringify(
|
|
22450
22449
|
encodeReplayData(sandboxArgs, {
|
|
@@ -25363,7 +25362,8 @@ function callSplit(value, args, budget) {
|
|
|
25363
25362
|
let endedWithZeroWidthMatch = false;
|
|
25364
25363
|
for (const match of collectRegexMatches(splitter, value, true)) {
|
|
25365
25364
|
endedWithZeroWidthMatch = match.text.length === 0 && match.index === value.length;
|
|
25366
|
-
if (match.text.length === 0 && match.index ===
|
|
25365
|
+
if (match.text.length === 0 && (match.index === copiedThrough || match.index === value.length))
|
|
25366
|
+
continue;
|
|
25367
25367
|
if (result2.length >= limit2) break;
|
|
25368
25368
|
result2.push(budget.allocateString(value.slice(copiedThrough, match.index)));
|
|
25369
25369
|
for (const capture of match.captures) {
|
|
@@ -25372,7 +25372,7 @@ function callSplit(value, args, budget) {
|
|
|
25372
25372
|
}
|
|
25373
25373
|
copiedThrough = match.index + match.text.length;
|
|
25374
25374
|
}
|
|
25375
|
-
if (result2.length < limit2 && !endedWithZeroWidthMatch)
|
|
25375
|
+
if (result2.length < limit2 && (value.length > 0 || !endedWithZeroWidthMatch))
|
|
25376
25376
|
result2.push(budget.allocateString(value.slice(copiedThrough)));
|
|
25377
25377
|
budget.allocateArrayLength(result2.length);
|
|
25378
25378
|
return result2;
|
|
@@ -29125,4 +29125,4 @@ export {
|
|
|
29125
29125
|
FileSnapshotBackend,
|
|
29126
29126
|
run
|
|
29127
29127
|
};
|
|
29128
|
-
//# sourceMappingURL=chunk-
|
|
29128
|
+
//# sourceMappingURL=chunk-IB5DSFBQ.js.map
|