@poe-platform/safe-js 0.1.268 → 0.1.270
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/safe-js/chunks/{chunk-3BMZELFG.js → chunk-JJRD6D25.js} +15 -6
- package/dist/safe-js/chunks/chunk-JJRD6D25.js.map +7 -0
- package/dist/safe-js/chunks/{chunk-YMFWKGFU.js → chunk-RKESZ3RE.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- package/dist/safe-js/chunks/chunk-3BMZELFG.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-YMFWKGFU.js.map → chunk-RKESZ3RE.js.map} +0 -0
|
@@ -11874,7 +11874,8 @@ function getPromisePrototype(budget) {
|
|
|
11874
11874
|
newTarget: void 0
|
|
11875
11875
|
});
|
|
11876
11876
|
};
|
|
11877
|
-
const
|
|
11877
|
+
const descriptor = getSandboxPropertyDescriptor(target, "then", budget);
|
|
11878
|
+
const then = descriptor === void 0 ? readPromiseReceiverProperty(target, "then", prototype, context) : readPropertyDescriptor(descriptor, target, context, true);
|
|
11878
11879
|
return then instanceof Promise ? then.then(invoke) : invoke(then);
|
|
11879
11880
|
},
|
|
11880
11881
|
name: "catch"
|
|
@@ -11932,7 +11933,8 @@ function getPromisePrototype(budget) {
|
|
|
11932
11933
|
});
|
|
11933
11934
|
};
|
|
11934
11935
|
const finish = () => {
|
|
11935
|
-
const
|
|
11936
|
+
const descriptor = getSandboxPropertyDescriptor(target, "then", budget);
|
|
11937
|
+
const then = descriptor === void 0 ? readPromiseReceiverProperty(target, "then", prototype, context) : readPropertyDescriptor(descriptor, target, context, true);
|
|
11936
11938
|
return then instanceof Promise ? then.then(invoke) : invoke(then);
|
|
11937
11939
|
};
|
|
11938
11940
|
const validation = validatePromiseConstructorProperty(target, prototype, context);
|
|
@@ -12110,7 +12112,12 @@ function resolveSandboxValueNow(value, options) {
|
|
|
12110
12112
|
(reason) => Promise.reject(budgetIfNeeded(reason, options.budget))
|
|
12111
12113
|
);
|
|
12112
12114
|
}
|
|
12113
|
-
if (
|
|
12115
|
+
if (isSelfResolution(value, options.self)) {
|
|
12116
|
+
return Promise.reject(
|
|
12117
|
+
options.budget === void 0 ? new TypeError("Promise cannot resolve to itself.") : createSubsetErrorValue("TypeError", "Promise cannot resolve to itself.", [], options.budget)
|
|
12118
|
+
);
|
|
12119
|
+
}
|
|
12120
|
+
if (isSandboxPromise(value) && getSandboxPropertyDescriptor(value, "then", options.budget) === void 0) {
|
|
12114
12121
|
if (options.budget !== void 0) {
|
|
12115
12122
|
return resolvePromiseResult(value, options.budget, options.self);
|
|
12116
12123
|
}
|
|
@@ -12264,7 +12271,9 @@ function resolvePromiseResult(result, budget, self) {
|
|
|
12264
12271
|
createSubsetErrorValue("TypeError", "Promise cannot resolve to itself.", [], budget)
|
|
12265
12272
|
);
|
|
12266
12273
|
}
|
|
12267
|
-
if (!isSandboxPromise(result)
|
|
12274
|
+
if (!isSandboxPromise(result) || getSandboxPropertyDescriptor(result, "then", budget) !== void 0) {
|
|
12275
|
+
return resolveSandboxValue(result, { budget, self });
|
|
12276
|
+
}
|
|
12268
12277
|
const then = getPromiseMember("then", budget);
|
|
12269
12278
|
if (!isSandboxClosure(then)) return Promise.resolve(result);
|
|
12270
12279
|
return new Promise((resolve, reject) => {
|
|
@@ -12328,7 +12337,7 @@ function requiresPromiseResolution(value, budget) {
|
|
|
12328
12337
|
return descriptor !== void 0 && (!("value" in descriptor) || isSandboxClosure(descriptor.value));
|
|
12329
12338
|
}
|
|
12330
12339
|
function getThenable(value, budget) {
|
|
12331
|
-
if (typeof value !== "object" || value === null
|
|
12340
|
+
if (typeof value !== "object" || value === null) {
|
|
12332
12341
|
return void 0;
|
|
12333
12342
|
}
|
|
12334
12343
|
const descriptor = getSandboxPropertyDescriptor(value, "then", budget);
|
|
@@ -40093,4 +40102,4 @@ export {
|
|
|
40093
40102
|
FileSnapshotBackend,
|
|
40094
40103
|
run
|
|
40095
40104
|
};
|
|
40096
|
-
//# sourceMappingURL=chunk-
|
|
40105
|
+
//# sourceMappingURL=chunk-JJRD6D25.js.map
|