create-dev-to 1.5.0 → 1.5.2
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/README.md +1 -0
- package/dist/index.js +13 -11
- package/dist/visualComponents.js +16 -15
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -7,15 +7,17 @@ import { randomUUID } from "node:crypto";
|
|
|
7
7
|
import readline from "node:readline";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import * as clack from "@clack/prompts";
|
|
10
|
-
import { red, cyan, yellow,
|
|
10
|
+
import { red, cyan, yellow, dim } from "kolorist";
|
|
11
|
+
const primaryGreen = (str) => `\x1B[38;2;63;185;80m${str}\x1B[0m`;
|
|
12
|
+
const white = (str) => `\x1B[38;2;230;237;243m${str}\x1B[0m`;
|
|
11
13
|
import { InstallLogger } from "./installLogger.js";
|
|
12
14
|
import { displayInstallSummary } from "./visualComponents.js";
|
|
13
15
|
const PACKAGE_MANAGERS = ["pnpm", "npm", "yarn", "bun"];
|
|
14
16
|
const __BUILD_INFO__ = {
|
|
15
|
-
commit: "
|
|
17
|
+
commit: "d6a7395",
|
|
16
18
|
branch: "main",
|
|
17
|
-
buildTime: "2026-01-
|
|
18
|
-
version: "1.5.
|
|
19
|
+
buildTime: "2026-01-16 01:14",
|
|
20
|
+
version: "1.5.2"
|
|
19
21
|
};
|
|
20
22
|
const FRAMEWORKS = [
|
|
21
23
|
{
|
|
@@ -58,7 +60,7 @@ const FRAMEWORKS = [
|
|
|
58
60
|
{
|
|
59
61
|
name: "vue",
|
|
60
62
|
display: "Vue",
|
|
61
|
-
color:
|
|
63
|
+
color: primaryGreen,
|
|
62
64
|
variants: []
|
|
63
65
|
},
|
|
64
66
|
{
|
|
@@ -729,12 +731,12 @@ function printBanner() {
|
|
|
729
731
|
const minutes = String(utcDateTime.getMinutes()).padStart(2, "0");
|
|
730
732
|
const localTime = `${year}-${month}-${day} ${hours}:${minutes}`;
|
|
731
733
|
const logo = `
|
|
732
|
-
${
|
|
733
|
-
${
|
|
734
|
-
${
|
|
735
|
-
${
|
|
736
|
-
${
|
|
737
|
-
${
|
|
734
|
+
${primaryGreen(" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557")} ${white("\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557")} ${primaryGreen(`\u0189ev`)}${white(`-to v${version}`)}
|
|
735
|
+
${primaryGreen(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2551")} ${white("\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557")} ${dim(`${commit === "unknown" ? "" : `${commit} on ${branch}`}`)}
|
|
736
|
+
${primaryGreen(" \u256C\u0189\u256C \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551")} ${white("\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551")} ${dim(`${localTime}`)}
|
|
737
|
+
${primaryGreen(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D")} ${white("\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551")}
|
|
738
|
+
${primaryGreen(" \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u255A\u2588\u2588\u2588\u2588\u2554\u255D")} ${white("\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D")}
|
|
739
|
+
${primaryGreen(" \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u255D")} ${white("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D")}
|
|
738
740
|
`;
|
|
739
741
|
console.log(logo);
|
|
740
742
|
}
|
package/dist/visualComponents.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { yellow, red, dim, bold } from "kolorist";
|
|
2
|
+
const primaryGreen = (str) => `\x1B[38;2;63;185;80m${str}\x1B[0m`;
|
|
2
3
|
const ANSI = {
|
|
3
4
|
cursorUp: (n) => `\x1B[${n}A`,
|
|
4
5
|
cursorDown: (n) => `\x1B[${n}B`,
|
|
@@ -66,23 +67,23 @@ function getPhaseIcon(phase) {
|
|
|
66
67
|
function getPhaseColors(phase) {
|
|
67
68
|
const colorSets = {
|
|
68
69
|
resolving: [
|
|
69
|
-
{ r:
|
|
70
|
-
{ r:
|
|
70
|
+
{ r: 63, g: 185, b: 80 },
|
|
71
|
+
{ r: 86, g: 211, b: 100 }
|
|
71
72
|
],
|
|
72
73
|
downloading: [
|
|
73
|
-
{ r:
|
|
74
|
-
{ r:
|
|
74
|
+
{ r: 63, g: 185, b: 80 },
|
|
75
|
+
{ r: 86, g: 211, b: 100 }
|
|
75
76
|
],
|
|
76
77
|
installing: [
|
|
77
|
-
{ r:
|
|
78
|
-
{ r:
|
|
78
|
+
{ r: 63, g: 185, b: 80 },
|
|
79
|
+
{ r: 86, g: 211, b: 100 }
|
|
79
80
|
],
|
|
80
81
|
building: [
|
|
81
|
-
{ r:
|
|
82
|
-
{ r:
|
|
82
|
+
{ r: 63, g: 185, b: 80 },
|
|
83
|
+
{ r: 86, g: 211, b: 100 }
|
|
83
84
|
]
|
|
84
85
|
};
|
|
85
|
-
return colorSets[phase] || [{ r:
|
|
86
|
+
return colorSets[phase] || [{ r: 63, g: 185, b: 80 }];
|
|
86
87
|
}
|
|
87
88
|
function formatSpeed(bytesPerSecond) {
|
|
88
89
|
if (bytesPerSecond < 1024) return `${bytesPerSecond.toFixed(0)} B/s`;
|
|
@@ -132,8 +133,8 @@ class InstallRenderer {
|
|
|
132
133
|
if (this.supportsColor) {
|
|
133
134
|
const title = createGradient(
|
|
134
135
|
"\u25C6 Installing Dependencies",
|
|
135
|
-
{ r:
|
|
136
|
-
{ r:
|
|
136
|
+
{ r: 63, g: 185, b: 80 },
|
|
137
|
+
{ r: 86, g: 211, b: 100 }
|
|
137
138
|
);
|
|
138
139
|
lines.push(bold(title));
|
|
139
140
|
} else {
|
|
@@ -172,7 +173,7 @@ class InstallRenderer {
|
|
|
172
173
|
buildStatsLine(stats) {
|
|
173
174
|
const parts = [];
|
|
174
175
|
if (stats.packagesAdded) {
|
|
175
|
-
parts.push(`Packages: ${
|
|
176
|
+
parts.push(`Packages: ${primaryGreen(`+${stats.packagesAdded}`)}`);
|
|
176
177
|
}
|
|
177
178
|
if (stats.packagesUpdated) {
|
|
178
179
|
parts.push(`Updated: ${yellow(stats.packagesUpdated.toString())}`);
|
|
@@ -219,11 +220,11 @@ class InstallRenderer {
|
|
|
219
220
|
function displayInstallSummary(stats) {
|
|
220
221
|
const lines = [];
|
|
221
222
|
lines.push("");
|
|
222
|
-
lines.push(
|
|
223
|
+
lines.push(primaryGreen("\u2728 Installation Complete!"));
|
|
223
224
|
lines.push("");
|
|
224
225
|
const pkgStats = [];
|
|
225
226
|
if (stats.packagesAdded > 0)
|
|
226
|
-
pkgStats.push(`${
|
|
227
|
+
pkgStats.push(`${primaryGreen(`+${stats.packagesAdded}`)} added`);
|
|
227
228
|
if (stats.packagesUpdated > 0)
|
|
228
229
|
pkgStats.push(`${yellow(`~${stats.packagesUpdated}`)} updated`);
|
|
229
230
|
if (stats.packagesRemoved > 0)
|