create-githat-app 1.2.1 → 1.2.3
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/cli.js +14 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ import gradient from "gradient-string";
|
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
|
|
13
13
|
// src/constants.ts
|
|
14
|
-
var VERSION = "1.2.
|
|
14
|
+
var VERSION = "1.2.3";
|
|
15
15
|
var DEFAULT_API_URL = "https://api.githat.io";
|
|
16
16
|
var DASHBOARD_URL = "https://githat.io/dashboard/apps";
|
|
17
17
|
var BRAND_COLORS = ["#7c3aed", "#6366f1", "#8b5cf6"];
|
|
@@ -21,7 +21,7 @@ var DEPS = {
|
|
|
21
21
|
next: "^16.0.0",
|
|
22
22
|
react: "^19.0.0",
|
|
23
23
|
"react-dom": "^19.0.0",
|
|
24
|
-
"@githat/nextjs": "^0.
|
|
24
|
+
"@githat/nextjs": "^0.3.1"
|
|
25
25
|
},
|
|
26
26
|
devDependencies: {
|
|
27
27
|
typescript: "^5.9.0",
|
|
@@ -35,7 +35,7 @@ var DEPS = {
|
|
|
35
35
|
react: "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
37
|
"react-router-dom": "^7.0.0",
|
|
38
|
-
"@githat/nextjs": "^0.
|
|
38
|
+
"@githat/nextjs": "^0.3.1"
|
|
39
39
|
},
|
|
40
40
|
devDependencies: {
|
|
41
41
|
vite: "^7.0.0",
|
|
@@ -83,8 +83,12 @@ var dim = chalk.dim;
|
|
|
83
83
|
function visibleLength(str) {
|
|
84
84
|
return str.replace(/\u001b\[.*?m/g, "").length;
|
|
85
85
|
}
|
|
86
|
+
function getBoxWidth() {
|
|
87
|
+
const termWidth = process.stdout.columns || 80;
|
|
88
|
+
return Math.min(70, Math.max(40, termWidth - 6));
|
|
89
|
+
}
|
|
86
90
|
function drawBox(lines) {
|
|
87
|
-
const W =
|
|
91
|
+
const W = getBoxWidth();
|
|
88
92
|
const hr = "\u2500".repeat(W);
|
|
89
93
|
console.log(dim(` \u256D${hr}\u256E`));
|
|
90
94
|
console.log(dim(` \u2502${" ".repeat(W)}\u2502`));
|
|
@@ -113,9 +117,10 @@ function displayBanner() {
|
|
|
113
117
|
console.log("");
|
|
114
118
|
}
|
|
115
119
|
function sectionHeader(title) {
|
|
116
|
-
const
|
|
120
|
+
const W = getBoxWidth();
|
|
121
|
+
const lineLen = Math.max(1, W - 6 - title.length);
|
|
117
122
|
console.log("");
|
|
118
|
-
console.log(dim(` \u2500\u2500\u2500 ${title} ${
|
|
123
|
+
console.log(dim(` \u2500\u2500\u2500 ${title} ${"\u2500".repeat(lineLen)}`));
|
|
119
124
|
console.log("");
|
|
120
125
|
}
|
|
121
126
|
function displaySuccess(projectName, packageManager, framework) {
|
|
@@ -299,6 +304,9 @@ async function promptGitHat(existingKey) {
|
|
|
299
304
|
process.exit(0);
|
|
300
305
|
}
|
|
301
306
|
publishableKey = pastedKey || "";
|
|
307
|
+
} else if (connectChoice === "skip") {
|
|
308
|
+
p3.log.info("Your app will work on localhost without a key!");
|
|
309
|
+
p3.log.info("For production, get your key at https://githat.io/dashboard/apps");
|
|
302
310
|
}
|
|
303
311
|
}
|
|
304
312
|
const authFeatures = await p3.multiselect({
|