poe-code 14.0.13 → 14.0.15
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 +37 -20
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safe-js/dist/chunks/{chunk-RXLDJ6LQ.js → chunk-6ET7ZJGT.js} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-MO3YD4ID.js → chunk-LBJGHXII.js} +38 -20
- package/packages/safe-js/dist/chunks/{chunk-MO3YD4ID.js.map → chunk-LBJGHXII.js.map} +3 -3
- package/packages/safe-js/dist/cli.js +2 -2
- package/packages/safe-js/dist/core.d.ts +1 -1
- package/packages/safe-js/dist/core.js +1 -1
- package/packages/safe-js/dist/extensions.d.ts +5 -0
- package/packages/safe-js/dist/index.d.ts +1 -1
- package/packages/safe-js/dist/index.js +2 -2
- package/packages/safe-js/dist/index.js.map +1 -1
- package/packages/safe-js/dist/interp/host-bridge.js +3 -1
- package/packages/safe-js/dist/realm.d.ts +2 -1
- package/packages/safe-js/dist/realm.js +28 -10
- /package/packages/safe-js/dist/chunks/{chunk-RXLDJ6LQ.js.map → chunk-6ET7ZJGT.js.map} +0 -0
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LBJGHXII.js";
|
|
31
31
|
import {
|
|
32
32
|
createFileSystem,
|
|
33
33
|
createNodeFileSystemAdapterRegistry,
|
|
@@ -8245,4 +8245,4 @@ export {
|
|
|
8245
8245
|
parseMcpConfig,
|
|
8246
8246
|
makeMcpModule
|
|
8247
8247
|
};
|
|
8248
|
-
//# sourceMappingURL=chunk-
|
|
8248
|
+
//# sourceMappingURL=chunk-6ET7ZJGT.js.map
|
|
@@ -28648,7 +28648,7 @@ function wrapCallerInjectedFunction(name, value, options, state) {
|
|
|
28648
28648
|
throw error;
|
|
28649
28649
|
}
|
|
28650
28650
|
if (options.realm.awaitResult(callable)) {
|
|
28651
|
-
return Promise.resolve(result).then((value2) => copyHostResultToSandbox(value2, stackFrames, options));
|
|
28651
|
+
return wrapHostPromiseWithSignal(Promise.resolve(result), options.signal).then((value2) => copyHostResultToSandbox(value2, stackFrames, options));
|
|
28652
28652
|
}
|
|
28653
28653
|
return copyHostResultToSandbox(result, stackFrames, options);
|
|
28654
28654
|
}
|
|
@@ -29158,6 +29158,7 @@ function wrapHostPromiseWithSignal(promise, signal) {
|
|
|
29158
29158
|
return promise;
|
|
29159
29159
|
}
|
|
29160
29160
|
if (signal.aborted) {
|
|
29161
|
+
void promise.catch(() => void 0);
|
|
29161
29162
|
return Promise.reject(readAbortReason2(signal));
|
|
29162
29163
|
}
|
|
29163
29164
|
return new Promise((resolve, reject) => {
|
|
@@ -31135,7 +31136,20 @@ var RealmState = class {
|
|
|
31135
31136
|
this.compilation
|
|
31136
31137
|
);
|
|
31137
31138
|
};
|
|
31138
|
-
|
|
31139
|
+
startCallback = (callback, options = {}) => {
|
|
31140
|
+
let complete;
|
|
31141
|
+
let fail2;
|
|
31142
|
+
const synchronous = new Promise((resolve, reject) => {
|
|
31143
|
+
complete = resolve;
|
|
31144
|
+
fail2 = reject;
|
|
31145
|
+
});
|
|
31146
|
+
const result = this.executeCallback(callback, options, complete);
|
|
31147
|
+
void result.catch(fail2);
|
|
31148
|
+
void synchronous.catch(() => void 0);
|
|
31149
|
+
return Object.freeze({ synchronous, result });
|
|
31150
|
+
};
|
|
31151
|
+
invokeCallback = this.executeCallback.bind(this);
|
|
31152
|
+
async executeCallback(callback, options = {}, completeSynchronous) {
|
|
31139
31153
|
if (this.closed || this.failure !== void 0) await this.dispose();
|
|
31140
31154
|
this.assertOpen();
|
|
31141
31155
|
const closure = readGuestCallback(callback, this);
|
|
@@ -31157,9 +31171,13 @@ var RealmState = class {
|
|
|
31157
31171
|
compilation: this.compilation,
|
|
31158
31172
|
stack: []
|
|
31159
31173
|
});
|
|
31160
|
-
const
|
|
31161
|
-
|
|
31162
|
-
)
|
|
31174
|
+
const settlement = awaitSandboxValue(value, this.controller.signal, this.budget);
|
|
31175
|
+
void settlement.catch(() => void 0);
|
|
31176
|
+
if (isSandboxPromise(value) && value.synchronousPrefix !== void 0)
|
|
31177
|
+
await value.synchronousPrefix;
|
|
31178
|
+
this.assertOpen();
|
|
31179
|
+
completeSynchronous?.();
|
|
31180
|
+
const settled = await suspendJob(settlement);
|
|
31163
31181
|
return this.exportValue(settled);
|
|
31164
31182
|
} finally {
|
|
31165
31183
|
leaveCall();
|
|
@@ -31167,20 +31185,18 @@ var RealmState = class {
|
|
|
31167
31185
|
}
|
|
31168
31186
|
};
|
|
31169
31187
|
try {
|
|
31170
|
-
|
|
31171
|
-
|
|
31172
|
-
|
|
31173
|
-
|
|
31174
|
-
|
|
31175
|
-
|
|
31176
|
-
|
|
31177
|
-
|
|
31178
|
-
)
|
|
31188
|
+
const active = this.active !== void 0;
|
|
31189
|
+
const pending = withSandboxPromiseRejectionTracker(
|
|
31190
|
+
this.tracker,
|
|
31191
|
+
() => runResources.run(
|
|
31192
|
+
{ signal: this.controller.signal, add: this.onCleanup },
|
|
31193
|
+
() => withCancellationSignal(
|
|
31194
|
+
this.controller.signal,
|
|
31195
|
+
() => active && this.phase.getStore()?.active ? runAsyncPrefix(invoke) : this.queue.run(invoke)
|
|
31179
31196
|
)
|
|
31180
|
-
)
|
|
31181
|
-
|
|
31182
|
-
|
|
31183
|
-
}
|
|
31197
|
+
)
|
|
31198
|
+
);
|
|
31199
|
+
record2.promise = active ? pending : this.perform(() => pending);
|
|
31184
31200
|
return await record2.promise;
|
|
31185
31201
|
} catch (error) {
|
|
31186
31202
|
if (error instanceof SandboxError) this.poison(error);
|
|
@@ -31194,7 +31210,7 @@ var RealmState = class {
|
|
|
31194
31210
|
this.compilation
|
|
31195
31211
|
);
|
|
31196
31212
|
}
|
|
31197
|
-
}
|
|
31213
|
+
}
|
|
31198
31214
|
initialize() {
|
|
31199
31215
|
if (this.initialized) return;
|
|
31200
31216
|
this.assertOpen();
|
|
@@ -31205,6 +31221,7 @@ var RealmState = class {
|
|
|
31205
31221
|
onCleanup: this.onCleanup,
|
|
31206
31222
|
chargeWork: this.chargeWork,
|
|
31207
31223
|
createHostObject: this.createHostObject,
|
|
31224
|
+
startCallback: this.startCallback,
|
|
31208
31225
|
invokeCallback: this.invokeCallback,
|
|
31209
31226
|
releaseCallback: this.releaseCallback,
|
|
31210
31227
|
releaseGuestReference: this.releaseGuestReference,
|
|
@@ -31476,6 +31493,7 @@ function createRealm(options = {}) {
|
|
|
31476
31493
|
return Object.freeze({
|
|
31477
31494
|
extensions: Object.freeze(state.extensions.map((extension) => extension.manifest)),
|
|
31478
31495
|
evaluate: state.evaluate,
|
|
31496
|
+
startCallback: state.startCallback,
|
|
31479
31497
|
invokeCallback: state.invokeCallback,
|
|
31480
31498
|
releaseCallback: state.releaseCallback,
|
|
31481
31499
|
releaseGuestReference: state.releaseGuestReference,
|
|
@@ -32675,4 +32693,4 @@ export {
|
|
|
32675
32693
|
FileSnapshotBackend,
|
|
32676
32694
|
run
|
|
32677
32695
|
};
|
|
32678
|
-
//# sourceMappingURL=chunk-
|
|
32696
|
+
//# sourceMappingURL=chunk-LBJGHXII.js.map
|