@decantr/cli 1.7.0 → 1.7.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/bin.js +1 -1
- package/dist/{chunk-RQUIYILX.js → chunk-4KL2DCYC.js} +13 -39
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -3299,48 +3299,16 @@ function extractPatternName(item) {
|
|
|
3299
3299
|
}
|
|
3300
3300
|
function generateCuratedPrompt(ctx) {
|
|
3301
3301
|
const lines = [];
|
|
3302
|
-
lines.push(
|
|
3302
|
+
lines.push("Build this application using the Decantr design system.");
|
|
3303
3303
|
lines.push("");
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
lines.push(
|
|
3308
|
-
lines.push(`Personality: ${ctx.personality.join(", ")}`);
|
|
3309
|
-
lines.push(`Guard mode: ${ctx.guard}`);
|
|
3310
|
-
lines.push("");
|
|
3311
|
-
lines.push("Pages to build:");
|
|
3312
|
-
for (const page of ctx.pages) {
|
|
3313
|
-
const patternNames = page.layout.map(extractPatternName);
|
|
3314
|
-
const patterns = patternNames.length > 0 ? patternNames.join(", ") : "custom";
|
|
3315
|
-
lines.push(` - ${page.id}: ${page.shell} shell with ${patterns}`);
|
|
3316
|
-
}
|
|
3317
|
-
if (ctx.features.length > 0) {
|
|
3318
|
-
lines.push("");
|
|
3319
|
-
lines.push(`Features: ${ctx.features.join(", ")}`);
|
|
3320
|
-
}
|
|
3304
|
+
lines.push("Read DECANTR.md for the design spec, CSS approach, and guard rules.");
|
|
3305
|
+
lines.push("Read .decantr/context/scaffold.md for the app overview, topology, routes, and voice guidance.");
|
|
3306
|
+
lines.push("Read each .decantr/context/section-*.md file before building that section's pages.");
|
|
3307
|
+
lines.push("Import src/styles/global.css, src/styles/tokens.css, and src/styles/treatments.css.");
|
|
3321
3308
|
lines.push("");
|
|
3322
|
-
lines.push("
|
|
3323
|
-
lines.push("Follow the guard rules and use the patterns from decantr.essence.json.");
|
|
3309
|
+
lines.push("Start with the shell layouts, then build each section's pages.");
|
|
3324
3310
|
return lines.join("\n");
|
|
3325
3311
|
}
|
|
3326
|
-
function boxedPrompt(content, title) {
|
|
3327
|
-
const lines = content.split("\n");
|
|
3328
|
-
const maxLen = Math.max(...lines.map((l) => l.length), title.length + 4);
|
|
3329
|
-
const width = maxLen + 4;
|
|
3330
|
-
const top = `\u250C${"\u2500".repeat(width - 2)}\u2510`;
|
|
3331
|
-
const titleLine = `\u2502 ${BOLD6}${title}${RESET13}${" ".repeat(width - title.length - 4)} \u2502`;
|
|
3332
|
-
const sep2 = `\u251C${"\u2500".repeat(width - 2)}\u2524`;
|
|
3333
|
-
const bottom = `\u2514${"\u2500".repeat(width - 2)}\u2518`;
|
|
3334
|
-
const body = lines.map((line) => {
|
|
3335
|
-
const padding = " ".repeat(width - line.length - 4);
|
|
3336
|
-
return `\u2502 ${line}${padding} \u2502`;
|
|
3337
|
-
}).join("\n");
|
|
3338
|
-
return `${top}
|
|
3339
|
-
${titleLine}
|
|
3340
|
-
${sep2}
|
|
3341
|
-
${body}
|
|
3342
|
-
${bottom}`;
|
|
3343
|
-
}
|
|
3344
3312
|
function getAPIClient() {
|
|
3345
3313
|
return new RegistryAPIClient3({
|
|
3346
3314
|
baseUrl: process.env.DECANTR_API_URL || void 0,
|
|
@@ -3895,7 +3863,13 @@ Validation warnings: ${validation.errors.join(", ")}`));
|
|
|
3895
3863
|
guard: options.guard
|
|
3896
3864
|
};
|
|
3897
3865
|
const curatedPrompt = generateCuratedPrompt(promptCtx);
|
|
3898
|
-
console.log(
|
|
3866
|
+
console.log("");
|
|
3867
|
+
console.log(`${BOLD6}Prompt for your AI assistant:${RESET13}`);
|
|
3868
|
+
console.log(dim3("\u2500".repeat(50)));
|
|
3869
|
+
console.log("");
|
|
3870
|
+
console.log(curatedPrompt);
|
|
3871
|
+
console.log("");
|
|
3872
|
+
console.log(dim3("\u2500".repeat(50)));
|
|
3899
3873
|
console.log("");
|
|
3900
3874
|
if (registrySource === "cache") {
|
|
3901
3875
|
console.log(dim3('Run "decantr sync" when online to get the latest registry content.'));
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-4KL2DCYC.js";
|
|
2
2
|
import "./chunk-X4RHL7WQ.js";
|