@zinn-dev/cli 0.40.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 +166 -38
- package/index.js +24 -13
- package/package.json +7 -2
- package/skills/zinn/SKILL.md +63 -0
- package/src/actor.d.ts +2 -1
- package/src/actor.js +78 -11
- 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 +1 -1
- package/src/database.js +4 -4
- 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 +42 -7
- package/src/lib.js +213 -17
- package/src/presentation/activity-presentation.js +16 -2
- package/src/presentation/column-presentation.d.ts +3 -5
- package/src/presentation/info-presentation.d.ts +4 -0
- package/src/presentation/info-presentation.js +96 -0
- package/src/presentation/task-presentation.d.ts +2 -10
- package/src/project.d.ts +6 -0
- package/src/project.js +23 -10
- 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 +71 -0
- package/src/routes/activity-router.js +59 -11
- package/src/routes/backup-router.d.ts +17 -0
- package/src/routes/backup-router.js +15 -3
- package/src/routes/capabilities-router.d.ts +21 -0
- package/src/routes/capabilities-router.js +28 -0
- package/src/routes/comment-router.d.ts +183 -4
- package/src/routes/comment-router.js +136 -29
- package/src/routes/info-router.d.ts +21 -0
- package/src/routes/info-router.js +29 -0
- package/src/routes/label-router.d.ts +165 -0
- package/src/routes/label-router.js +111 -29
- package/src/routes/migrate-router.d.ts +17 -0
- package/src/routes/migrate-router.js +17 -5
- package/src/routes/project-router.d.ts +349 -0
- package/src/routes/project-router.js +278 -92
- package/src/routes/reindex-router.d.ts +17 -0
- package/src/routes/reindex-router.js +15 -3
- package/src/routes/relation-router.d.ts +108 -12
- package/src/routes/relation-router.js +74 -14
- package/src/routes/restore-router.d.ts +29 -0
- package/src/routes/restore-router.js +30 -13
- package/src/routes/router.d.ts +1 -1
- package/src/routes/router.js +44 -25
- package/src/routes/routes.d.ts +1565 -0
- package/src/routes/routes.js +5 -1
- package/src/routes/task-router.d.ts +861 -0
- package/src/routes/task-router.js +419 -163
- package/src/text-edit.d.ts +20 -2
- package/src/text-edit.js +22 -10
- package/src/types.d.ts +14 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { jsonResult } from "../results.js";
|
|
1
2
|
import { parseArgs } from "node:util";
|
|
2
|
-
import { label, labelCreateSchema, labelDeleteSchema, labelEditSchema } from "@zinn-dev/core";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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";
|
|
5
8
|
import { currentActor } from "../actor.js";
|
|
6
9
|
import { isColorEnabled } from "../presentation/color.js";
|
|
7
10
|
import { formatRows } from "../presentation/row-layout.js";
|
|
@@ -19,64 +22,131 @@ function formatLabelList(presentedLabels) {
|
|
|
19
22
|
* does not support color, it is explicitly printed instead
|
|
20
23
|
*/
|
|
21
24
|
if (isColorEnabled()) {
|
|
22
|
-
|
|
25
|
+
const style = labelColorSchema.options.find((color) => color === presented.color);
|
|
26
|
+
return [{ text: presented.name, style }, ...descriptionCells];
|
|
23
27
|
}
|
|
24
28
|
return [{ text: presented.name }, { text: presented.color }, ...descriptionCells];
|
|
25
29
|
}));
|
|
26
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
|
+
};
|
|
27
80
|
export const labelRouter = {
|
|
28
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")],
|
|
29
87
|
run: (args) => {
|
|
30
88
|
const { values, positionals, tokens } = parseArgs({
|
|
31
89
|
args,
|
|
32
|
-
options:
|
|
90
|
+
options: labelInputs.create.options,
|
|
33
91
|
allowPositionals: true,
|
|
34
92
|
strict: true,
|
|
35
93
|
tokens: true,
|
|
36
94
|
});
|
|
37
|
-
validateUniqueOptions(tokens);
|
|
38
|
-
validatePositionals(positionals, [
|
|
95
|
+
validateUniqueOptions(tokens, labelInputs.create.options);
|
|
96
|
+
validatePositionals(positionals, labelInputs.create.forms[0]);
|
|
39
97
|
const input = labelCreateSchema.parse({ name: positionals[0], ...values });
|
|
40
98
|
const created = label.create(input, currentActor());
|
|
41
99
|
output(presentLabel(created), formatLabel);
|
|
42
100
|
},
|
|
43
|
-
help:
|
|
101
|
+
help: `${generateCommandUsage("label create", labelInputs.create)}
|
|
44
102
|
|
|
45
103
|
Create a global label. Names preserve casing, but uniqueness is case-insensitive.
|
|
46
104
|
Names are trimmed and cannot be blank or contain line breaks or control characters.
|
|
47
105
|
Description is optional.
|
|
48
106
|
|
|
49
107
|
Color defaults to white.
|
|
50
|
-
Valid colors:
|
|
108
|
+
Valid colors: ${labelInputs.create.options.color.value.choices.join(", ")}.
|
|
51
109
|
|
|
52
|
-
|
|
110
|
+
${dashValueHelp("--description")}
|
|
111
|
+
|
|
112
|
+
Example: zinn label create bug --description 'Unexpected behavior' --color red`,
|
|
53
113
|
},
|
|
54
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")],
|
|
55
120
|
run: (args) => {
|
|
56
|
-
const { positionals } = parseArgs({
|
|
57
|
-
|
|
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]);
|
|
58
128
|
output(label.getAll().map(presentLabel), formatLabelList);
|
|
59
129
|
},
|
|
60
|
-
help:
|
|
130
|
+
help: `${generateCommandUsage("label list", labelInputs.list)}
|
|
61
131
|
|
|
62
132
|
List all global label definitions.`,
|
|
63
133
|
},
|
|
64
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")],
|
|
65
140
|
run: (args) => {
|
|
66
141
|
const { values, positionals, tokens } = parseArgs({
|
|
67
142
|
args,
|
|
68
|
-
options:
|
|
69
|
-
name: { type: "string" },
|
|
70
|
-
description: { type: "string" },
|
|
71
|
-
...textEditOptions,
|
|
72
|
-
color: { type: "string" },
|
|
73
|
-
},
|
|
143
|
+
options: labelInputs.edit.options,
|
|
74
144
|
allowPositionals: true,
|
|
75
145
|
strict: true,
|
|
76
146
|
tokens: true,
|
|
77
147
|
});
|
|
78
|
-
validateUniqueOptions(tokens);
|
|
79
|
-
validatePositionals(positionals, [
|
|
148
|
+
validateUniqueOptions(tokens, labelInputs.edit.options);
|
|
149
|
+
validatePositionals(positionals, labelInputs.edit.forms[0]);
|
|
80
150
|
const input = labelEditSchema.parse({
|
|
81
151
|
labelName: positionals[0],
|
|
82
152
|
name: values.name,
|
|
@@ -86,10 +156,11 @@ List all global label definitions.`,
|
|
|
86
156
|
const edited = label.edit(input, currentActor());
|
|
87
157
|
output(presentLabel(edited), formatLabel);
|
|
88
158
|
},
|
|
89
|
-
help:
|
|
159
|
+
help: `${generateCommandUsage("label edit", labelInputs.edit)}
|
|
90
160
|
|
|
91
161
|
Change specified fields.
|
|
92
|
-
Provide at least one edit flag. Use --description
|
|
162
|
+
Provide at least one edit flag. Use --description '' to clear the description.
|
|
163
|
+
Valid colors: ${labelInputs.edit.options.color.value.choices.join(", ")}.
|
|
93
164
|
|
|
94
165
|
${textEditHelp("--description")}
|
|
95
166
|
|
|
@@ -97,25 +168,36 @@ Names are matched and kept unique case-insensitively while preserving their casi
|
|
|
97
168
|
Names are trimmed. Changing only the casing is allowed.
|
|
98
169
|
Editing does not affect task attachments or task timestamps.
|
|
99
170
|
|
|
171
|
+
${dashValueHelp("--description")}
|
|
172
|
+
|
|
100
173
|
Examples:
|
|
101
174
|
zinn label edit bug --name defect --color yellow
|
|
102
|
-
zinn label edit bug --description
|
|
175
|
+
zinn label edit bug --description 'Reported by users.' --append`,
|
|
103
176
|
},
|
|
104
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")],
|
|
105
183
|
run: async (args) => {
|
|
106
184
|
const { values, positionals, tokens } = parseArgs({
|
|
107
185
|
args,
|
|
108
|
-
options:
|
|
186
|
+
options: labelInputs.delete.options,
|
|
109
187
|
strict: true,
|
|
110
188
|
allowPositionals: true,
|
|
111
189
|
tokens: true,
|
|
112
190
|
});
|
|
113
|
-
validateUniqueOptions(tokens);
|
|
114
|
-
validatePositionals(positionals, [
|
|
191
|
+
validateUniqueOptions(tokens, labelInputs.delete.options);
|
|
192
|
+
validatePositionals(positionals, labelInputs.delete.forms[0]);
|
|
115
193
|
const props = labelDeleteSchema.parse({ name: positionals[0] });
|
|
116
194
|
const labelMatch = label.getByName(props.name);
|
|
117
195
|
if (labelMatch == null) {
|
|
118
|
-
|
|
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
|
+
});
|
|
119
201
|
}
|
|
120
202
|
const canDelete = await confirmAction(`Are you sure you want to delete label "${labelMatch.name}" and remove it from all tasks?`, values.yes === true);
|
|
121
203
|
if (!canDelete) {
|
|
@@ -125,7 +207,7 @@ Examples:
|
|
|
125
207
|
const deleted = label.delete(props, currentActor());
|
|
126
208
|
output(presentLabel(deleted), (l) => `Deleted label "${l.name}"`);
|
|
127
209
|
},
|
|
128
|
-
help:
|
|
210
|
+
help: `${generateCommandUsage("label delete", labelInputs.delete)}
|
|
129
211
|
|
|
130
212
|
Delete a label definition and remove it from all tasks after confirmation.
|
|
131
213
|
To remove a label from just one task, use zinn task label remove.
|
|
@@ -1,4 +1,21 @@
|
|
|
1
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[];
|
|
2
19
|
run: (args: string[]) => void;
|
|
3
20
|
help: string;
|
|
4
21
|
};
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
import { jsonResult } from "../results.js";
|
|
1
2
|
import { parseArgs } from "node:util";
|
|
2
3
|
import { migrate, MigrationRefusedError, getStorage } from "@zinn-dev/core";
|
|
4
|
+
import { generateCommandUsage, noInput } from "../input.js";
|
|
3
5
|
import { reportLockWait } from "../database.js";
|
|
4
|
-
import { output, validatePositionals } from "../lib.js";
|
|
6
|
+
import { diagnostic, output, validatePositionals } from "../lib.js";
|
|
5
7
|
import packageJson from "../../package.json" with { type: "json" };
|
|
6
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")],
|
|
7
14
|
run: (args) => {
|
|
8
|
-
const { positionals } = parseArgs({
|
|
9
|
-
|
|
15
|
+
const { positionals } = parseArgs({
|
|
16
|
+
options: noInput.options,
|
|
17
|
+
args,
|
|
18
|
+
strict: true,
|
|
19
|
+
allowPositionals: true,
|
|
20
|
+
});
|
|
21
|
+
validatePositionals(positionals, noInput.forms[0]);
|
|
10
22
|
// Resolved before the try, so a store that cannot be resolved fails without the note about backups.
|
|
11
23
|
const { backupDirectory } = getStorage();
|
|
12
24
|
try {
|
|
@@ -22,12 +34,12 @@ export const migrateCommand = {
|
|
|
22
34
|
catch (error) {
|
|
23
35
|
// A refusal attempted nothing, so only a failed upgrade points at the backups.
|
|
24
36
|
if (!(error instanceof MigrationRefusedError)) {
|
|
25
|
-
|
|
37
|
+
diagnostic(`The database is unchanged. Backups taken before each upgrade attempt are kept in ${backupDirectory}.`);
|
|
26
38
|
}
|
|
27
39
|
throw error;
|
|
28
40
|
}
|
|
29
41
|
},
|
|
30
|
-
help:
|
|
42
|
+
help: `${generateCommandUsage("migrate", noInput)}
|
|
31
43
|
|
|
32
44
|
Upgrade an existing database to the latest schema version.
|
|
33
45
|
|
|
@@ -1,38 +1,387 @@
|
|
|
1
1
|
export declare const projectRouter: {
|
|
2
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[];
|
|
3
42
|
run: (args: Array<string>) => void;
|
|
4
43
|
help: string;
|
|
5
44
|
};
|
|
6
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[];
|
|
7
63
|
run: (args: Array<string>) => void;
|
|
8
64
|
help: string;
|
|
9
65
|
};
|
|
10
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[];
|
|
11
92
|
run: (args: Array<string>) => void;
|
|
12
93
|
help: string;
|
|
13
94
|
};
|
|
14
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[];
|
|
15
167
|
run: (args: string[]) => void;
|
|
16
168
|
help: string;
|
|
17
169
|
};
|
|
18
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[];
|
|
19
201
|
run: (args: Array<string>) => Promise<void>;
|
|
20
202
|
help: string;
|
|
21
203
|
};
|
|
22
204
|
column: {
|
|
23
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[];
|
|
24
237
|
run: (args: Array<string>) => void;
|
|
25
238
|
help: string;
|
|
26
239
|
};
|
|
27
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[];
|
|
28
266
|
run: (args: Array<string>) => void;
|
|
29
267
|
help: string;
|
|
30
268
|
};
|
|
31
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[];
|
|
32
310
|
run: (args: Array<string>) => void;
|
|
33
311
|
help: string;
|
|
34
312
|
};
|
|
35
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[];
|
|
36
385
|
run: (args: Array<string>) => void;
|
|
37
386
|
help: string;
|
|
38
387
|
};
|