@qodalis/cli-files 2.0.0-beta.17 → 2.0.0-beta.18

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/public-api.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import * as _qodalis_cli_core from '@qodalis/cli-core';
2
1
  import { ICliOwnership, CliAccessAction, ICliCommandProcessor, CliProcessCommand, ICliExecutionContext, CliHeadersProvider, ICliFileTransferService, ICliFileEntry, ICliCompletionProvider, ICliCompletionContext, ICliConfigurableModule } from '@qodalis/cli-core';
3
2
  import { Subscription } from 'rxjs';
4
3
 
@@ -28,7 +27,7 @@ interface IFileNode {
28
27
  linkTarget?: string;
29
28
  }
30
29
 
31
- declare const IFileSystemService_TOKEN = "cli-file-system-service";
30
+ declare const IFileSystemService_TOKEN: any;
32
31
  /**
33
32
  * Decides whether the current principal may act on a node. Set by the files
34
33
  * module from the generic authorization layer (`cliCanAccess`); when no policy
@@ -81,7 +80,7 @@ interface IFileSystemService {
81
80
  declare class CliLsCommandProcessor implements ICliCommandProcessor {
82
81
  command: string;
83
82
  description: string;
84
- author: _qodalis_cli_core.ICliCommandAuthor;
83
+ author: any;
85
84
  version: string;
86
85
  acceptsRawInput: boolean;
87
86
  metadata: {
@@ -98,38 +97,42 @@ declare class CliLsCommandProcessor implements ICliCommandProcessor {
98
97
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
99
98
  writeDescription(context: ICliExecutionContext): void;
100
99
  private writeLongFormat;
100
+ private humanReadable;
101
+ private formatSize;
101
102
  private writeShortFormat;
102
103
  }
103
104
 
104
105
  declare class CliCdCommandProcessor implements ICliCommandProcessor {
105
106
  command: string;
106
107
  description: string;
107
- author: _qodalis_cli_core.ICliCommandAuthor;
108
+ author: any;
108
109
  version: string;
109
110
  acceptsRawInput: boolean;
110
111
  metadata: {
111
112
  icon: string;
112
113
  module: string;
113
114
  };
115
+ writeDescription(context: ICliExecutionContext): void;
114
116
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
115
117
  }
116
118
 
117
119
  declare class CliPwdCommandProcessor implements ICliCommandProcessor {
118
120
  command: string;
119
121
  description: string;
120
- author: _qodalis_cli_core.ICliCommandAuthor;
122
+ author: any;
121
123
  version: string;
122
124
  metadata: {
123
125
  icon: string;
124
126
  module: string;
125
127
  };
128
+ writeDescription(context: ICliExecutionContext): void;
126
129
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
127
130
  }
128
131
 
129
132
  declare class CliMkdirCommandProcessor implements ICliCommandProcessor {
130
133
  command: string;
131
134
  description: string;
132
- author: _qodalis_cli_core.ICliCommandAuthor;
135
+ author: any;
133
136
  version: string;
134
137
  acceptsRawInput: boolean;
135
138
  valueRequired: boolean;
@@ -144,13 +147,14 @@ declare class CliMkdirCommandProcessor implements ICliCommandProcessor {
144
147
  required: boolean;
145
148
  type: "boolean";
146
149
  }[];
150
+ writeDescription(context: ICliExecutionContext): void;
147
151
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
148
152
  }
149
153
 
150
154
  declare class CliRmdirCommandProcessor implements ICliCommandProcessor {
151
155
  command: string;
152
156
  description: string;
153
- author: _qodalis_cli_core.ICliCommandAuthor;
157
+ author: any;
154
158
  version: string;
155
159
  acceptsRawInput: boolean;
156
160
  valueRequired: boolean;
@@ -158,13 +162,14 @@ declare class CliRmdirCommandProcessor implements ICliCommandProcessor {
158
162
  icon: string;
159
163
  module: string;
160
164
  };
165
+ writeDescription(context: ICliExecutionContext): void;
161
166
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
162
167
  }
163
168
 
164
169
  declare class CliTouchCommandProcessor implements ICliCommandProcessor {
165
170
  command: string;
166
171
  description: string;
167
- author: _qodalis_cli_core.ICliCommandAuthor;
172
+ author: any;
168
173
  version: string;
169
174
  acceptsRawInput: boolean;
170
175
  valueRequired: boolean;
@@ -172,13 +177,14 @@ declare class CliTouchCommandProcessor implements ICliCommandProcessor {
172
177
  icon: string;
173
178
  module: string;
174
179
  };
180
+ writeDescription(context: ICliExecutionContext): void;
175
181
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
176
182
  }
177
183
 
178
184
  declare class CliCatCommandProcessor implements ICliCommandProcessor {
179
185
  command: string;
180
186
  description: string;
181
- author: _qodalis_cli_core.ICliCommandAuthor;
187
+ author: any;
182
188
  version: string;
183
189
  acceptsRawInput: boolean;
184
190
  valueRequired: boolean;
@@ -186,13 +192,14 @@ declare class CliCatCommandProcessor implements ICliCommandProcessor {
186
192
  icon: string;
187
193
  module: string;
188
194
  };
195
+ writeDescription(context: ICliExecutionContext): void;
189
196
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
190
197
  }
191
198
 
192
199
  declare class CliEchoCommandProcessor implements ICliCommandProcessor {
193
200
  command: string;
194
201
  description: string;
195
- author: _qodalis_cli_core.ICliCommandAuthor;
202
+ author: any;
196
203
  version: string;
197
204
  acceptsRawInput: boolean;
198
205
  extendsProcessor: boolean;
@@ -201,13 +208,14 @@ declare class CliEchoCommandProcessor implements ICliCommandProcessor {
201
208
  icon: string;
202
209
  module: string;
203
210
  };
211
+ writeDescription(context: ICliExecutionContext): void;
204
212
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
205
213
  }
206
214
 
207
215
  declare class CliRmCommandProcessor implements ICliCommandProcessor {
208
216
  command: string;
209
217
  description: string;
210
- author: _qodalis_cli_core.ICliCommandAuthor;
218
+ author: any;
211
219
  version: string;
212
220
  acceptsRawInput: boolean;
213
221
  valueRequired: boolean;
@@ -222,13 +230,14 @@ declare class CliRmCommandProcessor implements ICliCommandProcessor {
222
230
  required: boolean;
223
231
  type: "boolean";
224
232
  }[];
233
+ writeDescription(context: ICliExecutionContext): void;
225
234
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
226
235
  }
227
236
 
228
237
  declare class CliCpCommandProcessor implements ICliCommandProcessor {
229
238
  command: string;
230
239
  description: string;
231
- author: _qodalis_cli_core.ICliCommandAuthor;
240
+ author: any;
232
241
  version: string;
233
242
  acceptsRawInput: boolean;
234
243
  metadata: {
@@ -242,6 +251,7 @@ declare class CliCpCommandProcessor implements ICliCommandProcessor {
242
251
  required: boolean;
243
252
  type: "boolean";
244
253
  }[];
254
+ writeDescription(context: ICliExecutionContext): void;
245
255
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
246
256
  private parseArgs;
247
257
  }
@@ -249,13 +259,14 @@ declare class CliCpCommandProcessor implements ICliCommandProcessor {
249
259
  declare class CliMvCommandProcessor implements ICliCommandProcessor {
250
260
  command: string;
251
261
  description: string;
252
- author: _qodalis_cli_core.ICliCommandAuthor;
262
+ author: any;
253
263
  version: string;
254
264
  acceptsRawInput: boolean;
255
265
  metadata: {
256
266
  icon: string;
257
267
  module: string;
258
268
  };
269
+ writeDescription(context: ICliExecutionContext): void;
259
270
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
260
271
  private parseArgs;
261
272
  }
@@ -263,7 +274,7 @@ declare class CliMvCommandProcessor implements ICliCommandProcessor {
263
274
  declare class CliTreeCommandProcessor implements ICliCommandProcessor {
264
275
  command: string;
265
276
  description: string;
266
- author: _qodalis_cli_core.ICliCommandAuthor;
277
+ author: any;
267
278
  version: string;
268
279
  acceptsRawInput: boolean;
269
280
  metadata: {
@@ -277,6 +288,7 @@ declare class CliTreeCommandProcessor implements ICliCommandProcessor {
277
288
  required: boolean;
278
289
  type: "number";
279
290
  }[];
291
+ writeDescription(context: ICliExecutionContext): void;
280
292
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
281
293
  /** File system of the running command (listing goes through access checks) */
