create-jilatax 0.1.3 → 0.1.5

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-CFAEFCvz.cjs").runCreateCli().then((exitCode) => {
3
+ require("./cli-DOnqF03F.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-DIhW2_Q4.js";
2
+ import { n as runCreateCli } from "./cli-C4gsG0D1.js";
3
3
  //#region src/bin.ts
4
4
  runCreateCli().then((exitCode) => {
5
5
  process.exitCode = exitCode;
@@ -305,7 +305,7 @@ function parseArgs(args) {
305
305
  };
306
306
  }
307
307
  async function promptForOptions(options) {
308
- printWelcome(await readCreatorVersion());
308
+ await printWelcome(await readCreatorVersion());
309
309
  const targetDirectory = options.targetDirectory ?? unwrapPrompt(await prompts.text({
310
310
  message: "Where should the project be created?",
311
311
  placeholder: "./my-jilatax-app",
@@ -377,7 +377,7 @@ function readInlineValue(argument, option) {
377
377
  function titleCase(value) {
378
378
  return value.split(/[-_.\s]+/u).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
379
379
  }
380
- function printWelcome(version) {
380
+ async function printWelcome(version) {
381
381
  const reset = "\x1B[0m";
382
382
  const cyan = "\x1B[36m";
383
383
  const brightCyan = "\x1B[96m";
@@ -386,62 +386,62 @@ function printWelcome(version) {
386
386
  const black = "\x1B[30m";
387
387
  const bold = "\x1B[1m";
388
388
  const dim = "\x1B[2m";
389
- const mascot = [`${cyan} /\\_/\\ ${reset}`, `${cyan}(${green}●${cyan}ᴗ${green}●${cyan})${reset}`];
390
- const welcome = [`${bold}${brightCyan}Jilatax:${reset} ${dim}v${version}${reset}`, `${dim}Welcome.${reset} Build your next ${greenBackground}${black}Android${reset}-first app.`];
391
- console.log(`\n${mascot.map((line, index) => `${line} ${welcome[index]}`).join("\n")}\n`);
389
+ const mascotTop = `${cyan} /\\_/\\ ${reset}`;
390
+ const renderMascot = (eyes) => `${cyan} (${green}${eyes}${cyan}ᴗ${green}${eyes}${cyan}) ${reset}`;
391
+ const welcome = [`${bold}${brightCyan}JilataX:${reset} ${dim}v${version}${reset}`, `${dim}Welcome.${reset} Build your next ${greenBackground}${black}Android${reset}-first app.`];
392
+ const renderHeader = (eyes) => `${mascotTop} ${welcome[0]}\n${renderMascot(eyes)} ${welcome[1]}`;
393
+ stdout.write(`\n${renderHeader("●")}`);
394
+ await pause(160);
395
+ stdout.write(`\r\u001B[2K${renderMascot("−")} ${welcome[1]}`);
396
+ await pause(90);
397
+ stdout.write(`\r\u001B[2K${renderMascot("●")} ${welcome[1]}\n\n`);
398
+ }
399
+ function pause(milliseconds) {
400
+ return new Promise((resolve) => setTimeout(resolve, milliseconds));
392
401
  }
393
402
  function startInstallProgress() {
394
403
  const reset = "\x1B[0m";
395
- const cyan = "\x1B[36m";
404
+ const brightCyan = "\x1B[96m";
396
405
  const dim = "\x1B[2m";
397
406
  const green = "\x1B[32m";
407
+ const red = "\x1B[31m";
408
+ const bold = "\x1B[1m";
398
409
  const frames = [
399
- [
400
- 45,
401
- 105,
402
- 44,
403
- 46
404
- ],
405
- [
406
- 105,
407
- 44,
408
- 46,
409
- 45
410
- ],
411
- [
412
- 44,
413
- 46,
414
- 45,
415
- 105
416
- ],
417
- [
418
- 46,
419
- 45,
420
- 105,
421
- 44
422
- ]
410
+ "⠋",
411
+ "⠙",
412
+ "⠹",
413
+ "⠸",
414
+ "⠼",
415
+ "⠴",
416
+ "⠦",
417
+ "⠧",
418
+ "⠇",
419
+ "⠏"
423
420
  ];
424
421
  let frameIndex = 0;
425
- const renderBar = () => {
426
- const colors = frames[frameIndex % frames.length] ?? frames[0];
422
+ const renderInstalling = () => {
423
+ const frame = frames[frameIndex % frames.length] ?? frames[0];
427
424
  frameIndex += 1;
428
- return `${colors.map((color) => `\u001B[${color}m `).join("")}${reset}`;
425
+ return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset}`, ` ${dim}Bun is preparing your JilataX project…${reset}`];
426
+ };
427
+ const redraw = (lines) => {
428
+ stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
429
429
  };
430
- const renderTitle = () => `${renderBar()} Project initializing...`;
431
- stdout.write(`\u001B[?25l${renderTitle()}\n ${cyan}▸ Installing dependencies with Bun...${reset}\u001B[1A\r`);
430
+ stdout.write("\x1B[?25l");
431
+ redraw(renderInstalling());
432
432
  const timer = setInterval(() => {
433
- stdout.write(`\u001B[2K${renderTitle()}\r`);
434
- }, 120);
435
- const finish = (title, detail) => {
433
+ redraw(renderInstalling());
434
+ }, 90);
435
+ const finish = (lines) => {
436
436
  clearInterval(timer);
437
- stdout.write(`\u001B[2K\r\u001B[1B\r\u001B[2K\u001B[1A\r${title}\n${detail}\n\u001B[?25h`);
437
+ stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\n\u001B[?25h`);
438
438
  };
439
439
  return {
440
440
  fail() {
441
- finish(`${cyan}▲${reset} Project initialization failed.`, "");
441
+ finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
442
442
  },
443
443
  succeed() {
444
- finish(`${green} Project initialized!${reset}`, ` ${dim} Dependencies installed${reset}\n`);
444
+ finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your JilataX project is ready.${reset}`]);
445
445
  }
446
446
  };
447
447
  }
@@ -329,7 +329,7 @@ function parseArgs(args) {
329
329
  };
330
330
  }
331
331
  async function promptForOptions(options) {
332
- printWelcome(await readCreatorVersion());
332
+ await printWelcome(await readCreatorVersion());
333
333
  const targetDirectory = options.targetDirectory ?? unwrapPrompt(await _clack_prompts.text({
334
334
  message: "Where should the project be created?",
335
335
  placeholder: "./my-jilatax-app",
@@ -401,7 +401,7 @@ function readInlineValue(argument, option) {
401
401
  function titleCase(value) {
402
402
  return value.split(/[-_.\s]+/u).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
403
403
  }
404
- function printWelcome(version) {
404
+ async function printWelcome(version) {
405
405
  const reset = "\x1B[0m";
406
406
  const cyan = "\x1B[36m";
407
407
  const brightCyan = "\x1B[96m";
@@ -410,62 +410,62 @@ function printWelcome(version) {
410
410
  const black = "\x1B[30m";
411
411
  const bold = "\x1B[1m";
412
412
  const dim = "\x1B[2m";
413
- const mascot = [`${cyan} /\\_/\\ ${reset}`, `${cyan}(${green}●${cyan}ᴗ${green}●${cyan})${reset}`];
414
- const welcome = [`${bold}${brightCyan}Jilatax:${reset} ${dim}v${version}${reset}`, `${dim}Welcome.${reset} Build your next ${greenBackground}${black}Android${reset}-first app.`];
415
- console.log(`\n${mascot.map((line, index) => `${line} ${welcome[index]}`).join("\n")}\n`);
413
+ const mascotTop = `${cyan} /\\_/\\ ${reset}`;
414
+ const renderMascot = (eyes) => `${cyan} (${green}${eyes}${cyan}ᴗ${green}${eyes}${cyan}) ${reset}`;
415
+ const welcome = [`${bold}${brightCyan}JilataX:${reset} ${dim}v${version}${reset}`, `${dim}Welcome.${reset} Build your next ${greenBackground}${black}Android${reset}-first app.`];
416
+ const renderHeader = (eyes) => `${mascotTop} ${welcome[0]}\n${renderMascot(eyes)} ${welcome[1]}`;
417
+ node_process.stdout.write(`\n${renderHeader("●")}`);
418
+ await pause(160);
419
+ node_process.stdout.write(`\r\u001B[2K${renderMascot("−")} ${welcome[1]}`);
420
+ await pause(90);
421
+ node_process.stdout.write(`\r\u001B[2K${renderMascot("●")} ${welcome[1]}\n\n`);
422
+ }
423
+ function pause(milliseconds) {
424
+ return new Promise((resolve) => setTimeout(resolve, milliseconds));
416
425
  }
417
426
  function startInstallProgress() {
418
427
  const reset = "\x1B[0m";
419
- const cyan = "\x1B[36m";
428
+ const brightCyan = "\x1B[96m";
420
429
  const dim = "\x1B[2m";
421
430
  const green = "\x1B[32m";
431
+ const red = "\x1B[31m";
432
+ const bold = "\x1B[1m";
422
433
  const frames = [
423
- [
424
- 45,
425
- 105,
426
- 44,
427
- 46
428
- ],
429
- [
430
- 105,
431
- 44,
432
- 46,
433
- 45
434
- ],
435
- [
436
- 44,
437
- 46,
438
- 45,
439
- 105
440
- ],
441
- [
442
- 46,
443
- 45,
444
- 105,
445
- 44
446
- ]
434
+ "⠋",
435
+ "⠙",
436
+ "⠹",
437
+ "⠸",
438
+ "⠼",
439
+ "⠴",
440
+ "⠦",
441
+ "⠧",
442
+ "⠇",
443
+ "⠏"
447
444
  ];
448
445
  let frameIndex = 0;
449
- const renderBar = () => {
450
- const colors = frames[frameIndex % frames.length] ?? frames[0];
446
+ const renderInstalling = () => {
447
+ const frame = frames[frameIndex % frames.length] ?? frames[0];
451
448
  frameIndex += 1;
452
- return `${colors.map((color) => `\u001B[${color}m `).join("")}${reset}`;
449
+ return [`${brightCyan}${frame}${reset} ${bold}Installing dependencies${reset}`, ` ${dim}Bun is preparing your JilataX project…${reset}`];
450
+ };
451
+ const redraw = (lines) => {
452
+ node_process.stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\u001B[1A\r`);
453
453
  };
454
- const renderTitle = () => `${renderBar()} Project initializing...`;
455
- node_process.stdout.write(`\u001B[?25l${renderTitle()}\n ${cyan}▸ Installing dependencies with Bun...${reset}\u001B[1A\r`);
454
+ node_process.stdout.write("\x1B[?25l");
455
+ redraw(renderInstalling());
456
456
  const timer = setInterval(() => {
457
- node_process.stdout.write(`\u001B[2K${renderTitle()}\r`);
458
- }, 120);
459
- const finish = (title, detail) => {
457
+ redraw(renderInstalling());
458
+ }, 90);
459
+ const finish = (lines) => {
460
460
  clearInterval(timer);
461
- node_process.stdout.write(`\u001B[2K\r\u001B[1B\r\u001B[2K\u001B[1A\r${title}\n${detail}\n\u001B[?25h`);
461
+ node_process.stdout.write(`\r\u001B[2K${lines[0]}\n\r\u001B[2K${lines[1]}\n\u001B[?25h`);
462
462
  };
463
463
  return {
464
464
  fail() {
465
- finish(`${cyan}▲${reset} Project initialization failed.`, "");
465
+ finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
466
466
  },
467
467
  succeed() {
468
- finish(`${green} Project initialized!${reset}`, ` ${dim} Dependencies installed${reset}\n`);
468
+ finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your JilataX project is ready.${reset}`]);
469
469
  }
470
470
  };
471
471
  }
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cli = require("./cli-CFAEFCvz.cjs");
2
+ const require_cli = require("./cli-DOnqF03F.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-DIhW2_Q4.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-C4gsG0D1.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.3",
3
+ "version": "0.1.5",
4
4
  "packageManager": "bun@1.3.4",
5
5
  "description": "Create an Android-first Jilatax application for Lynx and Rspeedy.",
6
6
  "type": "module",