@poe-platform/safe-js 0.1.286 → 0.1.288
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-HEI7BJVB.js → chunk-K45MDTVS.js} +20 -7
- package/dist/safe-js/chunks/{chunk-HEI7BJVB.js.map → chunk-K45MDTVS.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-2KGYHU5J.js → chunk-LOPY7ITQ.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-2KGYHU5J.js.map → chunk-LOPY7ITQ.js.map} +0 -0
|
@@ -6933,6 +6933,7 @@ var methodNames = [
|
|
|
6933
6933
|
"getDate",
|
|
6934
6934
|
"getDay",
|
|
6935
6935
|
"getFullYear",
|
|
6936
|
+
"getYear",
|
|
6936
6937
|
"getHours",
|
|
6937
6938
|
"getMilliseconds",
|
|
6938
6939
|
"getMinutes",
|
|
@@ -6950,6 +6951,7 @@ var methodNames = [
|
|
|
6950
6951
|
"setTime",
|
|
6951
6952
|
"setDate",
|
|
6952
6953
|
"setFullYear",
|
|
6954
|
+
"setYear",
|
|
6953
6955
|
"setHours",
|
|
6954
6956
|
"setMilliseconds",
|
|
6955
6957
|
"setMinutes",
|
|
@@ -6971,7 +6973,7 @@ var methodNames = [
|
|
|
6971
6973
|
];
|
|
6972
6974
|
var dateMethods = new Map(
|
|
6973
6975
|
methodNames.map((name) => {
|
|
6974
|
-
const native = NativeDate.prototype
|
|
6976
|
+
const native = Object.getOwnPropertyDescriptor(NativeDate.prototype, name).value;
|
|
6975
6977
|
return [
|
|
6976
6978
|
name,
|
|
6977
6979
|
{
|
|
@@ -21871,7 +21873,7 @@ function createDateGlobal(options) {
|
|
|
21871
21873
|
}
|
|
21872
21874
|
}
|
|
21873
21875
|
);
|
|
21874
|
-
const
|
|
21876
|
+
const clock = wrapCallerInjectedBindings({ now: readNow }, { ...options, moduleId: "<Date>" }).now;
|
|
21875
21877
|
const prototype = /* @__PURE__ */ Object.create(null);
|
|
21876
21878
|
const constructor = createSandboxClosure({
|
|
21877
21879
|
guest: true,
|
|
@@ -21879,11 +21881,11 @@ function createDateGlobal(options) {
|
|
|
21879
21881
|
name: "Date",
|
|
21880
21882
|
length: 7,
|
|
21881
21883
|
call: async (_args, context) => options.budget.allocateString(
|
|
21882
|
-
dateString(createSandboxDate(Number(await
|
|
21884
|
+
dateString(createSandboxDate(Number(await clock.call([], context))))
|
|
21883
21885
|
),
|
|
21884
21886
|
construct: async (args, context) => {
|
|
21885
21887
|
let time;
|
|
21886
|
-
if (args.length === 0) time = Number(await
|
|
21888
|
+
if (args.length === 0) time = Number(await clock.call([], context));
|
|
21887
21889
|
else if (args.length > 1) time = await coerceDateParts(args, false, options.budget, context);
|
|
21888
21890
|
else if (isSandboxDate(args[0])) time = dateTime(args[0]);
|
|
21889
21891
|
else {
|
|
@@ -21901,15 +21903,25 @@ function createDateGlobal(options) {
|
|
|
21901
21903
|
}
|
|
21902
21904
|
});
|
|
21903
21905
|
const staticProperties = {
|
|
21904
|
-
now
|
|
21906
|
+
now: createSandboxClosure({
|
|
21907
|
+
guest: true,
|
|
21908
|
+
sandbox: true,
|
|
21909
|
+
name: "now",
|
|
21910
|
+
length: 0,
|
|
21911
|
+
retainedValues: () => [clock],
|
|
21912
|
+
// Date.now ignores arguments; none may enter the host copy boundary.
|
|
21913
|
+
call: (_args, context) => clock.call([], context)
|
|
21914
|
+
}),
|
|
21905
21915
|
prototype,
|
|
21906
21916
|
parse: createSandboxClosure({
|
|
21917
|
+
guest: true,
|
|
21907
21918
|
sandbox: true,
|
|
21908
21919
|
name: "parse",
|
|
21909
21920
|
length: 1,
|
|
21910
21921
|
call: async ([value], context) => parseDate(await sandboxString(value, options.budget, context), options.budget)
|
|
21911
21922
|
}),
|
|
21912
21923
|
UTC: createSandboxClosure({
|
|
21924
|
+
guest: true,
|
|
21913
21925
|
sandbox: true,
|
|
21914
21926
|
name: "UTC",
|
|
21915
21927
|
length: 7,
|
|
@@ -21937,6 +21949,7 @@ function createDateGlobal(options) {
|
|
|
21937
21949
|
}
|
|
21938
21950
|
})
|
|
21939
21951
|
);
|
|
21952
|
+
methods.set("toGMTString", methods.get("toUTCString"));
|
|
21940
21953
|
methods.set(Symbol.toPrimitive, createSandboxClosure({
|
|
21941
21954
|
guest: true,
|
|
21942
21955
|
sandbox: true,
|
|
@@ -21968,7 +21981,7 @@ async function coerceDateSetter(name, receiver, args, budget, context) {
|
|
|
21968
21981
|
const initialTime = dateTime(receiver);
|
|
21969
21982
|
const converted = [];
|
|
21970
21983
|
for (const value of args.slice(0, method.length)) converted.push(await sandboxNumber(value, budget, context));
|
|
21971
|
-
if (Number.isNaN(initialTime) && name !== "setTime" && !name.endsWith("FullYear")) return NaN;
|
|
21984
|
+
if (Number.isNaN(initialTime) && name !== "setTime" && name !== "setYear" && !name.endsWith("FullYear")) return NaN;
|
|
21972
21985
|
const result = method.invoke(createSandboxDate(initialTime), converted);
|
|
21973
21986
|
return dateMethods.get("setTime").invoke(receiver, [result]);
|
|
21974
21987
|
}
|
|
@@ -40327,4 +40340,4 @@ export {
|
|
|
40327
40340
|
FileSnapshotBackend,
|
|
40328
40341
|
run
|
|
40329
40342
|
};
|
|
40330
|
-
//# sourceMappingURL=chunk-
|
|
40343
|
+
//# sourceMappingURL=chunk-K45MDTVS.js.map
|