@zinn-dev/cli 0.39.0 → 0.41.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.
- package/README.md +171 -40
- package/index.d.ts +2 -0
- package/index.js +34 -0
- package/package.json +27 -18
- package/skills/zinn/SKILL.md +63 -0
- package/src/actor.d.ts +7 -0
- package/src/actor.js +129 -0
- package/src/capabilities-schema.d.ts +163 -0
- package/src/capabilities-schema.js +124 -0
- package/src/capabilities.d.ts +21 -0
- package/src/capabilities.js +22 -0
- package/src/database.d.ts +6 -0
- package/src/database.js +27 -0
- package/src/errors.d.ts +158 -0
- package/src/errors.js +224 -0
- package/src/input.d.ts +116 -0
- package/src/input.js +119 -0
- package/src/lib.d.ts +66 -0
- package/src/lib.js +333 -0
- package/src/presentation/activity-presentation.d.ts +23 -0
- package/src/presentation/activity-presentation.js +403 -0
- package/src/presentation/color.d.ts +9 -0
- package/src/presentation/color.js +21 -0
- package/src/presentation/column-presentation.d.ts +14 -0
- package/src/presentation/column-presentation.js +29 -0
- package/src/presentation/description-presentation.d.ts +3 -0
- package/src/presentation/description-presentation.js +11 -0
- package/src/presentation/info-presentation.d.ts +4 -0
- package/src/presentation/info-presentation.js +96 -0
- package/src/presentation/row-layout.d.ts +22 -0
- package/src/presentation/row-layout.js +58 -0
- package/src/presentation/section.d.ts +4 -0
- package/src/presentation/section.js +9 -0
- package/src/presentation/task-presentation.d.ts +9 -0
- package/src/presentation/task-presentation.js +62 -0
- package/src/presentation/time.d.ts +1 -0
- package/src/presentation/time.js +13 -0
- package/src/project.d.ts +12 -0
- package/src/project.js +44 -0
- package/src/release-identity.d.ts +2 -0
- package/src/release-identity.js +1 -0
- package/src/result-schemas.d.ts +987 -0
- package/src/result-schemas.js +220 -0
- package/src/results.d.ts +23 -0
- package/src/results.js +17 -0
- package/src/routes/activity-router.d.ts +81 -0
- package/src/routes/activity-router.js +119 -0
- package/src/routes/backup-router.d.ts +21 -0
- package/src/routes/backup-router.js +30 -0
- package/src/routes/capabilities-router.d.ts +21 -0
- package/src/routes/capabilities-router.js +28 -0
- package/src/routes/comment-router.d.ts +203 -0
- package/src/routes/comment-router.js +241 -0
- package/src/routes/info-router.d.ts +21 -0
- package/src/routes/info-router.js +29 -0
- package/src/routes/label-router.d.ts +183 -0
- package/src/routes/label-router.js +218 -0
- package/src/routes/migrate-router.d.ts +21 -0
- package/src/routes/migrate-router.js +49 -0
- package/src/routes/project-router.d.ts +389 -0
- package/src/routes/project-router.js +514 -0
- package/src/routes/reindex-router.d.ts +21 -0
- package/src/routes/reindex-router.js +33 -0
- package/src/routes/relation-router.d.ts +124 -0
- package/src/routes/relation-router.js +223 -0
- package/src/routes/restore-router.d.ts +33 -0
- package/src/routes/restore-router.js +88 -0
- package/src/routes/router.d.ts +6 -0
- package/src/routes/router.js +204 -0
- package/src/routes/routes.d.ts +1735 -0
- package/src/routes/routes.js +23 -0
- package/src/routes/task-router.d.ts +945 -0
- package/src/routes/task-router.js +789 -0
- package/src/text-edit.d.ts +43 -0
- package/src/text-edit.js +57 -0
- package/src/types.d.ts +24 -0
- package/src/types.js +1 -0
- package/index.ts +0 -26
- package/release-stamp.json +0 -1
- package/src/actor.test.ts +0 -41
- package/src/actor.ts +0 -78
- package/src/database.test.ts +0 -70
- package/src/database.ts +0 -41
- package/src/lib.test.ts +0 -86
- package/src/lib.ts +0 -159
- package/src/presentation/activity-presentation.test.ts +0 -112
- package/src/presentation/activity-presentation.ts +0 -490
- package/src/presentation/color.ts +0 -29
- package/src/presentation/column-presentation.ts +0 -48
- package/src/presentation/description-presentation.ts +0 -18
- package/src/presentation/row-layout.ts +0 -77
- package/src/presentation/section.ts +0 -16
- package/src/presentation/task-presentation.ts +0 -92
- package/src/presentation/time.ts +0 -17
- package/src/project.test.ts +0 -479
- package/src/project.ts +0 -53
- package/src/routes/activity-router.ts +0 -81
- package/src/routes/backup-router.ts +0 -24
- package/src/routes/comment-router.ts +0 -171
- package/src/routes/label-router.ts +0 -168
- package/src/routes/migrate-router.test.ts +0 -31
- package/src/routes/migrate-router.ts +0 -48
- package/src/routes/project-router.ts +0 -415
- package/src/routes/reindex-router.ts +0 -27
- package/src/routes/relation-router.ts +0 -194
- package/src/routes/restore-router.test.ts +0 -44
- package/src/routes/restore-router.ts +0 -90
- package/src/routes/router.test.ts +0 -136
- package/src/routes/router.ts +0 -248
- package/src/routes/routes.ts +0 -20
- package/src/routes/task-router.ts +0 -649
- package/src/text-edit.ts +0 -68
- package/src/types.ts +0 -6
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { jsonResult } from "../results.js";
|
|
2
|
+
import { parseArgs } from "node:util";
|
|
3
|
+
import { label, labelColorSchema, labelCreateSchema, labelDeleteSchema, labelEditSchema, } from "@zinn-dev/core";
|
|
4
|
+
import { CliError } from "../errors.js";
|
|
5
|
+
import { generateCommandUsage, noInput } from "../input.js";
|
|
6
|
+
import { confirmationDescription, confirmAction, dashValueHelp, output, validatePositionals, validateUniqueOptions, } from "../lib.js";
|
|
7
|
+
import { resolveTextEdit, textEditHelp, textEditOptions, textEditConstraints, } from "../text-edit.js";
|
|
8
|
+
import { currentActor } from "../actor.js";
|
|
9
|
+
import { isColorEnabled } from "../presentation/color.js";
|
|
10
|
+
import { formatRows } from "../presentation/row-layout.js";
|
|
11
|
+
function presentLabel(labelMatch) {
|
|
12
|
+
return { name: labelMatch.name, color: labelMatch.color, description: labelMatch.description };
|
|
13
|
+
}
|
|
14
|
+
function formatLabel(presented) {
|
|
15
|
+
return formatLabelList([presented]);
|
|
16
|
+
}
|
|
17
|
+
function formatLabelList(presentedLabels) {
|
|
18
|
+
return formatRows(presentedLabels.map((presented) => {
|
|
19
|
+
const descriptionCells = presented.description == null ? [] : [{ text: presented.description }];
|
|
20
|
+
/**
|
|
21
|
+
* The colored name shows the color, and if the environment
|
|
22
|
+
* does not support color, it is explicitly printed instead
|
|
23
|
+
*/
|
|
24
|
+
if (isColorEnabled()) {
|
|
25
|
+
const style = labelColorSchema.options.find((color) => color === presented.color);
|
|
26
|
+
return [{ text: presented.name, style }, ...descriptionCells];
|
|
27
|
+
}
|
|
28
|
+
return [{ text: presented.name }, { text: presented.color }, ...descriptionCells];
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
const colorOption = {
|
|
32
|
+
type: "string",
|
|
33
|
+
value: {
|
|
34
|
+
kind: "enum",
|
|
35
|
+
name: "color",
|
|
36
|
+
choices: labelColorSchema.options,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const labelInputs = {
|
|
40
|
+
create: {
|
|
41
|
+
options: {
|
|
42
|
+
description: { type: "string", value: { kind: "text", name: "text" } },
|
|
43
|
+
color: colorOption,
|
|
44
|
+
},
|
|
45
|
+
forms: [
|
|
46
|
+
{ id: "default", positionals: [{ name: "name", min: 1, max: 1, value: { kind: "name" } }] },
|
|
47
|
+
],
|
|
48
|
+
constraints: [],
|
|
49
|
+
},
|
|
50
|
+
list: noInput,
|
|
51
|
+
edit: {
|
|
52
|
+
options: {
|
|
53
|
+
name: { type: "string", value: { kind: "text", name: "text" } },
|
|
54
|
+
description: { type: "string", value: { kind: "text", name: "text" } },
|
|
55
|
+
...textEditOptions,
|
|
56
|
+
color: colorOption,
|
|
57
|
+
},
|
|
58
|
+
forms: [
|
|
59
|
+
{ id: "default", positionals: [{ name: "name", min: 1, max: 1, value: { kind: "name" } }] },
|
|
60
|
+
],
|
|
61
|
+
constraints: [
|
|
62
|
+
...textEditConstraints("--description"),
|
|
63
|
+
{
|
|
64
|
+
kind: "atLeastOne",
|
|
65
|
+
members: Object.keys(labelEditSchema.shape)
|
|
66
|
+
.filter((name) => name !== "labelName")
|
|
67
|
+
.map((name) => `option:${name}`),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
notes: [textEditHelp("--description")],
|
|
71
|
+
},
|
|
72
|
+
delete: {
|
|
73
|
+
options: { yes: { type: "boolean" } },
|
|
74
|
+
forms: [
|
|
75
|
+
{ id: "default", positionals: [{ name: "name", min: 1, max: 1, value: { kind: "name" } }] },
|
|
76
|
+
],
|
|
77
|
+
constraints: [],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export const labelRouter = {
|
|
81
|
+
create: {
|
|
82
|
+
summary: "Create a global label. Names preserve casing, but uniqueness is case-insensitive.",
|
|
83
|
+
effects: { domain: "create", storage: "normal-open" },
|
|
84
|
+
confirmation: { kind: "none" },
|
|
85
|
+
input: labelInputs.create,
|
|
86
|
+
results: [jsonResult("Label")],
|
|
87
|
+
run: (args) => {
|
|
88
|
+
const { values, positionals, tokens } = parseArgs({
|
|
89
|
+
args,
|
|
90
|
+
options: labelInputs.create.options,
|
|
91
|
+
allowPositionals: true,
|
|
92
|
+
strict: true,
|
|
93
|
+
tokens: true,
|
|
94
|
+
});
|
|
95
|
+
validateUniqueOptions(tokens, labelInputs.create.options);
|
|
96
|
+
validatePositionals(positionals, labelInputs.create.forms[0]);
|
|
97
|
+
const input = labelCreateSchema.parse({ name: positionals[0], ...values });
|
|
98
|
+
const created = label.create(input, currentActor());
|
|
99
|
+
output(presentLabel(created), formatLabel);
|
|
100
|
+
},
|
|
101
|
+
help: `${generateCommandUsage("label create", labelInputs.create)}
|
|
102
|
+
|
|
103
|
+
Create a global label. Names preserve casing, but uniqueness is case-insensitive.
|
|
104
|
+
Names are trimmed and cannot be blank or contain line breaks or control characters.
|
|
105
|
+
Description is optional.
|
|
106
|
+
|
|
107
|
+
Color defaults to white.
|
|
108
|
+
Valid colors: ${labelInputs.create.options.color.value.choices.join(", ")}.
|
|
109
|
+
|
|
110
|
+
${dashValueHelp("--description")}
|
|
111
|
+
|
|
112
|
+
Example: zinn label create bug --description 'Unexpected behavior' --color red`,
|
|
113
|
+
},
|
|
114
|
+
list: {
|
|
115
|
+
summary: "List all global label definitions.",
|
|
116
|
+
effects: { domain: "read", storage: "normal-open" },
|
|
117
|
+
confirmation: { kind: "none" },
|
|
118
|
+
input: labelInputs.list,
|
|
119
|
+
results: [jsonResult("LabelList")],
|
|
120
|
+
run: (args) => {
|
|
121
|
+
const { positionals } = parseArgs({
|
|
122
|
+
options: labelInputs.list.options,
|
|
123
|
+
args,
|
|
124
|
+
strict: true,
|
|
125
|
+
allowPositionals: true,
|
|
126
|
+
});
|
|
127
|
+
validatePositionals(positionals, labelInputs.list.forms[0]);
|
|
128
|
+
output(label.getAll().map(presentLabel), formatLabelList);
|
|
129
|
+
},
|
|
130
|
+
help: `${generateCommandUsage("label list", labelInputs.list)}
|
|
131
|
+
|
|
132
|
+
List all global label definitions.`,
|
|
133
|
+
},
|
|
134
|
+
edit: {
|
|
135
|
+
summary: "Change specified fields.",
|
|
136
|
+
effects: { domain: "update", storage: "normal-open" },
|
|
137
|
+
confirmation: { kind: "none" },
|
|
138
|
+
input: labelInputs.edit,
|
|
139
|
+
results: [jsonResult("Label")],
|
|
140
|
+
run: (args) => {
|
|
141
|
+
const { values, positionals, tokens } = parseArgs({
|
|
142
|
+
args,
|
|
143
|
+
options: labelInputs.edit.options,
|
|
144
|
+
allowPositionals: true,
|
|
145
|
+
strict: true,
|
|
146
|
+
tokens: true,
|
|
147
|
+
});
|
|
148
|
+
validateUniqueOptions(tokens, labelInputs.edit.options);
|
|
149
|
+
validatePositionals(positionals, labelInputs.edit.forms[0]);
|
|
150
|
+
const input = labelEditSchema.parse({
|
|
151
|
+
labelName: positionals[0],
|
|
152
|
+
name: values.name,
|
|
153
|
+
description: resolveTextEdit(values.description, values, "--description"),
|
|
154
|
+
color: values.color,
|
|
155
|
+
});
|
|
156
|
+
const edited = label.edit(input, currentActor());
|
|
157
|
+
output(presentLabel(edited), formatLabel);
|
|
158
|
+
},
|
|
159
|
+
help: `${generateCommandUsage("label edit", labelInputs.edit)}
|
|
160
|
+
|
|
161
|
+
Change specified fields.
|
|
162
|
+
Provide at least one edit flag. Use --description '' to clear the description.
|
|
163
|
+
Valid colors: ${labelInputs.edit.options.color.value.choices.join(", ")}.
|
|
164
|
+
|
|
165
|
+
${textEditHelp("--description")}
|
|
166
|
+
|
|
167
|
+
Names are matched and kept unique case-insensitively while preserving their casing.
|
|
168
|
+
Names are trimmed. Changing only the casing is allowed.
|
|
169
|
+
Editing does not affect task attachments or task timestamps.
|
|
170
|
+
|
|
171
|
+
${dashValueHelp("--description")}
|
|
172
|
+
|
|
173
|
+
Examples:
|
|
174
|
+
zinn label edit bug --name defect --color yellow
|
|
175
|
+
zinn label edit bug --description 'Reported by users.' --append`,
|
|
176
|
+
},
|
|
177
|
+
delete: {
|
|
178
|
+
summary: "Delete a label definition and remove it from all tasks after confirmation.",
|
|
179
|
+
effects: { domain: "delete", storage: "normal-open" },
|
|
180
|
+
confirmation: { kind: "prompt", description: confirmationDescription },
|
|
181
|
+
input: labelInputs.delete,
|
|
182
|
+
results: [jsonResult("Label")],
|
|
183
|
+
run: async (args) => {
|
|
184
|
+
const { values, positionals, tokens } = parseArgs({
|
|
185
|
+
args,
|
|
186
|
+
options: labelInputs.delete.options,
|
|
187
|
+
strict: true,
|
|
188
|
+
allowPositionals: true,
|
|
189
|
+
tokens: true,
|
|
190
|
+
});
|
|
191
|
+
validateUniqueOptions(tokens, labelInputs.delete.options);
|
|
192
|
+
validatePositionals(positionals, labelInputs.delete.forms[0]);
|
|
193
|
+
const props = labelDeleteSchema.parse({ name: positionals[0] });
|
|
194
|
+
const labelMatch = label.getByName(props.name);
|
|
195
|
+
if (labelMatch == null) {
|
|
196
|
+
throw new CliError(`A label with name "${props.name}" does not exist`, "not_found", {
|
|
197
|
+
entity: "label",
|
|
198
|
+
key: props.name,
|
|
199
|
+
source: "explicit",
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const canDelete = await confirmAction(`Are you sure you want to delete label "${labelMatch.name}" and remove it from all tasks?`, values.yes === true);
|
|
203
|
+
if (!canDelete) {
|
|
204
|
+
output(presentLabel(labelMatch), (l) => `Deletion cancelled for label "${l.name}"`);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const deleted = label.delete(props, currentActor());
|
|
208
|
+
output(presentLabel(deleted), (l) => `Deleted label "${l.name}"`);
|
|
209
|
+
},
|
|
210
|
+
help: `${generateCommandUsage("label delete", labelInputs.delete)}
|
|
211
|
+
|
|
212
|
+
Delete a label definition and remove it from all tasks after confirmation.
|
|
213
|
+
To remove a label from just one task, use zinn task label remove.
|
|
214
|
+
Label names are matched case-insensitively.
|
|
215
|
+
|
|
216
|
+
Use --yes to skip the confirmation prompt, for example in scripts or with --json.`,
|
|
217
|
+
},
|
|
218
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const migrateCommand: {
|
|
2
|
+
summary: string;
|
|
3
|
+
effects: {
|
|
4
|
+
domain: "none";
|
|
5
|
+
storage: "migrate";
|
|
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,49 @@
|
|
|
1
|
+
import { jsonResult } from "../results.js";
|
|
2
|
+
import { parseArgs } from "node:util";
|
|
3
|
+
import { migrate, MigrationRefusedError, getStorage } from "@zinn-dev/core";
|
|
4
|
+
import { generateCommandUsage, noInput } from "../input.js";
|
|
5
|
+
import { reportLockWait } from "../database.js";
|
|
6
|
+
import { diagnostic, output, validatePositionals } from "../lib.js";
|
|
7
|
+
import packageJson from "../../package.json" with { type: "json" };
|
|
8
|
+
export const migrateCommand = {
|
|
9
|
+
summary: "Upgrade an existing database to the latest schema version.",
|
|
10
|
+
effects: { domain: "none", storage: "migrate" },
|
|
11
|
+
confirmation: { kind: "none" },
|
|
12
|
+
input: noInput,
|
|
13
|
+
results: [jsonResult("Migrate")],
|
|
14
|
+
run: (args) => {
|
|
15
|
+
const { positionals } = parseArgs({
|
|
16
|
+
options: noInput.options,
|
|
17
|
+
args,
|
|
18
|
+
strict: true,
|
|
19
|
+
allowPositionals: true,
|
|
20
|
+
});
|
|
21
|
+
validatePositionals(positionals, noInput.forms[0]);
|
|
22
|
+
// Resolved before the try, so a store that cannot be resolved fails without the note about backups.
|
|
23
|
+
const { backupDirectory } = getStorage();
|
|
24
|
+
try {
|
|
25
|
+
const result = migrate.run({
|
|
26
|
+
client: "cli",
|
|
27
|
+
version: packageJson.version,
|
|
28
|
+
onWait: reportLockWait,
|
|
29
|
+
});
|
|
30
|
+
output(result, (r) => r.changed
|
|
31
|
+
? `Upgraded the database from schema version ${r.previousVersion} to ${r.finalVersion}. A backup was saved to ${r.backupPath}`
|
|
32
|
+
: `The database is already at schema version ${r.finalVersion}`);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
// A refusal attempted nothing, so only a failed upgrade points at the backups.
|
|
36
|
+
if (!(error instanceof MigrationRefusedError)) {
|
|
37
|
+
diagnostic(`The database is unchanged. Backups taken before each upgrade attempt are kept in ${backupDirectory}.`);
|
|
38
|
+
}
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
help: `${generateCommandUsage("migrate", noInput)}
|
|
43
|
+
|
|
44
|
+
Upgrade an existing database to the latest schema version.
|
|
45
|
+
|
|
46
|
+
A backup is saved first, in the same place as \`zinn backup\`, and the upgrade is applied completely or not at all.
|
|
47
|
+
Does nothing when the database is already up to date.
|
|
48
|
+
Fails, leaving the database as it is, when there is no database with data yet, when it has no schema version, or when it is newer than this Zinn.`,
|
|
49
|
+
};
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
export declare const projectRouter: {
|
|
2
|
+
create: {
|
|
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 name: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly value: {
|
|
16
|
+
readonly kind: "text";
|
|
17
|
+
readonly name: "text";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly description: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly value: {
|
|
23
|
+
readonly kind: "text";
|
|
24
|
+
readonly name: "text";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly forms: readonly [{
|
|
29
|
+
readonly id: "default";
|
|
30
|
+
readonly positionals: readonly [{
|
|
31
|
+
readonly name: "project-key";
|
|
32
|
+
readonly min: 1;
|
|
33
|
+
readonly max: 1;
|
|
34
|
+
readonly value: {
|
|
35
|
+
readonly kind: "project-key";
|
|
36
|
+
};
|
|
37
|
+
}];
|
|
38
|
+
}];
|
|
39
|
+
readonly constraints: readonly [];
|
|
40
|
+
};
|
|
41
|
+
results: import("../results.js").CommandResult[];
|
|
42
|
+
run: (args: Array<string>) => void;
|
|
43
|
+
help: string;
|
|
44
|
+
};
|
|
45
|
+
list: {
|
|
46
|
+
summary: string;
|
|
47
|
+
effects: {
|
|
48
|
+
domain: "read";
|
|
49
|
+
storage: "normal-open";
|
|
50
|
+
};
|
|
51
|
+
confirmation: {
|
|
52
|
+
kind: "none";
|
|
53
|
+
};
|
|
54
|
+
input: {
|
|
55
|
+
readonly options: {};
|
|
56
|
+
readonly forms: readonly [{
|
|
57
|
+
readonly id: "default";
|
|
58
|
+
readonly positionals: readonly [];
|
|
59
|
+
}];
|
|
60
|
+
readonly constraints: readonly [];
|
|
61
|
+
};
|
|
62
|
+
results: import("../results.js").CommandResult[];
|
|
63
|
+
run: (args: Array<string>) => void;
|
|
64
|
+
help: string;
|
|
65
|
+
};
|
|
66
|
+
view: {
|
|
67
|
+
summary: string;
|
|
68
|
+
effects: {
|
|
69
|
+
domain: "read";
|
|
70
|
+
storage: "normal-open";
|
|
71
|
+
};
|
|
72
|
+
confirmation: {
|
|
73
|
+
kind: "none";
|
|
74
|
+
};
|
|
75
|
+
input: {
|
|
76
|
+
readonly options: {};
|
|
77
|
+
readonly forms: readonly [{
|
|
78
|
+
readonly id: "default";
|
|
79
|
+
readonly positionals: readonly [{
|
|
80
|
+
readonly name: "project-key";
|
|
81
|
+
readonly min: 0;
|
|
82
|
+
readonly max: 1;
|
|
83
|
+
readonly value: {
|
|
84
|
+
readonly kind: "project-key";
|
|
85
|
+
};
|
|
86
|
+
}];
|
|
87
|
+
}];
|
|
88
|
+
readonly constraints: readonly [];
|
|
89
|
+
readonly notes: readonly ["An omitted project key uses defaultProject from settings. Without a configured default, a project key is required. A missing configured project is an error."];
|
|
90
|
+
};
|
|
91
|
+
results: import("../results.js").CommandResult[];
|
|
92
|
+
run: (args: Array<string>) => void;
|
|
93
|
+
help: string;
|
|
94
|
+
};
|
|
95
|
+
edit: {
|
|
96
|
+
summary: string;
|
|
97
|
+
effects: {
|
|
98
|
+
domain: "update";
|
|
99
|
+
storage: "normal-open";
|
|
100
|
+
};
|
|
101
|
+
confirmation: {
|
|
102
|
+
kind: "none";
|
|
103
|
+
};
|
|
104
|
+
input: {
|
|
105
|
+
readonly options: {
|
|
106
|
+
readonly append: {
|
|
107
|
+
readonly type: "boolean";
|
|
108
|
+
};
|
|
109
|
+
readonly replacing: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly value: {
|
|
112
|
+
readonly kind: "text";
|
|
113
|
+
readonly name: "old";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
readonly all: {
|
|
117
|
+
readonly type: "boolean";
|
|
118
|
+
};
|
|
119
|
+
readonly name: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
readonly value: {
|
|
122
|
+
readonly kind: "text";
|
|
123
|
+
readonly name: "text";
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
readonly description: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly value: {
|
|
129
|
+
readonly kind: "text";
|
|
130
|
+
readonly name: "text";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly forms: readonly [{
|
|
135
|
+
readonly id: "default";
|
|
136
|
+
readonly positionals: readonly [{
|
|
137
|
+
readonly name: "project-key";
|
|
138
|
+
readonly min: 0;
|
|
139
|
+
readonly max: 1;
|
|
140
|
+
readonly value: {
|
|
141
|
+
readonly kind: "project-key";
|
|
142
|
+
};
|
|
143
|
+
}];
|
|
144
|
+
}];
|
|
145
|
+
readonly constraints: readonly [{
|
|
146
|
+
readonly kind: "exclusive";
|
|
147
|
+
readonly members: readonly ["option:append", "option:replacing"];
|
|
148
|
+
}, {
|
|
149
|
+
readonly kind: "requires";
|
|
150
|
+
readonly input: "option:append";
|
|
151
|
+
readonly requires: `option:${string}`;
|
|
152
|
+
}, {
|
|
153
|
+
readonly kind: "requires";
|
|
154
|
+
readonly input: "option:replacing";
|
|
155
|
+
readonly requires: `option:${string}`;
|
|
156
|
+
}, {
|
|
157
|
+
readonly kind: "requires";
|
|
158
|
+
readonly input: "option:all";
|
|
159
|
+
readonly requires: "option:replacing";
|
|
160
|
+
}, {
|
|
161
|
+
readonly kind: "atLeastOne";
|
|
162
|
+
readonly members: readonly ["option:name", "option:description"];
|
|
163
|
+
}];
|
|
164
|
+
readonly notes: readonly ["An omitted project key uses defaultProject from settings. Without a configured default, a project key is required. A missing configured project is an error.", string];
|
|
165
|
+
};
|
|
166
|
+
results: import("../results.js").CommandResult[];
|
|
167
|
+
run: (args: string[]) => void;
|
|
168
|
+
help: string;
|
|
169
|
+
};
|
|
170
|
+
delete: {
|
|
171
|
+
summary: string;
|
|
172
|
+
effects: {
|
|
173
|
+
domain: "delete";
|
|
174
|
+
storage: "normal-open";
|
|
175
|
+
};
|
|
176
|
+
confirmation: {
|
|
177
|
+
kind: "project-delete";
|
|
178
|
+
description: string;
|
|
179
|
+
};
|
|
180
|
+
input: {
|
|
181
|
+
readonly options: {
|
|
182
|
+
readonly yes: {
|
|
183
|
+
readonly type: "boolean";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
readonly forms: readonly [{
|
|
187
|
+
readonly id: "default";
|
|
188
|
+
readonly positionals: readonly [{
|
|
189
|
+
readonly name: "project-key";
|
|
190
|
+
readonly min: 0;
|
|
191
|
+
readonly max: 1;
|
|
192
|
+
readonly value: {
|
|
193
|
+
readonly kind: "project-key";
|
|
194
|
+
};
|
|
195
|
+
}];
|
|
196
|
+
}];
|
|
197
|
+
readonly constraints: readonly [];
|
|
198
|
+
readonly notes: readonly ["An omitted project key uses defaultProject from settings. Without a configured default, a project key is required. A missing configured project is an error."];
|
|
199
|
+
};
|
|
200
|
+
results: import("../results.js").CommandResult[];
|
|
201
|
+
run: (args: Array<string>) => Promise<void>;
|
|
202
|
+
help: string;
|
|
203
|
+
};
|
|
204
|
+
column: {
|
|
205
|
+
create: {
|
|
206
|
+
summary: string;
|
|
207
|
+
effects: {
|
|
208
|
+
domain: "create";
|
|
209
|
+
storage: "normal-open";
|
|
210
|
+
};
|
|
211
|
+
confirmation: {
|
|
212
|
+
kind: "none";
|
|
213
|
+
};
|
|
214
|
+
input: {
|
|
215
|
+
readonly options: {};
|
|
216
|
+
readonly forms: readonly [{
|
|
217
|
+
readonly id: "default";
|
|
218
|
+
readonly positionals: readonly [{
|
|
219
|
+
readonly name: "project-key";
|
|
220
|
+
readonly min: 1;
|
|
221
|
+
readonly max: 1;
|
|
222
|
+
readonly value: {
|
|
223
|
+
readonly kind: "project-key";
|
|
224
|
+
};
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "column-name";
|
|
227
|
+
readonly min: 1;
|
|
228
|
+
readonly max: 1;
|
|
229
|
+
readonly value: {
|
|
230
|
+
readonly kind: "column-name";
|
|
231
|
+
};
|
|
232
|
+
}];
|
|
233
|
+
}];
|
|
234
|
+
readonly constraints: readonly [];
|
|
235
|
+
};
|
|
236
|
+
results: import("../results.js").CommandResult[];
|
|
237
|
+
run: (args: Array<string>) => void;
|
|
238
|
+
help: string;
|
|
239
|
+
};
|
|
240
|
+
list: {
|
|
241
|
+
summary: string;
|
|
242
|
+
effects: {
|
|
243
|
+
domain: "read";
|
|
244
|
+
storage: "normal-open";
|
|
245
|
+
};
|
|
246
|
+
confirmation: {
|
|
247
|
+
kind: "none";
|
|
248
|
+
};
|
|
249
|
+
input: {
|
|
250
|
+
readonly options: {};
|
|
251
|
+
readonly forms: readonly [{
|
|
252
|
+
readonly id: "default";
|
|
253
|
+
readonly positionals: readonly [{
|
|
254
|
+
readonly name: "project-key";
|
|
255
|
+
readonly min: 0;
|
|
256
|
+
readonly max: 1;
|
|
257
|
+
readonly value: {
|
|
258
|
+
readonly kind: "project-key";
|
|
259
|
+
};
|
|
260
|
+
}];
|
|
261
|
+
}];
|
|
262
|
+
readonly constraints: readonly [];
|
|
263
|
+
readonly notes: readonly ["An omitted project key uses defaultProject from settings. Without a configured default, a project key is required. A missing configured project is an error."];
|
|
264
|
+
};
|
|
265
|
+
results: import("../results.js").CommandResult[];
|
|
266
|
+
run: (args: Array<string>) => void;
|
|
267
|
+
help: string;
|
|
268
|
+
};
|
|
269
|
+
edit: {
|
|
270
|
+
summary: string;
|
|
271
|
+
effects: {
|
|
272
|
+
domain: "update";
|
|
273
|
+
storage: "normal-open";
|
|
274
|
+
};
|
|
275
|
+
confirmation: {
|
|
276
|
+
kind: "none";
|
|
277
|
+
};
|
|
278
|
+
input: {
|
|
279
|
+
readonly options: {
|
|
280
|
+
readonly name: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly required: true;
|
|
283
|
+
readonly value: {
|
|
284
|
+
readonly kind: "text";
|
|
285
|
+
readonly name: "text";
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
readonly forms: readonly [{
|
|
290
|
+
readonly id: "default";
|
|
291
|
+
readonly positionals: readonly [{
|
|
292
|
+
readonly name: "project-key";
|
|
293
|
+
readonly min: 1;
|
|
294
|
+
readonly max: 1;
|
|
295
|
+
readonly value: {
|
|
296
|
+
readonly kind: "project-key";
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
readonly name: "column-name";
|
|
300
|
+
readonly min: 1;
|
|
301
|
+
readonly max: 1;
|
|
302
|
+
readonly value: {
|
|
303
|
+
readonly kind: "column-name";
|
|
304
|
+
};
|
|
305
|
+
}];
|
|
306
|
+
}];
|
|
307
|
+
readonly constraints: readonly [];
|
|
308
|
+
};
|
|
309
|
+
results: import("../results.js").CommandResult[];
|
|
310
|
+
run: (args: Array<string>) => void;
|
|
311
|
+
help: string;
|
|
312
|
+
};
|
|
313
|
+
order: {
|
|
314
|
+
summary: string;
|
|
315
|
+
effects: {
|
|
316
|
+
domain: "update";
|
|
317
|
+
storage: "normal-open";
|
|
318
|
+
};
|
|
319
|
+
confirmation: {
|
|
320
|
+
kind: "none";
|
|
321
|
+
};
|
|
322
|
+
input: {
|
|
323
|
+
readonly options: {};
|
|
324
|
+
readonly forms: readonly [{
|
|
325
|
+
readonly id: "absolute";
|
|
326
|
+
readonly positionals: readonly [{
|
|
327
|
+
readonly name: "project-key";
|
|
328
|
+
readonly min: 1;
|
|
329
|
+
readonly max: 1;
|
|
330
|
+
readonly value: {
|
|
331
|
+
readonly kind: "project-key";
|
|
332
|
+
};
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "column-name";
|
|
335
|
+
readonly min: 1;
|
|
336
|
+
readonly max: 1;
|
|
337
|
+
readonly value: {
|
|
338
|
+
readonly kind: "column-name";
|
|
339
|
+
};
|
|
340
|
+
}, {
|
|
341
|
+
readonly name: "direction";
|
|
342
|
+
readonly min: 1;
|
|
343
|
+
readonly max: 1;
|
|
344
|
+
readonly value: {
|
|
345
|
+
readonly kind: "enum";
|
|
346
|
+
readonly choices: ("first" | "previous" | "next" | "last")[];
|
|
347
|
+
};
|
|
348
|
+
}];
|
|
349
|
+
}, {
|
|
350
|
+
readonly id: "relative";
|
|
351
|
+
readonly positionals: readonly [{
|
|
352
|
+
readonly name: "project-key";
|
|
353
|
+
readonly min: 1;
|
|
354
|
+
readonly max: 1;
|
|
355
|
+
readonly value: {
|
|
356
|
+
readonly kind: "project-key";
|
|
357
|
+
};
|
|
358
|
+
}, {
|
|
359
|
+
readonly name: "column-name";
|
|
360
|
+
readonly min: 1;
|
|
361
|
+
readonly max: 1;
|
|
362
|
+
readonly value: {
|
|
363
|
+
readonly kind: "column-name";
|
|
364
|
+
};
|
|
365
|
+
}, {
|
|
366
|
+
readonly name: "direction";
|
|
367
|
+
readonly min: 1;
|
|
368
|
+
readonly max: 1;
|
|
369
|
+
readonly value: {
|
|
370
|
+
readonly kind: "enum";
|
|
371
|
+
readonly choices: ("before" | "after")[];
|
|
372
|
+
};
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "target-column-name";
|
|
375
|
+
readonly min: 1;
|
|
376
|
+
readonly max: 1;
|
|
377
|
+
readonly value: {
|
|
378
|
+
readonly kind: "column-name";
|
|
379
|
+
};
|
|
380
|
+
}];
|
|
381
|
+
}];
|
|
382
|
+
readonly constraints: readonly [];
|
|
383
|
+
};
|
|
384
|
+
results: import("../results.js").CommandResult[];
|
|
385
|
+
run: (args: Array<string>) => void;
|
|
386
|
+
help: string;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|