create-morax 2.0.0 → 2.0.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/README.github.md +139 -139
- package/README.md +88 -88
- package/dist/index.js +144 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import pc29 from "picocolors";
|
|
|
5
5
|
|
|
6
6
|
// src/core/runner.ts
|
|
7
7
|
import path35 from "path";
|
|
8
|
-
import { spinner as
|
|
8
|
+
import { spinner as spinner20 } from "@clack/prompts";
|
|
9
9
|
import pc28 from "picocolors";
|
|
10
10
|
|
|
11
11
|
// src/core/startcli.ts
|
|
@@ -27,7 +27,7 @@ function startCli() {
|
|
|
27
27
|
console.log("\n");
|
|
28
28
|
console.log(moraxGradient(asciiArt));
|
|
29
29
|
console.log("\n");
|
|
30
|
-
intro(pc.yellow("
|
|
30
|
+
intro(pc.yellow("Welcome to Morax \u2014 The Next-Gen Workspace Scaffolder"));
|
|
31
31
|
console.log(
|
|
32
32
|
boxen(
|
|
33
33
|
`\u26A1 ${pc.bold("Morax")} automates the setup of modern ${pc.cyan("pnpm workspaces")}, linking internal shared configurations, UI packages, and framework apps concurrently.`,
|
|
@@ -47,7 +47,7 @@ import pc3 from "picocolors";
|
|
|
47
47
|
import fsPromises from "fs/promises";
|
|
48
48
|
|
|
49
49
|
// src/utils/exec.ts
|
|
50
|
-
import { exec } from "child_process";
|
|
50
|
+
import { exec, spawn } from "child_process";
|
|
51
51
|
import { promisify } from "util";
|
|
52
52
|
import pc2 from "picocolors";
|
|
53
53
|
var execAsync = promisify(exec);
|
|
@@ -82,6 +82,27 @@ async function runCommand(command, options = {}) {
|
|
|
82
82
|
throw error;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
function runInteractiveCommand(command, args, cwd) {
|
|
86
|
+
return new Promise((resolve, reject) => {
|
|
87
|
+
const fullCommand = args.length > 0 ? `${command} ${args.join(" ")}` : command;
|
|
88
|
+
const child = spawn(fullCommand, [], {
|
|
89
|
+
cwd,
|
|
90
|
+
stdio: "inherit",
|
|
91
|
+
shell: true,
|
|
92
|
+
env: { ...process.env, NODE_NO_WARNINGS: "1" }
|
|
93
|
+
});
|
|
94
|
+
child.on("close", (code) => {
|
|
95
|
+
if (code === 0) {
|
|
96
|
+
resolve();
|
|
97
|
+
} else {
|
|
98
|
+
reject(new Error(`Command "${fullCommand}" exited with code ${code}`));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
child.on("error", (err) => {
|
|
102
|
+
reject(err);
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
85
106
|
|
|
86
107
|
// src/core/preflight.ts
|
|
87
108
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -1027,12 +1048,12 @@ import pc9 from "picocolors";
|
|
|
1027
1048
|
import pc7 from "picocolors";
|
|
1028
1049
|
import fsPromises3 from "fs/promises";
|
|
1029
1050
|
import path2 from "path";
|
|
1030
|
-
import { spawn } from "child_process";
|
|
1051
|
+
import { spawn as spawn2 } from "child_process";
|
|
1031
1052
|
import { confirm, spinner as spinner2, text as text2 } from "@clack/prompts";
|
|
1032
|
-
function
|
|
1053
|
+
function runInteractiveCommand2(command, args, cwd) {
|
|
1033
1054
|
return new Promise((resolve, reject) => {
|
|
1034
1055
|
const fullCommand = args.length > 0 ? `${command} ${args.join(" ")}` : command;
|
|
1035
|
-
const child =
|
|
1056
|
+
const child = spawn2(fullCommand, [], {
|
|
1036
1057
|
cwd,
|
|
1037
1058
|
stdio: "inherit",
|
|
1038
1059
|
shell: true,
|
|
@@ -1081,7 +1102,7 @@ async function setupReact(projectPath, isMonorepo = true) {
|
|
|
1081
1102
|
} catch {
|
|
1082
1103
|
}
|
|
1083
1104
|
try {
|
|
1084
|
-
await
|
|
1105
|
+
await runInteractiveCommand2("pnpm", ["create", "vite@latest"], appsDir);
|
|
1085
1106
|
let afterDirs = [];
|
|
1086
1107
|
try {
|
|
1087
1108
|
afterDirs = await fsPromises3.readdir(appsDir);
|
|
@@ -1313,7 +1334,7 @@ async function setupReact(projectPath, isMonorepo = true) {
|
|
|
1313
1334
|
console.log(
|
|
1314
1335
|
pc7.cyan("\nStarting interactive shadcn UI initialization...")
|
|
1315
1336
|
);
|
|
1316
|
-
await
|
|
1337
|
+
await runInteractiveCommand2("pnpm", args, webDir);
|
|
1317
1338
|
console.log(
|
|
1318
1339
|
pc7.green(
|
|
1319
1340
|
isMonorepo ? `
|
|
@@ -1566,11 +1587,11 @@ import { confirm as confirm3 } from "@clack/prompts";
|
|
|
1566
1587
|
import pc10 from "picocolors";
|
|
1567
1588
|
import fsPromises6 from "fs/promises";
|
|
1568
1589
|
import path6 from "path";
|
|
1569
|
-
import { spawn as
|
|
1570
|
-
function
|
|
1590
|
+
import { spawn as spawn3 } from "child_process";
|
|
1591
|
+
function runInteractiveCommand3(command, args, cwd) {
|
|
1571
1592
|
return new Promise((resolve, reject) => {
|
|
1572
1593
|
const fullCommand = args.length > 0 ? `${command} ${args.join(" ")}` : command;
|
|
1573
|
-
const child =
|
|
1594
|
+
const child = spawn3(fullCommand, [], {
|
|
1574
1595
|
cwd,
|
|
1575
1596
|
stdio: "inherit",
|
|
1576
1597
|
shell: true,
|
|
@@ -1597,7 +1618,7 @@ async function setupNextjs(projectPath, isMonorepo = true) {
|
|
|
1597
1618
|
} catch {
|
|
1598
1619
|
}
|
|
1599
1620
|
console.log(pc10.cyan("\nStarting interactive Next.js application setup..."));
|
|
1600
|
-
await
|
|
1621
|
+
await runInteractiveCommand3(
|
|
1601
1622
|
"pnpm",
|
|
1602
1623
|
["dlx", "create-next-app@latest", targetName],
|
|
1603
1624
|
appsDir
|
|
@@ -1633,16 +1654,16 @@ import { confirm as confirm4 } from "@clack/prompts";
|
|
|
1633
1654
|
import pc11 from "picocolors";
|
|
1634
1655
|
import fsPromises7 from "fs/promises";
|
|
1635
1656
|
import path7 from "path";
|
|
1636
|
-
import { spawn as
|
|
1657
|
+
import { spawn as spawn4 } from "child_process";
|
|
1637
1658
|
async function promptShadcn() {
|
|
1638
1659
|
return await confirm4({
|
|
1639
1660
|
message: "Do you want to setup shadcn UI in your Next.js website (apps/web)?",
|
|
1640
1661
|
initialValue: true
|
|
1641
1662
|
});
|
|
1642
1663
|
}
|
|
1643
|
-
function
|
|
1664
|
+
function runInteractiveCommand4(command, args, cwd) {
|
|
1644
1665
|
return new Promise((resolve, reject) => {
|
|
1645
|
-
const child =
|
|
1666
|
+
const child = spawn4(command, args, {
|
|
1646
1667
|
cwd,
|
|
1647
1668
|
stdio: "inherit",
|
|
1648
1669
|
shell: true,
|
|
@@ -1667,7 +1688,7 @@ function runInteractiveCommand3(command, args, cwd) {
|
|
|
1667
1688
|
async function setupShadcn(projectPath, isMonorepo = true) {
|
|
1668
1689
|
const webDir = isMonorepo ? path7.join(projectPath, "apps", "web") : projectPath;
|
|
1669
1690
|
console.log(pc11.cyan("\nStarting interactive shadcn UI initialization..."));
|
|
1670
|
-
await
|
|
1691
|
+
await runInteractiveCommand4(
|
|
1671
1692
|
"pnpm",
|
|
1672
1693
|
["dlx", "shadcn@latest", "init", "--template", "next"],
|
|
1673
1694
|
webDir
|
|
@@ -2600,61 +2621,95 @@ async function promptAndSetupExtras(projectPath, options) {
|
|
|
2600
2621
|
}
|
|
2601
2622
|
|
|
2602
2623
|
// src/modules/skills/index.ts
|
|
2603
|
-
import {
|
|
2624
|
+
import { confirm as confirm5 } from "@clack/prompts";
|
|
2604
2625
|
import pc15 from "picocolors";
|
|
2605
2626
|
import fsPromises14 from "fs/promises";
|
|
2606
2627
|
import path15 from "path";
|
|
2607
|
-
var CURATED_SKILLS = [
|
|
2608
|
-
{
|
|
2609
|
-
id: "modular-nextjs-dynamic",
|
|
2610
|
-
name: "Modular Next.js (Dynamic)",
|
|
2611
|
-
repo: "AshutoshDM1/skills",
|
|
2612
|
-
description: "Dynamic modular architecture for Next.js webapps",
|
|
2613
|
-
hint: "SaaS, dashboards & portals"
|
|
2614
|
-
},
|
|
2615
|
-
{
|
|
2616
|
-
id: "modular-nextjs-lean",
|
|
2617
|
-
name: "Modular Next.js (Lean)",
|
|
2618
|
-
repo: "AshutoshDM1/skills",
|
|
2619
|
-
description: "Lean modular architecture for Next.js landing pages",
|
|
2620
|
-
hint: "Landing pages & marketing sites"
|
|
2621
|
-
}
|
|
2622
|
-
];
|
|
2623
2628
|
async function promptSkills() {
|
|
2624
|
-
const result = await
|
|
2625
|
-
message: "Install
|
|
2626
|
-
|
|
2627
|
-
value: skill.id,
|
|
2628
|
-
label: skill.name,
|
|
2629
|
-
hint: skill.hint
|
|
2630
|
-
})),
|
|
2631
|
-
initialValues: [],
|
|
2632
|
-
required: false
|
|
2629
|
+
const result = await confirm5({
|
|
2630
|
+
message: "Install AI Agent Skills (skills.sh)?",
|
|
2631
|
+
initialValue: true
|
|
2633
2632
|
});
|
|
2634
2633
|
handleCancel(result);
|
|
2635
2634
|
return result;
|
|
2636
2635
|
}
|
|
2637
|
-
async function
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2636
|
+
async function moveRulesToAgentRoot(projectPath) {
|
|
2637
|
+
const targetRulesDir = path15.join(projectPath, ".agents", "rules");
|
|
2638
|
+
const sourceCandidates = [
|
|
2639
|
+
path15.join(projectPath, ".agents", "skills", "rules"),
|
|
2640
|
+
path15.join(projectPath, ".agent", "skills", "rules"),
|
|
2641
|
+
path15.join(projectPath, ".agent", "rules")
|
|
2642
|
+
];
|
|
2643
|
+
let moved = false;
|
|
2644
|
+
for (const sourceDir of sourceCandidates) {
|
|
2646
2645
|
try {
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
}
|
|
2651
|
-
|
|
2646
|
+
await fsPromises14.access(sourceDir);
|
|
2647
|
+
} catch {
|
|
2648
|
+
continue;
|
|
2649
|
+
}
|
|
2650
|
+
await fsPromises14.mkdir(targetRulesDir, { recursive: true });
|
|
2651
|
+
try {
|
|
2652
|
+
const entries = await fsPromises14.readdir(sourceDir);
|
|
2653
|
+
for (const entry of entries) {
|
|
2654
|
+
const srcPath = path15.join(sourceDir, entry);
|
|
2655
|
+
const destPath = path15.join(targetRulesDir, entry);
|
|
2656
|
+
await fsPromises14.cp(srcPath, destPath, {
|
|
2657
|
+
recursive: true,
|
|
2658
|
+
force: true
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
await fsPromises14.rm(sourceDir, { recursive: true, force: true });
|
|
2662
|
+
moved = true;
|
|
2663
|
+
} catch (err) {
|
|
2664
|
+
console.log(
|
|
2652
2665
|
pc15.yellow(
|
|
2653
|
-
`\u26A0 Warning:
|
|
2666
|
+
`\u26A0 Warning: Could not move rules from ${sourceDir} (${err.message})
|
|
2667
|
+
`
|
|
2654
2668
|
)
|
|
2655
2669
|
);
|
|
2656
2670
|
}
|
|
2657
2671
|
}
|
|
2672
|
+
const agentDir = path15.join(projectPath, ".agent");
|
|
2673
|
+
try {
|
|
2674
|
+
const remaining = await fsPromises14.readdir(agentDir);
|
|
2675
|
+
if (remaining.length === 0) {
|
|
2676
|
+
await fsPromises14.rm(agentDir, { recursive: true, force: true });
|
|
2677
|
+
} else if (remaining.length === 1 && remaining[0] === "skills") {
|
|
2678
|
+
const skillsRemaining = await fsPromises14.readdir(
|
|
2679
|
+
path15.join(agentDir, "skills")
|
|
2680
|
+
);
|
|
2681
|
+
if (skillsRemaining.length === 0) {
|
|
2682
|
+
await fsPromises14.rm(agentDir, { recursive: true, force: true });
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
} catch {
|
|
2686
|
+
}
|
|
2687
|
+
if (moved) {
|
|
2688
|
+
console.log(
|
|
2689
|
+
pc15.green(`\u2714 Configured AI rules: Moved rules to .agents/rules
|
|
2690
|
+
`)
|
|
2691
|
+
);
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
async function installSkills(projectPath) {
|
|
2695
|
+
console.log(pc15.cyan("\nLaunching interactive skills CLI (skills.sh)...\n"));
|
|
2696
|
+
try {
|
|
2697
|
+
await runInteractiveCommand(
|
|
2698
|
+
"pnpm",
|
|
2699
|
+
["dlx", "skills", "add", "AshutoshDM1/skills"],
|
|
2700
|
+
projectPath
|
|
2701
|
+
);
|
|
2702
|
+
console.log(pc15.green("\n\u2714 Skills installation completed\n"));
|
|
2703
|
+
} catch (error) {
|
|
2704
|
+
console.log(
|
|
2705
|
+
pc15.yellow(
|
|
2706
|
+
`
|
|
2707
|
+
\u26A0 Note: Skills installation ended (${error.message || "CLI exited"})
|
|
2708
|
+
`
|
|
2709
|
+
)
|
|
2710
|
+
);
|
|
2711
|
+
}
|
|
2712
|
+
await moveRulesToAgentRoot(projectPath);
|
|
2658
2713
|
const claudeDir = path15.join(projectPath, ".claude");
|
|
2659
2714
|
try {
|
|
2660
2715
|
await fsPromises14.rm(claudeDir, { recursive: true, force: true });
|
|
@@ -2676,9 +2731,9 @@ async function installSkills(projectPath, selectedSkillIds) {
|
|
|
2676
2731
|
}
|
|
2677
2732
|
}
|
|
2678
2733
|
async function promptAndInstallSkills(projectPath) {
|
|
2679
|
-
const
|
|
2680
|
-
if (
|
|
2681
|
-
await installSkills(projectPath
|
|
2734
|
+
const shouldInstall = await promptSkills();
|
|
2735
|
+
if (shouldInstall) {
|
|
2736
|
+
await installSkills(projectPath);
|
|
2682
2737
|
}
|
|
2683
2738
|
}
|
|
2684
2739
|
|
|
@@ -2772,7 +2827,7 @@ async function setupRootEnv(projectPath, options = {}) {
|
|
|
2772
2827
|
}
|
|
2773
2828
|
|
|
2774
2829
|
// src/modules/git/husky.ts
|
|
2775
|
-
import { confirm as
|
|
2830
|
+
import { confirm as confirm6, spinner as spinner8 } from "@clack/prompts";
|
|
2776
2831
|
import pc16 from "picocolors";
|
|
2777
2832
|
import fsPromises16 from "fs/promises";
|
|
2778
2833
|
import path17 from "path";
|
|
@@ -2798,7 +2853,7 @@ async function setupHusky(projectPath) {
|
|
|
2798
2853
|
}
|
|
2799
2854
|
async function runHuskySetup(projectPath, gitInitialized) {
|
|
2800
2855
|
if (!gitInitialized) return;
|
|
2801
|
-
const s =
|
|
2856
|
+
const s = spinner8();
|
|
2802
2857
|
s.start("Setting up Husky hooks...");
|
|
2803
2858
|
try {
|
|
2804
2859
|
await setupHusky(projectPath);
|
|
@@ -2812,7 +2867,7 @@ Error details: ${error.message || error}`));
|
|
|
2812
2867
|
}
|
|
2813
2868
|
|
|
2814
2869
|
// src/modules/git/lefthook.ts
|
|
2815
|
-
import { spinner as
|
|
2870
|
+
import { spinner as spinner9 } from "@clack/prompts";
|
|
2816
2871
|
import pc17 from "picocolors";
|
|
2817
2872
|
import fsPromises17 from "fs/promises";
|
|
2818
2873
|
import path18 from "path";
|
|
@@ -2867,7 +2922,7 @@ async function setupLefthook(projectPath, hasFormatter, hasLinter) {
|
|
|
2867
2922
|
}
|
|
2868
2923
|
async function runLefthookSetup(projectPath, gitInitialized, hasFormatter = true, hasLinter = true) {
|
|
2869
2924
|
if (!gitInitialized) return;
|
|
2870
|
-
const s =
|
|
2925
|
+
const s = spinner9();
|
|
2871
2926
|
s.start("Configuring modern Lefthook Git hooks...");
|
|
2872
2927
|
try {
|
|
2873
2928
|
await setupLefthook(projectPath, hasFormatter, hasLinter);
|
|
@@ -2881,7 +2936,7 @@ Error details: ${error.message || error}`));
|
|
|
2881
2936
|
}
|
|
2882
2937
|
|
|
2883
2938
|
// src/modules/quality/biome.ts
|
|
2884
|
-
import { spinner as
|
|
2939
|
+
import { spinner as spinner10 } from "@clack/prompts";
|
|
2885
2940
|
import pc18 from "picocolors";
|
|
2886
2941
|
import fsPromises18 from "fs/promises";
|
|
2887
2942
|
import path19 from "path";
|
|
@@ -2946,7 +3001,7 @@ async function setupBiome(projectPath, options) {
|
|
|
2946
3001
|
);
|
|
2947
3002
|
}
|
|
2948
3003
|
async function runBiomeSetup(projectPath, options) {
|
|
2949
|
-
const s =
|
|
3004
|
+
const s = spinner10();
|
|
2950
3005
|
const actionText = options.linter && options.formatter ? "linter & formatter" : options.linter ? "linter" : "formatter";
|
|
2951
3006
|
s.start(`Configuring ultra-fast Biome ${actionText}...`);
|
|
2952
3007
|
try {
|
|
@@ -2961,7 +3016,7 @@ Error details: ${error.message || error}`));
|
|
|
2961
3016
|
}
|
|
2962
3017
|
|
|
2963
3018
|
// src/modules/quality/oxlint.ts
|
|
2964
|
-
import { spinner as
|
|
3019
|
+
import { spinner as spinner11 } from "@clack/prompts";
|
|
2965
3020
|
import pc19 from "picocolors";
|
|
2966
3021
|
import fsPromises19 from "fs/promises";
|
|
2967
3022
|
import path20 from "path";
|
|
@@ -3000,7 +3055,7 @@ async function setupOxlint(projectPath) {
|
|
|
3000
3055
|
);
|
|
3001
3056
|
}
|
|
3002
3057
|
async function runOxlintSetup(projectPath) {
|
|
3003
|
-
const s =
|
|
3058
|
+
const s = spinner11();
|
|
3004
3059
|
s.start("Configuring ultra-fast Oxlint linter...");
|
|
3005
3060
|
try {
|
|
3006
3061
|
await setupOxlint(projectPath);
|
|
@@ -3016,7 +3071,7 @@ Error details: ${error.message || error}`));
|
|
|
3016
3071
|
}
|
|
3017
3072
|
|
|
3018
3073
|
// src/modules/quality/prettier.ts
|
|
3019
|
-
import { confirm as
|
|
3074
|
+
import { confirm as confirm7, spinner as spinner12 } from "@clack/prompts";
|
|
3020
3075
|
import pc20 from "picocolors";
|
|
3021
3076
|
import fsPromises20 from "fs/promises";
|
|
3022
3077
|
import path21 from "path";
|
|
@@ -3062,7 +3117,7 @@ async function setupPrettier(projectPath) {
|
|
|
3062
3117
|
await runCommand("pnpm format", { cwd: projectPath });
|
|
3063
3118
|
}
|
|
3064
3119
|
async function runPrettierSetup(projectPath) {
|
|
3065
|
-
const s =
|
|
3120
|
+
const s = spinner12();
|
|
3066
3121
|
s.start("Setting up Prettier auto-formatting...");
|
|
3067
3122
|
try {
|
|
3068
3123
|
await setupPrettier(projectPath);
|
|
@@ -3076,7 +3131,7 @@ Error details: ${error.message || error}`));
|
|
|
3076
3131
|
}
|
|
3077
3132
|
|
|
3078
3133
|
// src/modules/packages/typescript.ts
|
|
3079
|
-
import { spinner as
|
|
3134
|
+
import { spinner as spinner13 } from "@clack/prompts";
|
|
3080
3135
|
import pc21 from "picocolors";
|
|
3081
3136
|
import fsPromises21 from "fs/promises";
|
|
3082
3137
|
import path22 from "path";
|
|
@@ -3128,7 +3183,7 @@ async function runTypescriptSetup(projectPath) {
|
|
|
3128
3183
|
} catch {
|
|
3129
3184
|
return;
|
|
3130
3185
|
}
|
|
3131
|
-
const s =
|
|
3186
|
+
const s = spinner13();
|
|
3132
3187
|
s.start("Setting up modular TypeScript config in packages/typescript...");
|
|
3133
3188
|
try {
|
|
3134
3189
|
await setupTypescript(projectPath);
|
|
@@ -3148,7 +3203,7 @@ Error details: ${error.message || error}`));
|
|
|
3148
3203
|
// src/modules/apps/server/index.ts
|
|
3149
3204
|
import fsPromises28 from "fs/promises";
|
|
3150
3205
|
import path31 from "path";
|
|
3151
|
-
import { spinner as
|
|
3206
|
+
import { spinner as spinner16 } from "@clack/prompts";
|
|
3152
3207
|
import pc24 from "picocolors";
|
|
3153
3208
|
|
|
3154
3209
|
// src/modules/apps/server/frameworks/express/index.ts
|
|
@@ -3704,7 +3759,7 @@ async function promptServerDeployment(framework) {
|
|
|
3704
3759
|
|
|
3705
3760
|
// src/modules/apps/server/deployment/docker/index.ts
|
|
3706
3761
|
import path27 from "path";
|
|
3707
|
-
import { spinner as
|
|
3762
|
+
import { spinner as spinner14 } from "@clack/prompts";
|
|
3708
3763
|
import pc22 from "picocolors";
|
|
3709
3764
|
|
|
3710
3765
|
// src/modules/apps/server/deployment/docker/express-docker.ts
|
|
@@ -3887,7 +3942,7 @@ async function setupDockerDeployment(options) {
|
|
|
3887
3942
|
const serverDir = path27.join(projectPath, "apps", "server");
|
|
3888
3943
|
const frameworkLabel = framework === "express" ? "Express" : "Hono";
|
|
3889
3944
|
const runtimeLabel = runtime === "bun" ? "Bun" : "Node.js";
|
|
3890
|
-
const s =
|
|
3945
|
+
const s = spinner14();
|
|
3891
3946
|
s.start(
|
|
3892
3947
|
`Configuring Docker deployment for ${frameworkLabel} (${runtimeLabel}) in apps/server...`
|
|
3893
3948
|
);
|
|
@@ -3910,7 +3965,7 @@ async function setupDockerDeployment(options) {
|
|
|
3910
3965
|
|
|
3911
3966
|
// src/modules/apps/server/deployment/vercel/index.ts
|
|
3912
3967
|
import path30 from "path";
|
|
3913
|
-
import { spinner as
|
|
3968
|
+
import { spinner as spinner15 } from "@clack/prompts";
|
|
3914
3969
|
import pc23 from "picocolors";
|
|
3915
3970
|
|
|
3916
3971
|
// src/modules/apps/server/deployment/vercel/express-vercel.ts
|
|
@@ -3991,7 +4046,7 @@ async function setupVercelDeployment(options) {
|
|
|
3991
4046
|
const { projectPath, framework, runtime } = options;
|
|
3992
4047
|
const serverDir = path30.join(projectPath, "apps", "server");
|
|
3993
4048
|
const frameworkLabel = framework === "express" ? "Express" : "Hono";
|
|
3994
|
-
const s =
|
|
4049
|
+
const s = spinner15();
|
|
3995
4050
|
s.start(
|
|
3996
4051
|
`Configuring Vercel deployment for ${frameworkLabel} backend in apps/server...`
|
|
3997
4052
|
);
|
|
@@ -4031,7 +4086,7 @@ async function runServerSetup(projectPath, framework, linter = "none", orm = "no
|
|
|
4031
4086
|
}
|
|
4032
4087
|
const frameworkLabel = framework === "express" ? "Express" : "Hono";
|
|
4033
4088
|
const runtimeLabel = runtime === "bun" ? "Bun" : "Node.js";
|
|
4034
|
-
const s =
|
|
4089
|
+
const s = spinner16();
|
|
4035
4090
|
s.start(
|
|
4036
4091
|
`Setting up modular ${frameworkLabel} backend (${runtimeLabel}) in apps/server...`
|
|
4037
4092
|
);
|
|
@@ -4098,7 +4153,7 @@ async function addWeb(projectPath) {
|
|
|
4098
4153
|
// src/modules/packages/env/index.ts
|
|
4099
4154
|
import fsPromises29 from "fs/promises";
|
|
4100
4155
|
import path32 from "path";
|
|
4101
|
-
import { confirm as
|
|
4156
|
+
import { confirm as confirm8, spinner as spinner17 } from "@clack/prompts";
|
|
4102
4157
|
import pc25 from "picocolors";
|
|
4103
4158
|
|
|
4104
4159
|
// src/modules/packages/env/package.ts
|
|
@@ -4452,8 +4507,8 @@ function renderCheckEnvTemplate(options) {
|
|
|
4452
4507
|
|
|
4453
4508
|
// src/modules/packages/env/index.ts
|
|
4454
4509
|
async function promptEnv() {
|
|
4455
|
-
const result = await
|
|
4456
|
-
message: "
|
|
4510
|
+
const result = await confirm8({
|
|
4511
|
+
message: `Configure ${pc25.cyan("packages/env")}? ${pc25.dim("(@repo/env: zod, dotenv)")}`,
|
|
4457
4512
|
initialValue: true
|
|
4458
4513
|
});
|
|
4459
4514
|
handleCancel(result);
|
|
@@ -4706,7 +4761,7 @@ async function setupEnvPackage(options) {
|
|
|
4706
4761
|
}
|
|
4707
4762
|
}
|
|
4708
4763
|
async function runEnvSetup(projectPath, options) {
|
|
4709
|
-
const s =
|
|
4764
|
+
const s = spinner17();
|
|
4710
4765
|
s.start("Configuring type-safe environment package in packages/env...");
|
|
4711
4766
|
try {
|
|
4712
4767
|
await setupEnvPackage(options);
|
|
@@ -4726,11 +4781,11 @@ Error details: ${error.message || error}`));
|
|
|
4726
4781
|
// src/modules/packages/auth/index.ts
|
|
4727
4782
|
import fsPromises30 from "fs/promises";
|
|
4728
4783
|
import path33 from "path";
|
|
4729
|
-
import { confirm as
|
|
4784
|
+
import { confirm as confirm9, spinner as spinner18 } from "@clack/prompts";
|
|
4730
4785
|
import pc26 from "picocolors";
|
|
4731
4786
|
async function promptAuth() {
|
|
4732
|
-
const result = await
|
|
4733
|
-
message:
|
|
4787
|
+
const result = await confirm9({
|
|
4788
|
+
message: `Configure ${pc26.cyan("packages/auth")}? ${pc26.dim("(@repo/auth: better-auth & Drizzle schemas)")}`,
|
|
4734
4789
|
initialValue: true
|
|
4735
4790
|
});
|
|
4736
4791
|
handleCancel(result);
|
|
@@ -4738,7 +4793,7 @@ async function promptAuth() {
|
|
|
4738
4793
|
}
|
|
4739
4794
|
async function setupAuth(options) {
|
|
4740
4795
|
const { projectPath, dialect, serverFramework, hasServer, hasEnv } = options;
|
|
4741
|
-
const s =
|
|
4796
|
+
const s = spinner18();
|
|
4742
4797
|
s.start("Configuring shared Better Auth package (@repo/auth)...");
|
|
4743
4798
|
try {
|
|
4744
4799
|
const authDir = path33.join(projectPath, "packages", "auth");
|
|
@@ -5174,7 +5229,7 @@ Error details: ${error.message || error}`));
|
|
|
5174
5229
|
}
|
|
5175
5230
|
|
|
5176
5231
|
// src/modules/docker/index.ts
|
|
5177
|
-
import { spinner as
|
|
5232
|
+
import { spinner as spinner19 } from "@clack/prompts";
|
|
5178
5233
|
import pc27 from "picocolors";
|
|
5179
5234
|
import fsPromises31 from "fs/promises";
|
|
5180
5235
|
import path34 from "path";
|
|
@@ -5182,7 +5237,7 @@ async function setupDocker(projectPath, options) {
|
|
|
5182
5237
|
if (!options.postgres && !options.redis) {
|
|
5183
5238
|
return;
|
|
5184
5239
|
}
|
|
5185
|
-
const s =
|
|
5240
|
+
const s = spinner19();
|
|
5186
5241
|
s.start("Configuring root Docker infrastructure in docker/...");
|
|
5187
5242
|
try {
|
|
5188
5243
|
const dockerDir = path34.join(projectPath, "docker");
|
|
@@ -5422,7 +5477,7 @@ async function runWorkspaceScaffolder(options = {}) {
|
|
|
5422
5477
|
}
|
|
5423
5478
|
});
|
|
5424
5479
|
await promptAndInstallSkills(projectPath);
|
|
5425
|
-
const s =
|
|
5480
|
+
const s = spinner20();
|
|
5426
5481
|
s.start("Running final workspace package installation...");
|
|
5427
5482
|
try {
|
|
5428
5483
|
await runCommand("pnpm install", { cwd: projectPath, silent: true });
|