create-inox-app 0.2.2 → 0.2.4
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 +20 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import os, { constants } from "node:os";
|
|
|
9
9
|
import * as tty$1 from "node:tty";
|
|
10
10
|
import tty from "node:tty";
|
|
11
11
|
import path, { dirname, extname, join, relative, resolve, sep } from "node:path";
|
|
12
|
-
import { appendFileSync, chmodSync, createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
12
|
+
import { appendFileSync, chmodSync, createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, statSync, symlinkSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
15
15
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -3087,13 +3087,10 @@ const TITLE_TEXT = `
|
|
|
3087
3087
|
╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
|
|
3088
3088
|
`;
|
|
3089
3089
|
const INOX_THEME = {
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
lime: "#84CC16",
|
|
3095
|
-
yellow: "#EAB308",
|
|
3096
|
-
orange: "#F97316"
|
|
3090
|
+
red: "#D20000",
|
|
3091
|
+
warmRed: "#E83600",
|
|
3092
|
+
orange: "#F06800",
|
|
3093
|
+
amber: "#F59E0B"
|
|
3097
3094
|
};
|
|
3098
3095
|
const renderTitle = () => {
|
|
3099
3096
|
const cols = process.stdout.columns ?? 80;
|
|
@@ -6844,7 +6841,7 @@ const navigableGroup = async (steps) => {
|
|
|
6844
6841
|
const prevIndex = shownSteps.pop();
|
|
6845
6842
|
delete results[steps[prevIndex].key];
|
|
6846
6843
|
i$2 = prevIndex;
|
|
6847
|
-
}
|
|
6844
|
+
} else throw new UserCancelledError();
|
|
6848
6845
|
continue;
|
|
6849
6846
|
}
|
|
6850
6847
|
if (isCancel(result)) throw new UserCancelledError();
|
|
@@ -14583,6 +14580,15 @@ const writeFiles = (projectDir, files) => {
|
|
|
14583
14580
|
if (extname(absPath) === ".sh") chmodSync(absPath, 493);
|
|
14584
14581
|
}
|
|
14585
14582
|
};
|
|
14583
|
+
const linkSkills = (projectDir) => {
|
|
14584
|
+
const agentsDir = join(projectDir, ".agents", "skills");
|
|
14585
|
+
const claudeSkillsDir = join(projectDir, ".claude", "skills");
|
|
14586
|
+
try {
|
|
14587
|
+
const skills = readdirSync(agentsDir);
|
|
14588
|
+
mkdirSync(claudeSkillsDir, { recursive: true });
|
|
14589
|
+
for (const skill of skills) symlinkSync(join("..", "..", ".agents", "skills", skill), join(claudeSkillsDir, skill));
|
|
14590
|
+
} catch {}
|
|
14591
|
+
};
|
|
14586
14592
|
const mergeFiles = (target, source) => {
|
|
14587
14593
|
for (const [key, value] of source) target.set(key, value);
|
|
14588
14594
|
};
|
|
@@ -21100,6 +21106,7 @@ const scaffold = async (config) => {
|
|
|
21100
21106
|
mergeFiles(appFiles, renderTemplateDir(claudeAppDir, context, skipSkills));
|
|
21101
21107
|
}
|
|
21102
21108
|
writeFiles(appDir, appFiles);
|
|
21109
|
+
linkSkills(appDir);
|
|
21103
21110
|
s$1.stop(`Scaffolded ${appFiles.size} app files → ${config.projectName}/`);
|
|
21104
21111
|
s$1.start("Scaffolding kustomize files...");
|
|
21105
21112
|
const kustomizeTplDir = resolve(templatesDir, "kustomize");
|
|
@@ -22121,9 +22128,9 @@ const printPostInstall = (config) => {
|
|
|
22121
22128
|
} else if (config.cache === "redis") steps.push("docker compose --profile dev up -d redis");
|
|
22122
22129
|
steps.push("bun run dev");
|
|
22123
22130
|
consola.box({
|
|
22124
|
-
title: import_picocolors$1.default.bold(import_picocolors$1.default.
|
|
22131
|
+
title: import_picocolors$1.default.bold(import_picocolors$1.default.red("Next steps")),
|
|
22125
22132
|
message: steps.map((s$1) => import_picocolors$1.default.cyan(s$1)).join("\n"),
|
|
22126
|
-
style: { borderColor: "
|
|
22133
|
+
style: { borderColor: "red" }
|
|
22127
22134
|
});
|
|
22128
22135
|
};
|
|
22129
22136
|
|
|
@@ -22158,7 +22165,7 @@ const createInoxCli = async () => {
|
|
|
22158
22165
|
return;
|
|
22159
22166
|
}
|
|
22160
22167
|
renderTitle();
|
|
22161
|
-
Ie(import_picocolors.default.
|
|
22168
|
+
Ie(import_picocolors.default.red("Create a new Inox project"));
|
|
22162
22169
|
try {
|
|
22163
22170
|
const config = await gatherConfig(flags);
|
|
22164
22171
|
M.info([
|
|
@@ -22176,7 +22183,7 @@ const createInoxCli = async () => {
|
|
|
22176
22183
|
].join("\n"));
|
|
22177
22184
|
await scaffold(config);
|
|
22178
22185
|
M.info(import_picocolors.default.dim(buildReproducibleCmd(config)));
|
|
22179
|
-
Se(import_picocolors.default.
|
|
22186
|
+
Se(import_picocolors.default.red("Happy building!"));
|
|
22180
22187
|
printPostInstall(config);
|
|
22181
22188
|
} catch (err) {
|
|
22182
22189
|
if (err instanceof UserCancelledError) {
|