@poe-platform/safe-bash 0.1.778 → 0.1.780

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.
Files changed (97) hide show
  1. package/dist/safe-bash/command-chunks/{chunk-ELX7X5SF.js → chunk-2MPJNOGU.js} +3 -3
  2. package/dist/safe-bash/command-chunks/{chunk-NT6N3KCA.js → chunk-36A7T7VI.js} +1 -1
  3. package/dist/safe-bash/command-chunks/{chunk-W7K4JN2M.js → chunk-3AQJQW6S.js} +1 -1
  4. package/dist/safe-bash/command-chunks/{chunk-T6ZPGCNJ.js → chunk-3DVCCMBJ.js} +2 -1
  5. package/dist/safe-bash/command-chunks/{chunk-XQZ3OG7K.js → chunk-442UWLQR.js} +1 -1
  6. package/dist/safe-bash/command-chunks/{chunk-W6UOCPP2.js → chunk-7THHNO2E.js} +1 -1
  7. package/dist/safe-bash/command-chunks/{chunk-ZMCVEYVX.js → chunk-AXO7RDN5.js} +1 -1
  8. package/dist/safe-bash/command-chunks/{chunk-PLOA5HZJ.js → chunk-BHOK6HA3.js} +4 -4
  9. package/dist/safe-bash/command-chunks/{chunk-TEVDQ3XP.js → chunk-C2JGBXOY.js} +2 -2
  10. package/dist/safe-bash/command-chunks/{chunk-MANR67FK.js → chunk-CD2SMRKD.js} +4 -4
  11. package/dist/safe-bash/command-chunks/{chunk-IFMCWC7A.js → chunk-CXDWDFFU.js} +2 -2
  12. package/dist/safe-bash/command-chunks/{chunk-TETIL2QG.js → chunk-FDJBYW3P.js} +1 -1
  13. package/dist/safe-bash/command-chunks/{chunk-OTTXGYBL.js → chunk-G3O44ZGT.js} +2 -2
  14. package/dist/safe-bash/command-chunks/{chunk-TUX2ZVRV.js → chunk-G5XIFXNF.js} +1 -1
  15. package/dist/safe-bash/command-chunks/{chunk-3PBP2NWM.js → chunk-GEHF4YAY.js} +1 -1
  16. package/dist/safe-bash/command-chunks/{chunk-ACRMXIQC.js → chunk-JUMF6JDJ.js} +10 -10
  17. package/dist/safe-bash/command-chunks/{chunk-B7CSA2AN.js → chunk-KEMWQP25.js} +1 -1
  18. package/dist/safe-bash/command-chunks/{chunk-VGKASRY7.js → chunk-KI2XV6GF.js} +1 -1
  19. package/dist/safe-bash/command-chunks/{chunk-T4BURXBK.js → chunk-KL4ODNMV.js} +3 -3
  20. package/dist/safe-bash/command-chunks/{chunk-YRMCH7OE.js → chunk-LCR6YMBL.js} +1 -1
  21. package/dist/safe-bash/command-chunks/{chunk-YUBBOIPH.js → chunk-LP5NRR5O.js} +1 -1
  22. package/dist/safe-bash/command-chunks/{chunk-CUFCNL6G.js → chunk-MTKXVRXL.js} +1 -1
  23. package/dist/safe-bash/command-chunks/{chunk-4SZIRINP.js → chunk-OEPERWLZ.js} +2 -1
  24. package/dist/safe-bash/command-chunks/{chunk-QYSAAJ6K.js → chunk-PUIGJ37F.js} +1 -1
  25. package/dist/safe-bash/command-chunks/{chunk-O4ARSYST.js → chunk-QSD4I3TT.js} +4 -3
  26. package/dist/safe-bash/command-chunks/{chunk-KDVJQQVT.js → chunk-QTKPEWR7.js} +4 -4
  27. package/dist/safe-bash/command-chunks/{chunk-EYRJX6FJ.js → chunk-TICYYKJB.js} +2 -1
  28. package/dist/safe-bash/command-chunks/{chunk-TKBJACLG.js → chunk-VXDCTI33.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-MAZIL3QC.js → chunk-WQHCF6N6.js} +1 -1
  30. package/dist/safe-bash/command-chunks/{chunk-I7PJVVOO.js → chunk-XFQAGBAV.js} +1 -1
  31. package/dist/safe-bash/command-chunks/{chunk-DYCEVLVC.js → chunk-Y6YHBQIS.js} +1 -1
  32. package/dist/safe-bash/command-chunks/{chunk-OPRPIHKA.js → chunk-ZGBHQQGL.js} +1 -1
  33. package/dist/safe-bash/command-chunks/{chunk-6QG3YR2F.js → chunk-ZPQ5OCKE.js} +1 -1
  34. package/dist/safe-bash/commands/diff-patch/shared.d.ts +1 -0
  35. package/dist/safe-bash/commands/diff-patch/shared.js +2 -1
  36. package/dist/safe-bash/core.browser.js +36 -19
  37. package/dist/safe-bash/opt-in/commands/dd/index.js +2 -1
  38. package/dist/safe-bash/opt-in/commands/shuf/input.js +4 -2
  39. package/dist/safe-bash/opt-in/commands/shuf/shuf.js +4 -3
  40. package/dist/safe-bash/shell/runtime.js +42 -24
  41. package/dist/safe-bash-command-dd/index.js +2 -1
  42. package/dist/safe-bash-command-du/budget.js +1 -1
  43. package/dist/safe-bash-command-du/du.js +2 -2
  44. package/dist/safe-bash-command-du/index.js +2 -2
  45. package/dist/safe-bash-command-file/index.js +1 -1
  46. package/dist/safe-bash-command-file/shared.d.ts +1 -0
  47. package/dist/safe-bash-command-file/shared.js +1 -1
  48. package/dist/safe-bash-command-fmt/index.js +2 -1
  49. package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
  50. package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
  51. package/dist/safe-bash-command-html-to-markdown/index.js +6 -6
  52. package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
  53. package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
  54. package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
  55. package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
  56. package/dist/safe-bash-command-iconv/command.js +5 -5
  57. package/dist/safe-bash-command-iconv/index.js +5 -5
  58. package/dist/safe-bash-command-iconv/internal.js +1 -1
  59. package/dist/safe-bash-command-iconv/lifecycle.js +2 -2
  60. package/dist/safe-bash-command-iconv/options.js +2 -2
  61. package/dist/safe-bash-command-iconv/reader.js +2 -2
  62. package/dist/safe-bash-command-numfmt/index.js +5 -3
  63. package/dist/safe-bash-command-pr/command.js +5 -5
  64. package/dist/safe-bash-command-pr/format.js +2 -2
  65. package/dist/safe-bash-command-pr/index.js +5 -5
  66. package/dist/safe-bash-command-pr/internal.d.ts +1 -0
  67. package/dist/safe-bash-command-pr/internal.js +1 -1
  68. package/dist/safe-bash-command-pr/io.js +2 -2
  69. package/dist/safe-bash-command-pr/options.js +2 -2
  70. package/dist/safe-bash-command-shuf/input.js +4 -2
  71. package/dist/safe-bash-command-shuf/shuf.js +4 -3
  72. package/dist/safe-bash-command-split/index.js +3 -3
  73. package/dist/safe-bash-command-split/io.d.ts +1 -0
  74. package/dist/safe-bash-command-split/io.js +1 -1
  75. package/dist/safe-bash-command-split/outputs.js +2 -2
  76. package/dist/safe-bash-command-split/split.js +3 -3
  77. package/dist/safe-bash-command-tree/arguments.js +3 -3
  78. package/dist/safe-bash-command-tree/charset.js +1 -1
  79. package/dist/safe-bash-command-tree/index.js +4 -4
  80. package/dist/safe-bash-command-tree/io.js +1 -1
  81. package/dist/safe-bash-command-tree/pattern.js +2 -2
  82. package/dist/safe-bash-command-tree/tree.js +4 -4
  83. package/dist/safe-bash-command-tsort/command.js +4 -4
  84. package/dist/safe-bash-command-tsort/graph.js +2 -2
  85. package/dist/safe-bash-command-tsort/index.js +4 -4
  86. package/dist/safe-bash-command-tsort/internal.js +1 -1
  87. package/dist/safe-bash-command-tsort/io.js +2 -2
  88. package/dist/safe-bash-io-engine/commands/archive/internal.js +2 -2
  89. package/dist/safe-bash-io-engine/shell/pattern.js +1 -1
  90. package/dist/safe-bash-io-engine/shell/string-operations.d.ts +1 -0
  91. package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
  92. package/dist/safe-bash-query-engine/index.js +2 -2
  93. package/dist/safe-bash-query-engine/parser.js +1 -1
  94. package/dist/safe-bash-query-engine/query-core.js +2 -2
  95. package/dist/safe-bash-text-stream-engine/stream-format/shared.d.ts +1 -0
  96. package/dist/safe-bash-text-stream-engine/stream-format/shared.js +2 -1
  97. package/package.json +2 -2
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  help,
3
3
  parse
