poe-code 13.0.8 → 13.0.9
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 +21 -2
- 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-ES7OFCHQ.js → chunk-SUOXSVL2.js} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-YVTMQWCX.js → chunk-XY2A4W6O.js} +21 -2
- package/packages/safe-js/dist/chunks/chunk-XY2A4W6O.js.map +7 -0
- 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.d.ts +1 -1
- package/packages/safe-js/dist/interp/methods/string.js +18 -0
- package/packages/safe-js/dist/parse/tokenizer.js +2 -1
- package/packages/safe-js/dist/chunks/chunk-YVTMQWCX.js.map +0 -7
- /package/packages/safe-js/dist/chunks/{chunk-ES7OFCHQ.js.map → chunk-SUOXSVL2.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-XY2A4W6O.js";
|
|
31
31
|
import {
|
|
32
32
|
createFileSystem,
|
|
33
33
|
createNodeFileSystemAdapterRegistry,
|
|
@@ -8183,4 +8183,4 @@ export {
|
|
|
8183
8183
|
parseMcpConfig,
|
|
8184
8184
|
makeMcpModule
|
|
8185
8185
|
};
|
|
8186
|
-
//# sourceMappingURL=chunk-
|
|
8186
|
+
//# sourceMappingURL=chunk-SUOXSVL2.js.map
|
|
@@ -1647,7 +1647,9 @@ function isExpressionEndingPunctuator(value) {
|
|
|
1647
1647
|
return value === ")" || value === "]" || value === "}" || value === "++" || value === "--";
|
|
1648
1648
|
}
|
|
1649
1649
|
function matchPunctuator(source, index) {
|
|
1650
|
-
return PUNCTUATORS.find(
|
|
1650
|
+
return PUNCTUATORS.find(
|
|
1651
|
+
(punctuator) => source.startsWith(punctuator, index) && (punctuator !== "?." || !isDecimalDigit(source[index + 2] ?? ""))
|
|
1652
|
+
);
|
|
1651
1653
|
}
|
|
1652
1654
|
function shouldRejectRegexLiteral(previousToken, lastClosedControlParenthesis) {
|
|
1653
1655
|
if (previousToken === void 0) {
|
|
@@ -26445,6 +26447,7 @@ var stringMethodNames = /* @__PURE__ */ new Set([
|
|
|
26445
26447
|
"endsWith",
|
|
26446
26448
|
"includes",
|
|
26447
26449
|
"indexOf",
|
|
26450
|
+
"isWellFormed",
|
|
26448
26451
|
"lastIndexOf",
|
|
26449
26452
|
"localeCompare",
|
|
26450
26453
|
"match",
|
|
@@ -26482,6 +26485,7 @@ function getStringMember(value, property, budget) {
|
|
|
26482
26485
|
sandbox: true,
|
|
26483
26486
|
name: `String#${property}`,
|
|
26484
26487
|
...property === "localeCompare" ? { length: 1 } : {},
|
|
26488
|
+
...property === "isWellFormed" ? { length: 0 } : {},
|
|
26485
26489
|
call: (args, context) => callStringMethod(
|
|
26486
26490
|
value,
|
|
26487
26491
|
property,
|
|
@@ -26505,6 +26509,21 @@ function isStringMethodName(property) {
|
|
|
26505
26509
|
function validateStringMethodArguments(_methodName, _args) {
|
|
26506
26510
|
}
|
|
26507
26511
|
function callStringMethod(value, methodName, args, budget, callClosure = async (closure, closureArgs) => await closure.call(closureArgs), parent) {
|
|
26512
|
+
if (methodName === "isWellFormed") {
|
|
26513
|
+
for (let index = 0; index < value.length; index++) {
|
|
26514
|
+
const codeUnit = value.charCodeAt(index);
|
|
26515
|
+
if (codeUnit >= 55296 && codeUnit <= 56319) {
|
|
26516
|
+
const nextCodeUnit = value.charCodeAt(index + 1);
|
|
26517
|
+
if (!(nextCodeUnit >= 56320 && nextCodeUnit <= 57343)) {
|
|
26518
|
+
return false;
|
|
26519
|
+
}
|
|
26520
|
+
index++;
|
|
26521
|
+
} else if (codeUnit >= 56320 && codeUnit <= 57343) {
|
|
26522
|
+
return false;
|
|
26523
|
+
}
|
|
26524
|
+
}
|
|
26525
|
+
return true;
|
|
26526
|
+
}
|
|
26508
26527
|
if (methodName === "replace" || methodName === "replaceAll") {
|
|
26509
26528
|
return callReplaceLikeMethod(value, methodName, args, budget, callClosure);
|
|
26510
26529
|
}
|
|
@@ -30656,4 +30675,4 @@ export {
|
|
|
30656
30675
|
FileSnapshotBackend,
|
|
30657
30676
|
run
|
|
30658
30677
|
};
|
|
30659
|
-
//# sourceMappingURL=chunk-
|
|
30678
|
+
//# sourceMappingURL=chunk-XY2A4W6O.js.map
|