create-jilatax 0.1.6 → 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 +1 -1
- package/dist/bin.js +1 -1
- package/dist/{cli-j6rVAu8L.js → cli-BPjdtzvk.js} +36 -8
- package/dist/{cli-e_IFfnNM.cjs → cli-Dd1dGtrw.cjs} +36 -8
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
package/dist/bin.js
CHANGED
|
@@ -474,29 +474,57 @@ function startInstallProgress() {
|
|
|
474
474
|
finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
|
|
475
475
|
},
|
|
476
476
|
succeed() {
|
|
477
|
-
finish([`${green}✓${reset} ${bold}Dependencies installed${reset}
|
|
477
|
+
finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
481
|
function printResult(result, log, interactive) {
|
|
482
|
-
const
|
|
483
|
-
"🛠️
|
|
484
|
-
` cd ${formatProjectDirectory(result.projectDirectory)}`,
|
|
482
|
+
const lines = [
|
|
483
|
+
"🛠️ build:",
|
|
485
484
|
...result.installed ? [] : [" bun install"],
|
|
486
485
|
" bun run dev",
|
|
487
486
|
"",
|
|
488
487
|
"🤖 Android:",
|
|
489
488
|
" bun run run:android",
|
|
490
489
|
" bun run create:aab"
|
|
491
|
-
]
|
|
492
|
-
const
|
|
490
|
+
];
|
|
491
|
+
const message = lines.join("\n");
|
|
492
|
+
const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
|
|
493
493
|
if (interactive) {
|
|
494
|
-
|
|
495
|
-
|
|
494
|
+
printResultPanel(lines);
|
|
495
|
+
stdout.write(`\n${farewell}\n`);
|
|
496
496
|
return;
|
|
497
497
|
}
|
|
498
498
|
log(`${message}\n\n${farewell}`);
|
|
499
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
|
+
}
|
|
500
528
|
function formatProjectDirectory(projectDirectory) {
|
|
501
529
|
const relativeDirectory = path.relative(process.cwd(), projectDirectory);
|
|
502
530
|
const cwdPath = relativeDirectory.length === 0 ? "." : relativeDirectory.startsWith("..") || path.isAbsolute(relativeDirectory) ? relativeDirectory : `.${path.sep}${relativeDirectory}`;
|
|
@@ -498,29 +498,57 @@ function startInstallProgress() {
|
|
|
498
498
|
finish([`${red}×${reset} ${bold}Dependency installation failed${reset}`, ` ${dim}Review the error above, then run bun install in your project.${reset}`]);
|
|
499
499
|
},
|
|
500
500
|
succeed() {
|
|
501
|
-
finish([`${green}✓${reset} ${bold}Dependencies installed${reset}
|
|
501
|
+
finish([`${green}✓${reset} ${bold}Dependencies installed${reset}`, ` ${dim}Your ${reset}${brightCyan}JilataX${reset}${dim} project is ready.${reset}`]);
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
505
|
function printResult(result, log, interactive) {
|
|
506
|
-
const
|
|
507
|
-
"🛠️
|
|
508
|
-
` cd ${formatProjectDirectory(result.projectDirectory)}`,
|
|
506
|
+
const lines = [
|
|
507
|
+
"🛠️ build:",
|
|
509
508
|
...result.installed ? [] : [" bun install"],
|
|
510
509
|
" bun run dev",
|
|
511
510
|
"",
|
|
512
511
|
"🤖 Android:",
|
|
513
512
|
" bun run run:android",
|
|
514
513
|
" bun run create:aab"
|
|
515
|
-
]
|
|
516
|
-
const
|
|
514
|
+
];
|
|
515
|
+
const message = lines.join("\n");
|
|
516
|
+
const farewell = `cd ${formatProjectDirectory(result.projectDirectory)}, Good luck! 🎉`;
|
|
517
517
|
if (interactive) {
|
|
518
|
-
|
|
519
|
-
|
|
518
|
+
printResultPanel(lines);
|
|
519
|
+
node_process.stdout.write(`\n${farewell}\n`);
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
522
|
log(`${message}\n\n${farewell}`);
|
|
523
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
|
+
}
|
|
524
552
|
function formatProjectDirectory(projectDirectory) {
|
|
525
553
|
const relativeDirectory = node_path.default.relative(process.cwd(), projectDirectory);
|
|
526
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-
|
|
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-
|
|
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 };
|