4
- } from "./chunk-TEVDQ3XP.js";
4
+ } from "./chunk-C2JGBXOY.js";
5
5
  import {
6
6
  settings
7
7
  } from "./chunk-36YVRHRG.js";
8
8
  import {
9
9
  matches
10
- } from "./chunk-I7PJVVOO.js";
10
+ } from "./chunk-XFQAGBAV.js";
11
11
  import {
12
12
  TreeLimitError,
13
13
  UsageError,
@@ -15,7 +15,7 @@ import {
15
15
  escaped,
16
16
  escapedName,
17
17
  message
18
- } from "./chunk-VGKASRY7.js";
18
+ } from "./chunk-KI2XV6GF.js";
19
19
  import {
20
20
  compareVersions
21
21
  } from "./chunk-YG2AMA7I.js";
@@ -3,7 +3,7 @@ import {
3
3
  bytes,
4
4
  fileQuote,
5
5
  pathText
6
- } from "./chunk-W7K4JN2M.js";
6
+ } from "./chunk-3AQJQW6S.js";
7
7
  import {
8
8
  init_buffer
9
9
  } from "./chunk-HX3SHTCE.js";
@@ -149,7 +149,7 @@ var Budget = class {
149
149
  this.checkpoint = this.work;
150
150
  const count = ++this.checkpointCount;
151
151
  const now = monotonicNow();
152
- if (count === 1 || now - this.lastYield >= 16 || hasYieldCheckpoint(this.signal)) {
152
+ if (count === 1 || count % 16 === 0 || now - this.lastYield >= 16 || hasYieldCheckpoint(this.signal)) {
153
153
  this.lastYield = now;
154
154
  return yieldTurn(this.signal).then(() => {
155
155
  this.lastYield = monotonicNow();
@@ -114,6 +114,7 @@ var Budget = class {
114
114
  signal;
115
115
  work = 0;
116
116
  checkpoint = 0;
117
+ yieldChecks = 0;
117
118
  lastYield = monotonicNow();
118
119
  retained = 0;
119
120
  input = 0;
@@ -154,7 +155,7 @@ var Budget = class {
154
155
  if (this.work - this.checkpoint < 4096)
155
156
  return;
156
157
  this.checkpoint = this.work;
157
- if (!hasYieldCheckpoint(this.signal) && monotonicNow() - this.lastYield < 25) {
158
+ if (++this.yieldChecks % 16 !== 0 && !hasYieldCheckpoint(this.signal) && monotonicNow() - this.lastYield < 25) {
158
159
  runYieldCheckpoint(this.signal);
159
160
  this.assertSignalOpen();
160
161
  return;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathText
3
- } from "./chunk-W6UOCPP2.js";
3
+ } from "./chunk-7THHNO2E.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -101,7 +101,7 @@ var Budget = class {
101
101
  this.checkpoint = this.work;
102
102
  const count = ++this.checkpointCount;
103
103
  const now = monotonicNow();
104
- if (count === 1 || now - this.lastYield >= 16 || hasYieldCheckpoint(this.callerSignal)) {
104
+ if (count === 1 || count % 16 === 0 || now - this.lastYield >= 16 || hasYieldCheckpoint(this.callerSignal)) {
105
105
  this.lastYield = now;
106
106
  return yieldTurn(this.callerSignal).then(() => {
107
107
  this.lastYield = monotonicNow();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PrError,
3
3
  quote
4
- } from "./chunk-T6ZPGCNJ.js";
4
+ } from "./chunk-3DVCCMBJ.js";
5
5
  import {
6
6
  init_buffer
7
7
  } from "./chunk-HX3SHTCE.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  blockTags
3
- } from "./chunk-OPRPIHKA.js";
3
+ } from "./chunk-ZGBHQQGL.js";
4
4
  import {
5
5
  destination,
6
6
  escapeText
7
- } from "./chunk-OTTXGYBL.js";
7
+ } from "./chunk-G3O44ZGT.js";
8
8
  import {
9
9
  htmlSpace,
10
10
  normalizeText,
11
11
  trimText
12
- } from "./chunk-DYCEVLVC.js";
12
+ } from "./chunk-Y6YHBQIS.js";
13
13
  import {
14
14
  Builder
15
- } from "./chunk-YUBBOIPH.js";
15
+ } from "./chunk-LP5NRR5O.js";
16
16
  import {
17
17
  init_buffer
18
18
  } from "./chunk-HX3SHTCE.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  compile
3
- } from "./chunk-I7PJVVOO.js";
3
+ } from "./chunk-XFQAGBAV.js";
4
4
  import {
5
5
  UsageError,
6
6
  environmentCharset,
7
7
  explicitCharset
8
- } from "./chunk-VGKASRY7.js";
8
+ } from "./chunk-KI2XV6GF.js";
9
9
  import {
10
10
  init_buffer
11
11
  } from "./chunk-HX3SHTCE.js";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  Formatter
3
- } from "./chunk-6QG3YR2F.js";
3
+ } from "./chunk-ZPQ5OCKE.js";
4
4
  import {
5
5
  Lifecycle,
6
6
  Reader,
7
7
  fsDetail
8
- } from "./chunk-TUX2ZVRV.js";
8
+ } from "./chunk-G5XIFXNF.js";
9
9
  import {
10
10
  parseOptions
11
- } from "./chunk-ZMCVEYVX.js";
11
+ } from "./chunk-AXO7RDN5.js";
12
12
  import {
13
13
  Budget,
14
14
  PrError,
15
15
  fileQuote,
16
16
  quote,
17
17
  settings
18
- } from "./chunk-T6ZPGCNJ.js";
18
+ } from "./chunk-3DVCCMBJ.js";
19
19
  import {
20
20
  init_buffer
21
21
  } from "./chunk-HX3SHTCE.js";
