@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.
@@ -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
- if (bracket)
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
- if (cursor >= pattern.length || pattern.charCodeAt(cursor) === 93) {
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;