@zinn-dev/cli 0.40.0 → 0.42.0

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 (84) hide show
  1. package/README.md +11 -561
  2. package/index.js +24 -13
  3. package/package.json +8 -2
  4. package/skills/zinn/SKILL.md +63 -0
  5. package/src/actor.d.ts +2 -1
  6. package/src/actor.js +78 -11
  7. package/src/capabilities-schema.d.ts +162 -0
  8. package/src/capabilities-schema.js +59 -0
  9. package/src/capabilities.d.ts +29 -0
  10. package/src/capabilities.js +30 -0
  11. package/src/column-hint.d.ts +3 -0
  12. package/src/column-hint.js +225 -0
  13. package/src/database.d.ts +1 -1
  14. package/src/database.js +5 -8
  15. package/src/errors.d.ts +158 -0
  16. package/src/errors.js +226 -0
  17. package/src/input.d.ts +227 -0
  18. package/src/input.js +192 -0
  19. package/src/lib.d.ts +71 -8
  20. package/src/lib.js +275 -18
  21. package/src/presentation/activity-presentation.d.ts +9 -1
  22. package/src/presentation/activity-presentation.js +120 -23
  23. package/src/presentation/capabilities-presentation.d.ts +2 -0
  24. package/src/presentation/capabilities-presentation.js +3 -0
  25. package/src/presentation/column-presentation.d.ts +9 -5
  26. package/src/presentation/column-presentation.js +10 -0
  27. package/src/presentation/comment-presentation.d.ts +15 -0
  28. package/src/presentation/comment-presentation.js +29 -0
  29. package/src/presentation/description-presentation.d.ts +17 -0
  30. package/src/presentation/description-presentation.js +26 -4
  31. package/src/presentation/info-presentation.d.ts +4 -0
  32. package/src/presentation/info-presentation.js +96 -0
  33. package/src/presentation/label-presentation.d.ts +8 -0
  34. package/src/presentation/label-presentation.js +28 -0
  35. package/src/presentation/project-presentation.d.ts +7 -0
  36. package/src/presentation/project-presentation.js +19 -0
  37. package/src/presentation/relation-presentation.d.ts +7 -0
  38. package/src/presentation/relation-presentation.js +73 -0
  39. package/src/presentation/task-presentation.d.ts +4 -12
  40. package/src/presentation/task-presentation.js +22 -18
  41. package/src/project.d.ts +18 -3
  42. package/src/project.js +37 -12
  43. package/src/result-schemas.d.ts +1194 -0
  44. package/src/result-schemas.js +279 -0
  45. package/src/results.d.ts +40 -0
  46. package/src/results.js +36 -0
  47. package/src/routes/activity-router.d.ts +104 -0
  48. package/src/routes/activity-router.js +155 -34
  49. package/src/routes/aliases.d.ts +2 -0
  50. package/src/routes/aliases.js +11 -0
  51. package/src/routes/backup-router.d.ts +17 -0
  52. package/src/routes/backup-router.js +15 -3
  53. package/src/routes/capabilities-router.d.ts +21 -0
  54. package/src/routes/capabilities-router.js +34 -0
  55. package/src/routes/comment-router.d.ts +210 -8
  56. package/src/routes/comment-router.js +189 -65
  57. package/src/routes/info-router.d.ts +21 -0
  58. package/src/routes/info-router.js +29 -0
  59. package/src/routes/label-router.d.ts +217 -2
  60. package/src/routes/label-router.js +189 -62
  61. package/src/routes/migrate-router.d.ts +17 -0
  62. package/src/routes/migrate-router.js +17 -5
  63. package/src/routes/project-router.d.ts +373 -2
  64. package/src/routes/project-router.js +322 -132
  65. package/src/routes/reindex-router.d.ts +17 -0
  66. package/src/routes/reindex-router.js +15 -3
  67. package/src/routes/relation-router.d.ts +110 -14
  68. package/src/routes/relation-router.js +122 -79
  69. package/src/routes/restore-router.d.ts +29 -0
  70. package/src/routes/restore-router.js +31 -14
  71. package/src/routes/router.d.ts +1 -1
  72. package/src/routes/router.js +80 -32
  73. package/src/routes/routes.d.ts +1781 -8
  74. package/src/routes/routes.js +9 -1
  75. package/src/routes/task-router.d.ts +946 -4
  76. package/src/routes/task-router.js +524 -260
  77. package/src/routes/whoami-router.d.ts +21 -0
  78. package/src/routes/whoami-router.js +31 -0
  79. package/src/text-edit.d.ts +28 -6
  80. package/src/text-edit.js +40 -23
  81. package/src/text-input.d.ts +47 -0
  82. package/src/text-input.js +187 -0
  83. package/src/types.d.ts +37 -0
  84. package/src/types.js +9 -1
