@nextsparkjs/cli 0.1.0-beta.86 → 0.1.0-beta.87
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.js +14 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3589,7 +3589,7 @@ async function runWizard(options = { mode: "interactive" }) {
|
|
|
3589
3589
|
const devCmd = isMonorepo ? "pnpm dev" : "pnpm dev";
|
|
3590
3590
|
console.log(chalk11.yellow(` Registries will be built automatically when you run "${devCmd}"`));
|
|
3591
3591
|
}
|
|
3592
|
-
await promptAIWorkflowSetup();
|
|
3592
|
+
await promptAIWorkflowSetup(config2);
|
|
3593
3593
|
showNextSteps(config2, selectedTheme);
|
|
3594
3594
|
} catch (error) {
|
|
3595
3595
|
if (error instanceof Error) {
|
|
@@ -3751,7 +3751,7 @@ function showNextSteps(config2, referenceTheme = null) {
|
|
|
3751
3751
|
console.log(chalk11.gray(" Docs: https://nextspark.dev/docs"));
|
|
3752
3752
|
console.log("");
|
|
3753
3753
|
}
|
|
3754
|
-
async function promptAIWorkflowSetup() {
|
|
3754
|
+
async function promptAIWorkflowSetup(config2) {
|
|
3755
3755
|
console.log("");
|
|
3756
3756
|
console.log(chalk11.cyan(" " + "=".repeat(60)));
|
|
3757
3757
|
console.log(chalk11.bold.white(" AI Workflow Setup (Optional)"));
|
|
@@ -3774,20 +3774,20 @@ async function promptAIWorkflowSetup() {
|
|
|
3774
3774
|
showInfo(`${choice} support is coming soon. For now, use Claude Code.`);
|
|
3775
3775
|
return;
|
|
3776
3776
|
}
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3779
|
-
prefixText: " "
|
|
3780
|
-
}).start();
|
|
3777
|
+
const projectRoot = process.cwd();
|
|
3778
|
+
const isMonorepo = isMonorepoProject(config2);
|
|
3781
3779
|
try {
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
cwd: process.cwd(),
|
|
3780
|
+
execSync("pnpm add -D -w @nextsparkjs/ai-workflow", {
|
|
3781
|
+
cwd: projectRoot,
|
|
3785
3782
|
stdio: "inherit"
|
|
3786
3783
|
});
|
|
3787
|
-
|
|
3784
|
+
let setupScript = join7(projectRoot, "node_modules", "@nextsparkjs", "ai-workflow", "scripts", "setup.mjs");
|
|
3785
|
+
if (!existsSync7(setupScript) && isMonorepo) {
|
|
3786
|
+
setupScript = join7(projectRoot, "web", "node_modules", "@nextsparkjs", "ai-workflow", "scripts", "setup.mjs");
|
|
3787
|
+
}
|
|
3788
3788
|
if (existsSync7(setupScript)) {
|
|
3789
3789
|
execSync(`node "${setupScript}" ${choice}`, {
|
|
3790
|
-
cwd:
|
|
3790
|
+
cwd: projectRoot,
|
|
3791
3791
|
stdio: "inherit"
|
|
3792
3792
|
});
|
|
3793
3793
|
showSuccess("AI workflow setup complete!");
|
|
@@ -4943,6 +4943,8 @@ function resolveAIWorkflowPath() {
|
|
|
4943
4943
|
const cwd = process.cwd();
|
|
4944
4944
|
const nmPath = join12(cwd, "node_modules", "@nextsparkjs", "ai-workflow");
|
|
4945
4945
|
if (existsSync12(nmPath)) return nmPath;
|
|
4946
|
+
const webNmPath = join12(cwd, "web", "node_modules", "@nextsparkjs", "ai-workflow");
|
|
4947
|
+
if (existsSync12(webNmPath)) return webNmPath;
|
|
4946
4948
|
const monoPath = join12(cwd, "packages", "ai-workflow");
|
|
4947
4949
|
if (existsSync12(monoPath)) return monoPath;
|
|
4948
4950
|
return null;
|
|
@@ -4964,7 +4966,7 @@ async function setupAICommand(options) {
|
|
|
4964
4966
|
console.log(chalk18.red(" @nextsparkjs/ai-workflow package not found."));
|
|
4965
4967
|
console.log("");
|
|
4966
4968
|
console.log(chalk18.gray(" Install it first:"));
|
|
4967
|
-
console.log(chalk18.cyan(" pnpm add -D @nextsparkjs/ai-workflow"));
|
|
4969
|
+
console.log(chalk18.cyan(" pnpm add -D -w @nextsparkjs/ai-workflow"));
|
|
4968
4970
|
console.log("");
|
|
4969
4971
|
process.exit(1);
|
|
4970
4972
|
}
|