centy 0.0.25 → 0.0.26
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/close/issue.d.ts +16 -0
- package/dist/commands/close/issue.d.ts.map +1 -0
- package/dist/commands/close/issue.js +54 -0
- package/dist/commands/close/issue.js.map +1 -0
- package/dist/commands/close/org-issue.d.ts +17 -0
- package/dist/commands/close/org-issue.d.ts.map +1 -0
- package/dist/commands/close/org-issue.js +69 -0
- package/dist/commands/close/org-issue.js.map +1 -0
- package/dist/commands/close.d.ts +22 -0
- package/dist/commands/close.d.ts.map +1 -0
- package/dist/commands/close.js +198 -0
- package/dist/commands/close.js.map +1 -0
- package/dist/commands/create/issue.d.ts +1 -0
- package/dist/commands/create/issue.d.ts.map +1 -1
- package/dist/commands/create/issue.js +6 -0
- package/dist/commands/create/issue.js.map +1 -1
- package/dist/commands/duplicate/doc.d.ts +19 -0
- package/dist/commands/duplicate/doc.d.ts.map +1 -0
- package/dist/commands/duplicate/doc.js +87 -0
- package/dist/commands/duplicate/doc.js.map +1 -0
- package/dist/commands/duplicate/issue.d.ts +18 -0
- package/dist/commands/duplicate/issue.d.ts.map +1 -0
- package/dist/commands/duplicate/issue.js +82 -0
- package/dist/commands/duplicate/issue.js.map +1 -0
- package/dist/commands/get/issue.d.ts +1 -0
- package/dist/commands/get/issue.d.ts.map +1 -1
- package/dist/commands/get/issue.js +38 -1
- package/dist/commands/get/issue.js.map +1 -1
- package/dist/commands/list/issues.d.ts +1 -0
- package/dist/commands/list/issues.d.ts.map +1 -1
- package/dist/commands/list/issues.js +9 -1
- package/dist/commands/list/issues.js.map +1 -1
- package/dist/commands/move/doc.d.ts +18 -0
- package/dist/commands/move/doc.d.ts.map +1 -0
- package/dist/commands/move/doc.js +82 -0
- package/dist/commands/move/doc.js.map +1 -0
- package/dist/commands/move/issue.d.ts +17 -0
- package/dist/commands/move/issue.d.ts.map +1 -0
- package/dist/commands/move/issue.js +74 -0
- package/dist/commands/move/issue.js.map +1 -0
- package/dist/commands/update/issue.d.ts +1 -0
- package/dist/commands/update/issue.d.ts.map +1 -1
- package/dist/commands/update/issue.js +7 -1
- package/dist/commands/update/issue.js.map +1 -1
- package/dist/daemon/daemon-duplicate-doc.d.ts +6 -0
- package/dist/daemon/daemon-duplicate-doc.d.ts.map +1 -0
- package/dist/daemon/daemon-duplicate-doc.js +17 -0
- package/dist/daemon/daemon-duplicate-doc.js.map +1 -0
- package/dist/daemon/daemon-duplicate-issue.d.ts +6 -0
- package/dist/daemon/daemon-duplicate-issue.d.ts.map +1 -0
- package/dist/daemon/daemon-duplicate-issue.js +17 -0
- package/dist/daemon/daemon-duplicate-issue.js.map +1 -0
- package/dist/daemon/daemon-move-doc.d.ts +6 -0
- package/dist/daemon/daemon-move-doc.d.ts.map +1 -0
- package/dist/daemon/daemon-move-doc.js +17 -0
- package/dist/daemon/daemon-move-doc.js.map +1 -0
- package/dist/daemon/daemon-move-issue.d.ts +6 -0
- package/dist/daemon/daemon-move-issue.d.ts.map +1 -0
- package/dist/daemon/daemon-move-issue.js +17 -0
- package/dist/daemon/daemon-move-issue.js.map +1 -0
- package/dist/daemon/daemon-spawn-agent.d.ts +6 -0
- package/dist/daemon/daemon-spawn-agent.d.ts.map +1 -0
- package/dist/daemon/daemon-spawn-agent.js +17 -0
- package/dist/daemon/daemon-spawn-agent.js.map +1 -0
- package/dist/daemon/load-proto.d.ts +6 -1
- package/dist/daemon/load-proto.d.ts.map +1 -1
- package/dist/daemon/load-proto.js.map +1 -1
- package/dist/daemon/types.d.ts +73 -0
- package/dist/daemon/types.d.ts.map +1 -1
- package/dist/hooks/postrun.d.ts +4 -0
- package/dist/hooks/postrun.d.ts.map +1 -0
- package/dist/hooks/postrun.js +17 -0
- package/dist/hooks/postrun.js.map +1 -0
- package/dist/lib/create-issue/create-issue.d.ts.map +1 -1
- package/dist/lib/create-issue/create-issue.js +3 -0
- package/dist/lib/create-issue/create-issue.js.map +1 -1
- package/dist/tui/components/domain/DocCreate.d.ts.map +1 -1
- package/dist/tui/components/domain/DocCreate.js +10 -41
- package/dist/tui/components/domain/DocCreate.js.map +1 -1
- package/dist/tui/components/domain/IssueCreate.d.ts.map +1 -1
- package/dist/tui/components/domain/IssueCreate.js +11 -49
- package/dist/tui/components/domain/IssueCreate.js.map +1 -1
- package/dist/tui/components/domain/IssueEdit.d.ts.map +1 -1
- package/dist/tui/components/domain/IssueEdit.js +15 -46
- package/dist/tui/components/domain/IssueEdit.js.map +1 -1
- package/dist/tui/components/domain/PRCreate.d.ts.map +1 -1
- package/dist/tui/components/domain/PRCreate.js +12 -35
- package/dist/tui/components/domain/PRCreate.js.map +1 -1
- package/dist/tui/components/domain/PREdit.d.ts.map +1 -1
- package/dist/tui/components/domain/PREdit.js +17 -39
- package/dist/tui/components/domain/PREdit.js.map +1 -1
- package/dist/tui/components/domain/ProjectCreate.d.ts.map +1 -1
- package/dist/tui/components/domain/ProjectCreate.js +5 -13
- package/dist/tui/components/domain/ProjectCreate.js.map +1 -1
- package/dist/tui/components/form/FormInput.d.ts +12 -0
- package/dist/tui/components/form/FormInput.d.ts.map +1 -0
- package/dist/tui/components/form/FormInput.js +6 -0
- package/dist/tui/components/form/FormInput.js.map +1 -0
- package/dist/tui/components/form/FormTextarea.d.ts +11 -0
- package/dist/tui/components/form/FormTextarea.d.ts.map +1 -0
- package/dist/tui/components/form/FormTextarea.js +13 -0
- package/dist/tui/components/form/FormTextarea.js.map +1 -0
- package/dist/tui/components/form/index.d.ts +3 -0
- package/dist/tui/components/form/index.d.ts.map +1 -0
- package/dist/tui/components/form/index.js +3 -0
- package/dist/tui/components/form/index.js.map +1 -0
- package/dist/tui/hooks/useNavigation.d.ts +1 -0
- package/dist/tui/hooks/useNavigation.d.ts.map +1 -1
- package/dist/tui/hooks/useNavigation.js +4 -0
- package/dist/tui/hooks/useNavigation.js.map +1 -1
- package/dist/tui/state/app-state.d.ts +4 -0
- package/dist/tui/state/app-state.d.ts.map +1 -1
- package/dist/tui/state/app-state.js +7 -0
- package/dist/tui/state/app-state.js.map +1 -1
- package/dist/types/create-issue-options.d.ts +2 -0
- package/dist/types/create-issue-options.d.ts.map +1 -1
- package/dist/utils/is-valid-uuid.js +2 -2
- package/dist/utils/is-valid-uuid.js.map +1 -1
- package/oclif.manifest.json +494 -76
- package/package.json +8 -3
- package/proto/centy.proto +4 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Close an issue by setting its status to closed
|
|
4
|
+
*/
|
|
5
|
+
export default class CloseIssue extends Command {
|
|
6
|
+
static args: {
|
|
7
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=issue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../src/commands/close/issue.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAE,MAAM,aAAa,CAAA;AAU3C;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAE7C,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAAmB;IAG9C,OAAgB,QAAQ,WAIvB;IAGD,OAAgB,KAAK;;MAEpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBlC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
import { Args, Command } from '@oclif/core';
|
|
3
|
+
import { daemonUpdateIssue } from '../../daemon/daemon-update-issue.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
|
+
* Close an issue by setting its status to closed
|
|
9
|
+
*/
|
|
10
|
+
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
11
|
+
export default class CloseIssue extends Command {
|
|
12
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
13
|
+
static args = {
|
|
14
|
+
id: Args.string({
|
|
15
|
+
description: 'Issue ID (UUID) or display number',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
20
|
+
static description = 'Close an issue';
|
|
21
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
+
static examples = [
|
|
23
|
+
'<%= config.bin %> close issue 1',
|
|
24
|
+
'<%= config.bin %> close issue abc123-uuid',
|
|
25
|
+
'<%= config.bin %> close issue 1 --project centy-daemon',
|
|
26
|
+
];
|
|
27
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
28
|
+
static flags = {
|
|
29
|
+
project: projectFlag,
|
|
30
|
+
};
|
|
31
|
+
async run() {
|
|
32
|
+
const { args, flags } = await this.parse(CloseIssue);
|
|
33
|
+
const cwd = await resolveProjectPath(flags.project);
|
|
34
|
+
try {
|
|
35
|
+
await ensureInitialized(cwd);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof NotInitializedError) {
|
|
39
|
+
this.error(error.message);
|
|
40
|
+
}
|
|
41
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
42
|
+
}
|
|
43
|
+
const response = await daemonUpdateIssue({
|
|
44
|
+
projectPath: cwd,
|
|
45
|
+
issueId: args.id,
|
|
46
|
+
status: 'closed',
|
|
47
|
+
});
|
|
48
|
+
if (!response.success) {
|
|
49
|
+
this.error(response.error);
|
|
50
|
+
}
|
|
51
|
+
this.log(`Closed issue #${response.issue.displayNumber}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/commands/close/issue.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AACvE,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,UAAW,SAAQ,OAAO;IAC7C,gDAAgD;IAChD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IAED,gDAAgD;IAChD,MAAM,CAAU,WAAW,GAAG,gBAAgB,CAAA;IAE9C,gDAAgD;IAChD,MAAM,CAAU,QAAQ,GAAG;QACzB,iCAAiC;QACjC,2CAA2C;QAC3C,wDAAwD;KACzD,CAAA;IAED,gDAAgD;IAChD,MAAM,CAAU,KAAK,GAAG;QACtB,OAAO,EAAE,WAAW;KACrB,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QACpD,MAAM,GAAG,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAEnD,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,iBAAiB,CAAC;YACvC,WAAW,EAAE,GAAG;YAChB,OAAO,EAAE,IAAI,CAAC,EAAE;YAChB,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,iBAAiB,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAA;IAC3D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Close an organization-level issue by setting its status to closed
|
|
4
|
+
*/
|
|
5
|
+
export default class CloseOrgIssue extends Command {
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static args: {
|
|
9
|
+
identifier: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
10
|
+
};
|
|
11
|
+
static flags: {
|
|
12
|
+
org: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=org-issue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-issue.d.ts","sourceRoot":"","sources":["../../../src/commands/close/org-issue.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAKlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAEhD,OAAgB,WAAW,SAAsC;IAGjE,OAAgB,QAAQ,WAIvB;IAGD,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,KAAK;;;MAUpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoClC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
+
import { daemonGetOrgIssueByDisplayNumber } from '../../daemon/daemon-get-org-issue-by-display-number.js';
|
|
4
|
+
import { daemonUpdateOrgIssue } from '../../daemon/daemon-update-org-issue.js';
|
|
5
|
+
/**
|
|
6
|
+
* Close an organization-level issue by setting its status to closed
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
9
|
+
export default class CloseOrgIssue extends Command {
|
|
10
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
11
|
+
static description = 'Close an organization-level issue';
|
|
12
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> close org-issue --org my-org 1',
|
|
15
|
+
'<%= config.bin %> close org-issue --org my-org #1',
|
|
16
|
+
'<%= config.bin %> close org-issue -o centy-io abc123',
|
|
17
|
+
];
|
|
18
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
19
|
+
static args = {
|
|
20
|
+
identifier: Args.string({
|
|
21
|
+
description: 'Issue ID or display number (#N or just N)',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
26
|
+
static flags = {
|
|
27
|
+
org: Flags.string({
|
|
28
|
+
char: 'o',
|
|
29
|
+
description: 'Organization slug',
|
|
30
|
+
required: true,
|
|
31
|
+
}),
|
|
32
|
+
json: Flags.boolean({
|
|
33
|
+
description: 'Output as JSON',
|
|
34
|
+
default: false,
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
async run() {
|
|
38
|
+
const { args, flags } = await this.parse(CloseOrgIssue);
|
|
39
|
+
// Resolve issue ID from display number if needed
|
|
40
|
+
let issueId;
|
|
41
|
+
const identifier = args.identifier;
|
|
42
|
+
const displayNumberMatch = identifier.match(/^#?(\d+)$/);
|
|
43
|
+
if (displayNumberMatch) {
|
|
44
|
+
const displayNumber = Number.parseInt(displayNumberMatch[1], 10);
|
|
45
|
+
const issue = await daemonGetOrgIssueByDisplayNumber({
|
|
46
|
+
orgSlug: flags.org,
|
|
47
|
+
displayNumber,
|
|
48
|
+
});
|
|
49
|
+
issueId = issue.id;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
issueId = identifier;
|
|
53
|
+
}
|
|
54
|
+
const response = await daemonUpdateOrgIssue({
|
|
55
|
+
orgSlug: flags.org,
|
|
56
|
+
issueId,
|
|
57
|
+
status: 'closed',
|
|
58
|
+
});
|
|
59
|
+
if (!response.success) {
|
|
60
|
+
this.error(response.error);
|
|
61
|
+
}
|
|
62
|
+
if (flags.json) {
|
|
63
|
+
this.log(JSON.stringify(response.issue, null, 2));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.log(`Closed organization issue #${response.issue.displayNumber}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=org-issue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"org-issue.js","sourceRoot":"","sources":["../../../src/commands/close/org-issue.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAElD,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C;gBACnD,OAAO,EAAE,KAAK,CAAC,GAAG;gBAClB,aAAa;aACd,CAAC,CAAA;YACF,OAAO,GAAG,KAAK,CAAC,EAAE,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,UAAU,CAAA;QACtB,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC;YAC1C,OAAO,EAAE,KAAK,CAAC,GAAG;YAClB,OAAO;YACP,MAAM,EAAE,QAAQ;SACjB,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,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YACjD,OAAM;QACR,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,8BAA8B,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAA;IACxE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Generic close command for issues, PRs, and org-issues
|
|
4
|
+
*/
|
|
5
|
+
export default class Close extends Command {
|
|
6
|
+
static args: {
|
|
7
|
+
identifier: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
org: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
private closeIssue;
|
|
19
|
+
private closePr;
|
|
20
|
+
private closeOrgIssue;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=close.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../src/commands/close.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAuBlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IAExC,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAC2B;IAGtD,OAAgB,QAAQ,WAOvB;IAGD,OAAgB,KAAK;;;;;MAepB;IAGY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YAmGnB,UAAU;YA4BV,OAAO;YA4BP,aAAa;CA6B5B"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
// eslint-disable-next-line import/order
|
|
3
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
4
|
+
import { daemonGetIssueByDisplayNumber } from '../daemon/daemon-get-issue-by-display-number.js';
|
|
5
|
+
import { daemonGetOrgIssueByDisplayNumber } from '../daemon/daemon-get-org-issue-by-display-number.js';
|
|
6
|
+
import { daemonGetPrByDisplayNumber } from '../daemon/daemon-get-pr-by-display-number.js';
|
|
7
|
+
import { daemonUpdateIssue } from '../daemon/daemon-update-issue.js';
|
|
8
|
+
import { daemonUpdateOrgIssue } from '../daemon/daemon-update-org-issue.js';
|
|
9
|
+
import { daemonUpdatePr } from '../daemon/daemon-update-pr.js';
|
|
10
|
+
import { projectFlag } from '../flags/project-flag.js';
|
|
11
|
+
import { ensureInitialized, NotInitializedError, } from '../utils/ensure-initialized.js';
|
|
12
|
+
import { resolveProjectPath } from '../utils/resolve-project-path.js';
|
|
13
|
+
/**
|
|
14
|
+
* Generic close command for issues, PRs, and org-issues
|
|
15
|
+
*/
|
|
16
|
+
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
17
|
+
export default class Close extends Command {
|
|
18
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
19
|
+
static args = {
|
|
20
|
+
identifier: Args.string({
|
|
21
|
+
description: 'Display number (#N or N) or UUID',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
26
|
+
static description = 'Close an issue, PR, or org-issue by display number';
|
|
27
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
28
|
+
static examples = [
|
|
29
|
+
'<%= config.bin %> close 1',
|
|
30
|
+
'<%= config.bin %> close #1',
|
|
31
|
+
'<%= config.bin %> close 1 --type issue',
|
|
32
|
+
'<%= config.bin %> close 1 --type pr',
|
|
33
|
+
'<%= config.bin %> close 1 --org my-org',
|
|
34
|
+
'<%= config.bin %> close 1 --project centy-daemon',
|
|
35
|
+
];
|
|
36
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
37
|
+
static flags = {
|
|
38
|
+
type: Flags.string({
|
|
39
|
+
char: 't',
|
|
40
|
+
description: 'Entity type (issue, pr, org-issue)',
|
|
41
|
+
options: ['issue', 'pr', 'org-issue'],
|
|
42
|
+
}),
|
|
43
|
+
org: Flags.string({
|
|
44
|
+
char: 'o',
|
|
45
|
+
description: 'Organization slug (for org-issues)',
|
|
46
|
+
}),
|
|
47
|
+
project: projectFlag,
|
|
48
|
+
json: Flags.boolean({
|
|
49
|
+
description: 'Output as JSON',
|
|
50
|
+
default: false,
|
|
51
|
+
}),
|
|
52
|
+
};
|
|
53
|
+
// eslint-disable-next-line max-lines-per-function
|
|
54
|
+
async run() {
|
|
55
|
+
const { args, flags } = await this.parse(Close);
|
|
56
|
+
// Parse display number (supports #1 or 1 format)
|
|
57
|
+
const displayNumberMatch = args.identifier.match(/^#?(\d+)$/);
|
|
58
|
+
if (!displayNumberMatch) {
|
|
59
|
+
this.error('Invalid identifier. Please provide a display number (e.g., 1 or #1)');
|
|
60
|
+
}
|
|
61
|
+
const displayNumber = Number.parseInt(displayNumberMatch[1], 10);
|
|
62
|
+
// Handle org-issue case
|
|
63
|
+
if (flags.org !== undefined || flags.type === 'org-issue') {
|
|
64
|
+
if (flags.org === undefined) {
|
|
65
|
+
this.error('Organization slug is required for org-issues. Use --org <slug>');
|
|
66
|
+
}
|
|
67
|
+
await this.closeOrgIssue(flags.org, displayNumber, flags.json);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Resolve project path for local entities
|
|
71
|
+
const cwd = await resolveProjectPath(flags.project);
|
|
72
|
+
try {
|
|
73
|
+
await ensureInitialized(cwd);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
if (error instanceof NotInitializedError) {
|
|
77
|
+
this.error(error.message);
|
|
78
|
+
}
|
|
79
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
80
|
+
}
|
|
81
|
+
// If type is specified, close that type directly
|
|
82
|
+
if (flags.type !== undefined) {
|
|
83
|
+
if (flags.type === 'issue') {
|
|
84
|
+
await this.closeIssue(cwd, displayNumber, flags.json);
|
|
85
|
+
}
|
|
86
|
+
else if (flags.type === 'pr') {
|
|
87
|
+
await this.closePr(cwd, displayNumber, flags.json);
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Search for entities with this display number
|
|
92
|
+
const foundEntities = [];
|
|
93
|
+
// Try to find issue
|
|
94
|
+
try {
|
|
95
|
+
const issue = await daemonGetIssueByDisplayNumber({
|
|
96
|
+
projectPath: cwd,
|
|
97
|
+
displayNumber,
|
|
98
|
+
});
|
|
99
|
+
foundEntities.push({
|
|
100
|
+
type: 'issue',
|
|
101
|
+
id: issue.id,
|
|
102
|
+
displayNumber: issue.displayNumber,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
// Issue not found, continue
|
|
107
|
+
}
|
|
108
|
+
// Try to find PR
|
|
109
|
+
try {
|
|
110
|
+
const pr = await daemonGetPrByDisplayNumber({
|
|
111
|
+
projectPath: cwd,
|
|
112
|
+
displayNumber,
|
|
113
|
+
});
|
|
114
|
+
foundEntities.push({
|
|
115
|
+
type: 'pr',
|
|
116
|
+
id: pr.id,
|
|
117
|
+
displayNumber: pr.displayNumber,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// PR not found, continue
|
|
122
|
+
}
|
|
123
|
+
// Handle results
|
|
124
|
+
if (foundEntities.length === 0) {
|
|
125
|
+
this.error(`No issue or PR found with display number #${displayNumber}`);
|
|
126
|
+
}
|
|
127
|
+
if (foundEntities.length > 1) {
|
|
128
|
+
const types = foundEntities.map(e => e.type).join(', ');
|
|
129
|
+
this.error(`Ambiguous: found multiple entities with #${displayNumber} (${types}). Use --type to specify which to close.`);
|
|
130
|
+
}
|
|
131
|
+
// Close the single found entity
|
|
132
|
+
const entity = foundEntities[0];
|
|
133
|
+
if (entity.type === 'issue') {
|
|
134
|
+
await this.closeIssue(cwd, displayNumber, flags.json);
|
|
135
|
+
}
|
|
136
|
+
else if (entity.type === 'pr') {
|
|
137
|
+
await this.closePr(cwd, displayNumber, flags.json);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async closeIssue(projectPath, displayNumber, jsonOutput) {
|
|
141
|
+
const issue = await daemonGetIssueByDisplayNumber({
|
|
142
|
+
projectPath,
|
|
143
|
+
displayNumber,
|
|
144
|
+
});
|
|
145
|
+
const response = await daemonUpdateIssue({
|
|
146
|
+
projectPath,
|
|
147
|
+
issueId: issue.id,
|
|
148
|
+
status: 'closed',
|
|
149
|
+
});
|
|
150
|
+
if (!response.success) {
|
|
151
|
+
this.error(response.error);
|
|
152
|
+
}
|
|
153
|
+
if (jsonOutput) {
|
|
154
|
+
this.log(JSON.stringify({ type: 'issue', ...response.issue }, null, 2));
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
this.log(`Closed issue #${response.issue.displayNumber}`);
|
|
158
|
+
}
|
|
159
|
+
async closePr(projectPath, displayNumber, jsonOutput) {
|
|
160
|
+
const pr = await daemonGetPrByDisplayNumber({
|
|
161
|
+
projectPath,
|
|
162
|
+
displayNumber,
|
|
163
|
+
});
|
|
164
|
+
const response = await daemonUpdatePr({
|
|
165
|
+
projectPath,
|
|
166
|
+
prId: pr.id,
|
|
167
|
+
status: 'closed',
|
|
168
|
+
});
|
|
169
|
+
if (!response.success) {
|
|
170
|
+
this.error(response.error);
|
|
171
|
+
}
|
|
172
|
+
if (jsonOutput) {
|
|
173
|
+
this.log(JSON.stringify({ type: 'pr', ...response.pr }, null, 2));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.log(`Closed PR #${response.pr.displayNumber}`);
|
|
177
|
+
}
|
|
178
|
+
async closeOrgIssue(orgSlug, displayNumber, jsonOutput) {
|
|
179
|
+
const issue = await daemonGetOrgIssueByDisplayNumber({
|
|
180
|
+
orgSlug,
|
|
181
|
+
displayNumber,
|
|
182
|
+
});
|
|
183
|
+
const response = await daemonUpdateOrgIssue({
|
|
184
|
+
orgSlug,
|
|
185
|
+
issueId: issue.id,
|
|
186
|
+
status: 'closed',
|
|
187
|
+
});
|
|
188
|
+
if (!response.success) {
|
|
189
|
+
this.error(response.error);
|
|
190
|
+
}
|
|
191
|
+
if (jsonOutput) {
|
|
192
|
+
this.log(JSON.stringify({ type: 'org-issue', ...response.issue }, null, 2));
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this.log(`Closed organization issue #${response.issue.displayNumber}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=close.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close.js","sourceRoot":"","sources":["../../src/commands/close.ts"],"names":[],"mappings":"AAAA,8BAA8B;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gC,CAAC;YACnD,OAAO;YACP,aAAa;SACd,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC;YAC1C,OAAO;YACP,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;QAED,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CACN,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAClE,CAAA;YACD,OAAM;QACR,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,8BAA8B,QAAQ,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAA;IACxE,CAAC"}
|
|
@@ -10,6 +10,7 @@ export default class CreateIssue extends Command {
|
|
|
10
10
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
priority: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
draft: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,WAMvB;IAGD,OAAgB,KAAK;;;;;;;MAwBpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmBlC"}
|
|
@@ -16,6 +16,7 @@ export default class CreateIssue extends Command {
|
|
|
16
16
|
'<%= config.bin %> create issue --title "Bug in login" --priority high',
|
|
17
17
|
'<%= config.bin %> create issue -t "Add feature" -d "Implement dark mode"',
|
|
18
18
|
'<%= config.bin %> create issue -t "Add feature" --project centy-daemon',
|
|
19
|
+
'<%= config.bin %> create issue --title "WIP feature" --draft',
|
|
19
20
|
];
|
|
20
21
|
// eslint-disable-next-line no-restricted-syntax
|
|
21
22
|
static flags = {
|
|
@@ -37,6 +38,10 @@ export default class CreateIssue extends Command {
|
|
|
37
38
|
description: 'Initial status',
|
|
38
39
|
default: 'open',
|
|
39
40
|
}),
|
|
41
|
+
draft: Flags.boolean({
|
|
42
|
+
description: 'Create as draft',
|
|
43
|
+
default: false,
|
|
44
|
+
}),
|
|
40
45
|
project: projectFlag,
|
|
41
46
|
};
|
|
42
47
|
async run() {
|
|
@@ -49,6 +54,7 @@ export default class CreateIssue extends Command {
|
|
|
49
54
|
// eslint-disable-next-line no-restricted-syntax
|
|
50
55
|
priority: flags.priority,
|
|
51
56
|
status: flags.status,
|
|
57
|
+
draft: flags.draft,
|
|
52
58
|
});
|
|
53
59
|
if (!result.success) {
|
|
54
60
|
// eslint-disable-next-line no-restricted-syntax
|
|
@@ -1 +1 @@
|
|
|
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;AAExE;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,gDAAgD;IAChD,MAAM,CAAU,WAAW,GAAG,yCAAyC,CAAA;IAEvE,gDAAgD;IAChD,MAAM,CAAU,QAAQ,GAAG;QACzB,gCAAgC;QAChC,uEAAuE;QACvE,0EAA0E;QAC1E,wEAAwE;
|
|
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;AAExE;;GAEG;AACH,qFAAqF;AACrF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,gDAAgD;IAChD,MAAM,CAAU,WAAW,GAAG,yCAAyC,CAAA;IAEvE,gDAAgD;IAChD,MAAM,CAAU,QAAQ,GAAG;QACzB,gCAAgC;QAChC,uEAAuE;QACvE,0EAA0E;QAC1E,wEAAwE;QACxE,8DAA8D;KAC/D,CAAA;IAED,gDAAgD;IAChD,MAAM,CAAU,KAAK,GAAG;QACtB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;YAClB,IAAI,EAAE,GAAG;YAC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@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Duplicate a doc (same or different project)
|
|
4
|
+
*/
|
|
5
|
+
export default class DuplicateDoc extends Command {
|
|
6
|
+
static args: {
|
|
7
|
+
slug: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'new-slug': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=doc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../../src/commands/duplicate/doc.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAUlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAE/C,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAC4B;IAGvD,OAAgB,QAAQ,WAKvB;IAGD,OAAgB,KAAK;;;;;MAcpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkDlC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// eslint-disable-next-line import/order
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
+
import { daemonDuplicateDoc } from '../../daemon/daemon-duplicate-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
|
+
* Duplicate a doc (same or different project)
|
|
9
|
+
*/
|
|
10
|
+
// eslint-disable-next-line custom/no-default-class-export, class-export/class-export
|
|
11
|
+
export default class DuplicateDoc extends Command {
|
|
12
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
13
|
+
static args = {
|
|
14
|
+
slug: Args.string({
|
|
15
|
+
description: 'Doc slug',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
20
|
+
static description = 'Duplicate a doc (same project or different project)';
|
|
21
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
22
|
+
static examples = [
|
|
23
|
+
'<%= config.bin %> duplicate doc my-doc',
|
|
24
|
+
'<%= config.bin %> duplicate doc readme --new-slug readme-v2',
|
|
25
|
+
'<%= config.bin %> duplicate doc api-guide --to /path/to/other/project',
|
|
26
|
+
'<%= config.bin %> duplicate doc spec --to ../other --new-slug spec-copy --title "Spec Copy"',
|
|
27
|
+
];
|
|
28
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
29
|
+
static flags = {
|
|
30
|
+
to: Flags.string({
|
|
31
|
+
char: 't',
|
|
32
|
+
description: 'Target project path (defaults to same project if not specified)',
|
|
33
|
+
}),
|
|
34
|
+
'new-slug': Flags.string({
|
|
35
|
+
char: 's',
|
|
36
|
+
description: 'Slug for the duplicate (defaults to "{slug}-copy")',
|
|
37
|
+
}),
|
|
38
|
+
title: Flags.string({
|
|
39
|
+
description: 'Title for the duplicate (defaults to "Copy of {original}")',
|
|
40
|
+
}),
|
|
41
|
+
project: projectFlag,
|
|
42
|
+
};
|
|
43
|
+
async run() {
|
|
44
|
+
const { args, flags } = await this.parse(DuplicateDoc);
|
|
45
|
+
const sourceProjectPath = await resolveProjectPath(flags.project);
|
|
46
|
+
const targetProjectPath = flags.to
|
|
47
|
+
? await resolveProjectPath(flags.to)
|
|
48
|
+
: sourceProjectPath;
|
|
49
|
+
// Ensure source project is initialized
|
|
50
|
+
try {
|
|
51
|
+
await ensureInitialized(sourceProjectPath);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error instanceof NotInitializedError) {
|
|
55
|
+
this.error(`Source project: ${error.message}`);
|
|
56
|
+
}
|
|
57
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
58
|
+
}
|
|
59
|
+
// Ensure target project is initialized (if different)
|
|
60
|
+
if (targetProjectPath !== sourceProjectPath) {
|
|
61
|
+
try {
|
|
62
|
+
await ensureInitialized(targetProjectPath);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (error instanceof NotInitializedError) {
|
|
66
|
+
this.error(`Target project: ${error.message}`);
|
|
67
|
+
}
|
|
68
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const response = await daemonDuplicateDoc({
|
|
72
|
+
sourceProjectPath,
|
|
73
|
+
slug: args.slug,
|
|
74
|
+
targetProjectPath,
|
|
75
|
+
newSlug: flags['new-slug'],
|
|
76
|
+
newTitle: flags.title,
|
|
77
|
+
});
|
|
78
|
+
if (!response.success) {
|
|
79
|
+
this.error(response.error);
|
|
80
|
+
}
|
|
81
|
+
const locationInfo = targetProjectPath !== sourceProjectPath
|
|
82
|
+
? ` in ${targetProjectPath}`
|
|
83
|
+
: ' in current project';
|
|
84
|
+
this.log(`Duplicated doc → "${response.doc.slug}" "${response.doc.title}"${locationInfo}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=doc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.js","sourceRoot":"","sources":["../../../src/commands/duplicate/doc.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,IAAI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AAO,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC5B,CAAC;QAED,MAAM,YAAY,GAChB,iBAAiB,KAAK,iBAAiB;YACrC,CAAC,CAAC,OAAO,iBAAiB,EAAE;YAC5B,CAAC,CAAC,qBAAqB,CAAA;QAE3B,IAAI,CAAC,GAAG,CACN,qBAAqB,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI,YAAY,EAAE,CACjF,CAAA;IACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Duplicate an issue (same or different project)
|
|
4
|
+
*/
|
|
5
|
+
export default class DuplicateIssue extends Command {
|
|
6
|
+
static args: {
|
|
7
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=issue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../src/commands/duplicate/issue.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAA;AAUlD;;GAEG;AAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,OAAO;IAEjD,OAAgB,IAAI;;MAKnB;IAGD,OAAgB,WAAW,SAC+B;IAG1D,OAAgB,QAAQ,WAKvB;IAGD,OAAgB,KAAK;;;;MAUpB;IAEY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiDlC"}
|