@maestro-js/init 1.0.0-alpha.7 → 1.0.0-alpha.8
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/bin.js +9 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/bin.ts
|
|
8
8
|
import crypto from "crypto";
|
|
9
|
+
import fs from "fs";
|
|
9
10
|
import path from "path";
|
|
10
11
|
import { execSync } from "child_process";
|
|
11
12
|
import { access } from "fs/promises";
|
|
13
|
+
import { fileURLToPath } from "url";
|
|
12
14
|
var name = process.argv[2];
|
|
13
15
|
if (!name || !/^[a-z][a-z0-9-]*$/.test(name)) {
|
|
14
16
|
console.error("Project name must be lowercase, start with a letter, and contain only letters, numbers, and hyphens.");
|
|
@@ -49,7 +51,7 @@ function deriveDbPort(name2) {
|
|
|
49
51
|
}
|
|
50
52
|
function installSkills(targetDir2) {
|
|
51
53
|
const skillSources = [
|
|
52
|
-
{ cmd:
|
|
54
|
+
{ cmd: `npx --yes @maestro-js/agent-skills@${getCurrentVersion()}`, label: "maestro" },
|
|
53
55
|
{ cmd: "npx skills add https://react-aria.adobe.com --all -a claude-code", label: "react-aria" },
|
|
54
56
|
{ cmd: "npx skills add anthropics/skills --skill skill-creator -a claude-code -y", label: "skill-creator" },
|
|
55
57
|
{ cmd: "npx skills add mattpocock/skills --skill grill-me -a claude-code -y", label: "grill-me" },
|
|
@@ -71,3 +73,9 @@ async function fileExists(p) {
|
|
|
71
73
|
return false;
|
|
72
74
|
}
|
|
73
75
|
}
|
|
76
|
+
function getCurrentVersion() {
|
|
77
|
+
const dir = path.dirname(fileURLToPath(import.meta.url));
|
|
78
|
+
const raw = fs.readFileSync(path.join(dir, "../package.json"), "utf-8");
|
|
79
|
+
const pkg = JSON.parse(raw);
|
|
80
|
+
return pkg.version;
|
|
81
|
+
}
|