create-daloy 0.2.0 → 0.3.0
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/bin/create-daloy.mjs +15 -11
- package/package.json +1 -1
- package/templates/bun-basic/package.json +1 -1
- package/templates/cloudflare-worker/package.json +1 -1
- package/templates/deno-basic/deno.json +2 -2
- package/templates/node-basic/package.json +1 -1
- package/templates/vercel-edge/package.json +1 -1
package/bin/create-daloy.mjs
CHANGED
|
@@ -248,13 +248,15 @@ function renderBox(lines, options = {}) {
|
|
|
248
248
|
return out.join("\n");
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
// Block-letter "
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
// from half-block characters so it stays
|
|
251
|
+
// Block-letter "DALOYJS" banner rendered with a left-to-right golden
|
|
252
|
+
// gradient (dark goldenrod → bright gold) on truecolor terminals. Falls back
|
|
253
|
+
// to a single bold-yellow line on 256-color TTYs and to plain text in dumb
|
|
254
|
+
// terminals. The shape is built from half-block characters so it stays
|
|
255
|
+
// compact (2 lines tall) and each glyph is 3 columns wide with a single
|
|
256
|
+
// space between letters, keeping the top and bottom rows perfectly aligned.
|
|
255
257
|
const LOGO_LINES = [
|
|
256
|
-
" \u2588\u2580\u2584
|
|
257
|
-
" \u2588\u2584\u2580
|
|
258
|
+
" \u2588\u2580\u2584 \u2584\u2580\u2588 \u2588 \u2588\u2580\u2588 \u2588 \u2588 \u2588 \u2584\u2580\u2580 ",
|
|
259
|
+
" \u2588\u2584\u2580 \u2588\u2580\u2588 \u2588\u2584\u2584 \u2588\u2584\u2588 \u2588 \u2584\u2584\u2588 \u2584\u2584\u2580 ",
|
|
258
260
|
];
|
|
259
261
|
|
|
260
262
|
function gradientLine(line, startRgb, endRgb) {
|
|
@@ -274,23 +276,25 @@ function gradientLine(line, startRgb, endRgb) {
|
|
|
274
276
|
|
|
275
277
|
function printBanner(version) {
|
|
276
278
|
if (!SUPPORTS_UNICODE) {
|
|
277
|
-
console.log(`\n${color(COLORS.bold, "create-daloy")} ${color(COLORS.dim, `v${version}`)}`);
|
|
279
|
+
console.log(`\n${color(COLORS.bold + COLORS.yellow, "create-daloy")} ${color(COLORS.dim, `v${version}`)}`);
|
|
278
280
|
console.log(color(COLORS.dim, "Contract-first REST APIs for Node, Bun, Deno, Vercel Edge, and Workers"));
|
|
279
281
|
console.log(color(COLORS.dim, "https://daloyjs.dev\n"));
|
|
280
282
|
return;
|
|
281
283
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
+
// Golden gradient: DarkGoldenrod → Gold. Evokes the DaloyJS "flow of gold"
|
|
285
|
+
// brand and stays legible on both light and dark terminal backgrounds.
|
|
286
|
+
const start = [184, 134, 11]; // DarkGoldenrod
|
|
287
|
+
const end = [255, 215, 0]; // Gold
|
|
284
288
|
console.log("");
|
|
285
289
|
for (const line of LOGO_LINES) {
|
|
286
290
|
console.log(` ${gradientLine(line, start, end)}`);
|
|
287
291
|
}
|
|
288
292
|
// Build the welcome content lines (each contains its own ANSI color codes).
|
|
289
|
-
const headline = `${color(COLORS.bold, "Welcome to DaloyJS")} ${color(COLORS.gray, `\u2014 v${version}`)}`;
|
|
293
|
+
const headline = `${color(COLORS.bold + COLORS.yellow, "Welcome to DaloyJS")} ${color(COLORS.gray, `\u2014 v${version}`)}`;
|
|
290
294
|
const subline = color(COLORS.dim, "Contract-first REST APIs for Node, Bun, Deno, Vercel Edge, and Workers.");
|
|
291
295
|
const docs = `${color(COLORS.gray, "docs:")} ${color(COLORS.cyan, "https://daloyjs.dev/docs")}`;
|
|
292
296
|
console.log("");
|
|
293
|
-
console.log(renderBox([headline, subline, "", docs]));
|
|
297
|
+
console.log(renderBox([headline, subline, "", docs], { accent: COLORS.yellow }));
|
|
294
298
|
console.log("");
|
|
295
299
|
}
|
|
296
300
|
|
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"gen:openapi": "deno run --allow-net --allow-env --allow-read --allow-write scripts/dump-openapi.ts"
|
|
9
9
|
},
|
|
10
10
|
"imports": {
|
|
11
|
-
"@daloyjs/core": "npm:@daloyjs/core@^0.8.
|
|
12
|
-
"@daloyjs/core/": "npm:@daloyjs/core@^0.8.
|
|
11
|
+
"@daloyjs/core": "npm:@daloyjs/core@^0.8.2",
|
|
12
|
+
"@daloyjs/core/": "npm:@daloyjs/core@^0.8.2/",
|
|
13
13
|
"zod": "npm:zod@^4.4.3"
|
|
14
14
|
},
|
|
15
15
|
"compilerOptions": {
|