282
294
  private fs?;
@@ -286,7 +298,7 @@ declare class CliTreeCommandProcessor implements ICliCommandProcessor {
286
298
  declare class CliHeadCommandProcessor implements ICliCommandProcessor {
287
299
  command: string;
288
300
  description: string;
289
- author: _qodalis_cli_core.ICliCommandAuthor;
301
+ author: any;
290
302
  version: string;
291
303
  acceptsRawInput: boolean;
292
304
  valueRequired: boolean;
@@ -301,6 +313,7 @@ declare class CliHeadCommandProcessor implements ICliCommandProcessor {
301
313
  required: boolean;
302
314
  type: "number";
303
315
  }[];
316
+ writeDescription(context: ICliExecutionContext): void;
304
317
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
305
318
  private parsePaths;
306
319
  }
@@ -308,7 +321,7 @@ declare class CliHeadCommandProcessor implements ICliCommandProcessor {
308
321
  declare class CliTailCommandProcessor implements ICliCommandProcessor {
309
322
  command: string;
310
323
  description: string;
311
- author: _qodalis_cli_core.ICliCommandAuthor;
324
+ author: any;
312
325
  version: string;
313
326
  acceptsRawInput: boolean;
314
327
  valueRequired: boolean;
@@ -323,6 +336,7 @@ declare class CliTailCommandProcessor implements ICliCommandProcessor {
323
336
  required: boolean;
324
337
  type: "number";
325
338
  }[];
339
+ writeDescription(context: ICliExecutionContext): void;
326
340
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
327
341
  private parsePaths;
328
342
  }
@@ -330,7 +344,7 @@ declare class CliTailCommandProcessor implements ICliCommandProcessor {
330
344
  declare class CliWcCommandProcessor implements ICliCommandProcessor {
331
345
  command: string;
332
346
  description: string;
333
- author: _qodalis_cli_core.ICliCommandAuthor;
347
+ author: any;
334
348
  version: string;
335
349
  acceptsRawInput: boolean;
336
350
  valueRequired: boolean;
@@ -345,14 +359,17 @@ declare class CliWcCommandProcessor implements ICliCommandProcessor {
345
359
  required: boolean;
346
360
  type: "boolean";
347
361
  }[];
362
+ writeDescription(context: ICliExecutionContext): void;
348
363
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
364
+ /** Counts like Unix wc: lines are newline characters. */
365
+ private count;
349
366
  private parsePaths;
350
367
  }
351
368
 
352
369
  declare class CliFindCommandProcessor implements ICliCommandProcessor {
353
370
  command: string;
354
371
  description: string;
355
- author: _qodalis_cli_core.ICliCommandAuthor;
372
+ author: any;
356
373
  version: string;
357
374
  acceptsRawInput: boolean;
358
375
  metadata: {
@@ -370,18 +387,23 @@ declare class CliFindCommandProcessor implements ICliCommandProcessor {
370
387
  required: boolean;
371
388
  type: "number";
372
389
  })[];
390
+ writeDescription(context: ICliExecutionContext): void;
373
391
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
392
+ /** `--name` matches case-sensitively, `--iname` ignoring case. */
393
+ private nameRegex;
394
+ private matches;
374
395
  private parseSearchPath;
375
396
  private globToRegex;
376
397
  /** File system of the running command (listing goes through access checks) */
377
398
  private fs?;
399
+ /** Lists the children of `node`, which are at `depth` (1 = direct children). */
378
400
  private walk;
379
401
  }
380
402
 
381
403
  declare class CliGrepCommandProcessor implements ICliCommandProcessor {
382
404
  command: string;
383
405
  description: string;
384
- author: _qodalis_cli_core.ICliCommandAuthor;
406
+ author: any;
385
407
  version: string;
386
408
  acceptsRawInput: boolean;
387
409
  metadata: {
@@ -395,7 +417,13 @@ declare class CliGrepCommandProcessor implements ICliCommandProcessor {
395
417
  required: boolean;
396
418
  type: "boolean";
397
419
  }[];
420
+ writeDescription(context: ICliExecutionContext): void;
398
421
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
422
+ /**
423
+ * As Unix grep: 0 when a line matched, 1 when none did, 2 after an
424
+ * error (so `if grep -q ...` and `grep x f && ...` work).
425
+ */
426
+ private exitStatus;
399
427
  private grepContent;
400
428
  private parseArgs;
401
429
  private collectFiles;
@@ -404,7 +432,7 @@ declare class CliGrepCommandProcessor implements ICliCommandProcessor {
404
432
  declare class CliTacCommandProcessor implements ICliCommandProcessor {
405
433
  command: string;
406
434
  description: string;
407
- author: _qodalis_cli_core.ICliCommandAuthor;
435
+ author: any;
408
436
  version: string;
409
437
  acceptsRawInput: boolean;
410
438
  valueRequired: boolean;
@@ -412,6 +440,7 @@ declare class CliTacCommandProcessor implements ICliCommandProcessor {
412
440
  icon: string;
413
441
  module: string;
414
442
  };
443
+ writeDescription(context: ICliExecutionContext): void;
415
444
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
416
445
  private parsePaths;
417
446
  }
@@ -419,7 +448,7 @@ declare class CliTacCommandProcessor implements ICliCommandProcessor {
419
448
  declare class CliBasenameCommandProcessor implements ICliCommandProcessor {
420
449
  command: string;
421
450
  description: string;
422
- author: _qodalis_cli_core.ICliCommandAuthor;
451
+ author: any;
423
452
  version: string;
424
453
  acceptsRawInput: boolean;
425
454
  valueRequired: boolean;
@@ -427,6 +456,7 @@ declare class CliBasenameCommandProcessor implements ICliCommandProcessor {
427
456
  icon: string;
428
457
  module: string;
429
458
  };
459
+ writeDescription(context: ICliExecutionContext): void;
430
460
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
431
461
  private parseTokens;
432
462
  }
@@ -434,7 +464,7 @@ declare class CliBasenameCommandProcessor implements ICliCommandProcessor {
434
464
  declare class CliDirnameCommandProcessor implements ICliCommandProcessor {
435
465
  command: string;
436
466
  description: string;
437
- author: _qodalis_cli_core.ICliCommandAuthor;
467
+ author: any;
438
468
  version: string;
439
469
  acceptsRawInput: boolean;
440
470
  valueRequired: boolean;
@@ -442,6 +472,7 @@ declare class CliDirnameCommandProcessor implements ICliCommandProcessor {
442
472
  icon: string;
443
473
  module: string;
444
474
  };
475
+ writeDescription(context: ICliExecutionContext): void;
445
476
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
446
477
  private parseTokens;
447
478
  }
@@ -449,7 +480,7 @@ declare class CliDirnameCommandProcessor implements ICliCommandProcessor {
449
480
  declare class CliSortCommandProcessor implements ICliCommandProcessor {
450
481
  command: string;
451
482
  description: string;
452
- author: _qodalis_cli_core.ICliCommandAuthor;
483
+ author: any;
453
484
  version: string;
454
485
  acceptsRawInput: boolean;
455
486
  valueRequired: boolean;
@@ -470,6 +501,7 @@ declare class CliSortCommandProcessor implements ICliCommandProcessor {
470
501
  required: boolean;
471
502
  type: "string";
472
503
  })[];
504
+ writeDescription(context: ICliExecutionContext): void;
473
505
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
474
506
  private parsePaths;
475
507
  }
@@ -477,7 +509,7 @@ declare class CliSortCommandProcessor implements ICliCommandProcessor {
477
509
  declare class CliUniqCommandProcessor implements ICliCommandProcessor {
478
510
  command: string;
479
511
  description: string;
480
- author: _qodalis_cli_core.ICliCommandAuthor;
512
+ author: any;
481
513
  version: string;
482
514
  acceptsRawInput: boolean;
483
515
  valueRequired: boolean;
@@ -492,6 +524,7 @@ declare class CliUniqCommandProcessor implements ICliCommandProcessor {
492
524
  required: boolean;
493
525
  type: "boolean";
494
526
  }[];
527
+ writeDescription(context: ICliExecutionContext): void;
495
528
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
496
529
  private parsePaths;
497
530
  }
@@ -499,7 +532,7 @@ declare class CliUniqCommandProcessor implements ICliCommandProcessor {
499
532
  declare class CliCutCommandProcessor implements ICliCommandProcessor {
500
533
  command: string;
501
534
  description: string;
502
- author: _qodalis_cli_core.ICliCommandAuthor;
535
+ author: any;
503
536
  version: string;
504
537
  acceptsRawInput: boolean;
505
538
  valueRequired: boolean;
@@ -514,6 +547,7 @@ declare class CliCutCommandProcessor implements ICliCommandProcessor {
514
547
  required: boolean;
515
548
  type: "string";
516
549
  }[];
550
+ writeDescription(context: ICliExecutionContext): void;
517
551
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
518
552
  private parseSpec;
519
553
  private resolveIndices;
@@ -523,7 +557,7 @@ declare class CliCutCommandProcessor implements ICliCommandProcessor {
523
557
  declare class CliPasteCommandProcessor implements ICliCommandProcessor {
524
558
  command: string;
525
559
  description: string;
526
- author: _qodalis_cli_core.ICliCommandAuthor;
560
+ author: any;
527
561
  version: string;
528
562
  acceptsRawInput: boolean;
529
563
  valueRequired: boolean;
@@ -544,14 +578,21 @@ declare class CliPasteCommandProcessor implements ICliCommandProcessor {
544
578
  required: boolean;
545
579
  type: "boolean";
546
580
  })[];
581
+ writeDescription(context: ICliExecutionContext): void;
547
582
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
583
+ /** `-d` list: each character in turn, with \t, \n, \\ and \0 (empty) escapes. */
584
+ private parseDelimiters;
585
+ /**
586
+ * The file operands. The engine drops a lone `-` from the value, so with
587
+ * piped input they are read from the raw command line to keep it.
588
+ */
548
589
  private parsePaths;
549
590
  }
550
591
 
551
592
  declare class CliTrCommandProcessor implements ICliCommandProcessor {
552
593
  command: string;
553
594
  description: string;
554
- author: _qodalis_cli_core.ICliCommandAuthor;
595
+ author: any;
555
596
  version: string;
556
597
  acceptsRawInput: boolean;
557
598
  valueRequired: boolean;
@@ -561,11 +602,14 @@ declare class CliTrCommandProcessor implements ICliCommandProcessor {
561
602
  };
562
603
  parameters: {
563
604
  name: string;
605
+ aliases: string[];
564
606
  description: string;
565
607
  required: boolean;
566
608
  type: "boolean";
567
609
  }[];
610
+ writeDescription(context: ICliExecutionContext): void;
568
611
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
612
+ private fail;
569
613
  private deleteChars;
570
614
  private squeezeChars;
571
615
  private translateChars;
@@ -574,7 +618,7 @@ declare class CliTrCommandProcessor implements ICliCommandProcessor {
574
618
  declare class CliStatCommandProcessor implements ICliCommandProcessor {
575
619
  command: string;
576
620
  description: string;
577
- author: _qodalis_cli_core.ICliCommandAuthor;
621
+ author: any;
578
622
  version: string;
579
623
  acceptsRawInput: boolean;
580
624
  valueRequired: boolean;
@@ -583,6 +627,7 @@ declare class CliStatCommandProcessor implements ICliCommandProcessor {
583
627
  module: string;
584
628
  };
585
629
  parameters: never[];
630
+ writeDescription(context: ICliExecutionContext): void;
586
631
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
587
632
  private parsePaths;
588
633
  }
@@ -590,7 +635,7 @@ declare class CliStatCommandProcessor implements ICliCommandProcessor {
590
635
  declare class CliChmodCommandProcessor implements ICliCommandProcessor {
591
636
  command: string;
592
637
  description: string;
593
- author: _qodalis_cli_core.ICliCommandAuthor;
638
+ author: any;
594
639
  version: string;
595
640
  acceptsRawInput: boolean;
596
641
  valueRequired: boolean;
@@ -604,6 +649,7 @@ declare class CliChmodCommandProcessor implements ICliCommandProcessor {
604
649
  required: boolean;
605
650
  type: "boolean";
606
651
  }[];
652
+ writeDescription(context: ICliExecutionContext): void;
607
653
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
608
654
  private parseArgs;
609
655
  private resolvePermissions;
@@ -614,7 +660,7 @@ declare class CliChmodCommandProcessor implements ICliCommandProcessor {
614
660
  declare class CliChownCommandProcessor implements ICliCommandProcessor {
615
661
  command: string;
616
662
  description: string;
617
- author: _qodalis_cli_core.ICliCommandAuthor;
663
+ author: any;
618
664
  version: string;
619
665
  acceptsRawInput: boolean;
620
666
  valueRequired: boolean;
@@ -628,6 +674,7 @@ declare class CliChownCommandProcessor implements ICliCommandProcessor {
628
674
  required: boolean;
629
675
  type: "boolean";
630
676
  }[];
677
+ writeDescription(context: ICliExecutionContext): void;
631
678
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
632
679
  private parseArgs;
633
680
  /** Parse "user:group", "user:", ":group", or "user" */
@@ -638,10 +685,9 @@ declare class CliChownCommandProcessor implements ICliCommandProcessor {
638
685
  declare class CliDuCommandProcessor implements ICliCommandProcessor {
639
686
  command: string;
640
687
  description: string;
641
- author: _qodalis_cli_core.ICliCommandAuthor;
688
+ author: any;
642
689
  version: string;
643
690
  acceptsRawInput: boolean;
644
- valueRequired: boolean;
645
691
  metadata: {
646
692
  icon: string;
647
693
  module: string;
@@ -659,6 +705,7 @@ declare class CliDuCommandProcessor implements ICliCommandProcessor {
659
705
  required: boolean;
660
706
  type: "number";
661
707
  })[];
708
+ writeDescription(context: ICliExecutionContext): void;
662
709
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
663
710
  private parseArgs;
664
711
  /** File system of the running command (listing goes through access checks) */
@@ -670,7 +717,7 @@ declare class CliDuCommandProcessor implements ICliCommandProcessor {
670
717
  declare class CliLnCommandProcessor implements ICliCommandProcessor {
671
718
  command: string;
672
719
  description: string;
673
- author: _qodalis_cli_core.ICliCommandAuthor;
720
+ author: any;
674
721
  version: string;
675
722
  acceptsRawInput: boolean;
676
723
  valueRequired: boolean;
@@ -678,12 +725,20 @@ declare class CliLnCommandProcessor implements ICliCommandProcessor {
678
725
  icon: string;
679
726
  module: string;
680
727
  };
681
- parameters: {
728
+ parameters: ({
682
729
  name: string;
683
730
  description: string;
684
731
  required: boolean;
685
732
  type: "boolean";
686
- }[];
733
+ aliases?: undefined;
734
+ } | {
735
+ name: string;
736
+ aliases: string[];
737
+ description: string;
738
+ required: boolean;
739
+ type: "boolean";
740
+ })[];
741
+ writeDescription(context: ICliExecutionContext): void;
687
742
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
688
743
  private parseArgs;
689
744
  }
@@ -691,7 +746,7 @@ declare class CliLnCommandProcessor implements ICliCommandProcessor {
691
746
  declare class CliSedCommandProcessor implements ICliCommandProcessor {
692
747
  command: string;
693
748
  description: string;
694
- author: _qodalis_cli_core.ICliCommandAuthor;
749
+ author: any;
695
750
  version: string;
696
751
  acceptsRawInput: boolean;
697
752
  metadata: {
@@ -709,21 +764,41 @@ declare class CliSedCommandProcessor implements ICliCommandProcessor {
709
764
  aliases: string[];
710
765
  description: string;
711
766
  required: boolean;
712
- type: "string";
767
+ type: "array";
713
768
  })[];
769
+ writeDescription(context: ICliExecutionContext): void;
714
770
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
771
+ private writeLines;
772
+ /** Runs the script over the lines and returns the output lines. */
773
+ private run;
774
+ /** `&` is the match, `\1`..`\9` the groups, `\n` a newline, `\x` a literal x. */
775
+ private expandReplacement;
715
776
  private parseRawCommand;
716
777
  private tokenize;
717
- private parseExpression;
778
+ /** Commands of a script, separated by `;` or newlines. */
779
+ private parseScript;
780
+ private parseCommand;
718
781
  private parseAddress;
782
+ /**
783
+ * Text up to the next unescaped delimiter, escapes kept (an escaped
784
+ * delimiter becomes the plain character when it has no regex meaning).
785
+ */
786
+ private readDelimited;
787
+ /**
788
+ * Basic regular expressions use \( \) \{ \} \+ \? \| for groups and
789
+ * operators. When a pattern uses them (or never in -E mode), they are
790
+ * turned into the JavaScript form and the bare characters made literal.
791
+ */
792
+ private toJsRegex;
719
793
  private parseSubstitution;
720
794
  private addressMatches;
795
+ private singleMatches;
721
796
  }
722
797
 
723
798
  declare class CliAwkCommandProcessor implements ICliCommandProcessor {
724
799
  command: string;
725
800
  description: string;
726
- author: _qodalis_cli_core.ICliCommandAuthor;
801
+ author: any;
727
802
  version: string;
728
803
  acceptsRawInput: boolean;
729
804
  metadata: {
@@ -737,8 +812,16 @@ declare class CliAwkCommandProcessor implements ICliCommandProcessor {
737
812
  required: boolean;
738
813
  type: "string";
739
814
  }[];
815
+ writeDescription(context: ICliExecutionContext): void;
740
816
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
817
+ /**
818
+ * The program is the first operand, usually quoted. Unquoted, it may span
819
+ * several words (`awk {print $1} file`): it is then everything before the
820
+ * trailing operands that are existing files, or the whole value with
821
+ * piped input.
822
+ */
741
823
  private parseArgs;
824
+ private bracesBalanced;
742
825
  private parseProgram;
743
826
  private findMatchingBrace;
744
827
  private matchesPattern;
@@ -758,7 +841,7 @@ declare class CliAwkCommandProcessor implements ICliCommandProcessor {
758
841
  declare class CliDiffCommandProcessor implements ICliCommandProcessor {
759
842
  command: string;
760
843
  description: string;
761
- author: _qodalis_cli_core.ICliCommandAuthor;
844
+ author: any;
762
845
  version: string;
763
846
  acceptsRawInput: boolean;
764
847
  valueRequired: boolean;
@@ -773,6 +856,7 @@ declare class CliDiffCommandProcessor implements ICliCommandProcessor {
773
856
  required: boolean;
774
857
  type: "boolean";
775
858
  }[];
859
+ writeDescription(context: ICliExecutionContext): void;
776
860
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
777
861
  private linesEqual;
778
862
  private computeLCS;
@@ -784,7 +868,7 @@ declare class CliDiffCommandProcessor implements ICliCommandProcessor {
784
868
  declare class CliTeeCommandProcessor implements ICliCommandProcessor {
785
869
  command: string;
786
870
  description: string;
787
- author: _qodalis_cli_core.ICliCommandAuthor;
871
+ author: any;
788
872
  version: string;
789
873
  acceptsRawInput: boolean;
790
874
  valueRequired: boolean;
@@ -799,15 +883,15 @@ declare class CliTeeCommandProcessor implements ICliCommandProcessor {
799
883
  required: boolean;
800
884
  type: "boolean";
801
885
  }[];
886
+ writeDescription(context: ICliExecutionContext): void;
802
887
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
803
888
  private getAllPaths;
804
- private parseArgs;
805
889
  }
806
890
 
807
891
  declare class CliXargsCommandProcessor implements ICliCommandProcessor {
808
892
  command: string;
809
893
  description: string;
810
- author: _qodalis_cli_core.ICliCommandAuthor;
894
+ author: any;
811
895
  version: string;
812
896
  acceptsRawInput: boolean;
813
897
  valueRequired: boolean;
@@ -828,28 +912,24 @@ declare class CliXargsCommandProcessor implements ICliCommandProcessor {
828
912
  required: boolean;
829
913
  type: "number";
830
914
  })[];
915
+ writeDescription(context: ICliExecutionContext): void;
831
916
  processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
832
- private getAllNonFlagTokens;
833
917
  private escapeRegex;
834
- private parseArgs;
835
918
  }
836
919
 
837
920
  /**
838
921
  * Execute a script file containing CLI commands.
839
922
  *
840
- * Supported syntax inside scripts:
841
- * - One command per line (pipes, operators, redirects all work)
842
- * - `# comment` lines and blank lines are ignored
843
- * - `set -e` (default) — stop on first error
844
- * - `set +e` — continue on errors
845
- * - `VAR=value` — variable assignment (script-scoped)
846
- * - `$VAR` / `${VAR}` — variable substitution
923
+ * Scripts run through the engine's shell runner (`@qodalis/cli`
924
+ * `runScript`): commands, `;`, comments, `set -e`/`set +e`, `VAR=value`,
925
+ * `if`/`elif`/`else`/`fi`, `for`/`while`/`until` loops, `break`/`continue`,
926
+ * `exit`, and `test`/`[ ]` conditions.
847
927
  */
848
928
  declare class CliShCommandProcessor implements ICliCommandProcessor {
849
929
  command: string;
850
930
  aliases: string[];
851
931
  description: string;
852
- author: _qodalis_cli_core.ICliCommandAuthor;
932
+ author: any;
853
933
  version: string;
854
934
  acceptsRawInput: boolean;
855
935
  metadata: {
@@ -867,9 +947,8 @@ declare class CliShCommandProcessor implements ICliCommandProcessor {
867
947
  writeDescription(context: ICliExecutionContext): void;
868
948
  }
869
949
  /**
870
- * Parse and execute script content line by line.
871
- *
872
- * Exported so the executor can reuse it for `./script.sh` execution.
950
+ * Execute script content with the engine's shell runner (control flow,
951
+ * variables, `set -e`), the same one used for `./script.sh`.
873
952
  */
874
953
  declare function executeScript(content: string, context: ICliExecutionContext): Promise<void>;
875
954
 
@@ -1081,4 +1160,5 @@ interface ICliFilesModule extends ICliConfigurableModule<CliFilesModuleConfig> {
1081
1160
  }
1082
1161
  declare const filesModule: ICliFilesModule;
1083
1162
 
1084
- export { ANONYMOUS_OWNERSHIP, CliAwkCommandProcessor, CliBasenameCommandProcessor, CliCatCommandProcessor, CliCdCommandProcessor, CliChmodCommandProcessor, CliChownCommandProcessor, CliCpCommandProcessor, CliCutCommandProcessor, CliDiffCommandProcessor, CliDirnameCommandProcessor, CliDuCommandProcessor, CliEchoCommandProcessor, type CliFileAccessPolicy, type CliFilesModuleConfig, CliFilesPermissions, CliFindCommandProcessor, CliGrepCommandProcessor, CliHeadCommandProcessor, CliLnCommandProcessor, CliLsCommandProcessor, CliMkdirCommandProcessor, CliMvCommandProcessor, CliPasteCommandProcessor, CliPwdCommandProcessor, CliRmCommandProcessor, CliRmdirCommandProcessor, CliSedCommandProcessor, CliShCommandProcessor, CliSortCommandProcessor, CliStatCommandProcessor, CliTacCommandProcessor, CliTailCommandProcessor, CliTeeCommandProcessor, CliTouchCommandProcessor, CliTrCommandProcessor, CliTreeCommandProcessor, CliUniqCommandProcessor, CliWcCommandProcessor, CliXargsCommandProcessor, FilePathCompletionProvider, HOME_DIR_PERMISSIONS, type IFileNode, type IFileSystemService, IFileSystemService_TOKEN, IndexedDbFileSystemService, SYSTEM_OWNERSHIP, type ServerFileSystemOptions, ServerFileSystemService, VirtualFsFileTransferService, createFileAccessPolicy, executeScript, filesModule, followUserAccounts, followUserSession };
1163
+ export { ANONYMOUS_OWNERSHIP, CliAwkCommandProcessor, CliBasenameCommandProcessor, CliCatCommandProcessor, CliCdCommandProcessor, CliChmodCommandProcessor, CliChownCommandProcessor, CliCpCommandProcessor, CliCutCommandProcessor, CliDiffCommandProcessor, CliDirnameCommandProcessor, CliDuCommandProcessor, CliEchoCommandProcessor, CliFilesPermissions, CliFindCommandProcessor, CliGrepCommandProcessor, CliHeadCommandProcessor, CliLnCommandProcessor, CliLsCommandProcessor, CliMkdirCommandProcessor, CliMvCommandProcessor, CliPasteCommandProcessor, CliPwdCommandProcessor, CliRmCommandProcessor, CliRmdirCommandProcessor, CliSedCommandProcessor, CliShCommandProcessor, CliSortCommandProcessor, CliStatCommandProcessor, CliTacCommandProcessor, CliTailCommandProcessor, CliTeeCommandProcessor, CliTouchCommandProcessor, CliTrCommandProcessor, CliTreeCommandProcessor, CliUniqCommandProcessor, CliWcCommandProcessor, CliXargsCommandProcessor, FilePathCompletionProvider, HOME_DIR_PERMISSIONS, IFileSystemService_TOKEN, IndexedDbFileSystemService, SYSTEM_OWNERSHIP, ServerFileSystemService, VirtualFsFileTransferService, createFileAccessPolicy, executeScript, filesModule, followUserAccounts, followUserSession };
1164
+ export type { CliFileAccessPolicy, CliFilesModuleConfig, IFileNode, IFileSystemService, ServerFileSystemOptions };