@deskwork/cli 0.12.0 → 0.13.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/approve.d.ts +8 -7
- package/dist/commands/approve.d.ts.map +1 -1
- package/dist/commands/approve.js +152 -121
- package/dist/commands/approve.js.map +1 -1
- package/dist/commands/publish.d.ts +16 -7
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +79 -25
- package/dist/commands/publish.js.map +1 -1
- package/package.json +5 -4
- package/dist/commands/draft.d.ts +0 -17
- package/dist/commands/draft.d.ts.map +0 -1
- package/dist/commands/draft.js +0 -77
- package/dist/commands/draft.js.map +0 -1
- package/dist/commands/outline.d.ts +0 -19
- package/dist/commands/outline.d.ts.map +0 -1
- package/dist/commands/outline.js +0 -102
- package/dist/commands/outline.js.map +0 -1
- package/dist/commands/pause.d.ts +0 -15
- package/dist/commands/pause.d.ts.map +0 -1
- package/dist/commands/pause.js +0 -70
- package/dist/commands/pause.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -12
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/plan.js +0 -74
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/resume.d.ts +0 -16
- package/dist/commands/resume.d.ts.map +0 -1
- package/dist/commands/resume.js +0 -70
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/review-cancel.d.ts +0 -15
- package/dist/commands/review-cancel.d.ts.map +0 -1
- package/dist/commands/review-cancel.js +0 -88
- package/dist/commands/review-cancel.js.map +0 -1
- package/dist/commands/review-help.d.ts +0 -12
- package/dist/commands/review-help.d.ts.map +0 -1
- package/dist/commands/review-help.js +0 -52
- package/dist/commands/review-help.js.map +0 -1
- package/dist/commands/review-report.d.ts +0 -13
- package/dist/commands/review-report.d.ts.map +0 -1
- package/dist/commands/review-report.js +0 -53
- package/dist/commands/review-report.js.map +0 -1
- package/dist/commands/review-start.d.ts +0 -17
- package/dist/commands/review-start.d.ts.map +0 -1
- package/dist/commands/review-start.js +0 -121
- package/dist/commands/review-start.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deskwork/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Editorial calendar + review CLI for the deskwork plugin",
|
|
6
6
|
"homepage": "https://github.com/audiocontrol-org/deskwork#readme",
|
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
"deskwork": "./dist/cli.js"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsc -b tsconfig.build.json",
|
|
30
|
-
"prepack": "tsc -b tsconfig.build.json",
|
|
29
|
+
"build": "tsc -b tsconfig.build.json && chmod +x dist/cli.js",
|
|
30
|
+
"prepack": "tsc -b tsconfig.build.json && chmod +x dist/cli.js",
|
|
31
|
+
"dev": "tsc -b tsconfig.build.json --watch",
|
|
31
32
|
"test": "vitest run",
|
|
32
33
|
"test:watch": "vitest",
|
|
33
34
|
"typecheck": "tsc --noEmit"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@deskwork/core": "0.
|
|
37
|
+
"@deskwork/core": "0.13.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/node": "^22.10.0",
|
package/dist/commands/draft.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-draft — move an Outlining entry to Drafting.
|
|
3
|
-
*
|
|
4
|
-
* Blog file scaffolding happens in the outline step (see deskwork-outline).
|
|
5
|
-
* By the time this helper runs, the blog markdown already exists with an
|
|
6
|
-
* approved outline. Draft just flips the stage and optionally records a
|
|
7
|
-
* linked GitHub issue number (Claude invokes `gh issue create` separately
|
|
8
|
-
* and passes the resulting number via --issue).
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* deskwork-draft <project-root> [--site <slug>] [--issue <n>] <slug>
|
|
12
|
-
*
|
|
13
|
-
* Emits a JSON result:
|
|
14
|
-
* { slug, stage, contentType, issueNumber?, site, calendarPath }
|
|
15
|
-
*/
|
|
16
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=draft.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/commands/draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAmEvD"}
|
package/dist/commands/draft.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-draft — move an Outlining entry to Drafting.
|
|
3
|
-
*
|
|
4
|
-
* Blog file scaffolding happens in the outline step (see deskwork-outline).
|
|
5
|
-
* By the time this helper runs, the blog markdown already exists with an
|
|
6
|
-
* approved outline. Draft just flips the stage and optionally records a
|
|
7
|
-
* linked GitHub issue number (Claude invokes `gh issue create` separately
|
|
8
|
-
* and passes the resulting number via --issue).
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* deskwork-draft <project-root> [--site <slug>] [--issue <n>] <slug>
|
|
12
|
-
*
|
|
13
|
-
* Emits a JSON result:
|
|
14
|
-
* { slug, stage, contentType, issueNumber?, site, calendarPath }
|
|
15
|
-
*/
|
|
16
|
-
import { readConfig } from '@deskwork/core/config';
|
|
17
|
-
import { readCalendar, writeCalendar } from '@deskwork/core/calendar';
|
|
18
|
-
import { draftEntry, findEntry } from '@deskwork/core/calendar-mutations';
|
|
19
|
-
import { effectiveContentType } from '@deskwork/core/types';
|
|
20
|
-
import { resolveSite, resolveCalendarPath } from '@deskwork/core/paths';
|
|
21
|
-
import { absolutize, emit, fail, parseArgs } from '@deskwork/core/cli-args';
|
|
22
|
-
export async function run(argv) {
|
|
23
|
-
const KNOWN_FLAGS = ['site', 'issue'];
|
|
24
|
-
const { positional, flags } = parse();
|
|
25
|
-
if (positional.length < 2) {
|
|
26
|
-
fail('Usage: deskwork-draft <project-root> [--site <slug>] [--issue <n>] <slug>', 2);
|
|
27
|
-
}
|
|
28
|
-
const [rootArg, slug] = positional;
|
|
29
|
-
const projectRoot = absolutize(rootArg);
|
|
30
|
-
let issueNumber;
|
|
31
|
-
if (flags.issue !== undefined) {
|
|
32
|
-
const n = parseInt(flags.issue, 10);
|
|
33
|
-
if (!Number.isFinite(n) || n <= 0) {
|
|
34
|
-
fail(`Invalid --issue "${flags.issue}". Must be a positive integer.`);
|
|
35
|
-
}
|
|
36
|
-
issueNumber = n;
|
|
37
|
-
}
|
|
38
|
-
let config;
|
|
39
|
-
try {
|
|
40
|
-
config = readConfig(projectRoot);
|
|
41
|
-
}
|
|
42
|
-
catch (err) {
|
|
43
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
44
|
-
}
|
|
45
|
-
const site = resolveSite(config, flags.site);
|
|
46
|
-
const calendarPath = resolveCalendarPath(projectRoot, config, site);
|
|
47
|
-
const calendar = readCalendar(calendarPath);
|
|
48
|
-
const existing = findEntry(calendar, slug);
|
|
49
|
-
if (!existing) {
|
|
50
|
-
const outlining = calendar.entries
|
|
51
|
-
.filter((e) => e.stage === 'Outlining')
|
|
52
|
-
.map((e) => e.slug)
|
|
53
|
-
.join(', ') || '(none)';
|
|
54
|
-
fail(`No calendar entry found with slug "${slug}". Outlining entries: ${outlining}`);
|
|
55
|
-
}
|
|
56
|
-
const contentType = effectiveContentType(existing);
|
|
57
|
-
const updated = draftEntry(calendar, slug, issueNumber);
|
|
58
|
-
writeCalendar(calendarPath, calendar);
|
|
59
|
-
emit({
|
|
60
|
-
slug: updated.slug,
|
|
61
|
-
title: updated.title,
|
|
62
|
-
stage: updated.stage,
|
|
63
|
-
contentType,
|
|
64
|
-
issueNumber: updated.issueNumber,
|
|
65
|
-
site,
|
|
66
|
-
calendarPath,
|
|
67
|
-
});
|
|
68
|
-
function parse() {
|
|
69
|
-
try {
|
|
70
|
-
return parseArgs(argv, KNOWN_FLAGS);
|
|
71
|
-
}
|
|
72
|
-
catch (err) {
|
|
73
|
-
fail(err instanceof Error ? err.message : String(err), 2);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=draft.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/commands/draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;IAE/C,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;IAEtC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,IAAI,CACF,2EAA2E,EAC3E,CAAC,CACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,WAA+B,CAAC;IACpC,IAAI,KAAK,CAAC,K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C;IAED,MAAM,WAAW,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IACxD,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAEtC,IAAI,CAAC;QACH,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW;QACX,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,IAAI;QACJ,YAAY;KACb,CAAC,CAAC;IAEH,SAAS,KAAK;QACZ,IAAI,CAAC;YACH,OAAO,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-outline — move a Planned entry to Outlining.
|
|
3
|
-
*
|
|
4
|
-
* For blog entries, scaffolds the blog post markdown with frontmatter +
|
|
5
|
-
* (optionally) a `## Outline` section so the operator can shape the
|
|
6
|
-
* piece before the agent drafts the body. For youtube/tool entries,
|
|
7
|
-
* no filesystem artifact is created — the stage flip to Outlining
|
|
8
|
-
* still happens (the pipeline expects every content type to pass
|
|
9
|
-
* through Outlining before Drafting).
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* deskwork-outline <project-root> [--site <slug>] [--author "Name"] <slug>
|
|
13
|
-
*
|
|
14
|
-
* Emits a JSON result:
|
|
15
|
-
* { slug, stage, contentType, scaffolded: {filePath, relativePath} | null,
|
|
16
|
-
* site, calendarPath }
|
|
17
|
-
*/
|
|
18
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
19
|
-
//# sourceMappingURL=outline.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../src/commands/outline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiBH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4FvD"}
|
package/dist/commands/outline.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-outline — move a Planned entry to Outlining.
|
|
3
|
-
*
|
|
4
|
-
* For blog entries, scaffolds the blog post markdown with frontmatter +
|
|
5
|
-
* (optionally) a `## Outline` section so the operator can shape the
|
|
6
|
-
* piece before the agent drafts the body. For youtube/tool entries,
|
|
7
|
-
* no filesystem artifact is created — the stage flip to Outlining
|
|
8
|
-
* still happens (the pipeline expects every content type to pass
|
|
9
|
-
* through Outlining before Drafting).
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* deskwork-outline <project-root> [--site <slug>] [--author "Name"] <slug>
|
|
13
|
-
*
|
|
14
|
-
* Emits a JSON result:
|
|
15
|
-
* { slug, stage, contentType, scaffolded: {filePath, relativePath} | null,
|
|
16
|
-
* site, calendarPath }
|
|
17
|
-
*/
|
|
18
|
-
import { readConfig } from '@deskwork/core/config';
|
|
19
|
-
import { readCalendar, writeCalendar } from '@deskwork/core/calendar';
|
|
20
|
-
import { outlineEntry, findEntry } from '@deskwork/core/calendar-mutations';
|
|
21
|
-
import { scaffoldBlogPost, } from '@deskwork/core/scaffold';
|
|
22
|
-
import { effectiveContentType, hasRepoContent, } from '@deskwork/core/types';
|
|
23
|
-
import { resolveSite, resolveCalendarPath } from '@deskwork/core/paths';
|
|
24
|
-
import { absolutize, emit, fail, parseArgs } from '@deskwork/core/cli-args';
|
|
25
|
-
export async function run(argv) {
|
|
26
|
-
const KNOWN_FLAGS = ['site', 'author', 'layout'];
|
|
27
|
-
const VALID_LAYOUTS = ['index', 'readme', 'flat'];
|
|
28
|
-
const { positional, flags } = parse();
|
|
29
|
-
if (positional.length < 2) {
|
|
30
|
-
fail('Usage: deskwork-outline <project-root> [--site <slug>] [--author "Name"] ' +
|
|
31
|
-
'[--layout index|readme|flat] <slug>', 2);
|
|
32
|
-
}
|
|
33
|
-
if (flags.layout !== undefined &&
|
|
34
|
-
!VALID_LAYOUTS.includes(flags.layout)) {
|
|
35
|
-
fail(`--layout must be one of ${VALID_LAYOUTS.join(', ')} (got "${flags.layout}")`, 2);
|
|
36
|
-
}
|
|
37
|
-
const layout = flags.layout;
|
|
38
|
-
const [rootArg, slug] = positional;
|
|
39
|
-
const projectRoot = absolutize(rootArg);
|
|
40
|
-
let config;
|
|
41
|
-
try {
|
|
42
|
-
config = readConfig(projectRoot);
|
|
43
|
-
}
|
|
44
|
-
catch (err) {
|
|
45
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
46
|
-
}
|
|
47
|
-
const site = resolveSite(config, flags.site);
|
|
48
|
-
const calendarPath = resolveCalendarPath(projectRoot, config, site);
|
|
49
|
-
const calendar = readCalendar(calendarPath);
|
|
50
|
-
// Preflight: find the entry and verify stage before writing anything.
|
|
51
|
-
const existing = findEntry(calendar, slug);
|
|
52
|
-
if (!existing) {
|
|
53
|
-
const planned = calendar.entries
|
|
54
|
-
.filter((e) => e.stage === 'Planned')
|
|
55
|
-
.map((e) => e.slug)
|
|
56
|
-
.join(', ') || '(none)';
|
|
57
|
-
fail(`No calendar entry found with slug "${slug}". Planned entries: ${planned}`);
|
|
58
|
-
}
|
|
59
|
-
if (existing.stage !== 'Planned') {
|
|
60
|
-
fail(`Entry "${slug}" is in stage "${existing.stage}" — must be in Planned to outline.`);
|
|
61
|
-
}
|
|
62
|
-
const contentType = effectiveContentType(existing);
|
|
63
|
-
let scaffolded = null;
|
|
64
|
-
if (hasRepoContent(contentType)) {
|
|
65
|
-
const opts = {};
|
|
66
|
-
if (flags.author !== undefined)
|
|
67
|
-
opts.authorOverride = flags.author;
|
|
68
|
-
if (layout !== undefined)
|
|
69
|
-
opts.layout = layout;
|
|
70
|
-
try {
|
|
71
|
-
scaffolded = scaffoldBlogPost(projectRoot, config, site, existing, opts);
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Phase 19a removed CalendarEntry.filePath — path-encoding lives in
|
|
78
|
-
// the scaffolded file's frontmatter `id:` and is resolved through
|
|
79
|
-
// the content index at read time. The scaffolder still reports
|
|
80
|
-
// `contentRelativePath` in its result for the JSON emit so the
|
|
81
|
-
// caller can show the operator where the file was created.
|
|
82
|
-
const updated = outlineEntry(calendar, slug);
|
|
83
|
-
writeCalendar(calendarPath, calendar);
|
|
84
|
-
emit({
|
|
85
|
-
slug: updated.slug,
|
|
86
|
-
title: updated.title,
|
|
87
|
-
stage: updated.stage,
|
|
88
|
-
contentType,
|
|
89
|
-
scaffolded,
|
|
90
|
-
site,
|
|
91
|
-
calendarPath,
|
|
92
|
-
});
|
|
93
|
-
function parse() {
|
|
94
|
-
try {
|
|
95
|
-
return parseArgs(argv, KNOWN_FLAGS);
|
|
96
|
-
}
|
|
97
|
-
catch (err) {
|
|
98
|
-
fail(err instanceof Error ? err.message : String(err), 2);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=outline.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outline.js","sourceRoot":"","sources":["../../src/commands/outline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,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rom` so `deskwork resume` can put
|
|
5
|
-
* the entry back where it came from. Refuses to pause Published or
|
|
6
|
-
* already-Paused entries (see core's `pauseEntry`). #27.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* deskwork-pause <project-root> [--site <slug>] <slug>
|
|
10
|
-
*
|
|
11
|
-
* Emits a JSON result:
|
|
12
|
-
* { slug, stage: "Paused", pausedFrom, site, calendarPath }
|
|
13
|
-
*/
|
|
14
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
15
|
-
//# sourceMappingURL=pause.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pause.d.ts","sourceRoot":"","sources":["../../src/commands/pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DvD"}
|
package/dist/commands/pause.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-pause — move a non-terminal entry to Paused.
|
|
3
|
-
*
|
|
4
|
-
* Records the prior stage on `pausedFrom` so `deskwork resume` can put
|
|
5
|
-
* the entry back where it came from. Refuses to pause Published or
|
|
6
|
-
* already-Paused entries (see core's `pauseEntry`). #27.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* deskwork-pause <project-root> [--site <slug>] <slug>
|
|
10
|
-
*
|
|
11
|
-
* Emits a JSON result:
|
|
12
|
-
* { slug, stage: "Paused", pausedFrom, site, calendarPath }
|
|
13
|
-
*/
|
|
14
|
-
import { readConfig } from '@deskwork/core/config';
|
|
15
|
-
import { readCalendar, writeCalendar } from '@deskwork/core/calendar';
|
|
16
|
-
import { findEntry, pauseEntry } from '@deskwork/core/calendar-mutations';
|
|
17
|
-
import { resolveSite, resolveCalendarPath } from '@deskwork/core/paths';
|
|
18
|
-
import { absolutize, emit, fail, parseArgs } from '@deskwork/core/cli-args';
|
|
19
|
-
export async function run(argv) {
|
|
20
|
-
const KNOWN_FLAGS = ['site'];
|
|
21
|
-
const { positional, flags } = parse();
|
|
22
|
-
if (positional.length < 2) {
|
|
23
|
-
fail('Usage: deskwork-pause <project-root> [--site <slug>] <slug>', 2);
|
|
24
|
-
}
|
|
25
|
-
const [rootArg, slug] = positional;
|
|
26
|
-
const projectRoot = absolutize(rootArg);
|
|
27
|
-
let config;
|
|
28
|
-
try {
|
|
29
|
-
config = readConfig(projectRoot);
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
33
|
-
}
|
|
34
|
-
const site = resolveSite(config, flags.site);
|
|
35
|
-
const calendarPath = resolveCalendarPath(projectRoot, config, site);
|
|
36
|
-
const calendar = readCalendar(calendarPath);
|
|
37
|
-
const existing = findEntry(calendar, slug);
|
|
38
|
-
if (!existing) {
|
|
39
|
-
const available = calendar.entries
|
|
40
|
-
.filter((e) => e.stage !== 'Published' && e.stage !== 'Paused')
|
|
41
|
-
.map((e) => e.slug)
|
|
42
|
-
.join(', ') || '(none)';
|
|
43
|
-
fail(`No calendar entry found with slug "${slug}". Pausable entries: ${available}`);
|
|
44
|
-
}
|
|
45
|
-
let paused;
|
|
46
|
-
try {
|
|
47
|
-
paused = pauseEntry(calendar, slug);
|
|
48
|
-
}
|
|
49
|
-
catch (err) {
|
|
50
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
51
|
-
}
|
|
52
|
-
writeCalendar(calendarPath, calendar);
|
|
53
|
-
emit({
|
|
54
|
-
slug: paused.slug,
|
|
55
|
-
title: paused.title,
|
|
56
|
-
stage: paused.stage,
|
|
57
|
-
pausedFrom: paused.pausedFrom,
|
|
58
|
-
site,
|
|
59
|
-
calendarPath,
|
|
60
|
-
});
|
|
61
|
-
function parse() {
|
|
62
|
-
try {
|
|
63
|
-
return parseArgs(argv, KNOWN_FLAGS);
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
fail(err instanceof Error ? err.message : String(err), 2);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=pause.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pause.js","sourceRoot":"","sources":["../../src/commands/pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,WAAW,GAAG,CAAC,MAAM,CAAU,CAAC;IAEtC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;IAEtC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,IAAI,CAAC,6DAA6D,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,CAAC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,KAAK;QACZ,IAAI,CAAC;YACH,OAAO,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/commands/plan.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-plan — move an Ideas entry to Planned and set target keywords.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* deskwork-plan <project-root> [--site <slug>] [--topics t1,t2,...]
|
|
6
|
-
* <slug> [<keyword1> <keyword2> ...]
|
|
7
|
-
*
|
|
8
|
-
* Keywords may be passed as separate positionals or a single
|
|
9
|
-
* comma-separated string. Emits a JSON result with the updated entry.
|
|
10
|
-
*/
|
|
11
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
12
|
-
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoEvD"}
|
package/dist/commands/plan.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-plan — move an Ideas entry to Planned and set target keywords.
|
|
3
|
-
*
|
|
4
|
-
* Usage:
|
|
5
|
-
* deskwork-plan <project-root> [--site <slug>] [--topics t1,t2,...]
|
|
6
|
-
* <slug> [<keyword1> <keyword2> ...]
|
|
7
|
-
*
|
|
8
|
-
* Keywords may be passed as separate positionals or a single
|
|
9
|
-
* comma-separated string. Emits a JSON result with the updated entry.
|
|
10
|
-
*/
|
|
11
|
-
import { readConfig } from '@deskwork/core/config';
|
|
12
|
-
import { readCalendar, writeCalendar } from '@deskwork/core/calendar';
|
|
13
|
-
import { planEntry } from '@deskwork/core/calendar-mutations';
|
|
14
|
-
import { resolveSite, resolveCalendarPath } from '@deskwork/core/paths';
|
|
15
|
-
import { absolutize, emit, fail, parseArgs } from '@deskwork/core/cli-args';
|
|
16
|
-
export async function run(argv) {
|
|
17
|
-
const KNOWN_FLAGS = ['site', 'topics'];
|
|
18
|
-
const { positional, flags } = parse();
|
|
19
|
-
if (positional.length < 2) {
|
|
20
|
-
fail('Usage: deskwork-plan <project-root> [--site <slug>] [--topics t1,t2,...] ' +
|
|
21
|
-
'<slug> [<keyword1> <keyword2> ...]', 2);
|
|
22
|
-
}
|
|
23
|
-
const [rootArg, slug, ...keywordArgs] = positional;
|
|
24
|
-
const projectRoot = absolutize(rootArg);
|
|
25
|
-
// Accept "a, b, c" as a single arg or separate positionals. Both shapes
|
|
26
|
-
// collapse to a flat string[] of non-empty trimmed keywords.
|
|
27
|
-
const keywords = keywordArgs
|
|
28
|
-
.flatMap((k) => k.split(','))
|
|
29
|
-
.map((k) => k.trim())
|
|
30
|
-
.filter((k) => k.length > 0);
|
|
31
|
-
let topics;
|
|
32
|
-
if (flags.topics !== undefined) {
|
|
33
|
-
topics = flags.topics
|
|
34
|
-
.split(',')
|
|
35
|
-
.map((t) => t.trim())
|
|
36
|
-
.filter((t) => t.length > 0);
|
|
37
|
-
}
|
|
38
|
-
let config;
|
|
39
|
-
try {
|
|
40
|
-
config = readConfig(projectRoot);
|
|
41
|
-
}
|
|
42
|
-
catch (err) {
|
|
43
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
44
|
-
}
|
|
45
|
-
const site = resolveSite(config, flags.site);
|
|
46
|
-
const calendarPath = resolveCalendarPath(projectRoot, config, site);
|
|
47
|
-
const calendar = readCalendar(calendarPath);
|
|
48
|
-
let entry;
|
|
49
|
-
try {
|
|
50
|
-
entry = planEntry(calendar, slug, keywords, topics ? { topics } : undefined);
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
54
|
-
}
|
|
55
|
-
writeCalendar(calendarPath, calendar);
|
|
56
|
-
emit({
|
|
57
|
-
slug: entry.slug,
|
|
58
|
-
title: entry.title,
|
|
59
|
-
stage: entry.stage,
|
|
60
|
-
targetKeywords: entry.targetKeywords,
|
|
61
|
-
topics: entry.topics,
|
|
62
|
-
site,
|
|
63
|
-
calendarPath,
|
|
64
|
-
});
|
|
65
|
-
function parse() {
|
|
66
|
-
try {
|
|
67
|
-
return parseArgs(argv, KNOWN_FLAGS);
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
fail(err instanceof Error ? err.message : String(err), 2);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=plan.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;IAEhD,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;IAEtC,IA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rom` (recorded by `deskwork pause`) and moves the entry
|
|
5
|
-
* back to that stage. Refuses to resume an entry whose `pausedFrom` was
|
|
6
|
-
* lost (e.g. legacy hand-edit) — operator must move the entry by hand
|
|
7
|
-
* in that case. #27.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* deskwork-resume <project-root> [--site <slug>] <slug>
|
|
11
|
-
*
|
|
12
|
-
* Emits a JSON result:
|
|
13
|
-
* { slug, stage, site, calendarPath }
|
|
14
|
-
*/
|
|
15
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
16
|
-
//# sourceMappingURL=resume.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyDvD"}
|
package/dist/commands/resume.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-resume — restore a Paused entry to its prior stage.
|
|
3
|
-
*
|
|
4
|
-
* Reads `pausedFrom` (recorded by `deskwork pause`) and moves the entry
|
|
5
|
-
* back to that stage. Refuses to resume an entry whose `pausedFrom` was
|
|
6
|
-
* lost (e.g. legacy hand-edit) — operator must move the entry by hand
|
|
7
|
-
* in that case. #27.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* deskwork-resume <project-root> [--site <slug>] <slug>
|
|
11
|
-
*
|
|
12
|
-
* Emits a JSON result:
|
|
13
|
-
* { slug, stage, site, calendarPath }
|
|
14
|
-
*/
|
|
15
|
-
import { readConfig } from '@deskwork/core/config';
|
|
16
|
-
import { readCalendar, writeCalendar } from '@deskwork/core/calendar';
|
|
17
|
-
import { findEntry, unpauseEntry } from '@deskwork/core/calendar-mutations';
|
|
18
|
-
import { resolveSite, resolveCalendarPath } from '@deskwork/core/paths';
|
|
19
|
-
import { absolutize, emit, fail, parseArgs } from '@deskwork/core/cli-args';
|
|
20
|
-
export async function run(argv) {
|
|
21
|
-
const KNOWN_FLAGS = ['site'];
|
|
22
|
-
const { positional, flags } = parse();
|
|
23
|
-
if (positional.length < 2) {
|
|
24
|
-
fail('Usage: deskwork-resume <project-root> [--site <slug>] <slug>', 2);
|
|
25
|
-
}
|
|
26
|
-
const [rootArg, slug] = positional;
|
|
27
|
-
const projectRoot = absolutize(rootArg);
|
|
28
|
-
let config;
|
|
29
|
-
try {
|
|
30
|
-
config = readConfig(projectRoot);
|
|
31
|
-
}
|
|
32
|
-
catch (err) {
|
|
33
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
34
|
-
}
|
|
35
|
-
const site = resolveSite(config, flags.site);
|
|
36
|
-
const calendarPath = resolveCalendarPath(projectRoot, config, site);
|
|
37
|
-
const calendar = readCalendar(calendarPath);
|
|
38
|
-
const existing = findEntry(calendar, slug);
|
|
39
|
-
if (!existing) {
|
|
40
|
-
const paused = calendar.entries
|
|
41
|
-
.filter((e) => e.stage === 'Paused')
|
|
42
|
-
.map((e) => e.slug)
|
|
43
|
-
.join(', ') || '(none)';
|
|
44
|
-
fail(`No calendar entry found with slug "${slug}". Paused entries: ${paused}`);
|
|
45
|
-
}
|
|
46
|
-
let resumed;
|
|
47
|
-
try {
|
|
48
|
-
resumed = unpauseEntry(calendar, slug);
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
fail(err instanceof Error ? err.message : String(err));
|
|
52
|
-
}
|
|
53
|
-
writeCalendar(calendarPath, calendar);
|
|
54
|
-
emit({
|
|
55
|
-
slug: resumed.slug,
|
|
56
|
-
title: resumed.title,
|
|
57
|
-
stage: resumed.stage,
|
|
58
|
-
site,
|
|
59
|
-
calendarPath,
|
|
60
|
-
});
|
|
61
|
-
function parse() {
|
|
62
|
-
try {
|
|
63
|
-
return parseArgs(argv, KNOWN_FLAGS);
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
fail(err instanceof Error ? err.message : String(err), 2);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=resume.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../src/commands/resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,WAAW,GAAG,CAAC,MAAM,CAAU,CAAC;IAEtC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;IAEtC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,IAAI,CAAC,8DAA8D,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC;IACnC,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CA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IAAI,EAAE,WAAW,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* deskwork-review-cancel — mark a review workflow as cancelled.
|
|
3
|
-
*
|
|
4
|
-
* Cancellation is a terminal state: the journal retains the workflow for
|
|
5
|
-
* audit but it no longer appears in listOpen. Use when a draft is
|
|
6
|
-
* abandoned, a workflow was enqueued by mistake, or a review has
|
|
7
|
-
* been superseded.
|
|
8
|
-
*
|
|
9
|
-
* Usage:
|
|
10
|
-
* deskwork-review-cancel <project-root> [--site <slug>] <slug>
|
|
11
|
-
* deskwork-review-cancel <project-root> [--site <slug>] <slug> --platform <p> [--channel <c>]
|
|
12
|
-
* deskwork-review-cancel <project-root> [--kind outline] <slug>
|
|
13
|
-
*/
|
|
14
|
-
export declare function run(argv: string[]): Promise<void>;
|
|
15
|
-
//# sourceMappingURL=review-cancel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review-cancel.d.ts","sourceRoot":"","sources":["../../src/commands/review-cancel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsFvD"}
|