centy 0.5.1 → 0.7.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/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/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 +396 -466
- 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/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
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* Create a new documentation file
|
|
4
|
-
*/
|
|
5
|
-
export default class CreateDoc extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
title: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
content: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
slug: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=doc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../../src/commands/create/doc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAA;AAU5C;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;IAE5C,OAAgB,WAAW,SAAoC;IAG/D,OAAgB,QAAQ,WAKvB;IAGD,OAAgB,KAAK;;;;;;MAkBpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8BlC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/order
|
|
2
|
-
import { Command, Flags } from '@oclif/core';
|
|
3
|
-
import { daemonCreateDoc } from '../../daemon/daemon-create-doc.js';
|
|
4
|
-
import { projectFlag } from '../../flags/project-flag.js';
|
|
5
|
-
import { ensureInitialized, NotInitializedError, } from '../../utils/ensure-initialized.js';
|
|
6
|
-
import { resolveProjectPath } from '../../utils/resolve-project-path.js';
|
|
7
|
-
/**
|
|
8
|
-
* Create a new documentation file
|
|
9
|
-
*/
|
|
10
|
-
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
11
|
-
export default class CreateDoc extends Command {
|
|
12
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
13
|
-
static description = 'Create a new documentation file';
|
|
14
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
15
|
-
static examples = [
|
|
16
|
-
'<%= config.bin %> create doc --title "Getting Started"',
|
|
17
|
-
'<%= config.bin %> create doc -t "API Reference" -c "# API\n\nDocumentation here"',
|
|
18
|
-
'<%= config.bin %> create doc --title "Guide" --slug my-guide',
|
|
19
|
-
'<%= config.bin %> create doc --title "Guide" --project centy-daemon',
|
|
20
|
-
];
|
|
21
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
-
static flags = {
|
|
23
|
-
title: Flags.string({
|
|
24
|
-
char: 't',
|
|
25
|
-
description: 'Doc title',
|
|
26
|
-
required: true,
|
|
27
|
-
}),
|
|
28
|
-
content: Flags.string({
|
|
29
|
-
char: 'c',
|
|
30
|
-
description: 'Doc content (markdown)',
|
|
31
|
-
default: '',
|
|
32
|
-
}),
|
|
33
|
-
slug: Flags.string({
|
|
34
|
-
description: 'Custom slug (auto-generated from title if not provided)',
|
|
35
|
-
}),
|
|
36
|
-
template: Flags.string({
|
|
37
|
-
description: 'Template name to use',
|
|
38
|
-
}),
|
|
39
|
-
project: projectFlag,
|
|
40
|
-
};
|
|
41
|
-
async run() {
|
|
42
|
-
const { flags } = await this.parse(CreateDoc);
|
|
43
|
-
const cwd = await resolveProjectPath(flags.project);
|
|
44
|
-
try {
|
|
45
|
-
await ensureInitialized(cwd);
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
if (error instanceof NotInitializedError) {
|
|
49
|
-
this.error(error.message);
|
|
50
|
-
}
|
|
51
|
-
throw error instanceof Error ? error : new Error(String(error));
|
|
52
|
-
}
|
|
53
|
-
const response = await daemonCreateDoc({
|
|
54
|
-
projectPath: cwd,
|
|
55
|
-
title: flags.title,
|
|
56
|
-
content: flags.content,
|
|
57
|
-
slug: flags.slug !== undefined ? flags.slug : '',
|
|
58
|
-
template: flags.template !== undefined ? flags.template : '',
|
|
59
|
-
isOrgDoc: false,
|
|
60
|
-
});
|
|
61
|
-
if (!response.success) {
|
|
62
|
-
this.error(response.error);
|
|
63
|
-
}
|
|
64
|
-
this.log(`Created doc "${flags.title}"`);
|
|
65
|
-
this.log(` Slug: ${response.slug}`);
|
|
66
|
-
this.log(` File: ${response.createdFile}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=doc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doc.js","sourceRoot":"","sources":["../../../src/commands/create/doc.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAExE;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;IAC5C,gDAAgD;IAChD,MAAM,CAAU,WAAW,GAAG,iCAAiC,CAAA;IAE/D,gDAAgD;IAChD,MAAM,CAAU,QAAQ,GAAG;QACzB,wDAAwD;QACxD,kFAAkF;QAClF,8DAA8D;QAC9D,qEAAqE;KACtE,CAAA;IAED,gDAAgD;IAChD,MAAM,CAAU,KAAK,GAAG;QACtB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;YAClB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC;YACpB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,wBAAwB;YACrC,OAAO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C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;QACxC,IAAI,CAAC,GAAG,CAAC,WAAW,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;QACpC,IAAI,CAAC,GAAG,CAAC,WAAW,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;IAC7C,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
/**
|
|
3
|
-
* Create a new issue in the .centy/issues folder
|
|
4
|
-
*/
|
|
5
|
-
export default class CreateIssue extends Command {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
priority: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
draft: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
-
org: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
-
};
|
|
17
|
-
run(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../src/commands/create/issue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAA;AAM5C;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAE9C,OAAgB,WAAW,SAA4C;IAGvE,OAAgB,QAAQ,WAOvB;IAGD,OAAgB,KAAK;;;;;;;;MA4BpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoBlC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/order
|
|
2
|
-
import { Command, Flags } from '@oclif/core';
|
|
3
|
-
import { projectFlag } from '../../flags/project-flag.js';
|
|
4
|
-
import { createIssue } from '../../lib/create-issue/index.js';
|
|
5
|
-
import { resolveProjectPath } from '../../utils/resolve-project-path.js';
|
|
6
|
-
/**
|
|
7
|
-
* Create a new issue in the .centy/issues folder
|
|
8
|
-
*/
|
|
9
|
-
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
10
|
-
export default class CreateIssue extends Command {
|
|
11
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
12
|
-
static description = 'Create a new issue in the .centy folder';
|
|
13
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
14
|
-
static examples = [
|
|
15
|
-
'<%= config.bin %> create issue',
|
|
16
|
-
'<%= config.bin %> create issue --title "Bug in login" --priority high',
|
|
17
|
-
'<%= config.bin %> create issue -t "Add feature" -d "Implement dark mode"',
|
|
18
|
-
'<%= config.bin %> create issue -t "Add feature" --project centy-daemon',
|
|
19
|
-
'<%= config.bin %> create issue --title "WIP feature" --draft',
|
|
20
|
-
'<%= config.bin %> create issue --title "Cross-org bug" --org',
|
|
21
|
-
];
|
|
22
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
23
|
-
static flags = {
|
|
24
|
-
title: Flags.string({
|
|
25
|
-
char: 't',
|
|
26
|
-
description: 'Issue title',
|
|
27
|
-
}),
|
|
28
|
-
description: Flags.string({
|
|
29
|
-
char: 'd',
|
|
30
|
-
description: 'Issue description',
|
|
31
|
-
}),
|
|
32
|
-
priority: Flags.string({
|
|
33
|
-
char: 'p',
|
|
34
|
-
description: 'Priority level (low/medium/high)',
|
|
35
|
-
options: ['low', 'medium', 'high'],
|
|
36
|
-
}),
|
|
37
|
-
status: Flags.string({
|
|
38
|
-
char: 's',
|
|
39
|
-
description: 'Initial status',
|
|
40
|
-
default: 'open',
|
|
41
|
-
}),
|
|
42
|
-
draft: Flags.boolean({
|
|
43
|
-
description: 'Create as draft',
|
|
44
|
-
default: false,
|
|
45
|
-
}),
|
|
46
|
-
org: Flags.boolean({
|
|
47
|
-
description: 'Create as an org-wide issue',
|
|
48
|
-
default: false,
|
|
49
|
-
}),
|
|
50
|
-
project: projectFlag,
|
|
51
|
-
};
|
|
52
|
-
async run() {
|
|
53
|
-
const { flags } = await this.parse(CreateIssue);
|
|
54
|
-
const cwd = await resolveProjectPath(flags.project);
|
|
55
|
-
const result = await createIssue({
|
|
56
|
-
cwd,
|
|
57
|
-
title: flags.title,
|
|
58
|
-
description: flags.description,
|
|
59
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
60
|
-
priority: flags.priority,
|
|
61
|
-
status: flags.status,
|
|
62
|
-
draft: flags.draft,
|
|
63
|
-
org: flags.org,
|
|
64
|
-
});
|
|
65
|
-
if (!result.success) {
|
|
66
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
67
|
-
this.error(result.error ?? 'Failed to create issue');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/commands/create/issue.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;A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OAAO,CAAC,CAAA;QAEnD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC;YAC/B,GAAG;YACH,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,gDAAgD;YAChD,QAAQ,EAAE,KAAK,CAAC,QAAiD;YACjE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,EAAE,KAAK,CAAC,GAAG;SACf,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,gDAAgD;YAChD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,wBAAwB,CAAC,CAAA;QACtD,CAAC;IACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/create-issue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/create-issue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA"}
|