create-jilatax 0.1.5 → 0.1.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  //#region src/bin.ts
3
- require("./cli-DOnqF03F.cjs").runCreateCli().then((exitCode) => {
3
+ require("./cli-Dd1dGtrw.cjs").runCreateCli().then((exitCode) => {
4
4
  process.exitCode = exitCode;
5
5
  });
6
6
  //#endregion
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runCreateCli } from "./cli-C4gsG0D1.js";
2
+ import { n as runCreateCli } from "./cli-BPjdtzvk.js";
3
3
  //#region src/bin.ts
4
4
  runCreateCli().then((exitCode) => {
5
5
  process.exitCode = exitCode;
@@ -404,6 +404,10 @@ function startInstallProgress() {
404
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";
407
411
  const red = "\x1B[31m";
408
412
  const bold = "\x1B[1m";
409
413
  const frames = [
@@ -418,11 +422,40 @@ function startInstallProgress() {
418
422
  "⠇",
419
423
  "⠏"
420
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
442
+ ];
421
443
  let frameIndex = 0;
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
+ };
422
454
  const renderInstalling = () => {
423
455
  const frame = frames[frameIndex % frames.length] ?? frames[0];
456
+ const cometPosition = cometPositions[frameIndex % cometPositions.length] ?? 0;
424
457
  frameIndex += 1;
425
- return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset}`, ` ${dim}Bun is preparing your JilataX project…${reset}`];
458
+ return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset} ${renderComet(cometPosition)}`, ` ${dim}Bun is assembling your ${reset}${brightCyan}JilataX${reset}${dim} project…${reset}`];
426
459
  };
427
460
  const redraw = (lines) => {
428
461
  stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
@@ -441,29 +474,57 @@ function startInstallProgress() {
441
474
  finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
442
475
  },
443
476
  succeed() {
444
- finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your JilataX project is ready.${reset}`]);
477
+ finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
445
478
  }
446
479
  };
447
480
  }
448
481
  function printResult(result, log, interactive) {
449
- const message = [
450
- "🛠️ Next steps:",
451
- ` cd ${formatProjectDirectory(result.projectDirectory)}`,
482
+ const lines = [
483
+ "🛠️ build:",
452
484
  ...result.installed ? [] : [" bun install"],
453
485
  " bun run dev",
454
486
  "",
455
487
  "🤖 Android:",
456
488
  " bun run run:android",
457
489
  " bun run create:aab"
458
- ].join("\n");
459
- const farewell = `Good luck out there, ${result.projectName}! 🎉`;
490
+ ];
491
+ const message = lines.join("\n");
492
+ const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
460
493
  if (interactive) {
461
- prompts.note(message, "Result");
462
- prompts.outro(farewell);
494
+ printResultPanel(lines);
495
+ stdout.write(`\n${farewell}\n`);
463
496
  return;
464
497
  }
465
498
  log(`${message}\n\n${farewell}`);
466
499
  }
500
+ function printResultPanel(lines) {
501
+ const terminalWidth = stdout.columns || 80;
502
+ const panelWidth = Math.max(24, terminalWidth - 2);
503
+ const contentWidth = panelWidth - 4;
504
+ const titlePrefix = "╭─ Lynx / Jilatax ";
505
+ const titleRuleWidth = Math.max(0, panelWidth - displayWidth(titlePrefix) - 1);
506
+ const top = `${titlePrefix}${"─".repeat(titleRuleWidth)}╮`;
507
+ const content = [
508
+ "",
509
+ ...lines,
510
+ ""
511
+ ].map((line) => {
512
+ const padding = Math.max(0, contentWidth - displayWidth(line));
513
+ return `│ ${line}${" ".repeat(padding)} │`;
514
+ });
515
+ const bottom = `╰${"─".repeat(panelWidth - 2)}╯`;
516
+ stdout.write(`${[
517
+ top,
518
+ ...content,
519
+ bottom
520
+ ].join("\n")}\n`);
521
+ }
522
+ function displayWidth(value) {
523
+ return [...value].reduce((width, character) => {
524
+ if (/^[\uFE0E\uFE0F\u200D]$/u.test(character)) return width;
525
+ return width + (/\p{Extended_Pictographic}/u.test(character) ? 2 : 1);
526
+ }, 0);
527
+ }
467
528
  function formatProjectDirectory(projectDirectory) {
468
529
  const relativeDirectory = path.relative(process.cwd(), projectDirectory);
469
530
  const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || path.isAbsolute(relativeDirectory) ? relativeDirectory : `.${path.sep}${relativeDirectory}`;
@@ -428,6 +428,10 @@ function startInstallProgress() {
428
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";
431
435
  const red = "\x1B[31m";
432
436
  const bold = "\x1B[1m";
433
437
  const frames = [
@@ -442,11 +446,40 @@ function startInstallProgress() {
442
446
  "⠇",
443
447
  "⠏"
444
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
466
+ ];
445
467
  let frameIndex = 0;
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
+ };
446
478
  const renderInstalling = () => {
447
479
  const frame = frames[frameIndex % frames.length] ?? frames[0];
480
+ const cometPosition = cometPositions[frameIndex % cometPositions.length] ?? 0;
448
481
  frameIndex += 1;
449
- return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset}`, ` ${dim}Bun is preparing your JilataX project…${reset}`];
482
+ return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset} ${renderComet(cometPosition)}`, ` ${dim}Bun is assembling your ${reset}${brightCyan}JilataX${reset}${dim} project…${reset}`];
450
483
  };
451
484
  const redraw = (lines) => {
452
485
  node_process.stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
@@ -465,29 +498,57 @@ function startInstallProgress() {
465
498
  finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
466
499
  },
467
500
  succeed() {
468
- finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your JilataX project is ready.${reset}`]);
501
+ finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
469
502
  }
