@namewta/speculo 0.6.0 → 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/README.md +11 -11
- package/dist/src/cli.js +36 -128
- package/dist/src/cli.js.map +1 -1
- package/dist/src/index.d.ts +2 -4
- package/dist/src/index.js +173 -151
- package/dist/src/index.js.map +1 -1
- package/package.json +6 -4
- package/template/.speculo/README.md +4 -0
- package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +133 -141
- package/template/canonical/canonical-specdev-goal-plan.md +394 -377
- package/template/canonical/canonical-specdev-grill-with-docs.md +241 -178
- package/template/canonical/canonical-specdev-spec.md +132 -122
- package/template/canonical/canonical-specdev-tickets.md +176 -156
- package/template/canonical/canonical-specdev-wayfinder.md +106 -108
- package/template/commands/archive-and-consolidate.md +10 -8
- package/template/commands/handoff.md +2 -0
- package/template/commands/retro.md +3 -3
- package/template/commands/status.md +5 -4
- package/template/skills/archive-and-consolidate/SKILL.md +5 -9
- package/template/skills/archive-and-consolidate/assets/archive-plan-template.md +1 -1
- package/template/skills/archive-and-consolidate/references/archive-rules.md +4 -4
- package/template/skills/archive-and-consolidate/references/consolidation-rules.md +7 -8
- package/template/skills/archive-and-consolidate/references/knowledge-graduation.md +5 -2
- package/template/skills/github-npm-ops/SKILL.md +4 -2
- package/template/skills/github-npm-ops/references/issue-transport.md +26 -0
- package/template/skills/github-npm-ops/references/preflight-checklist.md +1 -1
- package/template/skills/github-npm-ops/scripts/issue-transport.mjs +227 -0
- package/template/workflows/specdev/A-archive-and-consolidate/A-archive-and-consolidate.md +31 -145
- package/template/workflows/specdev/A-archive-and-consolidate/consolidation-interview.md +4 -6
- package/template/workflows/specdev/C-code-review/C-code-review.md +42 -0
- package/template/workflows/specdev/C-code-review/code-review-template.md +42 -0
- package/template/workflows/specdev/D-diagnose-bugs/D-diagnose-bugs.md +45 -48
- package/template/workflows/specdev/D-diagnose-bugs/diagnosis-template.md +44 -40
- package/template/workflows/specdev/D-diagnose-bugs/feedback-loop.md +41 -0
- package/template/workflows/specdev/D-diagnose-bugs/hypothesis-and-instrumentation.md +32 -0
- package/template/workflows/specdev/D-diagnose-bugs/scripts/hitl-loop.template.sh +26 -0
- package/template/workflows/specdev/E-engineering-cognitive-mentor/E-engineering-cognitive-mentor.md +3 -3
- package/template/workflows/specdev/E-engineering-cognitive-mentor/persistence-and-resume.md +5 -20
- package/template/workflows/specdev/G-grill-with-docs/G-grill-with-docs.md +17 -10
- package/template/workflows/specdev/G-grill-with-docs/adr-format.md +31 -17
- package/template/workflows/specdev/G-grill-with-docs/context-format.md +9 -29
- package/template/workflows/specdev/G-grill-with-docs/domain-modeling-rules.md +10 -5
- package/template/workflows/specdev/G-grill-with-docs/stakeholder-questionnaire.md +45 -0
- package/template/workflows/specdev/I-implement/I-implement.md +29 -14
- package/template/workflows/specdev/I-implement/delegated-evidence-template.md +11 -0
- package/template/workflows/specdev/I-implement/evidence-template.md +24 -10
- package/template/workflows/specdev/I-implement/execution-preflight.md +4 -4
- package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +20 -0
- package/template/workflows/specdev/I-implement/tdd-mocking.md +19 -0
- package/template/workflows/specdev/I-implement/tdd-rules.md +14 -12
- package/template/workflows/specdev/I-implement/tdd-test-design.md +25 -0
- package/template/workflows/specdev/I-init-setup/I-init-setup.md +12 -9
- package/template/workflows/specdev/I-init-setup/config-template.json +1 -1
- package/template/workflows/specdev/I-init-setup/domain-layout-template.md +2 -2
- package/template/workflows/specdev/I-init-setup/status-template.json +2 -3
- package/template/workflows/specdev/I-init-setup/tracking-template.md +3 -0
- package/template/workflows/specdev/INDEX.md +64 -26
- package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +48 -38
- package/template/workflows/specdev/P-goal-plan/completion-control.md +19 -53
- package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +33 -0
- package/template/workflows/specdev/P-goal-plan/delegated-execution.md +53 -0
- package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +9 -40
- package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +16 -68
- package/template/workflows/specdev/P-goal-plan/planning-modes.md +20 -48
- package/template/workflows/specdev/P-prototype/P-prototype.md +46 -0
- package/template/workflows/specdev/P-prototype/logic-prototype.md +24 -0
- package/template/workflows/specdev/P-prototype/prototype-record-template.md +46 -0
- package/template/workflows/specdev/P-prototype/ui-prototype.md +21 -0
- package/template/workflows/specdev/R-review-architecture/R-review-architecture.md +1 -1
- package/template/workflows/specdev/S-spec/S-spec.md +2 -1
- package/template/workflows/specdev/T-tickets/T-tickets.md +3 -2
- package/template/workflows/specdev/T-tickets/ticket-readiness.md +1 -1
- package/template/workflows/specdev/T-tickets/ticket-template.md +1 -1
- package/template/workflows/specdev/T-tickets/tickets-map-template.md +1 -1
- package/template/workflows/specdev/T-triage/T-triage.md +65 -26
- package/template/workflows/specdev/T-triage/intake-protocol.md +32 -0
- package/template/workflows/specdev/T-triage/reconcile-protocol.md +34 -0
- package/template/workflows/specdev/T-triage/source-template.md +30 -0
- package/template/workflows/specdev/T-triage/triage-template.md +38 -24
- package/template/workflows/specdev/W-wayfinder/W-wayfinder.md +3 -1
- package/template/workflows/specdev/_state/status.json +2 -3
- package/template/workflows/specdev/common/README.md +9 -2
- package/template/workflows/specdev/common/rules/artifact-contract.md +20 -9
- package/template/workflows/specdev/common/rules/change-completion.md +33 -0
- package/template/workflows/specdev/common/rules/deviation-control.md +2 -2
- package/template/workflows/specdev/common/rules/evidence-and-verification.md +1 -1
- package/template/workflows/specdev/common/rules/path-ownership.md +3 -3
- package/template/workflows/specdev/common/schemas/change-status.schema.json +43 -0
- package/template/workflows/specdev/common/schemas/code-review.schema.json +22 -0
- package/template/workflows/specdev/common/schemas/diagnosis.schema.json +19 -0
- package/template/workflows/specdev/common/schemas/prototype-record.schema.json +24 -0
- package/template/workflows/specdev/common/schemas/source.schema.json +20 -0
- package/template/workflows/specdev/common/schemas/status.schema.json +20 -78
- package/template/workflows/specdev/common/schemas/triage.schema.json +21 -0
- package/template/workflows/specdev/common/skills/code-review/SKILL.md +49 -0
- package/template/workflows/specdev/common/skills/code-review/references/fowler-smells.md +18 -0
- package/template/workflows/specdev/common/skills/code-review/references/reviewer-contracts.md +13 -0
- package/template/workflows/specdev/common/skills/code-review/references/source-discovery.md +22 -0
- package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +12 -9
- package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +18 -13
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +8 -6
- package/template/workflows/specdev/common/skills/research/SKILL.md +38 -26
- package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +3 -5
- package/template/workflows/specdev/common/tools/README.md +3 -0
- package/template/workflows/specdev/common/tools/validate-specdev.mjs +496 -30
- package/dist/src/migrate.d.ts +0 -38
- package/dist/src/migrate.js +0 -642
- package/dist/src/migrate.js.map +0 -1
- package/dist/src/skills-mirror.d.ts +0 -38
- package/dist/src/skills-mirror.js +0 -160
- package/dist/src/skills-mirror.js.map +0 -1
- package/template/workflows/specdev/A-archive-and-consolidate/archive-checklist.md +0 -15
- package/template/workflows/specdev/A-archive-and-consolidate/knowledge-promotion-rules.md +0 -32
- package/template/workflows/specdev/I-implement/code-review-process.md +0 -17
- package/template/workflows/specdev/I-implement/tdd-examples.md +0 -14
- package/template/workflows/specdev/I-init-setup/status-labels-template.md +0 -55
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @namewta/speculo
|
|
2
2
|
|
|
3
|
-
> Workflow-packaged specification-driven development assets with
|
|
3
|
+
> Workflow-packaged specification-driven development assets with direct refresh tooling.
|
|
4
4
|
|
|
5
5
|
Speculo packages AI coding workflows as installable assets — commands, skills, workflow packages — delivered into any project via a unified CLI.
|
|
6
6
|
|
|
@@ -10,12 +10,9 @@ Speculo packages AI coding workflows as installable assets — commands, skills,
|
|
|
10
10
|
# Initialize Speculo in a target project
|
|
11
11
|
npx @namewta/speculo init
|
|
12
12
|
|
|
13
|
-
# Install all workflow packages
|
|
14
|
-
npx @namewta/speculo init --all
|
|
15
|
-
|
|
16
13
|
# Global install
|
|
17
14
|
npm install -g @namewta/speculo
|
|
18
|
-
speculo init [
|
|
15
|
+
speculo init [target]
|
|
19
16
|
```
|
|
20
17
|
|
|
21
18
|
After initialization, the target project's `speculo/` directory contains all core assets and selected workflow packages.
|
|
@@ -32,20 +29,23 @@ Requires: Node.js ≥ 22.22.3
|
|
|
32
29
|
|
|
33
30
|
| Command | Description |
|
|
34
31
|
|---|---|
|
|
35
|
-
| `speculo init [
|
|
36
|
-
| `speculo
|
|
37
|
-
|
|
32
|
+
| `speculo` / `speculo init [target]` | Initialize or directly refresh the managed Speculo assets. Each refresh replaces `config.json`, workspace metadata, commands, skills, and selected workflow packages with the current template. For selected workflows it resets managed state while retaining only `changes/` and `archive/`; command Markdown reports remain, but command `state.json` files are removed. Existing supported workflows not selected in the prompt remain untouched. Projects with SpecDev installed also get an idempotent `specdev-worktree/` entry in the project-root `.gitignore`. |
|
|
33
|
+
| `speculo version` | Print the installed version and check npm for the latest release. |
|
|
34
|
+
|
|
35
|
+
Legacy `migrate`, `mirror-skills`, and `update` commands, plus their flags, were removed in v0.7.0. Re-run `speculo init` to refresh old installations; no compatibility migration is performed.
|
|
38
36
|
|
|
39
37
|
## Installed Runtime Assets
|
|
40
38
|
|
|
41
39
|
After initialization, the target project gains the following AI agent-callable assets:
|
|
42
40
|
|
|
43
|
-
###
|
|
41
|
+
### 6 Commands
|
|
44
42
|
|
|
45
43
|
| Command | Purpose |
|
|
46
44
|
|---|---|
|
|
47
45
|
| `docs-sync` | Clean workspace, sync project documentation and Agent handbooks from reproducible Git ranges |
|
|
48
46
|
| `archive-and-consolidate` | Knowledge lifecycle governance: archive stale content, consolidate scattered knowledge, clean up outdated assets |
|
|
47
|
+
| `git-repository-audit` | Read-only, reproducible audit of one or more local Git repositories |
|
|
48
|
+
| `handoff` | Persist a compact, resumable context handoff for another agent |
|
|
49
49
|
| `retro` | Retrospective analysis with `gh issue` creation |
|
|
50
50
|
| `status` | Summary of installed workflows, active changes, and anomalies |
|
|
51
51
|
|
|
@@ -64,7 +64,7 @@ After initialization, the target project gains the following AI agent-callable a
|
|
|
64
64
|
|
|
65
65
|
| Workflow | Work Entries | Description |
|
|
66
66
|
|---|---:|---|
|
|
67
|
-
| **specdev** |
|
|
67
|
+
| **specdev** | 14 | Local-first specification-driven development: archive, code review, diagnosis, mentoring, grilling, implementation, setup, goal planning, prototyping, architecture review, specs, tickets, triage, and wayfinding |
|
|
68
68
|
| **person** | 1 | Persona-methodology-based consulting workflow (Mao Zedong Cognitive OS) |
|
|
69
69
|
|
|
70
70
|
Every workflow ships an `INDEX.md` as its auto-generated work catalog. Work entries follow `<Letter>-<work_name>/<Letter>-<work_name>.md` naming with progressive-disclosure sub-files, and resolve runtime paths via `<Path>{roots.xxx}/...</Path>` pointers in `workspace.json`.
|
|
@@ -86,7 +86,7 @@ Speculo stands on the shoulders of pioneers — including our own failures. With
|
|
|
86
86
|
- **[OpenSpec](https://github.com/Fission-AI/OpenSpec)** — a lightweight spec-driven development framework whose changes/ directory structure and archive mechanism deeply influenced Speculo's persistence contract design.
|
|
87
87
|
- **[Superpowers](https://github.com/obra/superpowers)** — a complete agentic development methodology whose skill orchestration and subagent dispatch provided key reference for workflow package design.
|
|
88
88
|
|
|
89
|
-
Speculo synthesizes lessons from all: from failure we learned "documents are the interface"; from Matt we inherited skill methodology; from OpenSpec we adopted engineering management; from Superpowers we studied orchestration. Together they form package-based workflow management, persistence contracts, and a
|
|
89
|
+
Speculo synthesizes lessons from all: from failure we learned "documents are the interface"; from Matt we inherited skill methodology; from OpenSpec we adopted engineering management; from Superpowers we studied orchestration. Together they form package-based workflow management, persistence contracts, and a direct refresh lifecycle. We carry their spirit forward.
|
|
90
90
|
|
|
91
91
|
## License
|
|
92
92
|
|
package/dist/src/cli.js
CHANGED
|
@@ -2,30 +2,18 @@
|
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { initSpeculo } from "./index.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { checkForUpdate, formatVersionBanner } from "./version.js";
|
|
6
|
+
const REMOVED_COMMANDS = new Set(["migrate", "mirror-skills", "update"]);
|
|
7
|
+
const REMOVED_OPTIONS = new Set(["--all", "--apply", "--dry-run"]);
|
|
8
8
|
function usage() {
|
|
9
9
|
return [
|
|
10
10
|
"Usage:",
|
|
11
|
-
" speculo init
|
|
12
|
-
" speculo migrate [--apply] [target]",
|
|
13
|
-
" speculo mirror-skills [--dry-run] [target]",
|
|
11
|
+
" speculo [init] [target]",
|
|
14
12
|
" speculo version",
|
|
15
13
|
"",
|
|
16
14
|
"Commands:",
|
|
17
|
-
" init
|
|
18
|
-
"
|
|
19
|
-
" migrate Preview migration from v2 or transitional v3 state to the current v3 contract.",
|
|
20
|
-
" Pass --apply to perform the staged, rollback-safe migration.",
|
|
21
|
-
" mirror-skills Mirror .agents/skills/* canonical skills into .claude/skills/* pointers.",
|
|
22
|
-
" Idempotent; relocates full .claude skills into .agents canonical first.",
|
|
23
|
-
" version Print the current Speculo version and check for updates.",
|
|
24
|
-
"",
|
|
25
|
-
"Options:",
|
|
26
|
-
" --all Select every workflow and fully refresh all assets during init.",
|
|
27
|
-
" --apply Apply a migration; without this flag migrate is always dry-run.",
|
|
28
|
-
" --dry-run Preview mirror-skills actions without writing to disk.",
|
|
15
|
+
" init Install or directly refresh Speculo assets and selected workflow packages.",
|
|
16
|
+
" version Print the current Speculo version and check for updates.",
|
|
29
17
|
].join("\n");
|
|
30
18
|
}
|
|
31
19
|
function isInteractive() {
|
|
@@ -37,132 +25,52 @@ async function showVersionWithCheck(packageRoot, packageName) {
|
|
|
37
25
|
return info;
|
|
38
26
|
}
|
|
39
27
|
async function confirmContinue() {
|
|
40
|
-
if (!isInteractive())
|
|
28
|
+
if (!isInteractive())
|
|
41
29
|
return true;
|
|
42
|
-
}
|
|
43
30
|
const { confirm } = await import("@inquirer/prompts");
|
|
44
|
-
return confirm({
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
return confirm({ message: "是否继续运行 speculo init?", default: true });
|
|
32
|
+
}
|
|
33
|
+
function assertNoRemovedOption(argv) {
|
|
34
|
+
const option = argv.find((argument) => REMOVED_OPTIONS.has(argument));
|
|
35
|
+
if (option)
|
|
36
|
+
throw new Error(option + " has been removed. Run speculo init [target] to refresh Speculo.");
|
|
48
37
|
}
|
|
49
38
|
async function main(argv) {
|
|
50
|
-
|
|
51
|
-
const applyFlag = argv.includes("--apply");
|
|
52
|
-
const dryRunFlag = argv.includes("--dry-run");
|
|
53
|
-
const positional = argv.filter((argument) => argument !== "--all" &&
|
|
54
|
-
argument !== "--apply" &&
|
|
55
|
-
argument !== "--dry-run");
|
|
56
|
-
const [command, targetArg, extra] = positional;
|
|
57
|
-
if (command === "--help" || command === "-h") {
|
|
39
|
+
if (argv[0] === "--help" || argv[0] === "-h") {
|
|
58
40
|
console.log(usage());
|
|
59
41
|
return 0;
|
|
60
42
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.error(
|
|
43
|
+
const [command, ...rest] = argv;
|
|
44
|
+
if (command && REMOVED_COMMANDS.has(command)) {
|
|
45
|
+
console.error("speculo " + command + " has been removed. Run speculo init [target] to refresh Speculo.");
|
|
64
46
|
return 1;
|
|
65
47
|
}
|
|
66
|
-
const target = resolve(targetArg ?? ".");
|
|
67
|
-
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
68
|
-
const packageName = "@namewta/speculo";
|
|
69
48
|
try {
|
|
70
|
-
|
|
49
|
+
assertNoRemovedOption(argv);
|
|
50
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
51
|
+
const packageName = "@namewta/speculo";
|
|
71
52
|
if (command === "version") {
|
|
53
|
+
if (rest.length > 0)
|
|
54
|
+
throw new Error("speculo version does not accept arguments.");
|
|
72
55
|
await showVersionWithCheck(packageRoot, packageName);
|
|
73
56
|
return 0;
|
|
74
57
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (!proceed) {
|
|
85
|
-
console.log("已取消。");
|
|
86
|
-
return 0;
|
|
87
|
-
}
|
|
88
|
-
const result = await initSpeculo(targetArg ?? ".", {
|
|
89
|
-
packageRoot,
|
|
90
|
-
all: command === "init" ? allFlag : false,
|
|
91
|
-
});
|
|
92
|
-
console.log(result.mode === "init"
|
|
93
|
-
? "Speculo initialized in " + result.target
|
|
94
|
-
: "Speculo updated in " + result.target);
|
|
95
|
-
for (const item of result.copied ?? result.updated ?? []) {
|
|
96
|
-
console.log(" " + (result.mode === "init" ? "copied " : "updated ") + item);
|
|
97
|
-
}
|
|
98
|
-
return 0;
|
|
99
|
-
}
|
|
100
|
-
// ── migrate ──────────────────────────────────────────────
|
|
101
|
-
if (command === "migrate") {
|
|
102
|
-
if (allFlag) {
|
|
103
|
-
throw new Error("--all is only valid with `speculo init`.");
|
|
104
|
-
}
|
|
105
|
-
const result = await migrateSpeculo(target, {
|
|
106
|
-
packageRoot,
|
|
107
|
-
apply: applyFlag,
|
|
108
|
-
});
|
|
109
|
-
if (!result.legacyDetected) {
|
|
110
|
-
console.log("No legacy Speculo state detected in " + result.target);
|
|
111
|
-
return 0;
|
|
112
|
-
}
|
|
113
|
-
console.log(result.applied
|
|
114
|
-
? "Speculo state migrated in " + result.target
|
|
115
|
-
: "Speculo migration preview for " + result.target);
|
|
116
|
-
for (const action of result.actions) {
|
|
117
|
-
const mapping = action.from
|
|
118
|
-
? action.from + (action.to ? " -> " + action.to : "")
|
|
119
|
-
: action.detail;
|
|
120
|
-
console.log(" " + action.kind + " " + mapping);
|
|
121
|
-
}
|
|
122
|
-
if (!result.applied) {
|
|
123
|
-
console.log("Dry-run only. Re-run with --apply to perform this migration.");
|
|
124
|
-
}
|
|
58
|
+
const targetArg = command === "init" ? rest[0] : command;
|
|
59
|
+
const extra = command === "init" ? rest[1] : rest[0];
|
|
60
|
+
if (extra)
|
|
61
|
+
throw new Error("Unexpected argument: " + extra);
|
|
62
|
+
if (targetArg?.startsWith("-"))
|
|
63
|
+
throw new Error("Unknown option: " + targetArg);
|
|
64
|
+
await showVersionWithCheck(packageRoot, packageName);
|
|
65
|
+
if (!(await confirmContinue())) {
|
|
66
|
+
console.log("已取消。");
|
|
125
67
|
return 0;
|
|
126
68
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (applyFlag) {
|
|
133
|
-
throw new Error("--apply is only valid with `speculo migrate`.");
|
|
134
|
-
}
|
|
135
|
-
const result = await mirrorSkills(targetArg ?? ".", {
|
|
136
|
-
apply: !dryRunFlag,
|
|
137
|
-
});
|
|
138
|
-
console.log(result.applied
|
|
139
|
-
? "Skills mirrored in " + result.target
|
|
140
|
-
: "Skills mirror preview for " + result.target);
|
|
141
|
-
for (const action of result.actions) {
|
|
142
|
-
console.log(" " + action.kind + " " + action.name +
|
|
143
|
-
(action.detail ? " (" + action.detail + ")" : ""));
|
|
144
|
-
}
|
|
145
|
-
if (result.actions.length === 0) {
|
|
146
|
-
console.log(" No skills found under .agents/skills or .claude/skills.");
|
|
147
|
-
}
|
|
148
|
-
if (!result.applied) {
|
|
149
|
-
console.log("Dry-run only. Re-run without --dry-run to apply.");
|
|
150
|
-
}
|
|
151
|
-
return 0;
|
|
152
|
-
}
|
|
153
|
-
// ── update (deprecated) ──────────────────────────────────
|
|
154
|
-
if (command === "update") {
|
|
155
|
-
console.error("Warning: `speculo update` is deprecated. Use `speculo init`.");
|
|
156
|
-
const result = await initSpeculo(target, {
|
|
157
|
-
packageRoot,
|
|
158
|
-
all: true,
|
|
159
|
-
});
|
|
160
|
-
console.log("Speculo updated in " + result.target);
|
|
161
|
-
return 0;
|
|
162
|
-
}
|
|
163
|
-
console.error("Unknown command: " + command);
|
|
164
|
-
console.error(usage());
|
|
165
|
-
return 1;
|
|
69
|
+
const result = await initSpeculo(targetArg ?? ".", { packageRoot });
|
|
70
|
+
console.log(result.mode === "init" ? "Speculo initialized in " + result.target : "Speculo refreshed in " + result.target);
|
|
71
|
+
for (const asset of result.assets)
|
|
72
|
+
console.log(" refreshed " + asset);
|
|
73
|
+
return 0;
|
|
166
74
|
}
|
|
167
75
|
catch (error) {
|
|
168
76
|
console.error(error instanceof Error ? error.message : String(error));
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAoB,MAAM,cAAc,CAAC;AAErF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;AACzE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAEnE,SAAS,KAAK;IACZ,OAAO;QACL,QAAQ;QACR,2BAA2B;Q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,MAAM,CAAC,CAAC;YACpB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,IAAI,GAAG,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QACpE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1H,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;YAAE,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,CAAC;IACX,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type WorkflowSelection } from "./workflows.js";
|
|
2
2
|
export type SpeculoCommandResult = {
|
|
3
3
|
target: string;
|
|
4
|
-
mode: "init" | "
|
|
5
|
-
|
|
6
|
-
updated?: string[];
|
|
4
|
+
mode: "init" | "refresh";
|
|
5
|
+
assets: string[];
|
|
7
6
|
};
|
|
8
7
|
export type SpeculoOptions = {
|
|
9
8
|
packageRoot?: string;
|
|
10
|
-
all?: boolean;
|
|
11
9
|
selection?: WorkflowSelection;
|
|
12
10
|
};
|
|
13
11
|
export declare function initSpeculo(targetArg?: string, options?: SpeculoOptions): Promise<SpeculoCommandResult>;
|