poe-code 14.0.53 → 14.0.54
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 +23 -8
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safe-js/dist/chunks/{chunk-VDFW3EKS.js → chunk-L7PHF62H.js} +22 -9
- package/packages/safe-js/dist/chunks/{chunk-VDFW3EKS.js.map → chunk-L7PHF62H.js.map} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-4XYGVCOQ.js → chunk-Z55VACOY.js} +2 -2
- package/packages/safe-js/dist/cli.js +2 -2
- package/packages/safe-js/dist/core.js +1 -1
- package/packages/safe-js/dist/index.js +2 -2
- package/packages/safe-js/dist/interp/methods/string.js +17 -3
- /package/packages/safe-js/dist/chunks/{chunk-4XYGVCOQ.js.map → chunk-Z55VACOY.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -145153,14 +145153,27 @@ function getStringMember(value, property, budget) {
|
|
|
145153
145153
|
name: `String#${property}`,
|
|
145154
145154
|
...property === "localeCompare" ? { length: 1 } : {},
|
|
145155
145155
|
...property === "isWellFormed" || property === "toWellFormed" ? { length: 0 } : {},
|
|
145156
|
-
call: (args, context) =>
|
|
145157
|
-
|
|
145158
|
-
|
|
145159
|
-
|
|
145160
|
-
|
|
145161
|
-
|
|
145162
|
-
|
|
145163
|
-
|
|
145156
|
+
call: async (args, context) => {
|
|
145157
|
+
const receiver = context?.thisValue;
|
|
145158
|
+
if (receiver === null || receiver === void 0) {
|
|
145159
|
+
throw new TypeError(`String#${property} requires a non-null receiver.`);
|
|
145160
|
+
}
|
|
145161
|
+
const retainedReceiver = {};
|
|
145162
|
+
budget.setRetainedValues(retainedReceiver, () => [receiver]);
|
|
145163
|
+
try {
|
|
145164
|
+
const string = await sandboxString(receiver, budget, context);
|
|
145165
|
+
return await callStringMethod(
|
|
145166
|
+
string,
|
|
145167
|
+
property,
|
|
145168
|
+
args,
|
|
145169
|
+
budget,
|
|
145170
|
+
(closure, closureArgs) => invokeBuiltinClosure(closure, closureArgs, budget, context, void 0),
|
|
145171
|
+
context?.compilation
|
|
145172
|
+
);
|
|
145173
|
+
} finally {
|
|
145174
|
+
budget.setRetainedValues(retainedReceiver, void 0);
|
|
145175
|
+
}
|
|
145176
|
+
}
|
|
145164
145177
|
});
|
|
145165
145178
|
}
|
|
145166
145179
|
function getStringIndex(property) {
|
|
@@ -145532,7 +145545,9 @@ var SPLIT_STRING_MESSAGE, stringMethodNames;
|
|
|
145532
145545
|
var init_string = __esm({
|
|
145533
145546
|
"packages/safe-js/src/interp/methods/string.ts"() {
|
|
145534
145547
|
"use strict";
|
|
145548
|
+
init_builtin_call();
|
|
145535
145549
|
init_compile_guard();
|
|
145550
|
+
init_string_coercion();
|
|
145536
145551
|
init_values();
|
|
145537
145552
|
init_regex();
|
|
145538
145553
|
SPLIT_STRING_MESSAGE = "String#split only supports string separator values.";
|