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/dist/index.js
CHANGED
|
@@ -148659,7 +148659,7 @@ function wrapCallerInjectedFunction(name, value, options, state) {
|
|
|
148659
148659
|
throw error3;
|
|
148660
148660
|
}
|
|
148661
148661
|
if (options.realm.awaitResult(callable)) {
|
|
148662
|
-
return Promise.resolve(result).then((value2) => copyHostResultToSandbox(value2, stackFrames, options));
|
|
148662
|
+
return wrapHostPromiseWithSignal(Promise.resolve(result), options.signal).then((value2) => copyHostResultToSandbox(value2, stackFrames, options));
|
|
148663
148663
|
}
|
|
148664
148664
|
return copyHostResultToSandbox(result, stackFrames, options);
|
|
148665
148665
|
}
|
|
@@ -149169,6 +149169,7 @@ function wrapHostPromiseWithSignal(promise, signal) {
|
|
|
149169
149169
|
return promise;
|
|
149170
149170
|
}
|
|
149171
149171
|
if (signal.aborted) {
|
|
149172
|
+
void promise.catch(() => void 0);
|
|
149172
149173
|
return Promise.reject(readAbortReason2(signal));
|
|
149173
149174
|
}
|
|
149174
149175
|
return new Promise((resolve16, reject) => {
|
|
@@ -151367,7 +151368,20 @@ var init_realm = __esm({
|
|
|
151367
151368
|
this.compilation
|
|
151368
151369
|
);
|
|
151369
151370
|
};
|
|
151370
|
-
|
|
151371
|
+
startCallback = (callback, options = {}) => {
|
|
151372
|
+
let complete;
|
|
151373
|
+
let fail3;
|
|
151374
|
+
const synchronous = new Promise((resolve16, reject) => {
|
|
151375
|
+
complete = resolve16;
|
|
151376
|
+
fail3 = reject;
|
|
151377
|
+
});
|
|
151378
|
+
const result = this.executeCallback(callback, options, complete);
|
|
151379
|
+
void result.catch(fail3);
|
|
151380
|
+
void synchronous.catch(() => void 0);
|
|
151381
|
+
return Object.freeze({ synchronous, result });
|
|
151382
|
+
};
|
|
151383
|
+
invokeCallback = this.executeCallback.bind(this);
|
|
151384
|
+
async executeCallback(callback, options = {}, completeSynchronous) {
|
|
151371
151385
|
if (this.closed || this.failure !== void 0) await this.dispose();
|
|
151372
151386
|
this.assertOpen();
|
|
151373
151387
|
const closure = readGuestCallback(callback, this);
|
|
@@ -151389,9 +151403,13 @@ var init_realm = __esm({
|
|
|
151389
151403
|
compilation: this.compilation,
|
|
151390
151404
|
stack: []
|
|
151391
151405
|
});
|
|
151392
|
-
const
|
|
151393
|
-
|
|
151394
|
-
)
|
|
151406
|
+
const settlement = awaitSandboxValue(value, this.controller.signal, this.budget);
|
|
151407
|
+
void settlement.catch(() => void 0);
|
|
151408
|
+
if (isSandboxPromise(value) && value.synchronousPrefix !== void 0)
|
|
151409
|
+
await value.synchronousPrefix;
|
|
151410
|
+
this.assertOpen();
|
|
151411
|
+
completeSynchronous?.();
|
|
151412
|
+
const settled = await suspendJob(settlement);
|
|
151395
151413
|
return this.exportValue(settled);
|
|
151396
151414
|
} finally {
|
|
151397
151415
|
leaveCall();
|
|
@@ -151399,20 +151417,18 @@ var init_realm = __esm({
|
|
|
151399
151417
|
}
|
|
151400
151418
|
};
|
|
151401
151419
|
try {
|
|
151402
|
-
|
|
151403
|
-
|
|
151404
|
-
|
|
151405
|
-
|
|
151406
|
-
|
|
151407
|
-
|
|
151408
|
-
|
|
151409
|
-
|
|
151410
|
-
)
|
|
151420
|
+
const active = this.active !== void 0;
|
|
151421
|
+
const pending = withSandboxPromiseRejectionTracker(
|
|
151422
|
+
this.tracker,
|
|
151423
|
+
() => runResources.run(
|
|
151424
|
+
{ signal: this.controller.signal, add: this.onCleanup },
|
|
151425
|
+
() => withCancellationSignal(
|
|
151426
|
+
this.controller.signal,
|
|
151427
|
+
() => active && this.phase.getStore()?.active ? runAsyncPrefix(invoke2) : this.queue.run(invoke2)
|
|
151411
151428
|
)
|
|
151412
|
-
)
|
|
151413
|
-
|
|
151414
|
-
|
|
151415
|
-
}
|
|
151429
|
+
)
|
|
151430
|
+
);
|
|
151431
|
+
record2.promise = active ? pending : this.perform(() => pending);
|
|
151416
151432
|
return await record2.promise;
|
|
151417
151433
|
} catch (error3) {
|
|
151418
151434
|
if (error3 instanceof SandboxError) this.poison(error3);
|
|
@@ -151426,7 +151442,7 @@ var init_realm = __esm({
|
|
|
151426
151442
|
this.compilation
|
|
151427
151443
|
);
|
|
151428
151444
|
}
|
|
151429
|
-
}
|
|
151445
|
+
}
|
|
151430
151446
|
initialize() {
|
|
151431
151447
|
if (this.initialized) return;
|
|
151432
151448
|
this.assertOpen();
|
|
@@ -151437,6 +151453,7 @@ var init_realm = __esm({
|
|
|
151437
151453
|
onCleanup: this.onCleanup,
|
|
151438
151454
|
chargeWork: this.chargeWork,
|
|
151439
151455
|
createHostObject: this.createHostObject,
|
|
151456
|
+
startCallback: this.startCallback,
|
|
151440
151457
|
invokeCallback: this.invokeCallback,
|
|
151441
151458
|
releaseCallback: this.releaseCallback,
|
|
151442
151459
|
releaseGuestReference: this.releaseGuestReference,
|
|
@@ -159678,7 +159695,7 @@ var init_package2 = __esm({
|
|
|
159678
159695
|
"package.json"() {
|
|
159679
159696
|
package_default2 = {
|
|
159680
159697
|
name: "poe-code",
|
|
159681
|
-
version: "14.0.
|
|
159698
|
+
version: "14.0.15",
|
|
159682
159699
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
159683
159700
|
license: "MIT",
|
|
159684
159701
|
type: "module",
|