declare-cc 0.3.5 → 0.3.7
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/bin/install.js +15 -3
- package/commands/declare/init.md +7 -4
- package/dist/declare-tools.cjs +3 -2
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -1465,6 +1465,19 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
1465
1465
|
console.log(` ${green}✓${reset} Installed workflows/`);
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
+
// Copy dashboard static files (src/server/public/) → .claude/server/public/
|
|
1469
|
+
const publicSrc = path.join(src, 'src', 'server', 'public');
|
|
1470
|
+
if (fs.existsSync(publicSrc)) {
|
|
1471
|
+
const publicDest = path.join(targetDir, 'server', 'public');
|
|
1472
|
+
fs.mkdirSync(publicDest, { recursive: true });
|
|
1473
|
+
for (const entry of fs.readdirSync(publicSrc, { withFileTypes: true })) {
|
|
1474
|
+
if (entry.isFile()) {
|
|
1475
|
+
fs.copyFileSync(path.join(publicSrc, entry.name), path.join(publicDest, entry.name));
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
console.log(` ${green}✓${reset} Installed dashboard (server/public/)`);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1468
1481
|
// Copy declare-tools.cjs bundle so commands can run `node {pathPrefix}declare-tools.cjs`
|
|
1469
1482
|
const bundleSrc = path.join(src, 'dist', 'declare-tools.cjs');
|
|
1470
1483
|
const bundleDest = path.join(targetDir, 'declare-tools.cjs');
|
|
@@ -1507,9 +1520,8 @@ function install(isGlobal, runtime = 'claude') {
|
|
|
1507
1520
|
fs.writeFileSync(pkgJsonDest, '{"type":"commonjs"}\n');
|
|
1508
1521
|
console.log(` ${green}✓${reset} Wrote package.json (CommonJS mode)`);
|
|
1509
1522
|
|
|
1510
|
-
// Copy hooks
|
|
1511
|
-
|
|
1512
|
-
const hooksSrc = path.join(src, 'hooks', 'dist');
|
|
1523
|
+
// Copy hooks (replaces '.claude' with runtime-specific config dir in .js files)
|
|
1524
|
+
const hooksSrc = path.join(src, 'hooks');
|
|
1513
1525
|
if (fs.existsSync(hooksSrc)) {
|
|
1514
1526
|
const hooksDest = path.join(targetDir, 'hooks');
|
|
1515
1527
|
fs.mkdirSync(hooksDest, { recursive: true });
|
package/commands/declare/init.md
CHANGED
|
@@ -30,7 +30,10 @@ If the `existing` array is non-empty, present the existing files to the user and
|
|
|
30
30
|
|
|
31
31
|
**Step 3: Report results.**
|
|
32
32
|
|
|
33
|
-
Show the user a summary of what was created
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
Show the user a brief summary of what was created (file name + one-line purpose). If a commit was made, mention the hash.
|
|
34
|
+
|
|
35
|
+
Then immediately prompt the user to start declaring:
|
|
36
|
+
|
|
37
|
+
> **Ready. Run `/declare:future` to declare what's true when this project succeeds.**
|
|
38
|
+
|
|
39
|
+
Do not suggest editing files manually or running `/declare:status`. The next step is always `/declare:future`.
|
package/dist/declare-tools.cjs
CHANGED
|
@@ -3674,9 +3674,10 @@ var require_server = __commonJS({
|
|
|
3674
3674
|
".png": "image/png",
|
|
3675
3675
|
".ico": "image/x-icon"
|
|
3676
3676
|
};
|
|
3677
|
-
var PUBLIC_DIR_RELATIVE = path.join("src", "server", "public");
|
|
3678
3677
|
function getPublicDir(cwd) {
|
|
3679
|
-
|
|
3678
|
+
const installed = path.join(cwd, ".claude", "server", "public");
|
|
3679
|
+
if (require("fs").existsSync(installed)) return installed;
|
|
3680
|
+
return path.join(cwd, "src", "server", "public");
|
|
3680
3681
|
}
|
|
3681
3682
|
function sendJson(res, statusCode, data) {
|
|
3682
3683
|
const body = JSON.stringify(data, null, 2);
|
package/package.json
CHANGED