@@ -1,119 +1,243 @@
1
+ import { jsonResult } from "../results.js";
1
2
  import { parseArgs } from "node:util";
2
3
  import { comment } from "@zinn-dev/core";
3
- import { confirmAction, output, quit, validatePositionals, validateUniqueOptions, } from "../lib.js";
4
- import { resolveTextEdit, textEditHelp, textEditOptions, textEditUsage } from "../text-edit.js";
4
+ import { generateCommandUsage, getOptionInputs, taskKeyPositional, violatesConstraint, } from "../input.js";
5
+ import { confirmationDescription, confirmAction, dashValueHelp, output, outputChanges, quit, renameFlag, validatePositionals, validateUniqueOptions, } from "../lib.js";
6
+ import { resolveTextEdit, textEditHelp, textEditOptions, textEditConstraints, } from "../text-edit.js";
7
+ import { resolveTextInput, textFileHelp, textFileOption, textSourceConstraint, } from "../text-input.js";
5
8
  import { currentActor } from "../actor.js";
6
- import { formatRows } from "../presentation/row-layout.js";
7
- import { formatLocalTime } from "../presentation/time.js";
8
- function presentComment(commentMatch) {
9
- return {
10
- key: commentMatch.key,
11
- text: commentMatch.text,
12
- created_at: commentMatch.created_at,
13
- updated_at: commentMatch.updated_at,
14
- };
15
- }
16
- export function presentComments(taskKey) {
17
- return comment.getAll(taskKey).map(presentComment);
18
- }
19
- function commentRow(commentMatch, options) {
20
- const createdAtCells = options.showsCreatedAt
21
- ? [{ text: formatLocalTime(commentMatch.created_at), style: "dim" }]
22
- : [];
23
- return [{ text: commentMatch.key }, ...createdAtCells, { text: commentMatch.text }];
24
- }
25
- export function formatComment(commentMatch) {
26
- return formatRows([commentRow(commentMatch, { showsCreatedAt: false })], {
27
- indentsContinuationLines: true,
28
- });
29
- }
30
- export function formatComments(comments) {
31
- return formatRows(comments.map((commentMatch) => commentRow(commentMatch, { showsCreatedAt: true })), { indentsContinuationLines: true });
9
+ import { formatCommentList, presentComment, presentComments, } from "../presentation/comment-presentation.js";
10
+ const commentTextConstraint = {
11
+ kind: "atLeastOne",
12
+ members: ["option:text", "option:text-file"],
13
+ };
14
+ function requireCommentText(values) {
15
+ if (violatesConstraint(commentTextConstraint, getOptionInputs(values))) {
16
+ quit("Comment text must be specified with --text or --text-file", undefined, {
17
+ argument: "--text",
18
+ });
19
+ }
32
20
  }
33
- function parseTextArgs(args) {
21
+ async function parseTextArgs(args) {
34
22
  const { values, positionals, tokens } = parseArgs({
35
23
  args,
36
- options: { text: { type: "string" } },
24
+ options: commentInputs.create.options,
37
25
  allowPositionals: true,
38
26
  strict: true,
39
27
  tokens: true,
40
28
  });
41
- validateUniqueOptions(tokens);
42
- validatePositionals(positionals, ["<task-key>"]);
43
- if (values.text === undefined) {
44
- quit("Comment text must be specified with --text");
45
- }
46
- return { key: positionals[0], text: values.text };
29
+ validateUniqueOptions(tokens, commentInputs.create.options);
30
+ validatePositionals(positionals, commentInputs.create.forms[0]);
31
+ requireCommentText(values);
32
+ const text = await resolveTextInput(values.text, values["text-file"], "--text");
33
+ return { key: positionals[0], text: text };
47
34
  }
48
- function parseCommentEditArgs(args) {
35
+ async function parseCommentEditArgs(args) {
49
36
  const { values, positionals, tokens } = parseArgs({
50
37
  args,
51
- options: { text: { type: "string" }, ...textEditOptions },
38
+ options: commentInputs.edit.options,
52
39
  allowPositionals: true,
53
40
  strict: true,
54
41
  tokens: true,
55
42
  });
56
- validateUniqueOptions(tokens);
57
- validatePositionals(positionals, ["<comment-key>"]);
58
- const text = resolveTextEdit(values.text, values, "--text");
59
- if (text === undefined) {
60
- quit("Comment text must be specified with --text");
61
- }
62
- return { key: positionals[0], text };
43
+ validateUniqueOptions(tokens, commentInputs.edit.options);
44
+ validatePositionals(positionals, commentInputs.edit.forms[0]);
45
+ const text = await resolveTextEdit(values, "--text");
46
+ // Without a text source nothing was read, so this usage error still comes before any input
47
+ requireCommentText(values);
48
+ return { key: positionals[0], text: text };
63
49
  }
50
+ const commentInputs = {
51
+ create: {
52
+ options: {
53
+ text: { type: "string", value: { kind: "text", name: "text" } },
54
+ "text-file": textFileOption,
55
+ },
56
+ forms: [
57
+ {
58
+ id: "default",
59
+ positionals: [taskKeyPositional],
60
+ },
61
+ ],
62
+ constraints: [textSourceConstraint("--text"), commentTextConstraint],
63
+ },
64
+ list: {
65
+ options: {},
66
+ forms: [
67
+ {
68
+ id: "default",
69
+ positionals: [taskKeyPositional],
70
+ },
71
+ ],
72
+ constraints: [],
73
+ },
74
+ view: {
75
+ options: {},
76
+ forms: [
77
+ {
78
+ id: "default",
79
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
80
+ },
81
+ ],
82
+ constraints: [],
83
+ },
84
+ edit: {
85
+ options: {
86
+ text: { type: "string", value: { kind: "text", name: "text" } },
87
+ "text-file": textFileOption,
88
+ ...textEditOptions,
89
+ },
90
+ forms: [
91
+ {
92
+ id: "default",
93
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
94
+ },
95
+ ],
96
+ constraints: [
97
+ textSourceConstraint("--text"),
98
+ ...textEditConstraints("--text"),
99
+ commentTextConstraint,
100
+ ],
101
+ notes: [textEditHelp("--text")],
102
+ },
103
+ delete: {
104
+ options: { yes: { type: "boolean" } },
105
+ forms: [
106
+ {
107
+ id: "default",
108
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
109
+ },
110
+ ],
111
+ constraints: [],
112
+ },
113
+ };
64
114
  export const commentRouter = {
65
115
  create: {
66
- run: (args) => {
67
- const props = parseTextArgs(args);
116
+ summary: "Add a comment to a task. Comment text cannot be blank.",
117
+ effects: { domain: "create", storage: "normal-open" },
118
+ confirmation: { kind: "none" },
119
+ input: commentInputs.create,
120
+ results: [jsonResult("Comment")],
121
+ guessedFlags: {
122
+ "--body": (args) => [
123
+ "task",
124
+ "comment",
125
+ "create",
126
+ ...renameFlag(args, commentInputs.create.options, "body", "text"),
127
+ ],
128
+ },
129
+ run: async (args) => {
130
+ const props = await parseTextArgs(args);
68
131
  const created = comment.create({ taskKey: props.key, text: props.text }, currentActor());
69
- output(presentComment(created), formatComment);
132
+ output(presentComment(created), (entry) => formatCommentList([entry], { showsCreatedAt: false, showsTextPreview: true }));
70
133
  },
71
- help: `Usage: zinn task comment create <task-key> --text <text>
134
+ help: `${generateCommandUsage("task comment create", commentInputs.create)}
72
135
 
73
136
  Add a comment to a task. Comment text cannot be blank.
137
+ ${textFileHelp("--text")}
74
138
  Archived tasks can be commented on.
139
+ The printed result is a preview. 'task comment view' shows the full text. --json keeps the full text.
75
140
 
76
- Example: zinn task comment create MDR-1 --text "Ready for review"`,
141
+ ${dashValueHelp("--text")}
142
+
143
+ Example: zinn task comment create MDR-1 --text 'Ready for review'`,
77
144
  },
78
145
  list: {
146
+ summary: "List a task's comments by oldest first.",
147
+ effects: { domain: "read", storage: "normal-open" },
148
+ confirmation: { kind: "none" },
149
+ input: commentInputs.list,
150
+ results: [jsonResult("CommentList")],
79
151
  run: (args) => {
80
- const { positionals } = parseArgs({ args, allowPositionals: true, strict: true });
81
- validatePositionals(positionals, ["<task-key>"]);
82
- output(presentComments(positionals[0]), formatComments);
152
+ const { positionals } = parseArgs({
153
+ options: commentInputs.list.options,
154
+ args,
155
+ allowPositionals: true,
156
+ strict: true,
157
+ });
158
+ validatePositionals(positionals, commentInputs.list.forms[0]);
159
+ output(presentComments(positionals[0]), formatCommentList);
83
160
  },
84
- help: `Usage: zinn task comment list <task-key>
161
+ help: `${generateCommandUsage("task comment list", commentInputs.list)}
85
162
 
86
163
  List a task's comments by oldest first.
87
164
 
88
165
  Example: zinn task comment list MDR-1`,
89
166
  },
90
- edit: {
167
+ view: {
168
+ summary: "Show a comment's current text in full, keeping its line breaks.",
169
+ effects: { domain: "read", storage: "normal-open" },
170
+ confirmation: { kind: "none" },
171
+ input: commentInputs.view,
172
+ results: [jsonResult("Comment")],
91
173
  run: (args) => {
92
- const props = parseCommentEditArgs(args);
174
+ const { positionals } = parseArgs({
175
+ options: commentInputs.view.options,
176
+ args,
177
+ allowPositionals: true,
178
+ strict: true,
179
+ });
180
+ validatePositionals(positionals, commentInputs.view.forms[0]);
181
+ output(presentComment(comment.getByKey(positionals[0])), (entry) => formatCommentList([entry], { showsCreatedAt: false }));
182
+ },
183
+ help: `${generateCommandUsage("task comment view", commentInputs.view)}
184
+
185
+ Show a comment's current text in full, keeping its line breaks.
186
+ Comments on archived tasks can be viewed.
187
+ With --json, return one object with id, key, task_id, text, created_at and updated_at.
188
+
189
+ Example: zinn task comment view 'MDR-1#1'`,
190
+ },
191
+ edit: {
192
+ summary: "Replace a comment's text. Comment text cannot be blank.",
193
+ effects: { domain: "update", storage: "normal-open" },
194
+ confirmation: { kind: "none" },
195
+ input: commentInputs.edit,
196
+ results: [jsonResult("CommentChange")],
197
+ guessedFlags: {
198
+ "--body": (args) => [
199
+ "task",
200
+ "comment",
201
+ "edit",
202
+ ...renameFlag(args, commentInputs.edit.options, "body", "text"),
203
+ ],
204
+ },
205
+ run: async (args) => {
206
+ const props = await parseCommentEditArgs(args);
93
207
  const edited = comment.edit({ commentKey: props.key, text: props.text }, currentActor());
94
- output(presentComment(edited), formatComment);
208
+ outputChanges([edited], (change) => presentComment(change.comment), (entries) => formatCommentList(entries, { showsCreatedAt: false, showsTextPreview: true }), (entry) => `Comment ${entry.key} was unchanged`);
95
209
  },
96
- help: `Usage: zinn task comment edit <comment-key> --text <text> ${textEditUsage}
210
+ help: `${generateCommandUsage("task comment edit", commentInputs.edit)}
97
211
 
98
212
  Replace a comment's text. Comment text cannot be blank.
213
+ With --json, changed is false when the text already matches.
214
+ ${textFileHelp("--text")}
215
+ The printed result is a preview. 'task comment view' shows the full text. --json keeps the full text.
99
216
 
100
217
  ${textEditHelp("--text")}
101
218
 
219
+ ${dashValueHelp("--text")}
220
+
102
221
  Examples:
103
- zinn task comment edit MDR-1#2 --text "Approved"
104
- zinn task comment edit MDR-1#2 --text "Also approved." --append`,
222
+ zinn task comment edit 'MDR-1#2' --text Approved
223
+ zinn task comment edit 'MDR-1#2' --text 'Also approved.' --append`,
105
224
  },
106
225
  delete: {
226
+ summary: "Permanently delete a comment after confirmation.",
227
+ effects: { domain: "delete", storage: "normal-open" },
228
+ confirmation: { kind: "prompt", description: confirmationDescription },
229
+ input: commentInputs.delete,
230
+ results: [jsonResult("Comment")],
107
231
  run: async (args) => {
108
232
  const { values, positionals, tokens } = parseArgs({
109
233
  args,
110
- options: { yes: { type: "boolean" } },
234
+ options: commentInputs.delete.options,
111
235
  allowPositionals: true,
112
236
  strict: true,
113
237
  tokens: true,
114
238
  });
115
- validateUniqueOptions(tokens);
116
- validatePositionals(positionals, ["<comment-key>"]);
239
+ validateUniqueOptions(tokens, commentInputs.delete.options);
240
+ validatePositionals(positionals, commentInputs.delete.forms[0]);
117
241
  const commentMatch = comment.getByKey(positionals[0]);
118
242
  const canDelete = await confirmAction(`Are you sure you want to delete ${commentMatch.key}?`, values.yes === true);
119
243
  const presented = presentComment(commentMatch);
@@ -124,11 +248,11 @@ Examples:
124
248
  comment.delete({ commentKey: commentMatch.key }, currentActor());
125
249
  output(presented, (entry) => `Deleted ${entry.key}`);
126
250
  },
127
- help: `Usage: zinn task comment delete <comment-key> [--yes]
251
+ help: `${generateCommandUsage("task comment delete", commentInputs.delete)}
128
252
 
129
253
  Permanently delete a comment after confirmation.
130
254
  Use --yes to skip the confirmation prompt, for example in scripts or with --json.
131
255
 
132
- Example: zinn task comment delete MDR-1#2`,
256
+ Example: zinn task comment delete 'MDR-1#2'`,
133
257
  },
134
258
  };
@@ -0,0 +1,21 @@
1
+ export declare const infoCommand: {
2
+ summary: string;
3
+ effects: {
4
+ domain: "none";
5
+ storage: "inspect";
6
+ };
7
+ confirmation: {
8
+ kind: "none";
9
+ };
10
+ input: {
11
+ readonly options: {};
12
+ readonly forms: readonly [{
13
+ readonly id: "default";
14
+ readonly positionals: readonly [];
15
+ }];
16
+ readonly constraints: readonly [];
17
+ };
18
+ results: import("../results.js").CommandResult[];
19
+ run: (args: string[]) => void;
20
+ help: string;
21
+ };
@@ -0,0 +1,29 @@
1
+ import { jsonResult } from "../results.js";
2
+ import { parseArgs } from "node:util";
3
+ import { info } from "@zinn-dev/core";
4
+ import { generateCommandUsage, noInput } from "../input.js";
5
+ import { output, validatePositionals } from "../lib.js";
6
+ import { formatInfo, presentInfo } from "../presentation/info-presentation.js";
7
+ export const infoCommand = {
8
+ summary: "Show the selected store, settings sources, database schema state and CLI, core and runtime versions.",
9
+ effects: { domain: "none", storage: "inspect" },
10
+ confirmation: { kind: "none" },
11
+ input: noInput,
12
+ results: [jsonResult("Info")],
13
+ run: (args) => {
14
+ const { positionals } = parseArgs({
15
+ options: noInput.options,
16
+ args,
17
+ strict: true,
18
+ allowPositionals: true,
19
+ });
20
+ validatePositionals(positionals, noInput.forms[0]);
21
+ output(presentInfo(info.get()), formatInfo);
22
+ },
23
+ help: `${generateCommandUsage("info", noInput)}
24
+
25
+ Show the selected store, settings sources, database schema state and CLI, core and runtime versions.
26
+
27
+ Reports unusable settings and database errors and exits successfully.
28
+ SQLite may perform its normal file housekeeping when this command is triggered.`,
29
+ };
@@ -1,17 +1,232 @@
1
1
  export declare const labelRouter: {
2
2
  create: {
3
- run: (args: string[]) => void;
3
+ summary: string;
4
+ effects: {
5
+ domain: "create";
6
+ storage: "normal-open";
7
+ };
8
+ confirmation: {
9
+ kind: "none";
10
+ };
11
+ input: {
12
+ readonly options: {
13
+ readonly description: {
14
+ readonly type: "string";
15
+ readonly value: {
16
+ readonly kind: "text";
17
+ readonly name: "text";
18
+ };
19
+ };
20
+ readonly "description-file": {
21
+ readonly type: "string";
22
+ readonly value: {
23
+ readonly kind: "path";
24
+ readonly name: "path";
25
+ readonly description: "A UTF-8 file, or \"-\" for stdin. Trailing line breaks are dropped; empty or blank input is an error.";
26
+ };
27
+ };
28
+ readonly color: {
29
+ readonly type: "string";
30
+ readonly value: {
31
+ readonly kind: "enum";
32
+ readonly name: "color";
33
+ readonly choices: ("red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray")[];
34
+ };
35
+ };
36
+ };
37
+ readonly forms: readonly [{
38
+ readonly id: "default";
39
+ readonly positionals: readonly [{
40
+ readonly name: "name";
41
+ readonly min: 1;
42
+ readonly max: 1;
43
+ readonly value: {
44
+ readonly kind: "name";
45
+ };
46
+ }];
47
+ }];
48
+ readonly constraints: readonly [{
49
+ readonly kind: "exclusive";
50
+ readonly members: readonly ["option:description" | "option:text", "option:description-file" | "option:text-file"];
51
+ }];
52
+ };
53
+ results: import("../results.js").CommandResult[];
54
+ run: (args: string[]) => Promise<void>;
4
55
  help: string;
5
56
  };
6
57
  list: {
58
+ summary: string;
59
+ effects: {
60
+ domain: "read";
61
+ storage: "normal-open";
62
+ };
63
+ confirmation: {
64
+ kind: "none";
65
+ };
66
+ input: {
67
+ readonly options: {};
68
+ readonly forms: readonly [{
69
+ readonly id: "default";
70
+ readonly positionals: readonly [];
71
+ }];
72
+ readonly constraints: readonly [];
73
+ };
74
+ results: import("../results.js").CommandResult[];
7
75
  run: (args: string[]) => void;
8
76
  help: string;
9
77
  };
10
- edit: {
78
+ view: {
79
+ summary: string;
80
+ effects: {
81
+ domain: "read";
82
+ storage: "normal-open";
83
+ };
84
+ confirmation: {
85
+ kind: "none";
86
+ };
87
+ input: {
88
+ readonly options: {};
89
+ readonly forms: readonly [{
90
+ readonly id: "default";
91
+ readonly positionals: readonly [{
92
+ readonly name: "name";
93
+ readonly min: 1;
94
+ readonly max: 1;
95
+ readonly value: {
96
+ readonly kind: "label-name";
97
+ };
98
+ }];
99
+ }];
100
+ readonly constraints: readonly [];
101
+ };
102
+ results: import("../results.js").CommandResult[];
11
103
  run: (args: string[]) => void;
12
104
  help: string;
13
105
  };
106
+ edit: {
107
+ summary: string;
108
+ effects: {
109
+ domain: "update";
110
+ storage: "normal-open";
111
+ };
112
+ confirmation: {
113
+ kind: "none";
114
+ };
115
+ input: {
116
+ readonly options: {
117
+ readonly color: {
118
+ readonly type: "string";
119
+ readonly value: {
120
+ readonly kind: "enum";
121
+ readonly name: "color";
122
+ readonly choices: ("red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray")[];
123
+ };
124
+ };
125
+ readonly append: {
126
+ readonly type: "boolean";
127
+ };
128
+ readonly replacing: {
129
+ readonly type: "string";
130
+ readonly value: {
131
+ readonly kind: "text";
132
+ readonly name: "old";
133
+ };
134
+ };
135
+ readonly all: {
136
+ readonly type: "boolean";
137
+ };
138
+ readonly name: {
139
+ readonly type: "string";
140
+ readonly value: {
141
+ readonly kind: "text";
142
+ readonly name: "text";
143
+ };
144
+ };
145
+ readonly description: {
146
+ readonly type: "string";
147
+ readonly value: {
148
+ readonly kind: "text";
149
+ readonly name: "text";
150
+ };
151
+ };
152
+ readonly "description-file": {
153
+ readonly type: "string";
154
+ readonly value: {
155
+ readonly kind: "path";
156
+ readonly name: "path";
157
+ readonly description: "A UTF-8 file, or \"-\" for stdin. Trailing line breaks are dropped; empty or blank input is an error.";
158
+ };
159
+ };
160
+ };
161
+ readonly forms: readonly [{
162
+ readonly id: "default";
163
+ readonly positionals: readonly [{
164
+ readonly name: "name";
165
+ readonly min: 1;
166
+ readonly max: 1;
167
+ readonly value: {
168
+ readonly kind: "name";
169
+ };
170
+ }];
171
+ }];
172
+ readonly constraints: readonly [{
173
+ readonly kind: "exclusive";
174
+ readonly members: readonly ["option:description" | "option:text", "option:description-file" | "option:text-file"];
175
+ }, {
176
+ readonly kind: "exclusive";
177
+ readonly members: readonly ["option:append", "option:replacing"];
178
+ }, {
179
+ readonly kind: "requiresAny";
180
+ readonly input: "option:append";
181
+ readonly members: readonly ["option:description" | "option:text", "option:description-file" | "option:text-file"];
182
+ }, {
183
+ readonly kind: "requiresAny";
184
+ readonly input: "option:replacing";
185
+ readonly members: readonly ["option:description" | "option:text", "option:description-file" | "option:text-file"];
186
+ }, {
187
+ readonly kind: "requires";
188
+ readonly input: "option:all";
189
+ readonly requires: "option:replacing";
190
+ }, {
191
+ readonly kind: "atLeastOne";
192
+ readonly members: `option:${string}`[];
193
+ }];
194
+ readonly notes: readonly [string];
195
+ };
196
+ results: import("../results.js").CommandResult[];
197
+ run: (args: string[]) => Promise<void>;
198
+ help: string;
199
+ };
14
200
  delete: {
201
+ summary: string;
202
+ effects: {
203
+ domain: "delete";
204
+ storage: "normal-open";
205
+ };
206
+ confirmation: {
207
+ kind: "prompt";
208
+ description: string;
209
+ };
210
+ input: {
211
+ readonly options: {
212
+ readonly yes: {
213
+ readonly type: "boolean";
214
+ };
215
+ };
216
+ readonly forms: readonly [{
217
+ readonly id: "default";
218
+ readonly positionals: readonly [{
219
+ readonly name: "name";
220
+ readonly min: 1;
221
+ readonly max: 1;
222
+ readonly value: {
223
+ readonly kind: "name";
224
+ };
225
+ }];
226
+ }];
227
+ readonly constraints: readonly [];
228
+ };
229
+ results: import("../results.js").CommandResult[];
15
230
  run: (args: string[]) => Promise<void>;
16
231
  help: string;
17
232
  };