@baseline-studio/cli 2.2.4 → 2.2.5
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/commands/init.js +3 -17
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -29,18 +29,8 @@ async function init() {
|
|
|
29
29
|
// 1. Gather basic info
|
|
30
30
|
const clientName = await ask(rl, " What's your company or project name? ");
|
|
31
31
|
const repo = "TrentM6/baseline-core";
|
|
32
|
-
//
|
|
33
|
-
const
|
|
34
|
-
const npxArtifacts = new Set(["node_modules", "package-lock.json", "package.json"]);
|
|
35
|
-
const cwdEntries = (0, fs_1.readdirSync)(cwd).filter((f) => !f.startsWith(".") && !npxArtifacts.has(f));
|
|
36
|
-
const destDir = cwdEntries.length === 0
|
|
37
|
-
? cwd
|
|
38
|
-
: (0, path_1.join)(cwd, `${clientName.toLowerCase().replace(/\s+/g, "-")}-system`);
|
|
39
|
-
if (destDir !== cwd && (0, fs_1.existsSync)(destDir)) {
|
|
40
|
-
console.error(`\n Error: ${destDir} already exists.\n`);
|
|
41
|
-
rl.close();
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
32
|
+
// Always scaffold in the current directory
|
|
33
|
+
const destDir = process.cwd();
|
|
44
34
|
// 2. Fetch latest from core
|
|
45
35
|
console.log(`\n Fetching latest from ${repo}...`);
|
|
46
36
|
const latest = (0, git_js_1.getLatestTag)(repo);
|
|
@@ -157,18 +147,14 @@ async function init() {
|
|
|
157
147
|
// Clean up
|
|
158
148
|
(0, fs_1.rmSync)(tmpDir, { recursive: true });
|
|
159
149
|
rl.close();
|
|
160
|
-
const displayPath = destDir === cwd ? "." : `./${clientName.toLowerCase().replace(/\s+/g, "-")}-system`;
|
|
161
150
|
const skillCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "skills")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "skills")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
|
|
162
151
|
const frameworkCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "frameworks")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "frameworks")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
|
|
163
152
|
const scriptCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "scripts")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "scripts")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
|
|
164
153
|
console.log(` ───────────────────────────────────`);
|
|
165
|
-
console.log(` ${clientName} system
|
|
154
|
+
console.log(` ${clientName} system ready!`);
|
|
166
155
|
console.log(` Version: v${latest}`);
|
|
167
156
|
console.log(` ${skillCount} skills | ${frameworkCount} frameworks | ${scriptCount} scripts`);
|
|
168
157
|
console.log(`\n Next steps:`);
|
|
169
|
-
if (destDir !== cwd) {
|
|
170
|
-
console.log(` cd ${clientName.toLowerCase().replace(/\s+/g, "-")}-system`);
|
|
171
|
-
}
|
|
172
158
|
console.log(` Edit context/ files to add more detail`);
|
|
173
159
|
console.log(` Run \`npx baseline status\` to check for updates\n`);
|
|
174
160
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const program = new commander_1.Command();
|
|
|
9
9
|
program
|
|
10
10
|
.name("baseline")
|
|
11
11
|
.description("Distribute and update the Baseline System")
|
|
12
|
-
.version("2.2.
|
|
12
|
+
.version("2.2.5");
|
|
13
13
|
program
|
|
14
14
|
.command("status")
|
|
15
15
|
.description("Show current version and check for updates")
|