centy 0.6.0 → 0.7.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/commands/create.d.ts +21 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +95 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/get.js +1 -7
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/{create/item-type.d.ts → item-type/create.d.ts} +2 -2
- package/dist/commands/item-type/create.d.ts.map +1 -0
- package/dist/commands/{create/item-type.js → item-type/create.js} +5 -5
- package/dist/commands/item-type/create.js.map +1 -0
- package/dist/commands/{create/org.d.ts → org/create.d.ts} +2 -3
- package/dist/commands/org/create.d.ts.map +1 -0
- package/dist/commands/{create/org.js → org/create.js} +6 -9
- package/dist/commands/org/create.js.map +1 -0
- package/dist/commands/{create/user.d.ts → user/create.d.ts} +2 -2
- package/dist/commands/user/create.d.ts.map +1 -0
- package/dist/commands/{create/user.js → user/create.js} +7 -7
- package/dist/commands/user/create.js.map +1 -0
- package/dist/daemon/daemon-create-item.d.ts +6 -0
- package/dist/daemon/daemon-create-item.d.ts.map +1 -0
- package/dist/daemon/daemon-create-item.js +9 -0
- package/dist/daemon/daemon-create-item.js.map +1 -0
- package/dist/utils/parse-custom-fields.d.ts +5 -0
- package/dist/utils/parse-custom-fields.d.ts.map +1 -0
- package/dist/utils/parse-custom-fields.js +19 -0
- package/dist/utils/parse-custom-fields.js.map +1 -0
- package/dist/utils/to-plural.d.ts +5 -0
- package/dist/utils/to-plural.d.ts.map +1 -0
- package/dist/utils/to-plural.js +11 -0
- package/dist/utils/to-plural.js.map +1 -0
- package/oclif.manifest.json +465 -538
- package/package.json +1 -1
- package/dist/commands/create/doc.d.ts +0 -17
- package/dist/commands/create/doc.d.ts.map +0 -1
- package/dist/commands/create/doc.js +0 -69
- package/dist/commands/create/doc.js.map +0 -1
- package/dist/commands/create/issue.d.ts +0 -19
- package/dist/commands/create/issue.d.ts.map +0 -1
- package/dist/commands/create/issue.js +0 -71
- package/dist/commands/create/issue.js.map +0 -1
- package/dist/commands/create/item-type.d.ts.map +0 -1
- package/dist/commands/create/item-type.js.map +0 -1
- package/dist/commands/create/org.d.ts.map +0 -1
- package/dist/commands/create/org.js.map +0 -1
- package/dist/commands/create/user.d.ts.map +0 -1
- package/dist/commands/create/user.js.map +0 -1
- package/dist/lib/create-issue/index.d.ts +0 -2
- package/dist/lib/create-issue/index.d.ts.map +0 -1
- package/dist/lib/create-issue/index.js +0 -2
- package/dist/lib/create-issue/index.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Create a new item of any registered type via the generic CreateItem RPC
|
|
4
|
+
*/
|
|
5
|
+
export default class Create extends Command {
|
|
6
|
+
static args: {
|
|
7
|
+
type: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
title: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
body: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
priority: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'custom-field': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAYlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IAEzC,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAAkC;IAG7D,OAAgB,QAAQ,WAMvB;IAGD,OAAgB,KAAK;;;;;;;MA0BpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyClC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
+
import { daemonCreateItem } from '../daemon/daemon-create-item.js';
|
|
4
|
+
import { projectFlag } from '../flags/project-flag.js';
|
|
5
|
+
import { ensureInitialized, NotInitializedError, } from '../utils/ensure-initialized.js';
|
|
6
|
+
import { parseCustomFields } from '../utils/parse-custom-fields.js';
|
|
7
|
+
import { resolveProjectPath } from '../utils/resolve-project-path.js';
|
|
8
|
+
import { toPlural } from '../utils/to-plural.js';
|
|
9
|
+
/**
|
|
10
|
+
* Create a new item of any registered type via the generic CreateItem RPC
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
13
|
+
export default class Create extends Command {
|
|
14
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
15
|
+
static args = {
|
|
16
|
+
type: Args.string({
|
|
17
|
+
description: 'Item type (e.g., issue, doc, epic, or custom type)',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
+
static description = 'Create a new item of any type';
|
|
23
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
24
|
+
static examples = [
|
|
25
|
+
'<%= config.bin %> create issue --title "Bug in login" --priority 1',
|
|
26
|
+
'<%= config.bin %> create doc --title "Getting Started" --body "# Guide"',
|
|
27
|
+
'<%= config.bin %> create epic --title "Auth overhaul" --status open',
|
|
28
|
+
'<%= config.bin %> create bug --title "Crash on startup"',
|
|
29
|
+
'<%= config.bin %> create task --title "Review PR" --custom-field "assignee=alice"',
|
|
30
|
+
];
|
|
31
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
32
|
+
static flags = {
|
|
33
|
+
title: Flags.string({
|
|
34
|
+
char: 't',
|
|
35
|
+
description: 'Item title',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
body: Flags.string({
|
|
39
|
+
char: 'b',
|
|
40
|
+
description: 'Item body / description (markdown)',
|
|
41
|
+
default: '',
|
|
42
|
+
}),
|
|
43
|
+
status: Flags.string({
|
|
44
|
+
char: 's',
|
|
45
|
+
description: 'Initial status (empty = use type default)',
|
|
46
|
+
default: '',
|
|
47
|
+
}),
|
|
48
|
+
priority: Flags.integer({
|
|
49
|
+
char: 'p',
|
|
50
|
+
description: 'Priority level (0 = use default)',
|
|
51
|
+
default: 0,
|
|
52
|
+
}),
|
|
53
|
+
'custom-field': Flags.string({
|
|
54
|
+
description: 'Custom field as key=value (repeatable)',
|
|
55
|
+
multiple: true,
|
|
56
|
+
}),
|
|
57
|
+
project: projectFlag,
|
|
58
|
+
};
|
|
59
|
+
async run() {
|
|
60
|
+
const { args, flags } = await this.parse(Create);
|
|
61
|
+
const itemType = toPlural(args.type);
|
|
62
|
+
const cwd = await resolveProjectPath(flags.project);
|
|
63
|
+
try {
|
|
64
|
+
await ensureInitialized(cwd);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof NotInitializedError) {
|
|
68
|
+
this.error(error.message);
|
|
69
|
+
}
|
|
70
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
71
|
+
}
|
|
72
|
+
const customFields = parseCustomFields(flags['custom-field']);
|
|
73
|
+
const response = await daemonCreateItem({
|
|
74
|
+
projectPath: cwd,
|
|
75
|
+
itemType,
|
|
76
|
+
title: flags.title,
|
|
77
|
+
body: flags.body,
|
|
78
|
+
status: flags.status,
|
|
79
|
+
priority: flags.priority,
|
|
80
|
+
customFields,
|
|
81
|
+
});
|
|
82
|
+
if (!response.success) {
|
|
83
|
+
const errorMsg = response.error !== '' ? response.error : 'Failed to create item';
|
|
84
|
+
this.error(errorMsg);
|
|
85
|
+
}
|
|
86
|
+
const item = response.item;
|
|
87
|
+
const meta = item.metadata;
|
|
88
|
+
const displayId = meta !== undefined && meta.displayNumber > 0
|
|
89
|
+
? ` #${meta.displayNumber}`
|
|
90
|
+
: '';
|
|
91
|
+
this.log(`Created ${args.type}${displayId}: "${item.title}"`);
|
|
92
|
+
this.log(` ID: ${item.id}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,OAAO;IACzC,gDAAgD;IAChD,MAAM,CAAU,IAAI,GAAG;QACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,oDAAoD;YACjE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CAAC,CAAA;QAC7D,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAalD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IAEtC,OAAgB,IAAI;;;MASnB;IAGD,OAAgB,WAAW,SAAuC;IAGlE,OAAgB,QAAQ,WASvB;IAGD,OAAgB,KAAK;;;;MAWpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4ClC"}
|
package/dist/commands/get.js
CHANGED
|
@@ -6,6 +6,7 @@ import { formatGenericItem } from '../lib/get-item/format-generic-item.js';
|
|
|
6
6
|
import { handleGlobalGet } from '../lib/get-item/handle-global-get.js';
|
|
7
7
|
import { ensureInitialized, NotInitializedError, } from '../utils/ensure-initialized.js';
|
|
8
8
|
import { resolveProjectPath } from '../utils/resolve-project-path.js';
|
|
9
|
+
import { toPlural } from '../utils/to-plural.js';
|
|
9
10
|
/**
|
|
10
11
|
* Get any item by type and identifier
|
|
11
12
|
*/
|
|
@@ -81,11 +82,4 @@ export default class Get extends Command {
|
|
|
81
82
|
formatGenericItem(response.item, this.log.bind(this));
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
function toPlural(type) {
|
|
85
|
-
if (type.endsWith('s'))
|
|
86
|
-
return type;
|
|
87
|
-
if (type.endsWith('y'))
|
|
88
|
-
return type.slice(0, -1) + 'ies';
|
|
89
|
-
return type + 's';
|
|
90
|
-
}
|
|
91
85
|
//# sourceMappingURL=get.js.map
|
package/dist/commands/get.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;IACtC,gDAAgD;IAChD,MAAM,CAAU,IAAI,GAAG;QACrB,IAAI,EAAE,IAAI,CAAC,MAAM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CAAC,IAAI,CAAC,IAAI,CAAC,EACnB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EACpB,UAAU,CACX,CAAA;YACD,OAAM;QACR,CAAC;QAED,IAAI,CAAC;YACH,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAA;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;gBACzC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC3B,CAAC;YACD,MAAM,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;QACjE,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC;YACnC,WAAW,EAAE,GAAG;YAChB,QAAQ;YACR,MAAM,EAAE,IAAI,CAAC,EAAE;SAChB,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YAChD,OAAM;QACR,CAAC;QAED,iBAAiB,CAAC,QAAQ,CAAC,IAAK,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACxD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a new custom item type in the .centy folder
|
|
4
4
|
*/
|
|
5
|
-
export default class
|
|
5
|
+
export default class ItemTypeCreate extends Command {
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
@@ -17,4 +17,4 @@ export default class CreateItemType extends Command {
|
|
|
17
17
|
};
|
|
18
18
|
run(): Promise<void>;
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/item-type/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAA;AAW5C;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAEjD,OAAgB,WAAW,SAAkC;IAG7D,OAAgB,QAAQ,WAGvB;IAGD,OAAgB,KAAK;;;;;;;;;MAiCpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4ClC"}
|
|
@@ -8,13 +8,13 @@ import { resolveProjectPath } from '../../utils/resolve-project-path.js';
|
|
|
8
8
|
* Create a new custom item type in the .centy folder
|
|
9
9
|
*/
|
|
10
10
|
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
11
|
-
export default class
|
|
11
|
+
export default class ItemTypeCreate extends Command {
|
|
12
12
|
// eslint-disable-next-line no-restricted-syntax
|
|
13
13
|
static description = 'Create a new custom item type';
|
|
14
14
|
// eslint-disable-next-line no-restricted-syntax
|
|
15
15
|
static examples = [
|
|
16
|
-
'<%= config.bin %>
|
|
17
|
-
'<%= config.bin %>
|
|
16
|
+
'<%= config.bin %> item-type create --name "Bug" --plural "bugs" --identifier uuid --statuses open,in-progress,closed --default-status open --priority-levels 3 --features display-number,status,priority,move,duplicate',
|
|
17
|
+
'<%= config.bin %> item-type create --name "Task" --plural "tasks" --identifier slug --statuses todo,doing,done --default-status todo --features status,priority',
|
|
18
18
|
];
|
|
19
19
|
// eslint-disable-next-line no-restricted-syntax
|
|
20
20
|
static flags = {
|
|
@@ -51,7 +51,7 @@ export default class CreateItemType extends Command {
|
|
|
51
51
|
project: projectFlag,
|
|
52
52
|
};
|
|
53
53
|
async run() {
|
|
54
|
-
const { flags } = await this.parse(
|
|
54
|
+
const { flags } = await this.parse(ItemTypeCreate);
|
|
55
55
|
const cwd = await resolveProjectPath(flags.project);
|
|
56
56
|
const statuses = flags.statuses.split(',').map(s => s.trim());
|
|
57
57
|
const defaultStatus = flags['default-status'];
|
|
@@ -88,4 +88,4 @@ export default class CreateItemType extends Command {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
//# sourceMappingURL=
|
|
91
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/item-type/create.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAA;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAExE;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IACjD,gDAAgD;IAChD,MAAM,CAAU,WAAW,GAAG,+BAA+B,CAAA;IAE7D,gDAAgD;IAChD,MAAM,CAAU,QAAQ,GAAG;QACzB,yNAAyN;QACzN,iKAAiK;KAClK,CAAA;IAED,gDAAgD;IAChD,MAAM,CAAU,KAAK,GAAG;QACtB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnB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AK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACxD,IAAI,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC3C,CAAC;IACH,CAAC"}
|
|
@@ -2,8 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a new organization
|
|
4
4
|
*/
|
|
5
|
-
export default class
|
|
6
|
-
static aliases: string[];
|
|
5
|
+
export default class OrgCreate extends Command {
|
|
7
6
|
static args: {
|
|
8
7
|
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
8
|
};
|
|
@@ -16,4 +15,4 @@ export default class CreateOrg extends Command {
|
|
|
16
15
|
};
|
|
17
16
|
run(): Promise<void>;
|
|
18
17
|
}
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/org/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAIlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;IAE5C,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAAgD;IAG3E,OAAgB,QAAQ,WAIvB;IAGD,OAAgB,KAAK;;;;MAapB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBlC"}
|
|
@@ -5,9 +5,7 @@ import { daemonCreateOrganization } from '../../daemon/daemon-create-organizatio
|
|
|
5
5
|
* Create a new organization
|
|
6
6
|
*/
|
|
7
7
|
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
8
|
-
export default class
|
|
9
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
10
|
-
static aliases = ['create:organization'];
|
|
8
|
+
export default class OrgCreate extends Command {
|
|
11
9
|
// eslint-disable-next-line no-restricted-syntax
|
|
12
10
|
static args = {
|
|
13
11
|
name: Args.string({
|
|
@@ -19,10 +17,9 @@ export default class CreateOrg extends Command {
|
|
|
19
17
|
static description = 'Create a new organization to group projects';
|
|
20
18
|
// eslint-disable-next-line no-restricted-syntax
|
|
21
19
|
static examples = [
|
|
22
|
-
'<%= config.bin %> create
|
|
23
|
-
'<%= config.bin %> create
|
|
24
|
-
'<%= config.bin %> create
|
|
25
|
-
'<%= config.bin %> create organization "Work Projects"',
|
|
20
|
+
'<%= config.bin %> org create "My Company"',
|
|
21
|
+
'<%= config.bin %> org create "Centy.io" --slug centy-io',
|
|
22
|
+
'<%= config.bin %> org create "My Org" --description "Official projects"',
|
|
26
23
|
];
|
|
27
24
|
// eslint-disable-next-line no-restricted-syntax
|
|
28
25
|
static flags = {
|
|
@@ -40,7 +37,7 @@ export default class CreateOrg extends Command {
|
|
|
40
37
|
}),
|
|
41
38
|
};
|
|
42
39
|
async run() {
|
|
43
|
-
const { args, flags } = await this.parse(
|
|
40
|
+
const { args, flags } = await this.parse(OrgCreate);
|
|
44
41
|
const response = await daemonCreateOrganization({
|
|
45
42
|
name: args.name,
|
|
46
43
|
slug: flags.slug !== undefined ? flags.slug : '',
|
|
@@ -61,4 +58,4 @@ export default class CreateOrg extends Command {
|
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/org/create.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAA;AAErF;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;IAC5C,gDAAgD;IAChD,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AAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YACxD,OAAM;QACR,CAAC;QAED,MAAM,GAAG,GAAG,QAAQ,CAAC,YAAa,CAAA;QAClC,IAAI,CAAC,GAAG,CAAC,yBAAyB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;QAC7C,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;QAC/B,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;YACpB,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,CAAC,WAAW,EAAE,CAAC,CAAA;QAC/C,CAAC;IACH,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a new user in the project
|
|
4
4
|
*/
|
|
5
|
-
export default class
|
|
5
|
+
export default class UserCreate extends Command {
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
@@ -15,4 +15,4 @@ export default class CreateUser extends Command {
|
|
|
15
15
|
};
|
|
16
16
|
run(): Promise<void>;
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/user/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAA;AAU5C;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAE7C,OAAgB,WAAW,SAAqC;IAGhE,OAAgB,QAAQ,WAKvB;IAGD,OAAgB,KAAK;;;;;;;MAyBpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4ClC"}
|
|
@@ -8,15 +8,15 @@ import { resolveProjectPath } from '../../utils/resolve-project-path.js';
|
|
|
8
8
|
* Create a new user in the project
|
|
9
9
|
*/
|
|
10
10
|
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
11
|
-
export default class
|
|
11
|
+
export default class UserCreate extends Command {
|
|
12
12
|
// eslint-disable-next-line no-restricted-syntax
|
|
13
13
|
static description = 'Create a new user in the project';
|
|
14
14
|
// eslint-disable-next-line no-restricted-syntax
|
|
15
15
|
static examples = [
|
|
16
|
-
'<%= config.bin %> create
|
|
17
|
-
'<%= config.bin %> create
|
|
18
|
-
'<%= config.bin %> create
|
|
19
|
-
'<%= config.bin %> create
|
|
16
|
+
'<%= config.bin %> user create --name "John Doe"',
|
|
17
|
+
'<%= config.bin %> user create --id john-doe --name "John Doe" --email john@example.com',
|
|
18
|
+
'<%= config.bin %> user create -n "Alice" -g alice-dev -g alice-work',
|
|
19
|
+
'<%= config.bin %> user create --name "Bob" --project centy-daemon',
|
|
20
20
|
];
|
|
21
21
|
// eslint-disable-next-line no-restricted-syntax
|
|
22
22
|
static flags = {
|
|
@@ -45,7 +45,7 @@ export default class CreateUser extends Command {
|
|
|
45
45
|
project: projectFlag,
|
|
46
46
|
};
|
|
47
47
|
async run() {
|
|
48
|
-
const { flags } = await this.parse(
|
|
48
|
+
const { flags } = await this.parse(UserCreate);
|
|
49
49
|
const cwd = await resolveProjectPath(flags.project);
|
|
50
50
|
try {
|
|
51
51
|
await ensureInitialized(cwd);
|
|
@@ -83,4 +83,4 @@ export default class CreateUser extends Command {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
//# sourceMappingURL=
|
|
86
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/user/create.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,OAAO,EAAE,KAA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,GAAG,QAAQ,CAAC,IAAI,CAAA;QAC1B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAM;QACR,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC,CAAA;QACnD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;QACpC,CAAC;QACD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpE,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC9D,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CreateItemRequest, CreateItemResponse } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Create a generic item via daemon
|
|
4
|
+
*/
|
|
5
|
+
export declare function daemonCreateItem(request: CreateItemRequest): Promise<CreateItemResponse>;
|
|
6
|
+
//# sourceMappingURL=daemon-create-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-create-item.d.ts","sourceRoot":"","sources":["../../src/daemon/daemon-create-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGvE;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAG7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getDaemonClient, callWithDeadline } from './load-proto.js';
|
|
2
|
+
/**
|
|
3
|
+
* Create a generic item via daemon
|
|
4
|
+
*/
|
|
5
|
+
export function daemonCreateItem(request) {
|
|
6
|
+
const client = getDaemonClient();
|
|
7
|
+
return callWithDeadline(client.createItem.bind(client), request);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=daemon-create-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-create-item.js","sourceRoot":"","sources":["../../src/daemon/daemon-create-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEnE;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA0B;IAE1B,MAAM,MAAM,GAAG,eAAe,EAAE,CAAA;IAChC,OAAO,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAA;AAClE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-custom-fields.d.ts","sourceRoot":"","sources":["../../src/utils/parse-custom-fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYxB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse custom field key=value pairs into an object.
|
|
3
|
+
*/
|
|
4
|
+
export function parseCustomFields(fields) {
|
|
5
|
+
const result = {};
|
|
6
|
+
if (fields === undefined)
|
|
7
|
+
return result;
|
|
8
|
+
for (const field of fields) {
|
|
9
|
+
const eqIndex = field.indexOf('=');
|
|
10
|
+
if (eqIndex === -1)
|
|
11
|
+
continue;
|
|
12
|
+
const key = field.slice(0, eqIndex);
|
|
13
|
+
const value = field.slice(eqIndex + 1);
|
|
14
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
15
|
+
result[key] = value;
|
|
16
|
+
}
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=parse-custom-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-custom-fields.js","sourceRoot":"","sources":["../../src/utils/parse-custom-fields.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAA4B;IAE5B,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAA;IACvC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAClC,IAAI,OAAO,KAAK,CAAC,CAAC;YAAE,SAAQ;QAC5B,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAA;QACtC,4DAA4D;QAC5D,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-plural.d.ts","sourceRoot":"","sources":["../../src/utils/to-plural.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI7C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a singular item type name to its plural form.
|
|
3
|
+
*/
|
|
4
|
+
export function toPlural(type) {
|
|
5
|
+
if (type.endsWith('s'))
|
|
6
|
+
return type;
|
|
7
|
+
if (type.endsWith('y'))
|
|
8
|
+
return type.slice(0, -1) + 'ies';
|
|
9
|
+
return type + 's';
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=to-plural.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-plural.js","sourceRoot":"","sources":["../../src/utils/to-plural.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;IACxD,OAAO,IAAI,GAAG,GAAG,CAAA;AACnB,CAAC"}
|