create-jilatax 0.1.9 → 0.2.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/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-Bei4bI0S.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-DVjeAJl_.js";
3
3
  //#region src/bin.ts
4
4
  runCreateCli().then((exitCode) => {
5
5
  process.exitCode = exitCode;
@@ -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,42 @@ function printResult(result, log, interactive) {
511
511
  "🤖 Android:",
512
512
  " bun run run:android",
513
513
  " bun run create:aab"
514
- ].join("\n");
514
+ ];
515
+ const message = lines.join("\n");
515
516
  const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
516
517
  if (interactive) {
517
- _clack_prompts.note(message, "Result");
518
- node_process.stdout.write(`\n${farewell}\n`);
518
+ printResultPanel(lines);
519
+ _clack_prompts.outro(farewell);
519
520
  return;
520
521
  }
521
522
  log(`${message}\n\n${farewell}`);
522
523
  }
524
+ function printResultPanel(lines) {
525
+ const reset = "\x1B[0m";
526
+ const gray = "\x1B[90m";
527
+ const green = "\x1B[32m";
528
+ const title = "Result";
529
+ const contentWidth = Math.max(displayWidth(title), ...lines.map(displayWidth)) + 5;
530
+ const topRule = "─".repeat(contentWidth - displayWidth(title) - 1);
531
+ const content = [
532
+ "",
533
+ ...lines,
534
+ ""
535
+ ].map((line) => {
536
+ const padding = " ".repeat(contentWidth - displayWidth(line));
537
+ return `${gray}│${reset} ${line}${padding}${gray}│${reset}`;
538
+ });
539
+ const top = `${green}◇${reset} ${title} ${gray}${topRule}╮${reset}`;
540
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
541
+ node_process.stdout.write(`${[
542
+ top,
543
+ ...content,
544
+ bottom
545
+ ].join("\n")}\n`);
546
+ }
547
+ function displayWidth(value) {
548
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
549
+ }
523
550
  function formatProjectDirectory(projectDirectory) {
524
551
  const relativeDirectory = node_path.default.relative(process.cwd(), projectDirectory);
525
552
  const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || node_path.default.isAbsolute(relativeDirectory) ? relativeDirectory : `.${node_path.default.sep}${relativeDirectory}`;
@@ -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,42 @@ function printResult(result, log, interactive) {
487
487
  "🤖 Android:",
488
488
  " bun run run:android",
489
489
  " bun run create:aab"
490
- ].join("\n");
490
+ ];
491
+ const message = lines.join("\n");
491
492
  const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
492
493
  if (interactive) {
493
- prompts.note(message, "Result");
494
- stdout.write(`\n${farewell}\n`);
494
+ printResultPanel(lines);
495
+ prompts.outro(farewell);
495
496
  return;
496
497
  }
497
498
  log(`${message}\n\n${farewell}`);
498
499
  }
500
+ function printResultPanel(lines) {
501
+ const reset = "\x1B[0m";
502
+ const gray = "\x1B[90m";
503
+ const green = "\x1B[32m";
504
+ const title = "Result";
505
+ const contentWidth = Math.max(displayWidth(title), ...lines.map(displayWidth)) + 5;
506
+ const topRule = "─".repeat(contentWidth - displayWidth(title) - 1);
507
+ const content = [
508
+ "",
509
+ ...lines,
510
+ ""
511
+ ].map((line) => {
512
+ const padding = " ".repeat(contentWidth - displayWidth(line));
513
+ return `${gray}│${reset} ${line}${padding}${gray}│${reset}`;
514
+ });
515
+ const top = `${green}◇${reset} ${title} ${gray}${topRule}╮${reset}`;
516
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
517
+ stdout.write(`${[
518
+ top,
519
+ ...content,
520
+ bottom
521
+ ].join("\n")}\n`);
522
+ }
523
+ function displayWidth(value) {
524
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
525
+ }
499
526
  function formatProjectDirectory(projectDirectory) {
500
527
  const relativeDirectory = path.relative(process.cwd(), projectDirectory);
501
528
  const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || path.isAbsolute(relativeDirectory) ? relativeDirectory : `.${path.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-Bei4bI0S.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-DVjeAJl_.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.0",
4
4
  "packageManager": "bun@1.3.4",
5
5
  "description": "Create an Android-first Jilatax application for Lynx and Rspeedy.",
6
6
  "type": "module",