@tomradex/shell 0.22.0 → 0.23.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/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Context } from "cordis";
2
2
  import { z } from "zod";
3
3
  import type { SettingsSection } from "@tomradex/settings";
4
4
  export { OutputBuffer, describeResult, findBash, orphanSweep, plain, runShell, type ShellResult, type ShellRun } from "./run.js";
5
- export type Approval = "ask" | "auto" | "off";
5
+ export type Approval = "ask" | "checks" | "auto" | "off";
6
6
  export interface ShellSettings {
7
7
  approval: Approval;
8
8
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The command's words, when it is one plain command: no pipe, redirection, chaining, substitution, expansion,
3
+ * escape or newline anywhere — quotes only group words. null otherwise, and then it is asked about.
4
+ */
5
+ export declare function plainWords(command: string): string[] | null;
6
+ /** Whether a command only reads inside its folder, or runs one of the project's own check scripts (`scripts` from its package.json). */
7
+ export declare function isQuietCommand(command: string, scripts: ReadonlySet<string>): boolean;
8
+ /** The scripts the folder's package.json names; none when it has none. */
9
+ export declare function scriptsOf(cwd: string): Set<string>;
10
+ /**
11
+ * Whether the folder is a ticket's own copy: a linked worktree, not a repository's main checkout, whose
12
+ * top is the folder itself and whose branch is the one the ticket's conversation works on.
13
+ */
14
+ export declare function isTicketCopy(cwd: string, branch: string): Promise<boolean>;
15
+ //# sourceMappingURL=quiet.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/shell",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "type": "module",
5
5
  "author": "Haoyuan Tang",
6
6
  "engines": {
@@ -27,10 +27,10 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@tomradex/contracts": "0.22.0",
31
- "@tomradex/domain": "0.2.29",
32
- "@tomradex/settings": "0.22.0",
33
- "@tomradex/tools": "0.22.0",
30
+ "@tomradex/contracts": "0.23.1",
31
+ "@tomradex/domain": "0.2.30",
32
+ "@tomradex/settings": "0.23.1",
33
+ "@tomradex/tools": "0.23.1",
34
34
  "cordis": "4.0.0-rc.8",
35
35
  "zod": "^4.4.3"
36
36
  }