@cmodjs/core 6.1.1 → 6.2.1

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/docs/commands.md CHANGED
@@ -25,7 +25,7 @@ Creates a mod in `./<name>`: a `defineMod` with one listener, a Sidebar page, a
25
25
  cmod link [path] [--option key=value]...
26
26
  ```
27
27
 
28
- Loads the checkout at `path` (default: the current folder) in every Claude Code session, the running ones too, in place of the installed mod. Installs the cmod plugin when Claude Code lacks it, unless the checkout is cmod itself. Then installs the checkout's packages, builds the program `cli/` declares and links it into cmod's programs folder and `~/.local/bin`, and runs the checkout's install step.
28
+ Loads the checkout at `path` (default: the current folder) in every Claude Code session, the running ones too, in place of the installed mod. Installs the cmod plugin when Claude Code lacks it, unless the checkout is cmod itself. Then installs the checkout's packages, builds the program `cli/` declares and links it into cmod's programs folder and `~/.local/bin`, and runs the checkout's install step. The build is `bin/<program>/<version>/<program>.linked` in the cmod store, beside the released program of the installed copy, which it never replaces.
29
29
 
30
30
  It loads the checkout through a marketplace cmod keeps in the checkout's parent folder:
31
31
 
@@ -44,7 +44,7 @@ It refuses a parent folder whose `.claude-plugin/marketplace.json` cmod did not
44
44
  cmod unlink [path]
45
45
  ```
46
46
 
47
- Stops loading the checkout at `path` (default: the current folder) in every Claude Code session. Uninstalls it through Claude Code and takes it out of the marketplace in its parent folder. Once that marketplace lists no checkout, it uninstalls the cmod plugin the marketplace installed, removes the marketplace and its declaration in `<parent>/.claude/settings.local.json` from Claude Code, and deletes its file and its line in `.git/info/exclude`. The line for `settings.local.json` stays while that file does, because Claude Code leaves it behind, empty. Then it turns back on the copy of the mod `cmod link` turned off, removes the program `cmod link` built, with its links, and sets up the copy of the mod Claude Code still has, which keeps the mod's data and secrets. Only when Claude Code has no other copy does it run the checkout's uninstall step and remove what cmod set up.
47
+ Stops loading the checkout at `path` (default: the current folder) in every Claude Code session. Uninstalls it through Claude Code and takes it out of the marketplace in its parent folder. Once that marketplace lists no checkout, it uninstalls the cmod plugin the marketplace installed, removes the marketplace and its declaration in `<parent>/.claude/settings.local.json` from Claude Code, and deletes its file and its line in `.git/info/exclude`. The line for `settings.local.json` stays while that file does, because Claude Code leaves it behind, empty. Then it turns back on the copy of the mod `cmod link` turned off and sets up the copy of the mod Claude Code still has, which keeps the mod's data and secrets and links the released program that copy already has, with no download, then deletes the program `cmod link` built. Only when Claude Code has no other copy does it run the checkout's uninstall step and remove what cmod set up.
48
48
 
49
49
  ### cmod check
50
50
 
