@thebassclef/lite 0.1.2 → 0.1.3
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/cli.cjs +38 -6
- package/dist/cli.js +38 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -595,18 +595,20 @@ function runInit(argv) {
|
|
|
595
595
|
}
|
|
596
596
|
];
|
|
597
597
|
if (args.dryRun) {
|
|
598
|
-
|
|
598
|
+
runDryRun$1(plans);
|
|
599
|
+
dispatchSubstrateCopy(targetDir, args.force, args.verbose, true);
|
|
600
|
+
return 0;
|
|
599
601
|
}
|
|
600
602
|
const exitCode = runReal$1(plans, args.force, args.verbose, targetDir);
|
|
601
603
|
if (exitCode === 0) {
|
|
602
|
-
dispatchSubstrateCopy(targetDir, args.force, args.verbose);
|
|
604
|
+
dispatchSubstrateCopy(targetDir, args.force, args.verbose, false);
|
|
603
605
|
}
|
|
604
606
|
return exitCode;
|
|
605
607
|
}
|
|
606
|
-
function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
608
|
+
function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
607
609
|
let result;
|
|
608
610
|
try {
|
|
609
|
-
result = copySubstrate(targetDir, { force });
|
|
611
|
+
result = copySubstrate(targetDir, { force, dryRun });
|
|
610
612
|
} catch (e) {
|
|
611
613
|
const err = e;
|
|
612
614
|
process.stderr.write(
|
|
@@ -619,6 +621,21 @@ function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
|
619
621
|
);
|
|
620
622
|
process.exit(2);
|
|
621
623
|
}
|
|
624
|
+
if (dryRun) {
|
|
625
|
+
const wouldCopy = result.wouldCopy ?? [];
|
|
626
|
+
for (const relativePath of wouldCopy) {
|
|
627
|
+
const targetPath = node_path.join(targetDir, relativePath);
|
|
628
|
+
process.stdout.write(` ${"would create".padEnd(14)} ${targetPath}
|
|
629
|
+
`);
|
|
630
|
+
}
|
|
631
|
+
if (wouldCopy.length > 0) {
|
|
632
|
+
process.stdout.write(
|
|
633
|
+
`bassclef init: ${wouldCopy.length} substrate files would be copied.
|
|
634
|
+
`
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
622
639
|
if (result.copied.length === 0 && result.refused.length === 0 && result.errored.length === 0) {
|
|
623
640
|
return;
|
|
624
641
|
}
|
|
@@ -638,6 +655,11 @@ function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
|
638
655
|
if (result.errored.length > 0) parts.push(`${result.errored.length} error(s)`);
|
|
639
656
|
process.stdout.write(`bassclef init: ${parts.join(", ")}.
|
|
640
657
|
`);
|
|
658
|
+
const grandTotal = 2 + result.copied.length;
|
|
659
|
+
process.stdout.write(
|
|
660
|
+
`bassclef init: ${grandTotal} files total (2 config + ${result.copied.length} substrate).
|
|
661
|
+
`
|
|
662
|
+
);
|
|
641
663
|
if (verbose && result.erroredMessages) {
|
|
642
664
|
for (const msg of result.erroredMessages) {
|
|
643
665
|
process.stderr.write(` substrate: ${msg}
|
|
@@ -745,7 +767,7 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
745
767
|
}
|
|
746
768
|
if (anyRefused && created > 0) {
|
|
747
769
|
process.stdout.write(
|
|
748
|
-
`bassclef init: ${created} created, ${unchanged} unchanged. Pass --force to overwrite.
|
|
770
|
+
`bassclef init: ${created} config files created, ${unchanged} unchanged. Pass --force to overwrite.
|
|
749
771
|
`
|
|
750
772
|
);
|
|
751
773
|
process.stdout.write(
|
|
@@ -754,7 +776,7 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
754
776
|
);
|
|
755
777
|
return 0;
|
|
756
778
|
}
|
|
757
|
-
process.stdout.write(`bassclef init: ${created} created, ${unchanged} unchanged.
|
|
779
|
+
process.stdout.write(`bassclef init: ${created} config files created, ${unchanged} unchanged.
|
|
758
780
|
`);
|
|
759
781
|
process.stdout.write(
|
|
760
782
|
`bassclef init: your substrate lives under .claude/. Add .claude/ to .gitignore if you have not.
|
|
@@ -812,6 +834,16 @@ function usage$2() {
|
|
|
812
834
|
" .claude/settings.json Claude Code settings (minimal, opt-in blocks)",
|
|
813
835
|
" substrate.config.md Bassclef project manifest",
|
|
814
836
|
" .bassclef/init.manifest.json Record of what init wrote (used by sync)",
|
|
837
|
+
"",
|
|
838
|
+
" Plus the bundled substrate tree (~280 files):",
|
|
839
|
+
" .claude/{agents,hooks,luminaries,rules,skills}/",
|
|
840
|
+
" standards/, templates/, scripts/, lib/, presence/install/",
|
|
841
|
+
" architecture/decisions/",
|
|
842
|
+
" AGENTS.md, CLAUDE-lite.md, README.md, CONTRIBUTING.md,",
|
|
843
|
+
" SECURITY.md, CODE_OF_CONDUCT.md",
|
|
844
|
+
"",
|
|
845
|
+
" Run with --dry-run first to preview the full file list before",
|
|
846
|
+
" writing anything to disk.",
|
|
815
847
|
""
|
|
816
848
|
].join("\n");
|
|
817
849
|
}
|
package/dist/cli.js
CHANGED
|
@@ -572,18 +572,20 @@ function runInit(argv) {
|
|
|
572
572
|
}
|
|
573
573
|
];
|
|
574
574
|
if (args.dryRun) {
|
|
575
|
-
|
|
575
|
+
runDryRun$1(plans);
|
|
576
|
+
dispatchSubstrateCopy(targetDir, args.force, args.verbose, true);
|
|
577
|
+
return 0;
|
|
576
578
|
}
|
|
577
579
|
const exitCode = runReal$1(plans, args.force, args.verbose, targetDir);
|
|
578
580
|
if (exitCode === 0) {
|
|
579
|
-
dispatchSubstrateCopy(targetDir, args.force, args.verbose);
|
|
581
|
+
dispatchSubstrateCopy(targetDir, args.force, args.verbose, false);
|
|
580
582
|
}
|
|
581
583
|
return exitCode;
|
|
582
584
|
}
|
|
583
|
-
function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
585
|
+
function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
584
586
|
let result;
|
|
585
587
|
try {
|
|
586
|
-
result = copySubstrate(targetDir, { force });
|
|
588
|
+
result = copySubstrate(targetDir, { force, dryRun });
|
|
587
589
|
} catch (e) {
|
|
588
590
|
const err = e;
|
|
589
591
|
process.stderr.write(
|
|
@@ -596,6 +598,21 @@ function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
|
596
598
|
);
|
|
597
599
|
process.exit(2);
|
|
598
600
|
}
|
|
601
|
+
if (dryRun) {
|
|
602
|
+
const wouldCopy = result.wouldCopy ?? [];
|
|
603
|
+
for (const relativePath of wouldCopy) {
|
|
604
|
+
const targetPath = join(targetDir, relativePath);
|
|
605
|
+
process.stdout.write(` ${"would create".padEnd(14)} ${targetPath}
|
|
606
|
+
`);
|
|
607
|
+
}
|
|
608
|
+
if (wouldCopy.length > 0) {
|
|
609
|
+
process.stdout.write(
|
|
610
|
+
`bassclef init: ${wouldCopy.length} substrate files would be copied.
|
|
611
|
+
`
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
599
616
|
if (result.copied.length === 0 && result.refused.length === 0 && result.errored.length === 0) {
|
|
600
617
|
return;
|
|
601
618
|
}
|
|
@@ -615,6 +632,11 @@ function dispatchSubstrateCopy(targetDir, force, verbose) {
|
|
|
615
632
|
if (result.errored.length > 0) parts.push(`${result.errored.length} error(s)`);
|
|
616
633
|
process.stdout.write(`bassclef init: ${parts.join(", ")}.
|
|
617
634
|
`);
|
|
635
|
+
const grandTotal = 2 + result.copied.length;
|
|
636
|
+
process.stdout.write(
|
|
637
|
+
`bassclef init: ${grandTotal} files total (2 config + ${result.copied.length} substrate).
|
|
638
|
+
`
|
|
639
|
+
);
|
|
618
640
|
if (verbose && result.erroredMessages) {
|
|
619
641
|
for (const msg of result.erroredMessages) {
|
|
620
642
|
process.stderr.write(` substrate: ${msg}
|
|
@@ -722,7 +744,7 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
722
744
|
}
|
|
723
745
|
if (anyRefused && created > 0) {
|
|
724
746
|
process.stdout.write(
|
|
725
|
-
`bassclef init: ${created} created, ${unchanged} unchanged. Pass --force to overwrite.
|
|
747
|
+
`bassclef init: ${created} config files created, ${unchanged} unchanged. Pass --force to overwrite.
|
|
726
748
|
`
|
|
727
749
|
);
|
|
728
750
|
process.stdout.write(
|
|
@@ -731,7 +753,7 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
731
753
|
);
|
|
732
754
|
return 0;
|
|
733
755
|
}
|
|
734
|
-
process.stdout.write(`bassclef init: ${created} created, ${unchanged} unchanged.
|
|
756
|
+
process.stdout.write(`bassclef init: ${created} config files created, ${unchanged} unchanged.
|
|
735
757
|
`);
|
|
736
758
|
process.stdout.write(
|
|
737
759
|
`bassclef init: your substrate lives under .claude/. Add .claude/ to .gitignore if you have not.
|
|
@@ -789,6 +811,16 @@ function usage$2() {
|
|
|
789
811
|
" .claude/settings.json Claude Code settings (minimal, opt-in blocks)",
|
|
790
812
|
" substrate.config.md Bassclef project manifest",
|
|
791
813
|
" .bassclef/init.manifest.json Record of what init wrote (used by sync)",
|
|
814
|
+
"",
|
|
815
|
+
" Plus the bundled substrate tree (~280 files):",
|
|
816
|
+
" .claude/{agents,hooks,luminaries,rules,skills}/",
|
|
817
|
+
" standards/, templates/, scripts/, lib/, presence/install/",
|
|
818
|
+
" architecture/decisions/",
|
|
819
|
+
" AGENTS.md, CLAUDE-lite.md, README.md, CONTRIBUTING.md,",
|
|
820
|
+
" SECURITY.md, CODE_OF_CONDUCT.md",
|
|
821
|
+
"",
|
|
822
|
+
" Run with --dry-run first to preview the full file list before",
|
|
823
|
+
" writing anything to disk.",
|
|
792
824
|
""
|
|
793
825
|
].join("\n");
|
|
794
826
|
}
|
package/dist/index.cjs
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version: "0.1.
|
|
1
|
+
export declare const version: "0.1.3";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thebassclef/lite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Bassclef CLI — install and upgrade bassclef in your project with two commands.",
|
|
5
5
|
"keywords": ["bassclef", "claude-code", "cli", "scaffolding"],
|
|
6
6
|
"homepage": "https://github.com/sunj-labs/bassclef-cli",
|