@skitterbyte/skitterspec-linear 4.0.0 → 5.0.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 +39 -0
- package/assets/core/env.config.json.example +3 -0
- package/assets/core/env.config.md +9 -0
- package/assets/rules/spec-planning.md +14 -0
- package/assets/skills/spec-complete/SKILL.md +6 -0
- package/assets/skills/spec-connect/SKILL.md +6 -0
- package/assets/skills/spec-go/SKILL.md +3 -1
- package/assets/skills/spec-init/SKILL.md +8 -0
- package/assets/skills/spec-live/SKILL.md +70 -0
- package/package.json +1 -1
- package/src/cli.js +377 -29
- package/src/env/config.js +12 -1
- package/src/env/live.js +348 -0
- package/src/env/resolve.js +25 -0
- package/src/init.js +241 -6
- package/src/prompts.js +37 -1
package/src/prompts.js
CHANGED
|
@@ -53,4 +53,40 @@ async function confirmRemoveReleaseTooling() {
|
|
|
53
53
|
return Boolean(ans.remove)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Interactive choice when `init` finds an already-set-up repo. Returns one of
|
|
58
|
+
* `leave` | `resync` | `reset`. Defaults to (and cancels to) `leave` — the safe
|
|
59
|
+
* no-op — and asks a second confirm before `reset` (destructive to managed files).
|
|
60
|
+
*/
|
|
61
|
+
async function promptExistingSetup() {
|
|
62
|
+
const prompts = require('prompts')
|
|
63
|
+
const { action } = await prompts(
|
|
64
|
+
{
|
|
65
|
+
type: 'select',
|
|
66
|
+
name: 'action',
|
|
67
|
+
message: 'This project already has skitterspec set up. What would you like to do?',
|
|
68
|
+
initial: 0,
|
|
69
|
+
choices: [
|
|
70
|
+
{ title: 'Leave alone — make no changes', value: 'leave' },
|
|
71
|
+
{ title: 'Resync — update managed files to the latest, keep my edits', value: 'resync' },
|
|
72
|
+
{ title: 'Start again — reset the scaffolding (your specs & config are kept)', value: 'reset' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{ onCancel: () => {} },
|
|
76
|
+
)
|
|
77
|
+
if (action === 'reset') {
|
|
78
|
+
const { confirm } = await prompts(
|
|
79
|
+
{
|
|
80
|
+
type: 'confirm',
|
|
81
|
+
name: 'confirm',
|
|
82
|
+
message: 'Start again overwrites managed skills/rules. Your specs and config are untouched. Continue?',
|
|
83
|
+
initial: false,
|
|
84
|
+
},
|
|
85
|
+
{ onCancel: () => false },
|
|
86
|
+
)
|
|
87
|
+
if (!confirm) return 'leave'
|
|
88
|
+
}
|
|
89
|
+
return action || 'leave'
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
module.exports = { promptSetup, confirmRemoveReleaseTooling, promptExistingSetup }
|