470
503
  };
471
504
  }
472
505
  function printResult(result, log, interactive) {
473
- const message = [
474
- "🛠️ Next steps:",
475
- ` cd ${formatProjectDirectory(result.projectDirectory)}`,
506
+ const lines = [
507
+ "🛠️ build:",
476
508
  ...result.installed ? [] : [" bun install"],
477
509
  " bun run dev",
478
510
  "",
479
511
  "🤖 Android:",
480
512
  " bun run run:android",
481
513
  " bun run create:aab"
482
- ].join("\n");
483
- const farewell = `Good luck out there, ${result.projectName}! 🎉`;
514
+ ];
515
+ const message = lines.join("\n");
516
+ const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
484
517
  if (interactive) {
485
- _clack_prompts.note(message, "Result");
486
- _clack_prompts.outro(farewell);
518
+ printResultPanel(lines);
519
+ node_process.stdout.write(`\n${farewell}\n`);
487
520
  return;
488
521
  }
489
522
  log(`${message}\n\n${farewell}`);
490
523
  }
524
+ function printResultPanel(lines) {
525
+ const terminalWidth = node_process.stdout.columns || 80;
526
+ const panelWidth = Math.max(24, terminalWidth - 2);
527
+ const contentWidth = panelWidth - 4;
528
+ const titlePrefix = "╭─ Lynx / Jilatax ";
529
+ const titleRuleWidth = Math.max(0, panelWidth - displayWidth(titlePrefix) - 1);
530
+ const top = `${titlePrefix}${"─".repeat(titleRuleWidth)}╮`;
531
+ const content = [
532
+ "",
533
+ ...lines,
534
+ ""
535
+ ].map((line) => {
536
+ const padding = Math.max(0, contentWidth - displayWidth(line));
537
+ return `│ ${line}${" ".repeat(padding)} │`;
538
+ });
539
+ const bottom = `╰${"─".repeat(panelWidth - 2)}╯`;
540
+ node_process.stdout.write(`${[
541
+ top,
542
+ ...content,
543
+ bottom
544
+ ].join("\n")}\n`);
545
+ }
546
+ function displayWidth(value) {
547
+ return [...value].reduce((width, character) => {
548
+ if (/^[\uFE0E\uFE0F\u200D]$/u.test(character)) return width;
549
+ return width + (/\p{Extended_Pictographic}/u.test(character) ? 2 : 1);
550
+ }, 0);
551
+ }
491
552
  function formatProjectDirectory(projectDirectory) {
492
553
  const relativeDirectory = node_path.default.relative(process.cwd(), projectDirectory);
493
554
  const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || node_path.default.isAbsolute(relativeDirectory) ? relativeDirectory : `.${node_path.default.sep}${relativeDirectory}`;
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cli = require("./cli-DOnqF03F.cjs");
2
+ const require_cli = require("./cli-Dd1dGtrw.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-C4gsG0D1.js";
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-BPjdtzvk.js";
2
2
  export { createHelpText, createProject, defaultPackageId, normalizeDisplayName, normalizeProjectName, runCreateCli, validatePackageId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jilatax",
3
- "version": "0.1.5",
3
+ "version": "0.1.8",
4
4
  "packageManager": "bun@1.3.4",
5
5
  "description": "Create an Android-first Jilatax application for Lynx and Rspeedy.",
6
6
  "type": "module",