create-jilatax 0.1.4 → 0.1.6
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.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/{cli-vfCQ6omd.cjs → cli-e_IFfnNM.cjs} +60 -36
- package/dist/{cli-DojQWkv-.js → cli-j6rVAu8L.js} +60 -36
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
package/dist/bin.js
CHANGED
|
@@ -425,56 +425,80 @@ function pause(milliseconds) {
|
|
|
425
425
|
}
|
|
426
426
|
function startInstallProgress() {
|
|
427
427
|
const reset = "\x1B[0m";
|
|
428
|
-
const
|
|
428
|
+
const brightCyan = "\x1B[96m";
|
|
429
429
|
const dim = "\x1B[2m";
|
|
430
430
|
const green = "\x1B[32m";
|
|
431
|
+
const brightGreen = "\x1B[92m";
|
|
432
|
+
const blue = "\x1B[94m";
|
|
433
|
+
const magenta = "\x1B[95m";
|
|
434
|
+
const muted = "\x1B[90m";
|
|
435
|
+
const red = "\x1B[31m";
|
|
436
|
+
const bold = "\x1B[1m";
|
|
431
437
|
const frames = [
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
438
|
+
"⠋",
|
|
439
|
+
"⠙",
|
|
440
|
+
"⠹",
|
|
441
|
+
"⠸",
|
|
442
|
+
"⠼",
|
|
443
|
+
"⠴",
|
|
444
|
+
"⠦",
|
|
445
|
+
"⠧",
|
|
446
|
+
"⠇",
|
|
447
|
+
"⠏"
|
|
448
|
+
];
|
|
449
|
+
const cometPositions = [
|
|
450
|
+
0,
|
|
451
|
+
1,
|
|
452
|
+
2,
|
|
453
|
+
3,
|
|
454
|
+
4,
|
|
455
|
+
5,
|
|
456
|
+
6,
|
|
457
|
+
7,
|
|
458
|
+
8,
|
|
459
|
+
7,
|
|
460
|
+
6,
|
|
461
|
+
5,
|
|
462
|
+
4,
|
|
463
|
+
3,
|
|
464
|
+
2,
|
|
465
|
+
1
|
|
456
466
|
];
|
|
457
467
|
let frameIndex = 0;
|
|
458
|
-
const
|
|
459
|
-
|
|
468
|
+
const renderComet = (position) => {
|
|
469
|
+
return `${Array.from({ length: 9 }, (_, index) => {
|
|
470
|
+
const distance = Math.abs(index - position);
|
|
471
|
+
if (distance === 0) return `${brightGreen}◆`;
|
|
472
|
+
if (distance === 1) return `${brightCyan}━`;
|
|
473
|
+
if (distance === 2) return `${magenta}━`;
|
|
474
|
+
if (distance === 3) return `${blue}·`;
|
|
475
|
+
return `${muted}·`;
|
|
476
|
+
}).join("")}${reset}`;
|
|
477
|
+
};
|
|
478
|
+
const renderInstalling = () => {
|
|
479
|
+
const frame = frames[frameIndex % frames.length] ?? frames[0];
|
|
480
|
+
const cometPosition = cometPositions[frameIndex % cometPositions.length] ?? 0;
|
|
460
481
|
frameIndex += 1;
|
|
461
|
-
return `${
|
|
482
|
+
return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset} ${renderComet(cometPosition)}`, ` ${dim}Bun is assembling your ${reset}${brightCyan}JilataX${reset}${dim} project…${reset}`];
|
|
483
|
+
};
|
|
484
|
+
const redraw = (lines) => {
|
|
485
|
+
node_process.stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
|
|
462
486
|
};
|
|
463
|
-
|
|
464
|
-
|
|
487
|
+
node_process.stdout.write("\x1B[?25l");
|
|
488
|
+
redraw(renderInstalling());
|
|
465
489
|
const timer = setInterval(() => {
|
|
466
|
-
|
|
467
|
-
},
|
|
468
|
-
const finish = (
|
|
490
|
+
redraw(renderInstalling());
|
|
491
|
+
}, 90);
|
|
492
|
+
const finish = (lines) => {
|
|
469
493
|
clearInterval(timer);
|
|
470
|
-
node_process.stdout.write(`\u001B[2K\
|
|
494
|
+
node_process.stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\n\u001B[?25h`);
|
|
471
495
|
};
|
|
472
496
|
return {
|
|
473
497
|
fail() {
|
|
474
|
-
finish(`${
|
|
498
|
+
finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
|
|
475
499
|
},
|
|
476
500
|
succeed() {
|
|
477
|
-
finish(`${green}
|
|
501
|
+
finish([`${green}✓${reset} ${bold}Dependencies installed${reset} ${green}━━━━━━━━━${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
|
|
478
502
|
}
|
|
479
503
|
};
|
|
480
504
|
}
|
|
@@ -401,56 +401,80 @@ function pause(milliseconds) {
|
|
|
401
401
|
}
|
|
402
402
|
function startInstallProgress() {
|
|
403
403
|
const reset = "\x1B[0m";
|
|
404
|
-
const
|
|
404
|
+
const brightCyan = "\x1B[96m";
|
|
405
405
|
const dim = "\x1B[2m";
|
|
406
406
|
const green = "\x1B[32m";
|
|
407
|
+
const brightGreen = "\x1B[92m";
|
|
408
|
+
const blue = "\x1B[94m";
|
|
409
|
+
const magenta = "\x1B[95m";
|
|
410
|
+
const muted = "\x1B[90m";
|
|
411
|
+
const red = "\x1B[31m";
|
|
412
|
+
const bold = "\x1B[1m";
|
|
407
413
|
const frames = [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
414
|
+
"⠋",
|
|
415
|
+
"⠙",
|
|
416
|
+
"⠹",
|
|
417
|
+
"⠸",
|
|
418
|
+
"⠼",
|
|
419
|
+
"⠴",
|
|
420
|
+
"⠦",
|
|
421
|
+
"⠧",
|
|
422
|
+
"⠇",
|
|
423
|
+
"⠏"
|
|
424
|
+
];
|
|
425
|
+
const cometPositions = [
|
|
426
|
+
0,
|
|
427
|
+
1,
|
|
428
|
+
2,
|
|
429
|
+
3,
|
|
430
|
+
4,
|
|
431
|
+
5,
|
|
432
|
+
6,
|
|
433
|
+
7,
|
|
434
|
+
8,
|
|
435
|
+
7,
|
|
436
|
+
6,
|
|
437
|
+
5,
|
|
438
|
+
4,
|
|
439
|
+
3,
|
|
440
|
+
2,
|
|
441
|
+
1
|
|
432
442
|
];
|
|
433
443
|
let frameIndex = 0;
|
|
434
|
-
const
|
|
435
|
-
|
|
444
|
+
const renderComet = (position) => {
|
|
445
|
+
return `${Array.from({ length: 9 }, (_, index) => {
|
|
446
|
+
const distance = Math.abs(index - position);
|
|
447
|
+
if (distance === 0) return `${brightGreen}◆`;
|
|
448
|
+
if (distance === 1) return `${brightCyan}━`;
|
|
449
|
+
if (distance === 2) return `${magenta}━`;
|
|
450
|
+
if (distance === 3) return `${blue}·`;
|
|
451
|
+
return `${muted}·`;
|
|
452
|
+
}).join("")}${reset}`;
|
|
453
|
+
};
|
|
454
|
+
const renderInstalling = () => {
|
|
455
|
+
const frame = frames[frameIndex % frames.length] ?? frames[0];
|
|
456
|
+
const cometPosition = cometPositions[frameIndex % cometPositions.length] ?? 0;
|
|
436
457
|
frameIndex += 1;
|
|
437
|
-
return `${
|
|
458
|
+
return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset} ${renderComet(cometPosition)}`, ` ${dim}Bun is assembling your ${reset}${brightCyan}JilataX${reset}${dim} project…${reset}`];
|
|
459
|
+
};
|
|
460
|
+
const redraw = (lines) => {
|
|
461
|
+
stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
|
|
438
462
|
};
|
|
439
|
-
|
|
440
|
-
|
|
463
|
+
stdout.write("\x1B[?25l");
|
|
464
|
+
redraw(renderInstalling());
|
|
441
465
|
const timer = setInterval(() => {
|
|
442
|
-
|
|
443
|
-
},
|
|
444
|
-
const finish = (
|
|
466
|
+
redraw(renderInstalling());
|
|
467
|
+
}, 90);
|
|
468
|
+
const finish = (lines) => {
|
|
445
469
|
clearInterval(timer);
|
|
446
|
-
stdout.write(`\u001B[2K\
|
|
470
|
+
stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\n\u001B[?25h`);
|
|
447
471
|
};
|
|
448
472
|
return {
|
|
449
473
|
fail() {
|
|
450
|
-
finish(`${
|
|
474
|
+
finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
|
|
451
475
|
},
|
|
452
476
|
succeed() {
|
|
453
|
-
finish(`${green}
|
|
477
|
+
finish([`${green}✓${reset} ${bold}Dependencies installed${reset} ${green}━━━━━━━━━${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
|
|
454
478
|
}
|
|
455
479
|
};
|
|
456
480
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cli = require("./cli-
|
|
2
|
+
const require_cli = require("./cli-e_IFfnNM.cjs");
|
|
3
3
|
exports.createHelpText = require_cli.createHelpText;
|
|
4
4
|
exports.createProject = require_cli.createProject;
|
|
5
5
|
exports.defaultPackageId = require_cli.defaultPackageId;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as normalizeDisplayName, i as defaultPackageId, n as runCreateCli, o as normalizeProjectName, r as createProject, s as validatePackageId, t as createHelpText } from "./cli-
|
|
1
|
+
import { a as normalizeDisplayName, i as defaultPackageId, n as runCreateCli, o as normalizeProjectName, r as createProject, s as validatePackageId, t as createHelpText } from "./cli-j6rVAu8L.js";
|
|
2
2
|
export { createHelpText, createProject, defaultPackageId, normalizeDisplayName, normalizeProjectName, runCreateCli, validatePackageId };
|