create-nyoworks 2.5.0 → 2.5.1
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/checks.d.ts +1 -0
- package/dist/checks.js +15 -0
- package/dist/init.js +12 -6
- package/package.json +1 -1
package/dist/checks.d.ts
CHANGED
package/dist/checks.js
CHANGED
|
@@ -87,6 +87,21 @@ export async function checkDependencies() {
|
|
|
87
87
|
console.log(pc.red("Please install the required dependencies before continuing."));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
export async function getDockerComposeCommand() {
|
|
91
|
+
try {
|
|
92
|
+
await execa("docker", ["compose", "version"]);
|
|
93
|
+
return "docker compose";
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
try {
|
|
97
|
+
await execa("docker-compose", ["version"]);
|
|
98
|
+
return "docker-compose";
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return "docker compose";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
90
105
|
export function showClaudeMaxWarning() {
|
|
91
106
|
console.log();
|
|
92
107
|
console.log(pc.yellow("╔═══════════════════════════════════════════════════════════════════════╗"));
|
package/dist/init.js
CHANGED
|
@@ -5,7 +5,7 @@ import path from "path";
|
|
|
5
5
|
import os from "os";
|
|
6
6
|
import { execa } from "execa";
|
|
7
7
|
import { replacePlaceholders } from "./replace.js";
|
|
8
|
-
import { checkDependencies, showClaudeMaxWarning } from "./checks.js";
|
|
8
|
+
import { checkDependencies, showClaudeMaxWarning, getDockerComposeCommand } from "./checks.js";
|
|
9
9
|
const REPO = "naimozcan/nyoworks-framework";
|
|
10
10
|
const BRANCH = "main";
|
|
11
11
|
const AVAILABLE_FEATURES = [
|
|
@@ -235,13 +235,14 @@ See \`docs/bible/data/schema.md\`
|
|
|
235
235
|
console.log();
|
|
236
236
|
console.log(pc.green(pc.bold("Project created successfully!")));
|
|
237
237
|
await checkDependencies();
|
|
238
|
+
const dockerCmd = await getDockerComposeCommand();
|
|
238
239
|
showClaudeMaxWarning();
|
|
239
240
|
console.log();
|
|
240
241
|
console.log(pc.bold(" Next steps:"));
|
|
241
242
|
console.log();
|
|
242
243
|
console.log(pc.cyan(` cd ${slug}`));
|
|
243
244
|
console.log(pc.cyan(" pnpm install"));
|
|
244
|
-
console.log(pc.cyan(
|
|
245
|
+
console.log(pc.cyan(` ${dockerCmd} up -d`) + " " + pc.dim("# Start PostgreSQL & Redis"));
|
|
245
246
|
console.log(pc.cyan(" pnpm dev"));
|
|
246
247
|
console.log();
|
|
247
248
|
console.log(pc.dim(" Optional:"));
|
|
@@ -256,13 +257,18 @@ See \`docs/bible/data/schema.md\`
|
|
|
256
257
|
console.log(pc.dim(` Language: ${LANGUAGE_RESPONSES[language] || "Turkish"}`));
|
|
257
258
|
console.log();
|
|
258
259
|
process.stdout.write(pc.dim(" Building MCP server..."));
|
|
260
|
+
const mcpPath = path.join(targetDir, "mcp-server");
|
|
259
261
|
try {
|
|
260
|
-
await execa("pnpm", ["install"], { cwd:
|
|
261
|
-
await execa("pnpm", ["build"], { cwd:
|
|
262
|
+
await execa("pnpm", ["install"], { cwd: mcpPath });
|
|
263
|
+
await execa("pnpm", ["build"], { cwd: mcpPath });
|
|
262
264
|
console.log(pc.green(" done"));
|
|
263
265
|
}
|
|
264
|
-
catch {
|
|
265
|
-
console.log(pc.yellow("
|
|
266
|
+
catch (error) {
|
|
267
|
+
console.log(pc.yellow(" failed"));
|
|
268
|
+
if (error instanceof Error) {
|
|
269
|
+
console.log(pc.dim(` Error: ${error.message.split("\n")[0]}`));
|
|
270
|
+
}
|
|
271
|
+
console.log(pc.dim(" Run manually: cd mcp-server && pnpm install && pnpm build"));
|
|
266
272
|
}
|
|
267
273
|
const mcpConfigPath = path.join(targetDir, ".claude", "settings.local.json");
|
|
268
274
|
const mcpConfig = {
|