super-backlog 0.8.0 → 0.9.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 +2 -2
- package/dist/commands/init.js +2 -0
- package/dist/dashboard/data.js +2 -1
- package/dist/init/execute.js +13 -1
- package/dist/init/planner.js +13 -7
- package/package.json +19 -2
package/README.md
CHANGED
|
@@ -24,13 +24,13 @@ Install super-backlog into the current project with the official installer for y
|
|
|
24
24
|
**Windows (PowerShell)** — bypasses Execution Policy automatically:
|
|
25
25
|
|
|
26
26
|
```powershell
|
|
27
|
-
irm https://raw.githubusercontent.com/adam-s-k-i/super-backlog/
|
|
27
|
+
irm https://raw.githubusercontent.com/adam-s-k-i/super-backlog/master/scripts/install.ps1 | iex
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**macOS / Linux**:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
curl -fsSL https://raw.githubusercontent.com/adam-s-k-i/super-backlog/
|
|
33
|
+
curl -fsSL https://raw.githubusercontent.com/adam-s-k-i/super-backlog/master/scripts/install.sh | bash
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Both installers check Node.js and npm, install `super-backlog`, and run `sbl init` without using `npx`, so they work even when `npx` is blocked by PowerShell's Execution Policy.
|
package/dist/commands/init.js
CHANGED
|
@@ -20,6 +20,8 @@ function describeAction(action) {
|
|
|
20
20
|
switch (action.kind) {
|
|
21
21
|
case 'upstream-install':
|
|
22
22
|
return `upstream-install via ${action.pm}`;
|
|
23
|
+
case 'scaffold-package-json':
|
|
24
|
+
return 'scaffold-package-json package.json';
|
|
23
25
|
case 'merge-json':
|
|
24
26
|
return `merge-json ${action.path} (${action.transform})`;
|
|
25
27
|
case 'inject-agents-block':
|
package/dist/dashboard/data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/dashboard/data.ts
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
3
|
+
import { basename, join } from 'node:path';
|
|
4
4
|
import { resolveBacklogBin, runCapture } from '../lib/run.js';
|
|
5
5
|
import { readSimpleKeys } from '../lib/yamlmini.js';
|
|
6
6
|
function isRecord(v) {
|
|
@@ -235,6 +235,7 @@ function readProjectIdentity(cwd) {
|
|
|
235
235
|
const name = asString(cfg['project_name']) ??
|
|
236
236
|
asString(cfg['name']) ??
|
|
237
237
|
asString(pkg?.['name']) ??
|
|
238
|
+
asString(basename(cwd)) ??
|
|
238
239
|
'Untitled project';
|
|
239
240
|
const description = asString(cfg['description']) ?? asString(pkg?.['description']) ?? '';
|
|
240
241
|
return { name, description };
|
package/dist/init/execute.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/init/execute.ts
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { dirname, join, resolve } from 'node:path';
|
|
3
|
+
import { dirname, basename, join, resolve } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import process from 'node:process';
|
|
6
6
|
import { atomicWrite } from '../lib/atomic.js';
|
|
@@ -177,6 +177,18 @@ export async function executeActions(cwd, actions, ctx) {
|
|
|
177
177
|
runUpstreamInstall(cwd, action, ctx);
|
|
178
178
|
applied++;
|
|
179
179
|
break;
|
|
180
|
+
case 'scaffold-package-json': {
|
|
181
|
+
const pkgPath = join(cwd, 'package.json');
|
|
182
|
+
if (existsSync(pkgPath)) {
|
|
183
|
+
skipped++;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
const minimal = { name: basename(cwd), private: true };
|
|
187
|
+
atomicWrite(pkgPath, `${JSON.stringify(minimal, null, 2)}\n`);
|
|
188
|
+
applied++;
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
180
192
|
case 'merge-json':
|
|
181
193
|
applyMergeJson(cwd, action) ? applied++ : skipped++;
|
|
182
194
|
break;
|
package/dist/init/planner.js
CHANGED
|
@@ -18,18 +18,24 @@ export function planInit(state, opts, _version) {
|
|
|
18
18
|
const actions = [];
|
|
19
19
|
const warnings = [];
|
|
20
20
|
const degradedAuto = opts.pm === 'auto' && state.detectedPm === null;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// degraded auto means: no package.json (detectPackageManager only returns
|
|
22
|
+
// null then). One-command promise: scaffold a minimal package.json and
|
|
23
|
+
// proceed with npm instead of degrading to a manual-install warning.
|
|
24
|
+
const scaffold = degradedAuto && !opts.skipInstall;
|
|
25
|
+
if (scaffold) {
|
|
26
|
+
actions.push({ kind: 'scaffold-package-json' });
|
|
27
|
+
}
|
|
28
|
+
if (!opts.skipInstall && opts.pm !== 'skip') {
|
|
29
|
+
if (scaffold) {
|
|
30
|
+
actions.push({ kind: 'upstream-install', pm: 'npm' });
|
|
31
|
+
}
|
|
32
|
+
else if (opts.pm === 'auto' && state.detectedPm !== null) {
|
|
23
33
|
actions.push({ kind: 'upstream-install', pm: state.detectedPm });
|
|
24
34
|
}
|
|
25
35
|
else if (opts.pm !== 'auto') {
|
|
26
36
|
actions.push({ kind: 'upstream-install', pm: opts.pm });
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
|
-
if (degradedAuto && !opts.skipInstall) {
|
|
30
|
-
warnings.push('no package manager detected - dependency installation and package.json merge were skipped; ' +
|
|
31
|
-
'install backlog.md and super-backlog manually, or re-run with --pm <npm|pnpm|bun>');
|
|
32
|
-
}
|
|
33
39
|
// opencode.json merge depends only on harness selection and applyPluginEntry
|
|
34
40
|
// not throwing a near-miss - never on package.json presence or PM detection
|
|
35
41
|
if (opts.harnesses.includes('opencode')) {
|
|
@@ -41,7 +47,7 @@ export function planInit(state, opts, _version) {
|
|
|
41
47
|
warnings.push(err instanceof Error ? err.message : String(err));
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
|
-
if (!degradedAuto && state.pkgExists) {
|
|
50
|
+
if ((!degradedAuto && state.pkgExists) || scaffold) {
|
|
45
51
|
actions.push({ kind: 'merge-json', path: 'package.json', transform: 'scripts-and-devdeps' });
|
|
46
52
|
}
|
|
47
53
|
if (opts.harnesses.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-backlog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "One command to equip any project with Backlog.md + Superpowers, plus a Project Dashboard.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"tasks": "backlog task list",
|
|
29
29
|
"board": "backlog board",
|
|
30
30
|
"browser": "backlog browser",
|
|
31
|
-
"dashboard": "super-backlog dashboard"
|
|
31
|
+
"dashboard": "super-backlog dashboard",
|
|
32
|
+
"screenshot": "npm run build && node scripts/capture-dashboard.mjs"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/node": "^26.2.0",
|
|
@@ -39,5 +40,21 @@
|
|
|
39
40
|
"typescript": "^7.0.2",
|
|
40
41
|
"vitepress": "^1.6.4",
|
|
41
42
|
"vitest": "^4.1.11"
|
|
43
|
+
},
|
|
44
|
+
"overrides": {
|
|
45
|
+
"vitepress": {
|
|
46
|
+
"vite": "^6.4.3",
|
|
47
|
+
"esbuild": "^0.25.0",
|
|
48
|
+
"@vitejs/plugin-vue": {
|
|
49
|
+
"vite": "^6.4.3",
|
|
50
|
+
"esbuild": "^0.25.0"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"vitest": {
|
|
54
|
+
"vite": "^8.2.2",
|
|
55
|
+
"@vitest/mocker": {
|
|
56
|
+
"vite": "^8.2.2"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
42
59
|
}
|
|
43
60
|
}
|