@poe-platform/safe-bash 0.1.519 → 0.1.520
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/core.browser.js +8 -4
- package/dist/safe-bash/core.browser.js.map +3 -3
- package/dist/safe-bash/shell/parser.d.ts.map +1 -1
- package/dist/safe-bash/shell/parser.js +4 -2
- package/dist/safe-bash/shell/parser.js.map +1 -1
- package/dist/safe-bash/shell/runtime.d.ts.map +1 -1
- package/dist/safe-bash/shell/runtime.js +4 -2
- package/dist/safe-bash/shell/runtime.js.map +1 -1
- package/package.json +2 -2
|
@@ -38024,10 +38024,12 @@ shell: command substitution: line ${line}: \`${sourceLine}'
|
|
|
38024
38024
|
if (character === "'") {
|
|
38025
38025
|
const nul = bytes3.indexOf(0);
|
|
38026
38026
|
const raw = Uint8Array.from(nul < 0 ? bytes3 : bytes3.slice(0, nul));
|
|
38027
|
+
const decoder2 = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
38027
38028
|
try {
|
|
38028
|
-
return
|
|
38029
|
+
return decoder2.decode(raw);
|
|
38029
38030
|
} catch (error) {
|
|
38030
|
-
|
|
38031
|
+
this.budget.admit(0);
|
|
38032
|
+
if (!(error instanceof TypeError) || "code" in error && error.code !== "ERR_ENCODING_INVALID_ENCODED_DATA") throw error;
|
|
38031
38033
|
this.budget.admit(2);
|
|
38032
38034
|
return shellValueFromBytes(raw);
|
|
38033
38035
|
}
|
|
@@ -46274,10 +46276,12 @@ ${prefix3} line ${offset + line}: \`${source2.split("\n")[line - 1] ?? ""}'
|
|
|
46274
46276
|
for (const byte of bytes3) if (byte !== 0) bytes3[length++] = byte;
|
|
46275
46277
|
while (length && bytes3[length - 1] === 10) length--;
|
|
46276
46278
|
const sanitized = bytes3.subarray(0, length);
|
|
46279
|
+
const decoder2 = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
46277
46280
|
try {
|
|
46278
|
-
return
|
|
46281
|
+
return decoder2.decode(sanitized);
|
|
46279
46282
|
} catch (error) {
|
|
46280
|
-
|
|
46283
|
+
this.signal.throwIfAborted();
|
|
46284
|
+
if (!(error instanceof TypeError) || "code" in error && error.code !== "ERR_ENCODING_INVALID_ENCODED_DATA") throw error;
|
|
46281
46285
|
return shellValueFromBytes(sanitized, io[valueScope]);
|
|
46282
46286
|
}
|
|
46283
46287
|
}
|