create-nextblock 0.9.62 → 0.9.70
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/bin/create-nextblock.js
CHANGED
|
@@ -2099,6 +2099,15 @@ function buildNextConfigContent(editorUtilNames) {
|
|
|
2099
2099
|
'function getRemotePatterns() {',
|
|
2100
2100
|
' /** @type {Array<{ protocol: "http" | "https", hostname: string, pathname: string }>} */',
|
|
2101
2101
|
' const patterns = [];',
|
|
2102
|
+
' // Storage providers allowlisted by wildcard so next/image works on a fresh install',
|
|
2103
|
+
' // WITHOUT a dev-server restart: next.config.js is read once at startup, before the',
|
|
2104
|
+
' // /setup wizard writes the R2 env, so the exact env-derived hosts below would be',
|
|
2105
|
+
' // missing until a restart. Custom domains are still picked up from env below.',
|
|
2106
|
+
' patterns.push(',
|
|
2107
|
+
" { protocol: 'https', hostname: '**.r2.dev', pathname: '/**' },",
|
|
2108
|
+
" { protocol: 'https', hostname: '**.r2.cloudflarestorage.com', pathname: '/**' },",
|
|
2109
|
+
" { protocol: 'https', hostname: '**.supabase.co', pathname: '/**' },",
|
|
2110
|
+
' );',
|
|
2102
2111
|
' // Whitelist this project R2 public/base URLs and the site URL for next/image.',
|
|
2103
2112
|
' const sources = [',
|
|
2104
2113
|
' process.env.NEXT_PUBLIC_R2_PUBLIC_URL,',
|
|
@@ -12,8 +12,6 @@ import { readFile, writeFile, access } from 'node:fs/promises';
|
|
|
12
12
|
import { resolve, dirname } from 'node:path';
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { spawn, spawnSync } from 'node:child_process';
|
|
15
|
-
import { createInterface } from 'node:readline/promises';
|
|
16
|
-
import { stdin as input, stdout as output } from 'node:process';
|
|
17
15
|
|
|
18
16
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
17
|
const PROJECT_ROOT = resolve(__dirname, '..');
|
|
@@ -111,33 +109,13 @@ async function main() {
|
|
|
111
109
|
process.exit(1);
|
|
112
110
|
}
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
turnstileSecretKey = await ask(' Cloudflare Turnstile Secret Key: ');
|
|
122
|
-
} else {
|
|
123
|
-
turnstileSiteKey = TURNSTILE_TEST_SITE_KEY;
|
|
124
|
-
turnstileSecretKey = TURNSTILE_TEST_SECRET_KEY;
|
|
125
|
-
console.log(' → Using Cloudflare Turnstile test keys (always pass).');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const smtp = { host: await ask(' SMTP Host (Enter = no email, auto-confirm sign-ups): '), port: '', user: '', pass: '', fromEmail: '', fromName: '' };
|
|
129
|
-
let mailerAutoconfirm = 'true';
|
|
130
|
-
if (smtp.host) {
|
|
131
|
-
smtp.port = await ask(' SMTP Port (465 = SSL, 587 = STARTTLS): ', '587');
|
|
132
|
-
smtp.user = await ask(' SMTP User: ');
|
|
133
|
-
smtp.pass = await ask(' SMTP Password: ');
|
|
134
|
-
smtp.fromEmail = await ask(' From Email: ');
|
|
135
|
-
smtp.fromName = await ask(' From Name: ', 'NextBlock');
|
|
136
|
-
mailerAutoconfirm = 'false';
|
|
137
|
-
} else {
|
|
138
|
-
console.log(' → No SMTP: new accounts auto-confirm so your first admin can sign in immediately.');
|
|
139
|
-
}
|
|
140
|
-
rl.close();
|
|
112
|
+
// No CLI prompts. Bot protection (Turnstile) and SMTP are configured later in the browser
|
|
113
|
+
// /setup wizard and CMS settings. Default to Turnstile TEST keys (always pass) and no SMTP,
|
|
114
|
+
// so GoTrue auto-confirms new accounts and the first admin can sign in immediately.
|
|
115
|
+
const turnstileSiteKey = TURNSTILE_TEST_SITE_KEY;
|
|
116
|
+
const turnstileSecretKey = TURNSTILE_TEST_SECRET_KEY;
|
|
117
|
+
const smtp = { host: '', port: '', user: '', pass: '', fromEmail: '', fromName: '' };
|
|
118
|
+
const mailerAutoconfirm = 'true';
|
|
141
119
|
|
|
142
120
|
let existing = '';
|
|
143
121
|
if (await pathExists(ENV_PATH)) {
|
|
@@ -225,12 +203,8 @@ async function main() {
|
|
|
225
203
|
|
|
226
204
|
console.log('\n🎉 Stack is up!');
|
|
227
205
|
console.log(' 1. Open the app: http://localhost:3000');
|
|
228
|
-
console.log(' 2.
|
|
229
|
-
console.log(
|
|
230
|
-
mailerAutoconfirm === 'true'
|
|
231
|
-
? ' No SMTP → your account is auto-confirmed; just sign in.'
|
|
232
|
-
: ' Click the confirmation link emailed by your SMTP provider.',
|
|
233
|
-
);
|
|
206
|
+
console.log(' 2. Finish setup: complete the browser wizard at http://localhost:3000/setup');
|
|
207
|
+
console.log(' (creates your first admin — auto-confirmed, no email needed).');
|
|
234
208
|
console.log(' 3. Supabase API: http://localhost:8000 MinIO console: http://localhost:9001');
|
|
235
209
|
const composeStr = `${compose.cmd} ${compose.args.join(' ')}`.trim();
|
|
236
210
|
console.log(`\n Logs: ${composeStr} logs -f nextblock-cms | Stop: ${composeStr} down (add -v to wipe data)`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nextblock",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.70",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"chalk": "^5.6.2",
|
|
22
22
|
"commander": "^14.0.1",
|
|
23
23
|
"execa": "^9.3.0",
|
|
24
|
-
"fs-extra": "^11.3.2"
|
|
25
|
-
"inquirer": "^12.10.0",
|
|
26
|
-
"ora": "^8.0.1",
|
|
27
|
-
"picocolors": "^1.1.1"
|
|
24
|
+
"fs-extra": "^11.3.2"
|
|
28
25
|
}
|
|
29
26
|
}
|
|
@@ -12,8 +12,6 @@ import { readFile, writeFile, access } from 'node:fs/promises';
|
|
|
12
12
|
import { resolve, dirname } from 'node:path';
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { spawn, spawnSync } from 'node:child_process';
|
|
15
|
-
import { createInterface } from 'node:readline/promises';
|
|
16
|
-
import { stdin as input, stdout as output } from 'node:process';
|
|
17
15
|
|
|
18
16
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
17
|
const PROJECT_ROOT = resolve(__dirname, '..');
|
|
@@ -111,33 +109,13 @@ async function main() {
|
|
|
111
109
|
process.exit(1);
|
|
112
110
|
}
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
turnstileSecretKey = await ask(' Cloudflare Turnstile Secret Key: ');
|
|
122
|
-
} else {
|
|
123
|
-
turnstileSiteKey = TURNSTILE_TEST_SITE_KEY;
|
|
124
|
-
turnstileSecretKey = TURNSTILE_TEST_SECRET_KEY;
|
|
125
|
-
console.log(' → Using Cloudflare Turnstile test keys (always pass).');
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const smtp = { host: await ask(' SMTP Host (Enter = no email, auto-confirm sign-ups): '), port: '', user: '', pass: '', fromEmail: '', fromName: '' };
|
|
129
|
-
let mailerAutoconfirm = 'true';
|
|
130
|
-
if (smtp.host) {
|
|
131
|
-
smtp.port = await ask(' SMTP Port (465 = SSL, 587 = STARTTLS): ', '587');
|
|
132
|
-
smtp.user = await ask(' SMTP User: ');
|
|
133
|
-
smtp.pass = await ask(' SMTP Password: ');
|
|
134
|
-
smtp.fromEmail = await ask(' From Email: ');
|
|
135
|
-
smtp.fromName = await ask(' From Name: ', 'NextBlock');
|
|
136
|
-
mailerAutoconfirm = 'false';
|
|
137
|
-
} else {
|
|
138
|
-
console.log(' → No SMTP: new accounts auto-confirm so your first admin can sign in immediately.');
|
|
139
|
-
}
|
|
140
|
-
rl.close();
|
|
112
|
+
// No CLI prompts. Bot protection (Turnstile) and SMTP are configured later in the browser
|
|
113
|
+
// /setup wizard and CMS settings. Default to Turnstile TEST keys (always pass) and no SMTP,
|
|
114
|
+
// so GoTrue auto-confirms new accounts and the first admin can sign in immediately.
|
|
115
|
+
const turnstileSiteKey = TURNSTILE_TEST_SITE_KEY;
|
|
116
|
+
const turnstileSecretKey = TURNSTILE_TEST_SECRET_KEY;
|
|
117
|
+
const smtp = { host: '', port: '', user: '', pass: '', fromEmail: '', fromName: '' };
|
|
118
|
+
const mailerAutoconfirm = 'true';
|
|
141
119
|
|
|
142
120
|
let existing = '';
|
|
143
121
|
if (await pathExists(ENV_PATH)) {
|
|
@@ -225,12 +203,8 @@ async function main() {
|
|
|
225
203
|
|
|
226
204
|
console.log('\n🎉 Stack is up!');
|
|
227
205
|
console.log(' 1. Open the app: http://localhost:3000');
|
|
228
|
-
console.log(' 2.
|
|
229
|
-
console.log(
|
|
230
|
-
mailerAutoconfirm === 'true'
|
|
231
|
-
? ' No SMTP → your account is auto-confirmed; just sign in.'
|
|
232
|
-
: ' Click the confirmation link emailed by your SMTP provider.',
|
|
233
|
-
);
|
|
206
|
+
console.log(' 2. Finish setup: complete the browser wizard at http://localhost:3000/setup');
|
|
207
|
+
console.log(' (creates your first admin — auto-confirmed, no email needed).');
|
|
234
208
|
console.log(' 3. Supabase API: http://localhost:8000 MinIO console: http://localhost:9001');
|
|
235
209
|
const composeStr = `${compose.cmd} ${compose.args.join(' ')}`.trim();
|
|
236
210
|
console.log(`\n Logs: ${composeStr} logs -f nextblock-cms | Stop: ${composeStr} down (add -v to wipe data)`);
|