@poe-platform/safe-bash 0.1.749 → 0.1.751
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/chunks/{chunk-4GK4FAT6.js → chunk-637A2MLA.js} +8 -6
- package/dist/safe-bash/chunks/{chunk-MUWJPSGN.js → chunk-B7IBQSD4.js} +7 -5
- package/dist/safe-bash/chunks/{chunk-BQEH4DKJ.js → chunk-ILHNFAZE.js} +198 -45
- package/dist/safe-bash/chunks/{src-YBSQFQZO.js → src-XXKXVO7T.js} +2 -2
- package/dist/safe-bash/commands/basic.js +2 -2
- package/dist/safe-bash/commands/pr/index.browser.js +1 -1
- package/dist/safe-bash/commands/time-env/shared.d.ts +1 -0
- package/dist/safe-bash/commands/time-env/shared.js +6 -5
- package/dist/safe-bash/commands/time-env/sleep.js +6 -3
- package/dist/safe-bash/core.browser.js +206 -452
- package/dist/safe-bash/shell/conditional.js +1 -2
- package/dist/safe-bash/shell/pattern.js +6 -1
- package/dist/safe-bash/shell/runtime.d.ts +1 -7
- package/dist/safe-bash/shell/runtime.js +262 -635
- package/dist/safe-bash-command-ssconvert/index.js +197 -44
- package/package.json +2 -2
|
@@ -68,8 +68,7 @@ async function patternAdmission(pattern, context) {
|
|
|
68
68
|
else if (character === "]" && bracket && index > bracketStart + 1)
|
|
69
69
|
bracket = false;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
unsupported("unclosed bracket pattern");
|
|
71
|
+
// The pattern tokenizer treats an unclosed bracket as a literal '['.
|
|
73
72
|
}
|
|
74
73
|
async function unary(operator, value, context) {
|
|
75
74
|
if (operator === "-n")
|
|
@@ -335,7 +335,12 @@ function getCompiledSyncPatternRegex(pattern) {
|
|
|
335
335
|
contents = "^";
|
|
336
336
|
cursor++;
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
// Bash treats a closing bracket at the start of a class as a member.
|
|
339
|
+
if (pattern.charCodeAt(cursor) === 93) {
|
|
340
|
+
contents += "\\]";
|
|
341
|
+
cursor++;
|
|
342
|
+
}
|
|
343
|
+
if (cursor >= pattern.length) {
|
|
339
344
|
syncPatternRegexCache.set(pattern, null);
|
|
340
345
|
return null;
|
|
341
346
|
}
|
|
@@ -526,13 +526,6 @@ export declare class Runtime {
|
|
|
526
526
|
private evalSyncRedirectSuffix;
|
|
527
527
|
private encodeSyncRedirectWordsToScratch;
|
|
528
528
|
private _activePrintfInductionName;
|
|
529
|
-
private _activeLoopBodyScript;
|
|
530
|
-
private _activeLoopCondScript;
|
|
531
|
-
private _activeLoopVarName;
|
|
532
|
-
private isVarUnmutatedInScript;
|
|
533
|
-
private isVarUnmutatedInActiveLoop;
|
|
534
|
-
private isFileReadOnlyScript;
|
|
535
|
-
private extractLoopInvariantInput;
|
|
536
529
|
private canSyncPrintfInductionBody;
|
|
537
530
|
private isSyncPrintfCallOk;
|
|
538
531
|
private isSimpleRedirectEchoWord;
|
|
@@ -549,6 +542,7 @@ export declare class Runtime {
|
|
|
549
542
|
private _syncLoopAction;
|
|
550
543
|
private flushSyncStdoutBatch;
|
|
551
544
|
private writeSyncStdoutText;
|
|
545
|
+
private runSyncDiscardStep;
|
|
552
546
|
private writeSyncRedirectStep;
|
|
553
547
|
private runSyncArithForFallback;
|
|
554
548
|
private _syncLoopFnCheckDepth;
|