package/docs/mod.md CHANGED
@@ -594,7 +594,7 @@ export const myMod = defineMod({
594
594
  parseShell(line: string): ParsedShell
595
595
 
596
596
  type ParsedShell = { commands: ShellCommand[]; reads: string[]; writes: string[]; fetches: string[]; isFullyParsed: boolean }
597
- type ShellCommand = { argv: [string, ...string[]]; folder: string; input?: number }
597
+ type ShellCommand = { argv: [string, ...string[]]; folder: string; input?: number; runner?: number }
598
598
 
599
599
  resolve(...paths): string join(...paths): string dirname(path): string basename(path, suffix?): string
600
600
  extname(path): string relative(from, to): string isAbsolute(path): boolean normalize(path): string
@@ -603,7 +603,8 @@ extname(path): string relative(from, to): string isAbsolute(path): bool
603
603
  - `commands` lists every command the line runs, those inside `sudo`, `bash -c`, `$(…)`, and heredocs included, with flags such as `-rf` split into `-r` and `-f`.
604
604
  - `folder` is where a command runs, as the line wrote it: `''` for the folder the line starts in, `src` after `cd src`, `/tmp` after `cd /tmp`, and `~/p` after `cd ~/p`. `resolve(call.cwd, folder)` makes it absolute.
605
605
  - `input` is the index in `commands` of the command whose output this one reads through `|` or `|&`, and is absent for a command that reads no pipe. `trace read a.ts | head -5` gives `head` the `input` `0`. A wrapper such as `timeout 5 trace read a.ts` writes the output of the command it runs, so `input` names `trace`, not `timeout`.
606
- - `reads`, `writes`, and `fetches` are the paths and URLs the commands name, as written. A path that holds a shell expansion makes `isFullyParsed` false, and so does a line the parser cannot read.
606
+ - `runner` is the index in `commands` of the command that runs this one, such as `sudo`, `xargs`, `find -exec`, or `bash -c`, and is absent for a command the line's own shell runs, `$(…)` and `( … )` included. `sudo rm x` gives `rm` the `runner` `0`, and in `sudo bash -c 'rm x'` the runners chain from `rm` to `bash` to `sudo`.
607
+ - `reads`, `writes`, and `fetches` are the paths and URLs the commands name, as written. A `{}` in a `find -exec` action stands for each start path of the `find`, so `find build -exec rm {} +` writes `build`, as `find build -delete` does, while its `argv` keeps `{}`. A path that holds a shell expansion makes `isFullyParsed` false, and so does a line the parser cannot read.
607
608
  - `resolve` has no working folder to start from in Claude Code, so pass an absolute folder first, such as `resolve(sessions.current.cwd, path)`.
608
609
 
609
610
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmodjs/core",
3
- "version": "6.1.1",
3
+ "version": "6.2.1",
4
4
  "description": "Build Claude Code mods: hooks, panes, checks, and an install that just works.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/records.d.ts CHANGED
@@ -59,6 +59,8 @@ export declare const pluginName: RegExp;
59
59
  export declare function storeFolder(env: Record<string, string | undefined>): string;
60
60
  export declare function recordPath(store: string, name: string): string;
61
61
  export declare function programPath(store: string, program: string, version: string): string;
62
+ export declare function linkedProgramPath(store: string, program: string, version: string): string;
63
+ export declare function programModifiedMs(modifiedMs: (path: string) => Promise<number | undefined>, store: string, record: InstallRecord): Promise<number | undefined>;
62
64
  export declare function isProgramNewer(record: InstallRecord, programModifiedMs: number | undefined): boolean;
63
65
  export declare function readCmodVersion(files: {
64
66
  list: (folder: string) => Promise<readonly string[]>;
@@ -174,7 +176,7 @@ export declare function newestLog(entries: readonly LogEntry[]): LogEntry[];
174
176
  export declare function versionsLine({ mod, core, cmod, program, claudeCode }: LogVersions): string;
175
177
  export declare function logReport(entry: LogEntry): string;
176
178
  export declare function parseConsent(value: unknown, path: string): Record<string, string[]>;
177
- export declare const coreVersion = "6.1.1";
179
+ export declare const coreVersion = "6.2.1";
178
180
  export declare const oldestCmodVersion = "6.1.0";
179
181
  export declare function hotkeyCommand(mod: string, hotkey: string): string;
180
182
  export declare function hotkeyBindings(mod: string, hotkeys: Hotkeys | undefined): Record<string, string>;
package/records.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["src/records.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAG1E,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACtC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IACrC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnF,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAChC,CAAA;AAiBD,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,C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KAAK;IAEtC,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,SAAS;IACjB,QAAQ;IACR,MAAM;;;IACN,MAAM;QAAI,UAAU;QAAQ,WAAW;;EAE1C;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAMrD;AAMD,wBAAsB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BzI;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAiBtD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAiBpD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAQnE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
package/records.js CHANGED
@@ -29,6 +29,16 @@ export function recordPath(store, name) {
29
29
  export function programPath(store, program, version) {
30
30
  return `${store}/bin/${checkedName(program)}/${version}/${program}`;
31
31
  }
32
+ export function linkedProgramPath(store, program, version) {
33
+ return `${programPath(store, program, version)}.linked`;
34
+ }
35
+ export async function programModifiedMs(modifiedMs, store, record) {
36
+ if (record.program === null)
37
+ return undefined;
38
+ const times = await Promise.all([programPath(store, record.program, record.version), linkedProgramPath(store, record.program, record.version)].map(modifiedMs));
39
+ const found = times.filter((time) => time !== undefined);
40
+ return found.length === 0 ? undefined : Math.max(...found);
41
+ }
32
42
  export function isProgramNewer(record, programModifiedMs) {
33
43
  return record.program !== null && (programModifiedMs === undefined || programModifiedMs > Date.parse(record.installedAt));
34
44
  }
@@ -37,7 +47,7 @@ export async function readCmodVersion(files, store) {
37
47
  return undefined;
38
48
  const newestFirst = (await files.list(`${store}/bin/cmod`)).filter((name) => releaseVersion.test(name)).toSorted((one, other) => (isAtLeast(one, other) ? -1 : 1));
39
49
  for (const version of newestFirst)
40
- if (await files.exists(programPath(store, 'cmod', version)))
50
+ if ((await files.exists(programPath(store, 'cmod', version))) || (await files.exists(linkedProgramPath(store, 'cmod', version))))
41
51
  return version;
42
52
  return undefined;
43
53
  }
@@ -378,7 +388,7 @@ function readHotkeys(hotkeys) {
378
388
  throw new Error(`package.json "cmod.hotkeys" is not a map of hotkeys to their title and optional default combo. ${fix}`);
379
389
  return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys) };
380
390
  }
381
- export const coreVersion = '6.1.1';
391
+ export const coreVersion = '6.2.1';
382
392
  export const oldestCmodVersion = '6.1.0';
383
393
  export function hotkeyCommand(mod, hotkey) {
384
394
  return `${mod}--${hotkey}`;
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../src/runtime/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAqB,WAAW,EAAE,MAAM,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAA;AAG5H,OAAO,KAAK,EAAW,GAAG,EAAE,aAAa,EAA8G,MAAM,WAAW,CAAA;AACxK,OAAO,KAAK,EAAE,OAAO,EAAgB,MAAM,eAAe,CAAA;AAC1D,OAAO,EAA2O,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAGnR,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIvD,OAAO,EAA6F,KAAK,WAAW,EAAE,MAAM,YAAY,CAAA;AACxI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAM7D,OAAO,EAA2B,KAAK,MAAM,EAAE,KA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IACtE,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAChE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAA;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;CACjD,KAAK,UAAU,CAAA;AA2DhB,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBhE;AAwBD,wBAAgB,eAAe,CAAC,KAAK,SAAS,MAAM,EAAE,QAAQ,SAAS,OAAO,GAAG,OAAO,EACtF,UAAU,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAClD,gBAAgB,GAAE,MAAM,gBAAgB,GAAG,SAA2B,EACtE,OAAO,GAAE,aAAkB,EAC3B,UAAU,UAAO,EACjB,eAAe,CAAC,EAAE,eAAe,GAChC,SAAS,CAAC,KAAK,CAAC,CAskBlB"}
@@ -1,4 +1,4 @@
1
- import { dataFolder, finishStepsMethod, isAtLeast, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programPath, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, storeFolder } from '../records.js';
1
+ import { dataFolder, finishStepsMethod, isAtLeast, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programModifiedMs, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, storeFolder } from '../records.js';
2
2
  import { homePrefix, ifMissing, relativePath } from '../utils/paths.js';
3
3
  import { firstLine, formatExit, messageOf } from '../utils/text.js';
4
4
  import { beforeDeadline, hookMs, settledAfterAbort } from './deadline.js';
@@ -68,8 +68,8 @@ export async function readPlugin(claude) {
68
68
  if (version === undefined || record?.scriptsSha256 !== scripts)
69
69
  return { ...plugin, isInstalled: false, shouldRecord: false };
70
70
  const isInstalled = record.version === version || record.root === root;
71
- const programModifiedMs = record.program === null ? undefined : (await claude.fs.stat(programPath(store, record.program, record.version)).catch(ifMissing(undefined)))?.mtimeMs;
72
- return { ...plugin, isInstalled, shouldRecord: isInstalled && (record.version !== version || isProgramNewer(record, programModifiedMs)) };
71
+ const modifiedMs = await programModifiedMs(async (path) => (await claude.fs.stat(path).catch(ifMissing(undefined)))?.mtimeMs, store, record);
72
+ return { ...plugin, isInstalled, shouldRecord: isInstalled && (record.version !== version || isProgramNewer(record, modifiedMs)) };
73
73
  }
74
74
  async function filesBelow(claude, folder) {
75
75
  const entries = await claude.fs.list(folder);
package/src/records.ts CHANGED
@@ -70,6 +70,17 @@ export function programPath(store: string, program: string, version: string): st
70
70
  return `${store}/bin/${checkedName(program)}/${version}/${program}`
71
71
  }
72
72
 
73
+ export function linkedProgramPath(store: string, program: string, version: string): string {
74
+ return `${programPath(store, program, version)}.linked`
75
+ }
76
+
77
+ export async function programModifiedMs(modifiedMs: (path: string) => Promise<number | undefined>, store: string, record: InstallRecord): Promise<number | undefined> {
78
+ if (record.program === null) return undefined
79
+ const times = await Promise.all([programPath(store, record.program, record.version), linkedProgramPath(store, record.program, record.version)].map(modifiedMs))
80
+ const found = times.filter((time): time is number => time !== undefined)
81
+ return found.length === 0 ? undefined : Math.max(...found)
82
+ }
83
+
73
84
  export function isProgramNewer(record: InstallRecord, programModifiedMs: number | undefined): boolean {
74
85
  return record.program !== null && (programModifiedMs === undefined || programModifiedMs > Date.parse(record.installedAt))
75
86
  }
@@ -77,7 +88,7 @@ export function isProgramNewer(record: InstallRecord, programModifiedMs: number
77
88
  export async function readCmodVersion(files: { list: (folder: string) => Promise<readonly string[]>; exists: (path: string) => Promise<boolean> }, store: string): Promise<string | undefined> {
78
89
  if (!(await files.exists(`${store}/programs/cmod`))) return undefined
79
90
  const newestFirst = (await files.list(`${store}/bin/cmod`)).filter((name) => releaseVersion.test(name)).toSorted((one, other) => (isAtLeast(one, other) ? -1 : 1))
80
- for (const version of newestFirst) if (await files.exists(programPath(store, 'cmod', version))) return version
91
+ for (const version of newestFirst) if ((await files.exists(programPath(store, 'cmod', version))) || (await files.exists(linkedProgramPath(store, 'cmod', version)))) return version
81
92
  return undefined
82
93
  }
83
94
 
@@ -458,7 +469,7 @@ function readHotkeys(hotkeys: unknown): Steps {
458
469
  return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys as Record<string, HotkeyInit>) }
459
470
  }
460
471
 
461
- export const coreVersion = '6.1.1'
472
+ export const coreVersion = '6.2.1'
462
473
 
463
474
  export const oldestCmodVersion = '6.1.0'
464
475
 
@@ -3,7 +3,7 @@ import type { Step } from '../installer.js'
3
3
 
4
4
  import type { Imports, Mod, ModDefinition, Reservation, SettingsFile, SettingsFileChange, SettingsFileChangeListener, Subscription, Timer as ModTimer } from '../mod.js'
5
5
  import type { Options, OptionValues } from '../options.js'
6
- import { dataFolder, finishStepsMethod, isAtLeast, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programPath, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, storeFolder, type ReadFile, type RunnerEvent, type Steps } from '../records.js'
6
+ import { dataFolder, finishStepsMethod, isAtLeast, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programModifiedMs, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, storeFolder, type ReadFile, type RunnerEvent, type Steps } from '../records.js'
7
7
  import { homePrefix, ifMissing, relativePath } from '../utils/paths.js'
8
8
  import { firstLine, formatExit, messageOf } from '../utils/text.js'
9
9
  import type { Claude } from './claude.js'
@@ -160,8 +160,8 @@ export async function readPlugin(claude: Claude): Promise<Plugin> {
160
160
  })
161
161
  if (version === undefined || record?.scriptsSha256 !== scripts) return { ...plugin, isInstalled: false, shouldRecord: false }
162
162
  const isInstalled = record.version === version || record.root === root
163
- const programModifiedMs = record.program === null ? undefined : (await claude.fs.stat(programPath(store, record.program, record.version)).catch(ifMissing(undefined)))?.mtimeMs
164
- return { ...plugin, isInstalled, shouldRecord: isInstalled && (record.version !== version || isProgramNewer(record, programModifiedMs)) }
163
+ const modifiedMs = await programModifiedMs(async (path) => (await claude.fs.stat(path).catch(ifMissing(undefined)))?.mtimeMs, store, record)
164
+ return { ...plugin, isInstalled, shouldRecord: isInstalled && (record.version !== version || isProgramNewer(record, modifiedMs)) }
165
165
  }
166
166
 
167
167
  async function filesBelow(claude: Claude, folder: string): Promise<string[]> {
@@ -1,6 +1,6 @@
1
1
  import { basename, parse, type GlobPattern, type ParseEntry } from '../vendor.js'
2
2
 
3
- export type ShellCommand = { argv: [string, ...string[]]; folder: string; input?: number }
3
+ export type ShellCommand = { argv: [string, ...string[]]; folder: string; input?: number; runner?: number }
4
4
 
5
5
  export type ParsedShell = {
6
6
  commands: ShellCommand[]
@@ -582,8 +582,9 @@ function addCommand(first: Word, args: Word[], folder: string, stdin: Stdin | un
582
582
  else if (wrappers.has(program)) addWrapper(first, program, args, folder, stdin, result)
583
583
  else {
584
584
  const flags = expandFlags(program, args)
585
- result.commands.push({ argv: [first.text, ...flags], folder })
585
+ const runner = result.commands.push({ argv: [first.text, ...flags], folder }) - 1
586
586
  addEffects(program, args, flags, folder, stdin, result)
587
+ runBy(runner, result)
587
588
  if (program === 'cd') return changedFolder(args, folder)
588
589
  }
589
590
  return undefined
@@ -613,13 +614,35 @@ function addFind(first: Word, args: Word[], folder: string, result: ParsedShell)
613
614
  actions.push(args.slice(index + 1, end < 0 ? args.length : end))
614
615
  index = end < 0 ? args.length : end
615
616
  }
616
- result.commands.push({ argv: [first.text, ...own], folder })
617
- if (own.includes('-delete')) for (const start of findStarts(args)) addPath(result, 'writes', start, folder)
618
- for (const [actionFirst, ...actionArgs] of actions) {
619
- if (actionFirst !== undefined) addCommand(actionFirst, actionArgs, folder, undefined, result)
617
+ const runner = result.commands.push({ argv: [first.text, ...own], folder }) - 1
618
+ const starts = findStarts(args)
619
+ if (own.includes('-delete')) for (const start of starts) addPath(result, 'writes', start, folder)
620
+ for (const action of actions) addFindAction(action, starts, folder, result)
621
+ runBy(runner, result)
622
+ }
623
+
624
+ function addFindAction(action: Word[], starts: Word[], folder: string, result: ParsedShell): void {
625
+ const [first, ...args] = action
626
+ if (first === undefined) return
627
+ const reads = result.reads.length
628
+ const writes = result.writes.length
629
+ addCommand(first, args, folder, undefined, result)
630
+ if (!action.some((word) => word.text.includes('{}'))) return
631
+ result.reads.splice(reads)
632
+ result.writes.splice(writes)
633
+ for (const start of starts) {
634
+ const found: ParsedShell = { commands: [], reads: result.reads, writes: result.writes, fetches: [], isFullyParsed: true }
635
+ const [foundFirst, ...foundArgs] = action.map((word) => foundWord(word, start))
636
+ addCommand(foundFirst!, foundArgs, folder, undefined, found)
637
+ if (!found.isFullyParsed) result.isFullyParsed = false
620
638
  }
621
639
  }
622
640
 
641
+ function foundWord(word: Word, start: Word): Word {
642
+ if (!word.text.includes('{}')) return word
643
+ return { text: word.text.replaceAll('{}', start.text), isGlob: word.isGlob || start.isGlob, isDynamic: word.isDynamic || start.isDynamic }
644
+ }
645
+
623
646
  function findStarts(args: Word[]): Word[] {
624
647
  let index = 0
625
648
  for (let text = args[0]?.text; text === '-D' || /^-([HLP]|O\d*)$/.test(text ?? ''); text = args[index]?.text) index += text === '-D' ? 2 : 1
@@ -637,18 +660,20 @@ function addWrapper(first: Word, program: string, args: Word[], folder: string,
637
660
  start += wrapper.leadingOperands ?? 0
638
661
  while (wrapper.takesAssignments === true && assignmentPattern.test(args[start]?.text ?? '')) start += 1
639
662
  const hasTrailingCode = wrapper.codeOptions?.includes(args[start]?.text ?? '') === true
640
- result.commands.push({ argv: [first.text, ...expandFlags(program, args.slice(0, start))], folder })
663
+ const runner = result.commands.push({ argv: [first.text, ...expandFlags(program, args.slice(0, start))], folder }) - 1
641
664
  const innerFolder = options.findLast((option) => wrapper.folderOptions?.includes(option.name) === true)?.value
642
665
  const wrappedFolder = innerFolder === undefined ? folder : joinFolder(folder, innerFolder.text)
643
666
  const code = hasTrailingCode ? args[start + 1] : options.findLast((option) => wrapper.codeOptions?.includes(option.name) === true)?.value
644
667
  const rest = args.slice(hasTrailingCode ? start + 2 : start)
645
668
  const isShell = wrapper.shellUnless !== undefined && !options.some((option) => wrapper.shellUnless?.includes(option.name) === true)
646
- if (code !== undefined || isShell) {
647
- parseLine([...(code === undefined ? [] : [code]), ...rest].map((word) => word.text).join(' '), wrappedFolder, result)
648
- return
649
- }
650
669
  const [innerFirst, ...innerArgs] = rest
651
- if (innerFirst !== undefined) addCommand(innerFirst, innerArgs, wrappedFolder, stdin, result)
670
+ if (code !== undefined || isShell) parseLine([...(code === undefined ? [] : [code]), ...rest].map((word) => word.text).join(' '), wrappedFolder, result)
671
+ else if (innerFirst !== undefined) addCommand(innerFirst, innerArgs, wrappedFolder, stdin, result)
672
+ runBy(runner, result)
673
+ }
674
+
675
+ function runBy(runner: number, result: ParsedShell): void {
676
+ for (const command of result.commands.slice(runner + 1)) command.runner ??= runner
652
677
  }
653
678
 
654
679
  function addEffects(program: string, args: Word[], flags: string[], folder: string, stdin: Stdin | undefined, result: ParsedShell): void {
@@ -2,6 +2,7 @@ export type ShellCommand = {
2
2
  argv: [string, ...string[]];
3
3
  folder: string;
4
4
  input?: number;
5
+ runner?: number;
5
6
  };
6
7
  export type ParsedShell = {
7
8
  commands: ShellCommand[];
@@ -1 +1 @@
1
- {"version":3,"file":"parse-shell.d.ts","sourceRoot":"","sources":["../src/utils/parse-shell.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1F,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AA4BD,eAAO,MAAM,cAAc,QAAS,CAAA;AAiKpC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAIpD"}
1
+ {"version":3,"file":"parse-shell.d.ts","sourceRoot":"","sources":["../src/utils/parse-shell.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3G,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AA4BD,eAAO,MAAM,cAAc,QAAS,CAAA;AAiKpC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAIpD"}
@@ -586,8 +586,9 @@ function addCommand(first, args, folder, stdin, result) {
586
586
  addWrapper(first, program, args, folder, stdin, result);
587
587
  else {
588
588
  const flags = expandFlags(program, args);
589
- result.commands.push({ argv: [first.text, ...flags], folder });
589
+ const runner = result.commands.push({ argv: [first.text, ...flags], folder }) - 1;
590
590
  addEffects(program, args, flags, folder, stdin, result);
591
+ runBy(runner, result);
591
592
  if (program === 'cd')
592
593
  return changedFolder(args, folder);
593
594
  }
@@ -618,15 +619,39 @@ function addFind(first, args, folder, result) {
618
619
  actions.push(args.slice(index + 1, end < 0 ? args.length : end));
619
620
  index = end < 0 ? args.length : end;
620
621
  }
621
- result.commands.push({ argv: [first.text, ...own], folder });
622
+ const runner = result.commands.push({ argv: [first.text, ...own], folder }) - 1;
623
+ const starts = findStarts(args);
622
624
  if (own.includes('-delete'))
623
- for (const start of findStarts(args))
625
+ for (const start of starts)
624
626
  addPath(result, 'writes', start, folder);
625
- for (const [actionFirst, ...actionArgs] of actions) {
626
- if (actionFirst !== undefined)
627
- addCommand(actionFirst, actionArgs, folder, undefined, result);
627
+ for (const action of actions)
628
+ addFindAction(action, starts, folder, result);
629
+ runBy(runner, result);
630
+ }
631
+ function addFindAction(action, starts, folder, result) {
632
+ const [first, ...args] = action;
633
+ if (first === undefined)
634
+ return;
635
+ const reads = result.reads.length;
636
+ const writes = result.writes.length;
637
+ addCommand(first, args, folder, undefined, result);
638
+ if (!action.some((word) => word.text.includes('{}')))
639
+ return;
640
+ result.reads.splice(reads);
641
+ result.writes.splice(writes);
642
+ for (const start of starts) {
643
+ const found = { commands: [], reads: result.reads, writes: result.writes, fetches: [], isFullyParsed: true };
644
+ const [foundFirst, ...foundArgs] = action.map((word) => foundWord(word, start));
645
+ addCommand(foundFirst, foundArgs, folder, undefined, found);
646
+ if (!found.isFullyParsed)
647
+ result.isFullyParsed = false;
628
648
  }
629
649
  }
650
+ function foundWord(word, start) {
651
+ if (!word.text.includes('{}'))
652
+ return word;
653
+ return { text: word.text.replaceAll('{}', start.text), isGlob: word.isGlob || start.isGlob, isDynamic: word.isDynamic || start.isDynamic };
654
+ }
630
655
  function findStarts(args) {
631
656
  let index = 0;
632
657
  for (let text = args[0]?.text; text === '-D' || /^-([HLP]|O\d*)$/.test(text ?? ''); text = args[index]?.text)
@@ -647,19 +672,22 @@ function addWrapper(first, program, args, folder, stdin, result) {
647
672
  while (wrapper.takesAssignments === true && assignmentPattern.test(args[start]?.text ?? ''))
648
673
  start += 1;
649
674
  const hasTrailingCode = wrapper.codeOptions?.includes(args[start]?.text ?? '') === true;
650
- result.commands.push({ argv: [first.text, ...expandFlags(program, args.slice(0, start))], folder });
675
+ const runner = result.commands.push({ argv: [first.text, ...expandFlags(program, args.slice(0, start))], folder }) - 1;
651
676
  const innerFolder = options.findLast((option) => wrapper.folderOptions?.includes(option.name) === true)?.value;
652
677
  const wrappedFolder = innerFolder === undefined ? folder : joinFolder(folder, innerFolder.text);
653
678
  const code = hasTrailingCode ? args[start + 1] : options.findLast((option) => wrapper.codeOptions?.includes(option.name) === true)?.value;
654
679
  const rest = args.slice(hasTrailingCode ? start + 2 : start);
655
680
  const isShell = wrapper.shellUnless !== undefined && !options.some((option) => wrapper.shellUnless?.includes(option.name) === true);
656
- if (code !== undefined || isShell) {
657
- parseLine([...(code === undefined ? [] : [code]), ...rest].map((word) => word.text).join(' '), wrappedFolder, result);
658
- return;
659
- }
660
681
  const [innerFirst, ...innerArgs] = rest;
661
- if (innerFirst !== undefined)
682
+ if (code !== undefined || isShell)
683
+ parseLine([...(code === undefined ? [] : [code]), ...rest].map((word) => word.text).join(' '), wrappedFolder, result);
684
+ else if (innerFirst !== undefined)
662
685
  addCommand(innerFirst, innerArgs, wrappedFolder, stdin, result);
686
+ runBy(runner, result);
687
+ }
688
+ function runBy(runner, result) {
689
+ for (const command of result.commands.slice(runner + 1))
690
+ command.runner ??= runner;
663
691
  }
664
692
  function addEffects(program, args, flags, folder, stdin, result) {
665
693
  const fileProgram = fileReaders.get(program);