@@ -7,12 +7,12 @@ import {
7
7
  } from "./chunk-N3PU3KH4.js";
8
8
  import {
9
9
  Outputs
10
- } from "./chunk-TKBJACLG.js";
10
+ } from "./chunk-VXDCTI33.js";
11
11
  import {
12
12
  Budget,
13
13
  Cursor,
14
14
  interruptible
15
- } from "./chunk-4SZIRINP.js";
15
+ } from "./chunk-OEPERWLZ.js";
16
16
  import {
17
17
  init_buffer
18
18
  } from "./chunk-HX3SHTCE.js";
@@ -133,7 +133,7 @@ var Budget = class {
133
133
  }
134
134
  async fs(operation) {
135
135
  this.step();
136
- if (++this.operations % 64 === 0 && (this.operations === 64 || hasYieldCheckpoint(this.context.signal) || monotonicNow() - this.lastYield >= 16)) {
136
+ if (++this.operations % 64 === 0 && (this.operations === 64 || this.operations % 1024 === 0 || hasYieldCheckpoint(this.context.signal) || monotonicNow() - this.lastYield >= 16)) {
137
137
  await this.wait(() => new Promise((resolve) => {
138
138
  const timer = scheduleTurn(() => {
139
139
  this.timers.delete(timer);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  htmlSpace
3
- } from "./chunk-DYCEVLVC.js";
3
+ } from "./chunk-Y6YHBQIS.js";
4
4
  import {
5
5
  Builder
6
- } from "./chunk-YUBBOIPH.js";
6
+ } from "./chunk-LP5NRR5O.js";
7
7
  import {
8
8
  init_buffer
9
9
  } from "./chunk-HX3SHTCE.js";
@@ -4,7 +4,7 @@ import {
4
4
  bytes,
5
5
  fileQuote,
6
6
  pathText
7
- } from "./chunk-T6ZPGCNJ.js";
7
+ } from "./chunk-3DVCCMBJ.js";
8
8
  import {
9
9
  init_buffer
10
10
  } from "./chunk-HX3SHTCE.js";
@@ -2,7 +2,7 @@ import {
2
2
  TsortError,
3
3
  fileQuote,
4
4
  raw
5
- } from "./chunk-W7K4JN2M.js";
5
+ } from "./chunk-3AQJQW6S.js";
6
6
  import {
7
7
  init_buffer
8
8
  } from "./chunk-HX3SHTCE.js";
@@ -18,15 +18,15 @@ init_buffer();
18
18
  var precedence = Object.freeze({
19
19
  "|": 1,
20
20
  ",": 2,
21
- "=": 3,
22
- "|=": 3,
23
- "+=": 3,
24
- "-=": 3,
25
- "*=": 3,
26
- "/=": 3,
27
- "%=": 3,
28
- "//=": 3,
29
- "//": 4,
21
+ "//": 3,
22
+ "=": 4,
23
+ "|=": 4,
24
+ "+=": 4,
25
+ "-=": 4,
26
+ "*=": 4,
27
+ "/=": 4,
28
+ "%=": 4,
29
+ "//=": 4,
30
30
  or: 5,
31
31
  and: 6,
32
32
  "==": 7,
@@ -461,7 +461,7 @@ jq: 1 compile error`, 3);
461
461
  if (priority < minimum || stopComma && operator === ",")
462
462
  break;
463
463
  take();
464
- const assignment = priority === 3;
464
+ const assignment = priority === 4;
465
465
  if (assignment && !isPath(left))
466
466
  fail("unsupported assignment path");
467
467
  const right = expression(priority + (assignment ? 0 : 1), stopComma);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  IconvError
3
- } from "./chunk-W6UOCPP2.js";
3
+ } from "./chunk-7THHNO2E.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -108,7 +108,7 @@ var WalkBudget = class {
108
108
  async fs(operation) {
109
109
  this.step();
110
110
  const { signal } = this.context;
111
- if (++this.operations % 64 === 0 && (this.operations === 64 || hasYieldCheckpoint(signal) || monotonicNow() - this.lastYield >= 16)) {
111
+ if (++this.operations % 64 === 0 && (this.operations === 64 || this.operations % 1024 === 0 || hasYieldCheckpoint(signal) || monotonicNow() - this.lastYield >= 16)) {
112
112
  await yieldTurn(signal);
113
113
  this.lastYield = monotonicNow();
114
114
  }
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  sort
3
- } from "./chunk-3PBP2NWM.js";
3
+ } from "./chunk-GEHF4YAY.js";
4
4
  import {
5
5
  Lifecycle,
6
6
  Reader
7
- } from "./chunk-NT6N3KCA.js";
7
+ } from "./chunk-36A7T7VI.js";
8
8
  import {
9
9
  Budget,
10
10
  TsortError,
11
11
  quote,
12
12
  settings
13
- } from "./chunk-W7K4JN2M.js";
13
+ } from "./chunk-3AQJQW6S.js";
14
14
  import {
15
15
  init_buffer
16
16
  } from "./chunk-HX3SHTCE.js";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  Budget,
7
7
  DuLimitError
8
- } from "./chunk-TETIL2QG.js";
8
+ } from "./chunk-FDJBYW3P.js";
9
9
  import {
10
10
  excluded
11
11
  } from "./chunk-EDH2EAAY.js";
@@ -62,7 +62,7 @@ var Budget = class {
62
62
  this.sinceYield = 0;
63
63
  const count = ++this.checkpoints;
64
64
  const now = monotonicNow();
65
- if (!this.hasExtYield && count > 1 && now - this.lastYieldTime < 16) {
65
+ if (!this.hasExtYield && count > 1 && count % 16 !== 0 && now - this.lastYieldTime < 16) {
66
66
  runYieldCheckpoint(this.context.signal);
67
67
  return;
68
68
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DC52GWRK.js";
4
4
  import {
5
5
  parse
6
- } from "./chunk-ACRMXIQC.js";
6
+ } from "./chunk-JUMF6JDJ.js";
7
7
  import {
8
8
  Budget,
9
9
  JqLimitError,
@@ -50,6 +50,7 @@ var Budget = class {
50
50
  outputBytes = 0;
51
51
  steps = 0;
52
52
  untilYield = 65536;
53
+ yieldChecks = 0;
53
54
  lastYield = monotonicNow();
54
55
  constructor(limits, signal) {
55
56
  this.limits = limits;
@@ -76,7 +77,7 @@ var Budget = class {
76
77
  if (this.untilYield > 0)
77
78
  return;
78
79
  this.untilYield = 65536;
79
- if (!hasYieldCheckpoint(this.signal) && monotonicNow() - this.lastYield < 16)
80
+ if (++this.yieldChecks % 16 !== 0 && !hasYieldCheckpoint(this.signal) && monotonicNow() - this.lastYield < 16)
80
81
  return;
81
82
  this.lastYield = monotonicNow();
82
83
  return yieldTurn(this.signal).catch((error) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  IconvError
3
- } from "./chunk-W6UOCPP2.js";
3
+ } from "./chunk-7THHNO2E.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -59,6 +59,7 @@ var SharedBudget = class {
59
59
  steps = 0;
60
60
  failureUnits = 64;
61
61
  untilYield = 128;
62
+ yieldChecks = 0;
62
63
  lastYield = monotonicNow();
63
64
  controller = new AbortController();
64
65
  timer;
@@ -105,8 +106,8 @@ var SharedBudget = class {
105
106
  if (--this.untilYield <= 0) {
106
107
  this.untilYield = 128;
107
108
  const now = monotonicNow();
108
- if (hasYieldCheckpoint(this.signal) || now - this.lastYield >= 16) {
109
- await yieldTurn();
109
+ if (++this.yieldChecks % 16 === 0 || hasYieldCheckpoint(this.signal) || now - this.lastYield >= 16) {
110
+ await yieldTurn(this.signal);
110
111
  this.lastYield = monotonicNow();
111
112
  } else {
112
113
  runYieldCheckpoint(this.signal);
@@ -149,7 +150,7 @@ var SharedBudget = class {
149
150
  untilYield -= character.length;
150
151
  if (untilYield <= 0) {
151
152
  untilYield = 4096;
152
- await yieldTurn();
153
+ await yieldTurn(this.signal);
153
154
  this.checkTime();
154
155
  }
155
156
  }
@@ -3,20 +3,20 @@ import {
3
3
  } from "./chunk-Z6V4XEAW.js";
4
4
  import {
5
5
  Lifecycle
6
- } from "./chunk-QYSAAJ6K.js";
6
+ } from "./chunk-PUIGJ37F.js";
7
7
  import {
8
8
  parse
9
- } from "./chunk-B7CSA2AN.js";
9
+ } from "./chunk-KEMWQP25.js";
10
10
  import {
11
11
  Reader,
12
12
  fsDetail
13
- } from "./chunk-XQZ3OG7K.js";
13
+ } from "./chunk-442UWLQR.js";
14
14
  import {
15
15
  Budget,
16
16
  IconvError,
17
17
  pathText,
18
18
  settings
19
- } from "./chunk-W6UOCPP2.js";
19
+ } from "./chunk-7THHNO2E.js";
20
20
  import {
21
21
  init_buffer
22
22
  } from "./chunk-HX3SHTCE.js";
@@ -17,7 +17,8 @@ function stringCheckpoint(work, units = 1) {
17
17
  const now = monotonicNow();
18
18
  const firstYield = work.lastYield === void 0;
19
19
  const lastYield = work.lastYield ??= now;
20
- if (firstYield || hasYieldCheckpoint(work.signal) || now - lastYield >= 1) {
20
+ work.yieldChecks = (work.yieldChecks ?? 0) + 1;
21
+ if (work.yieldChecks % 16 === 0 || firstYield || hasYieldCheckpoint(work.signal) || now - lastYield >= 1) {
21
22
  work.lastYield = now;
22
23
  return yieldTurn(work.signal).then(() => {
23
24
  work.lastYield = monotonicNow();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  interruptible
3
- } from "./chunk-4SZIRINP.js";
3
+ } from "./chunk-OEPERWLZ.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Parser
3
- } from "./chunk-OPRPIHKA.js";
3
+ } from "./chunk-ZGBHQQGL.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  UsageError
3
- } from "./chunk-VGKASRY7.js";
3
+ } from "./chunk-KI2XV6GF.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Builder
3
- } from "./chunk-YUBBOIPH.js";
3
+ } from "./chunk-LP5NRR5O.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  entities
3
- } from "./chunk-OTTXGYBL.js";
3
+ } from "./chunk-G3O44ZGT.js";
4
4
  import {
5
5
  init_buffer
6
6
  } from "./chunk-HX3SHTCE.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PrError,
3
3
  PrReadError
4
- } from "./chunk-T6ZPGCNJ.js";
4
+ } from "./chunk-3DVCCMBJ.js";
5
5
  import {
6
6
  init_buffer
7
7
  } from "./chunk-HX3SHTCE.js";
@@ -25,6 +25,7 @@ export declare class Budget {
25
25
  private lines;
26
26
  private work;
27
27
  private nextYield;
28
+ private yieldChecks;
28
29
  private nextYieldTime;
29
30
  private files;
30
31
  private hunks;
@@ -19,6 +19,7 @@ export class Budget {
19
19
  lines = 0;
20
20
  work = 0;
21
21
  nextYield = 4096;
22
+ yieldChecks = 0;
22
23
  nextYieldTime = monotonicNow() + 8;
23
24
  files = 0;
24
25
  hunks = 0;
@@ -64,7 +65,7 @@ export class Budget {
64
65
  const firstYield = this.nextYield === 4096;
65
66
  this.nextYield = this.work + 4096;
66
67
  const now = monotonicNow();
67
- if (firstYield || now >= this.nextYieldTime) {
68
+ if (++this.yieldChecks % 16 === 0 || firstYield || now >= this.nextYieldTime) {
68
69
  this.nextYieldTime = now + 16;
69
70
  return yieldTurn(this.context.signal).then(() => {
70
71
  this.nextYieldTime = monotonicNow() + 16;
@@ -27232,6 +27232,7 @@ var Budget9 = class _Budget {
27232
27232
  lines = 0;
27233
27233
  work = 0;
27234
27234
  nextYield = 4096;
27235
+ yieldChecks = 0;
27235
27236
  nextYieldTime = (0, yield_exports.monotonicNow)() + 8;
27236
27237
  files = 0;
27237
27238
  hunks = 0;
@@ -27257,7 +27258,7 @@ var Budget9 = class _Budget {
27257
27258
  const firstYield = this.nextYield === 4096;
27258
27259
  this.nextYield = this.work + 4096;
27259
27260
  const now = (0, yield_exports.monotonicNow)();
27260
- if (firstYield || now >= this.nextYieldTime) {
27261
+ if (++this.yieldChecks % 16 === 0 || firstYield || now >= this.nextYieldTime) {
27261
27262
  this.nextYieldTime = now + 16;
27262
27263
  return (0, yield_exports.yieldTurn)(this.context.signal).then(() => {
27263
27264
  this.nextYieldTime = (0, yield_exports.monotonicNow)() + 16;
@@ -83892,7 +83893,23 @@ ${prefix2} line ${offset + line}: \`${source.split("\n")[line - 1] ?? ""}'
83892
83893
  if (patSpec.length === 0 || patSpec.includes("[.") || patSpec.includes("[=") || /\\[1-9]/.test(patSpec)) return void 0;
83893
83894
  const normPat = syncPosixRegexSource(patSpec);
83894
83895
  if (normPat === void 0) return void 0;
83895
- const jsPat = isExtended ? normPat : normPat.replace(/\\([+?()|])/g, "$1");
83896
+ let jsPat = normPat;
83897
+ if (!isExtended) {
83898
+ jsPat = "";
83899
+ let inBracket = false;
83900
+ for (let i = 0; i < normPat.length; i++) {
83901
+ const ch = normPat[i];
83902
+ if (ch === "\\") {
83903
+ const next = normPat[++i];
83904
+ if (next === void 0) return void 0;
83905
+ jsPat += !inBracket && "+?(){}|".includes(next) ? next : "\\" + next;
83906
+ } else {
83907
+ if (ch === "[") inBracket = true;
83908
+ else if (ch === "]") inBracket = false;
83909
+ jsPat += !inBracket && "+?(){}|".includes(ch) ? "\\" + ch : ch;
83910
+ }
83911
+ }
83912
+ }
83896
83913
  try {
83897
83914
  return new RegExp(jsPat);
83898
83915
  } catch {
@@ -85213,23 +85230,6 @@ ${prefix2} line ${offset + line}: \`${source.split("\n")[line - 1] ?? ""}'
85213
85230
  let l = rawLines[li];
85214
85231
  let fields2 = awkSep === void 0 || awkSep === " " ? l.split(/[ \t]+/).filter(Boolean) : l.length === 0 ? [] : l.split(awkSep);
85215
85232
  if (rowPred && !rowPred(l, fields2, li + 1)) continue;
85216
- if (subRe) {
85217
- if (subTarget === "0") {
85218
- l = l.replace(subRe, (matched) => subRep.split("&").join(matched));
85219
- fields2 = awkSep === void 0 || awkSep === " " ? l.split(/[ \t]+/).filter(Boolean) : l.length === 0 ? [] : l.split(awkSep);
85220
- } else {
85221
- const tIdx = subTarget === "NF" ? fields2.length : Number(subTarget);
85222
- if (tIdx >= 1 && tIdx <= fields2.length) {
85223
- fields2 = [...fields2];
85224
- let replaced = false;
85225
- fields2[tIdx - 1] = fields2[tIdx - 1].replace(subRe, (matched) => {
85226
- replaced = true;
85227
- return subRep.split("&").join(matched);
85228
- });
85229
- if (replaced) l = fields2.join(ofs);
85230
- }
85231
- }
85232
- }
85233
85233
  if (preAssigns.length > 0) {
85234
85234
  for (let ai = 0; ai < preAssigns.length; ai++) {
85235
85235
  const pa = preAssigns[ai];
@@ -85297,6 +85297,23 @@ ${prefix2} line ${offset + line}: \`${source.split("\n")[line - 1] ?? ""}'
85297
85297
  }
85298
85298
  }
85299
85299
  }
85300
+ if (subRe) {
85301
+ if (subTarget === "0") {
85302
+ l = l.replace(subRe, (matched) => subRep.split("&").join(matched));
85303
+ fields2 = awkSep === void 0 || awkSep === " " ? l.split(/[ \t]+/).filter(Boolean) : l.length === 0 ? [] : l.split(awkSep);
85304
+ } else {
85305
+ const tIdx = subTarget === "NF" ? fields2.length : Number(subTarget);
85306
+ if (tIdx >= 1 && tIdx <= fields2.length) {
85307
+ fields2 = [...fields2];
85308
+ let replaced = false;
85309
+ fields2[tIdx - 1] = fields2[tIdx - 1].replace(subRe, (matched) => {
85310
+ replaced = true;
85311
+ return subRep.split("&").join(matched);
85312
+ });
85313
+ if (replaced) l = fields2.join(ofs);
85314
+ }
85315
+ }
85316
+ }
85300
85317
  if (parts.length === 1 && parts[0].kind === "field" && parts[0].token === "0") {
85301
85318
  outLines.push(l);
85302
85319
  continue;
@@ -247,9 +247,10 @@ export function createDdCommand(options = {}) {
247
247
  let partialRecord = 0;
248
248
  let warned = false;
249
249
  let lastYieldTime = monotonicNow();
250
+ let yieldChecks = 0;
250
251
  const maybeYield = async () => {
251
252
  context.signal.throwIfAborted();
252
- if (hasYieldCheckpoint(context.signal) || monotonicNow() - lastYieldTime >= 16) {
253
+ if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(context.signal) || monotonicNow() - lastYieldTime >= 16) {
253
254
  await yieldTurn(context.signal);
254
255
  lastYieldTime = monotonicNow();
255
256
  }
@@ -58,6 +58,7 @@ export async function* records(source, delimiter, limit, signal) {
58
58
  let used = 0;
59
59
  let scanned = 0;
60
60
  let lastYield = monotonicNow();
61
+ let yieldChecks = 0;
61
62
  for await (const rawChunk of source) {
62
63
  const chunk = Uint8Array.prototype.slice.call(rawChunk);
63
64
  let start = 0;
@@ -88,7 +89,7 @@ export async function* records(source, delimiter, limit, signal) {
88
89
  }
89
90
  }
90
91
  if (++scanned % 8192 === 0) {
91
- if (hasYieldCheckpoint(signal) || monotonicNow() - lastYield >= 25) {
92
+ if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(signal) || monotonicNow() - lastYield >= 25) {
92
93
  await yieldTurn(signal);
93
94
  lastYield = monotonicNow();
94
95
  }
@@ -114,6 +115,7 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
114
115
  let scanned = 0;
115
116
  let totalBytes = 0;
116
117
  let lastYield = monotonicNow();
118
+ let yieldChecks = 0;
117
119
  for await (const rawChunk of source) {
118
120
  const chunk = Uint8Array.prototype.slice.call(rawChunk);
119
121
  let start = 0;
@@ -154,7 +156,7 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
154
156
  }
155
157
  if (++scanned % 8192 === 0) {
156
158
  const now = monotonicNow();
157
- if (hasYieldCheckpoint(signal) || now - lastYield >= 16) {
159
+ if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(signal) || now - lastYield >= 16) {
158
160
  await yieldTurn(signal);
159
161
  lastYield = monotonicNow();
160
162
  }