create-jilatax 0.1.8 → 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-Dd1dGtrw.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-BPjdtzvk.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;
@@ -504,7 +504,7 @@ function startInstallProgress() {
504
504
  }
505
505
  function printResult(result, log, interactive) {
506
506
  const lines = [
507
- "🛠️ build:",
507
+ "🛠️ build:",
508
508
  ...result.installed ? [] : [" bun install"],
509
509
  " bun run dev",
510
510
  "",
@@ -516,27 +516,28 @@ function printResult(result, log, interactive) {
516
516
  const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
517
517
  if (interactive) {
518
518
  printResultPanel(lines);
519
- node_process.stdout.write(`\n${farewell}\n`);
519
+ _clack_prompts.outro(farewell);
520
520
  return;
521
521
  }
522
522
  log(`${message}\n\n${farewell}`);
523
523
  }
524
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)}╮`;
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
531
  const content = [
532
532
  "",
533
533
  ...lines,
534
534
  ""
535
535
  ].map((line) => {
536
- const padding = Math.max(0, contentWidth - displayWidth(line));
537
- return `│ ${line}${" ".repeat(padding)} │`;
536
+ const padding = " ".repeat(contentWidth - displayWidth(line));
537
+ return `${gray}│${reset} ${line}${padding}${gray}│${reset}`;
538
538
  });
539
- const bottom = `╰${"─".repeat(panelWidth - 2)}╯`;
539
+ const top = `${green}◇${reset} ${title} ${gray}${topRule}╮${reset}`;
540
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
540
541
  node_process.stdout.write(`${[
541
542
  top,
542
543
  ...content,
@@ -544,10 +545,7 @@ function printResultPanel(lines) {
544
545
  ].join("\n")}\n`);
545
546
  }
546
547
  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);
548
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
551
549
  }
552
550
  function formatProjectDirectory(projectDirectory) {
553
551
  const relativeDirectory = node_path.default.relative(process.cwd(), projectDirectory);
@@ -480,7 +480,7 @@ function startInstallProgress() {
480
480
  }
481
481
  function printResult(result, log, interactive) {
482
482
  const lines = [
483
- "🛠️ build:",
483
+ "🛠️ build:",
484
484
  ...result.installed ? [] : [" bun install"],
485
485
  " bun run dev",
486
486
  "",
@@ -492,27 +492,28 @@ function printResult(result, log, interactive) {
492
492
  const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
493
493
  if (interactive) {
494
494
  printResultPanel(lines);
495
- stdout.write(`\n${farewell}\n`);
495
+ prompts.outro(farewell);
496
496
  return;
497
497
  }
498
498
  log(`${message}\n\n${farewell}`);
499
499
  }
500
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)}╮`;
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
507
  const content = [
508
508
  "",
509
509
  ...lines,
510
510
  ""
511
511
  ].map((line) => {
512
- const padding = Math.max(0, contentWidth - displayWidth(line));
513
- return `│ ${line}${" ".repeat(padding)} │`;
512
+ const padding = " ".repeat(contentWidth - displayWidth(line));
513
+ return `${gray}│${reset} ${line}${padding}${gray}│${reset}`;
514
514
  });
515
- const bottom = `╰${"─".repeat(panelWidth - 2)}╯`;
515
+ const top = `${green}◇${reset} ${title} ${gray}${topRule}╮${reset}`;
516
+ const bottom = `${gray}├${"─".repeat(contentWidth + 2)}╯${reset}`;
516
517
  stdout.write(`${[
517
518
  top,
518
519
  ...content,
@@ -520,10 +521,7 @@ function printResultPanel(lines) {
520
521
  ].join("\n")}\n`);
521
522
  }
522
523
  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);
524
+ return [...value].filter((character) => !/^[\uFE0E\uFE0F\u200D]$/u.test(character)).length;
527
525
  }
528
526
  function formatProjectDirectory(projectDirectory) {
529
527
  const relativeDirectory = path.relative(process.cwd(), projectDirectory);
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cli = require("./cli-Dd1dGtrw.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-BPjdtzvk.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.8",
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",