create-jilatax 0.1.9 → 0.2.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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  //#region src/bin.ts
3
- require("./cli-CSUSszJB.cjs").runCreateCli().then((exitCode) => {
3
+ require("./cli-QUvLV0zQ.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-CmKnpwjR.js";
2
+ import { n as runCreateCli } from "./cli-CLokng2W.js";
3
3
  //#region src/bin.ts
4
4
  runCreateCli().then((exitCode) => {
5
5
  process.exitCode = exitCode;
@@ -479,7 +479,7 @@ function startInstallProgress() {
479
479
  };
480
480
  }
481
481
  function printResult(result, log, interactive) {
482
- const message = [
482
+ const lines = [
483
483
  "🛠️ build:",
484
484
  ...result.installed ? [] : [" bun install"],
485
485
  " bun run dev",
@@ -487,15 +487,50 @@ function printResult(result, log, interactive) {
487
487
  "🤖 Android:",
488
488
  " bun run run:android",
489
489
  " bun run create:aab"
490
- ].join("\n");
491
- const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
490
+ ];
491
+ const message = lines.join("\n");
492
+ const farewell = `Good luck out there 🎉, cd ${formatProjectDirectory(result.projectDirectory)}`;
492
493
  if (interactive) {
493
- prompts.note(message, "Result");
494
- stdout.write(`\n${farewell}\n`);
494
+ stdout.write("\n");
495
+ printResultPanel(lines);
496
+ printFarewell(farewell);
495
497
  return;
496
498
  }
497
499
  log(`${message}\n\n${farewell}`);
498
500
  }
501
+ function printResultPanel(lines) {
502
+ const reset = "\x1B[0m";
503
+ const gray = "\x1B[90m";
504
+ const green = "\x1B[32m";
505
+ const brightCyan = "\x1B[96m";
506
+ const bold = "\x1B[1m";
507
+ const title = "Result";
508
+ const headings = /* @__PURE__ */ new Set(["🛠️ build:", "🤖 Android:"]);
509
+ const contentWidth = Math.max(displayWidth(title), ...lines.map(displayWidth)) + 5;
510
+ const topRule = "─".repeat(contentWidth - displayWidth(title) - 1);
511
+ const content = [
512
+ "",
513
+ ...lines,
514
+ ""
515
+ ].map((line) => {
516
+ const padding = " ".repeat(contentWidth - displayWidth(line));
517
+ const text = headings.has(line) ? `${bold}${brightCyan}${line}${reset}` : line;
518
+ return `${gray}│${reset} ${text}${padding}${gray}│${reset}`;
519
+ });
520
+ const top = `${green}◇${reset} ${bold}${title}${reset} ${gray}${topRule}╮${reset}`;
521
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
522
+ stdout.write(`${[
523
+ top,
524
+ ...content,
525
+ bottom
526
+ ].join("\n")}\n`);
527
+ }
528
+ function printFarewell(message) {
529
+ stdout.write(`│\n└── ${message}\n\n`);
530
+ }
531
+ function displayWidth(value) {
532
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
533
+ }
499
534
  function formatProjectDirectory(projectDirectory) {
500
535
  const relativeDirectory = path.relative(process.cwd(), projectDirectory);
501
536
  const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || path.isAbsolute(relativeDirectory) ? relativeDirectory : `.${path.sep}${relativeDirectory}`;
@@ -503,7 +503,7 @@ function startInstallProgress() {
503
503
  };
504
504
  }
505
505
  function printResult(result, log, interactive) {
506
- const message = [
506
+ const lines = [
507
507
  "🛠️ build:",
508
508
  ...result.installed ? [] : [" bun install"],
509
509
  " bun run dev",
@@ -511,15 +511,50 @@ function printResult(result, log, interactive) {
511
511
  "🤖 Android:",
512
512
  " bun run run:android",
513
513
  " bun run create:aab"
514
- ].join("\n");
515
- const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
514
+ ];
515
+ const message = lines.join("\n");
516
+ const farewell = `Good luck out there 🎉, cd ${formatProjectDirectory(result.projectDirectory)}`;
516
517
  if (interactive) {
517
- _clack_prompts.note(message, "Result");
518
- node_process.stdout.write(`\n${farewell}\n`);
518
+ node_process.stdout.write("\n");
519
+ printResultPanel(lines);
520
+ printFarewell(farewell);
519
521
  return;
520
522
  }
521
523
  log(`${message}\n\n${farewell}`);
522
524
  }
525
+ function printResultPanel(lines) {
526
+ const reset = "\x1B[0m";
527
+ const gray = "\x1B[90m";
528
+ const green = "\x1B[32m";
529
+ const brightCyan = "\x1B[96m";
530
+ const bold = "\x1B[1m";
531
+ const title = "Result";
532
+ const headings = /* @__PURE__ */ new Set(["🛠️ build:", "🤖 Android:"]);
533
+ const contentWidth = Math.max(displayWidth(title), ...lines.map(displayWidth)) + 5;
534
+ const topRule = "─".repeat(contentWidth - displayWidth(title) - 1);
535
+ const content = [
536
+ "",
537
+ ...lines,
538
+ ""
539
+ ].map((line) => {
540
+ const padding = " ".repeat(contentWidth - displayWidth(line));
541
+ const text = headings.has(line) ? `${bold}${brightCyan}${line}${reset}` : line;
542
+ return `${gray}│${reset} ${text}${padding}${gray}│${reset}`;
543
+ });
544
+ const top = `${green}◇${reset} ${bold}${title}${reset} ${gray}${topRule}╮${reset}`;
545
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
546
+ node_process.stdout.write(`${[
547
+ top,
548
+ ...content,
549
+ bottom
550
+ ].join("\n")}\n`);
551
+ }
552
+ function printFarewell(message) {
553
+ node_process.stdout.write(`│\n└── ${message}\n\n`);
554
+ }
555
+ function displayWidth(value) {
556
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
557
+ }
523
558
  function formatProjectDirectory(projectDirectory) {
524
559
  const relativeDirectory = node_path.default.relative(process.cwd(), projectDirectory);
525
560
  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-CSUSszJB.cjs");
2
+ const require_cli = require("./cli-QUvLV0zQ.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-CmKnpwjR.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-CLokng2W.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.9",
3
+ "version": "0.2.1",
4
4
  "packageManager": "bun@1.3.4",
5
5
  "description": "Create an Android-first Jilatax application for Lynx and Rspeedy.",
6
6
  "type": "module",