@poe-platform/safe-bash 0.1.65 → 0.1.66
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-bash/browser.js +9 -2
- package/dist/safe-bash/browser.js.map +2 -2
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts +1 -0
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts.map +1 -1
- package/dist/safe-bash/commands/text-programs/awk-runtime.js +99 -33
- package/dist/safe-bash/commands/text-programs/awk-runtime.js.map +1 -1
- package/dist/safe-bash/commands/text-programs/sed.d.ts.map +1 -1
- package/dist/safe-bash/commands/text-programs/sed.js +11 -2
- package/dist/safe-bash/commands/text-programs/sed.js.map +1 -1
- package/package.json +2 -2
|
@@ -17249,9 +17249,16 @@ async function execute(program, context, files, quiet, budget) {
|
|
|
17249
17249
|
}
|
|
17250
17250
|
break;
|
|
17251
17251
|
}
|
|
17252
|
-
case "y":
|
|
17253
|
-
|
|
17252
|
+
case "y": {
|
|
17253
|
+
budget.step(pattern.length);
|
|
17254
|
+
const translated = import_buffer.Buffer.allocUnsafe(pattern.length);
|
|
17255
|
+
for (let index = 0; index < pattern.length; index++) {
|
|
17256
|
+
if (index % 256 === 0) await budget.checkpoint();
|
|
17257
|
+
translated[index] = (instruction.translation.get(pattern[index]) ?? pattern[index]).charCodeAt(0);
|
|
17258
|
+
}
|
|
17259
|
+
pattern = translated.toString("latin1");
|
|
17254
17260
|
break;
|
|
17261
|
+
}
|
|
17255
17262
|
case "b":
|
|
17256
17263
|
pc = instruction.jump;
|
|
17257
17264
|
continue;
|