@webhikers/cli 1.1.24 → 1.1.25
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/package.json +1 -1
- package/src/commands/create.js +12 -7
package/package.json
CHANGED
package/src/commands/create.js
CHANGED
|
@@ -109,13 +109,18 @@ export async function createCommand(name) {
|
|
|
109
109
|
}
|
|
110
110
|
console.log(c.green(" ✓ Repo created and cloned"));
|
|
111
111
|
|
|
112
|
-
// --- 3.
|
|
113
|
-
console.log(c.cyan("\n2/
|
|
112
|
+
// --- 3. Template setup (remote + merge strategy) ---
|
|
113
|
+
console.log(c.cyan("\n2/6 Setting up template upstream..."));
|
|
114
|
+
run("npm run template:setup", { cwd: projectDir });
|
|
115
|
+
console.log(c.green(" ✓ Template upstream configured"));
|
|
116
|
+
|
|
117
|
+
// --- 4. npm install ---
|
|
118
|
+
console.log(c.cyan("\n3/6 Installing dependencies..."))
|
|
114
119
|
run("npm install", { cwd: projectDir });
|
|
115
120
|
console.log(c.green(" ✓ Dependencies installed"));
|
|
116
121
|
|
|
117
|
-
// ---
|
|
118
|
-
console.log(c.cyan("\
|
|
122
|
+
// --- 5. Generate .env ---
|
|
123
|
+
console.log(c.cyan("\n4/6 Generating .env..."));
|
|
119
124
|
const payloadSecret = runCapture("openssl rand -hex 32");
|
|
120
125
|
const domain = `${name}.${DOMAIN_SUFFIX}`;
|
|
121
126
|
const siteUrl = `https://${domain}`;
|
|
@@ -128,8 +133,8 @@ export async function createCommand(name) {
|
|
|
128
133
|
writeFileSync(resolve(projectDir, ".env"), envContent, "utf-8");
|
|
129
134
|
console.log(c.green(" ✓ .env written"));
|
|
130
135
|
|
|
131
|
-
// ---
|
|
132
|
-
console.log(c.cyan("\
|
|
136
|
+
// --- 6. Setup Coolify deployment ---
|
|
137
|
+
console.log(c.cyan("\n5/6 Setting up Coolify deployment..."));
|
|
133
138
|
console.log(` Domain: ${c.bold(domain)}`);
|
|
134
139
|
|
|
135
140
|
console.log(c.dim(" Creating Coolify project..."));
|
|
@@ -175,7 +180,7 @@ export async function createCommand(name) {
|
|
|
175
180
|
console.log(c.green(" ✓ Coolify project configured"));
|
|
176
181
|
|
|
177
182
|
// --- 7. Write .deploy.json + enable sync guard ---
|
|
178
|
-
console.log(c.cyan("\
|
|
183
|
+
console.log(c.cyan("\n6/6 Writing .deploy.json..."));
|
|
179
184
|
const deployConfig = {
|
|
180
185
|
serverIp: config.serverIp,
|
|
181
186
|
domain,
|