@webhikers/cli 1.1.6 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webhikers/cli",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "CLI for creating and deploying webhikers projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -76,7 +76,7 @@ export async function createCommand(name) {
76
76
  }
77
77
 
78
78
  // --- 2. Create GitHub repo from template ---
79
- console.log(c.cyan("1/6 Creating GitHub repo from template..."));
79
+ console.log(c.cyan("1/5 Creating GitHub repo from template..."));
80
80
 
81
81
  run(
82
82
  `gh repo create ${GITHUB_ORG}/${name} --template ${TEMPLATE_REPO} --private`
@@ -110,12 +110,12 @@ export async function createCommand(name) {
110
110
  console.log(c.green(" ✓ Repo created and cloned"));
111
111
 
112
112
  // --- 3. npm install ---
113
- console.log(c.cyan("\n2/6 Installing dependencies..."));
113
+ console.log(c.cyan("\n2/5 Installing dependencies..."));
114
114
  run("npm install", { cwd: projectDir });
115
115
  console.log(c.green(" ✓ Dependencies installed"));
116
116
 
117
117
  // --- 4. Generate .env ---
118
- console.log(c.cyan("\n3/6 Generating .env..."));
118
+ console.log(c.cyan("\n3/5 Generating .env..."));
119
119
  const payloadSecret = runCapture("openssl rand -hex 32");
120
120
  const domain = `${name}.${DOMAIN_SUFFIX}`;
121
121
  const siteUrl = `https://${domain}`;
@@ -138,7 +138,7 @@ export async function createCommand(name) {
138
138
  }
139
139
 
140
140
  // --- 6. Setup Coolify deployment ---
141
- console.log(c.cyan("\n4/6 Setting up Coolify deployment..."));
141
+ console.log(c.cyan("\n4/5 Setting up Coolify deployment..."));
142
142
  console.log(` Domain: ${c.bold(domain)}`);
143
143
 
144
144
  console.log(c.dim(" Creating Coolify project..."));
@@ -149,7 +149,7 @@ export async function createCommand(name) {
149
149
  const projectUuid = project.uuid;
150
150
 
151
151
  console.log(c.dim(" Creating application..."));
152
- const app = await coolifyApi(config, "POST", "/applications", {
152
+ const app = await coolifyApi(config, "POST", "/applications/private-github-app", {
153
153
  project_uuid: projectUuid,
154
154
  server_uuid: config.serverUuid,
155
155
  environment_name: "production",
@@ -181,7 +181,7 @@ export async function createCommand(name) {
181
181
  console.log(c.green(" ✓ Coolify project configured"));
182
182
 
183
183
  // --- 7. Write .deploy.json ---
184
- console.log(c.cyan("\n5/6 Writing .deploy.json..."));
184
+ console.log(c.cyan("\n5/5 Writing .deploy.json..."));
185
185
  const deployConfig = {
186
186
  serverIp: config.serverIp,
187
187
  domain,
@@ -195,12 +195,7 @@ export async function createCommand(name) {
195
195
  );
196
196
  console.log(c.green(" ✓ .deploy.json written"));
197
197
 
198
- // --- 8. Trigger first deploy ---
199
- console.log(c.cyan("\n6/6 Triggering first deploy..."));
200
- await coolifyApi(config, "POST", `/applications/${appUuid}/start`);
201
- console.log(c.green(" ✓ Deploy triggered on Coolify"));
202
-
203
- // --- 9. Summary ---
198
+ // --- 8. Summary ---
204
199
  console.log("\n" + c.green("═══════════════════════════════════════════"));
205
200
  console.log(c.green(c.bold(" Project created successfully!")));
206
201
  console.log(c.green("═══════════════════════════════════════════\n"));
@@ -210,18 +205,21 @@ export async function createCommand(name) {
210
205
  console.log(` ${c.bold("Coolify:")} ${config.coolifyUrl}`);
211
206
  console.log(` ${c.bold("Dir:")} ${projectDir}`);
212
207
 
213
- console.log(c.yellow("\n ┌─────────────────────────────────────────────┐"));
214
- console.log(c.yellow(" │ MANUAL STEP: Add persistent volumes │"));
215
- console.log(c.yellow(" ├─────────────────────────────────────────────┤"));
216
- console.log(c.yellow(" │ │"));
217
- console.log(c.yellow(" │ 1. Open Coolify UI → Projects │"));
218
- console.log(c.yellow(` │ 2. Select "${name}" │`));
219
- console.log(c.yellow(" │ 3. Go to Storages tab │"));
220
- console.log(c.yellow(" │ 4. Add volume: /app/data (SQLite DB) │"));
221
- console.log(c.yellow(" │ 5. Add volume: /app/public/media (Uploads) │"));
222
- console.log(c.yellow(" │ 6. Redeploy the application │"));
223
- console.log(c.yellow(" │ │"));
224
- console.log(c.yellow(" └─────────────────────────────────────────────┘"));
225
-
226
- console.log(`\n ${c.bold("Next:")} cd ${name} && npm run dev\n`);
208
+ console.log(c.yellow("\n ┌──────────────────────────────────────────────────┐"));
209
+ console.log(c.yellow(" │ BEFORE FIRST DEPLOY: Add persistent volumes │"));
210
+ console.log(c.yellow(" ├──────────────────────────────────────────────────┤"));
211
+ console.log(c.yellow(" │ │"));
212
+ console.log(c.yellow(" │ 1. Open Coolify UI → Projects │"));
213
+ console.log(c.yellow(` │ 2. Select "${name}"${" ".repeat(Math.max(0, 34 - name.length))}│`));
214
+ console.log(c.yellow(" │ 3. Go to Storages tab │"));
215
+ console.log(c.yellow(" │ 4. Add volume: /app/data (SQLite DB) │"));
216
+ console.log(c.yellow(" │ 5. Add volume: /app/public/media (Uploads) │"));
217
+ console.log(c.yellow(" │ 6. Click Deploy │"));
218
+ console.log(c.yellow(" │ │"));
219
+ console.log(c.yellow(" │ Volumes MUST be added before the first deploy │"));
220
+ console.log(c.yellow(" │ to ensure data persistence. │"));
221
+ console.log(c.yellow(" │ │"));
222
+ console.log(c.yellow(" └──────────────────────────────────────────────────┘"));
223
+
224
+ console.log(`\n ${c.bold("Local dev:")} cd ${name} && npm run dev\n`);
227
225
  }