create-nextblock 0.15.4 → 0.15.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 +50 -26
- package/templates/nextblock-template/app/actions/feedback.ts +1 -1
- package/templates/nextblock-template/app/actions/package-actions.ts +2 -2
- package/templates/nextblock-template/app/api/cron/reset-sandbox/route.ts +16 -2
- package/templates/nextblock-template/app/api/cron/reset-sandbox/sandboxResetSql.ts +694 -637
- package/templates/nextblock-template/app/cms/settings/packages/activation-form.tsx +2 -2
- package/templates/nextblock-template/app/cms/settings/packages/package-card.tsx +3 -3
- package/templates/nextblock-template/app/layout.tsx +7 -3
- package/templates/nextblock-template/app/lib/seo.ts +319 -311
- package/templates/nextblock-template/components/SandboxCredentialsAlert.tsx +1 -1
- package/templates/nextblock-template/docs/05-DEVELOPER-GUIDE.md +25 -19
- package/templates/nextblock-template/docs/06-CLI-AND-SCAFFOLDING.md +1 -1
- package/templates/nextblock-template/docs/08-NEXTBLOCK-CORTEX-AI-ARCHITECTURE.md +2 -2
- package/templates/nextblock-template/docs/12-VERCEL-DEPLOYMENT.md +32 -9
- package/templates/nextblock-template/docs/TECHNICAL_SPECIFICATION.md +12506 -12508
- package/templates/nextblock-template/docs/assets/lighthouse-scores.png +0 -0
- package/templates/nextblock-template/lib/setup/migrations-bundle.ts +9 -4
- package/templates/nextblock-template/package.json +14 -1
- package/templates/nextblock-template/public/assets/nextblock-banner.jpg +0 -0
package/package.json
CHANGED
|
@@ -1,26 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "create-nextblock",
|
|
3
|
-
"version": "0.15.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"create-nextblock": "bin/create-nextblock.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"sync-template": "node ./scripts/sync-template.js",
|
|
12
|
-
"prepack": "npm run sync-template"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "create-nextblock",
|
|
3
|
+
"version": "0.15.8",
|
|
4
|
+
"description": "Scaffold a production-ready NextBlock CMS project — the open-source, full-stack AI-native CMS for Next.js 16, Supabase, and Tailwind CSS.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-nextblock": "bin/create-nextblock.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"sync-template": "node ./scripts/sync-template.js",
|
|
12
|
+
"prepack": "npm run sync-template"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"create-nextblock",
|
|
16
|
+
"nextblock",
|
|
17
|
+
"cms",
|
|
18
|
+
"nextjs",
|
|
19
|
+
"nextjs16",
|
|
20
|
+
"supabase",
|
|
21
|
+
"rsc",
|
|
22
|
+
"tailwind",
|
|
23
|
+
"tiptap",
|
|
24
|
+
"fullstack",
|
|
25
|
+
"open-source",
|
|
26
|
+
"scaffolding",
|
|
27
|
+
"starter",
|
|
28
|
+
"cli"
|
|
29
|
+
],
|
|
30
|
+
"author": "NextBlock CMS (https://nextblock.dev)",
|
|
31
|
+
"license": "AGPL-3.0-or-later",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/nextblock-cms/nextblock.git",
|
|
35
|
+
"directory": "apps/create-nextblock"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/nextblock-cms/nextblock/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://nextblock.dev",
|
|
41
|
+
"type": "module",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@clack/prompts": "^0.8.1",
|
|
44
|
+
"@nextblock-cms/db": "latest",
|
|
45
|
+
"chalk": "^5.6.2",
|
|
46
|
+
"commander": "^14.0.1",
|
|
47
|
+
"execa": "^9.3.0",
|
|
48
|
+
"fs-extra": "^11.3.2"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -82,7 +82,7 @@ export async function submitFeedback(data: FeedbackData) {
|
|
|
82
82
|
`;
|
|
83
83
|
|
|
84
84
|
await sendEmail({
|
|
85
|
-
to: "feedback@nextblock.
|
|
85
|
+
to: "feedback@nextblock.dev",
|
|
86
86
|
// Newlines in a header would let a caller inject extra headers (Bcc, …).
|
|
87
87
|
subject: `[CMS Feedback] ${subject.replace(/[\r\n]+/g, ' ')}`,
|
|
88
88
|
text: textContent,
|
|
@@ -39,7 +39,7 @@ const getServiceRoleClient = () => {
|
|
|
39
39
|
|
|
40
40
|
export async function activatePackage(key: string) {
|
|
41
41
|
if (process.env.NEXT_PUBLIC_IS_SANDBOX === 'true') {
|
|
42
|
-
return { error: 'License activation is disabled in Sandbox mode. To purchase a real license, visit nextblock.
|
|
42
|
+
return { error: 'License activation is disabled in Sandbox mode. To purchase a real license, visit nextblock.dev' };
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (!key) {
|
|
@@ -98,7 +98,7 @@ export async function activatePackage(key: string) {
|
|
|
98
98
|
|
|
99
99
|
if (!data || !pkg) {
|
|
100
100
|
if (hasLicenseError && process.env.NEXT_PUBLIC_IS_SANDBOX !== 'true' && !specificErrorMsg) {
|
|
101
|
-
return { error: 'Sorry, this is a sandbox key. Please purchase the real key at nextblock.
|
|
101
|
+
return { error: 'Sorry, this is a sandbox key. Please purchase the real key at nextblock.dev' };
|
|
102
102
|
}
|
|
103
103
|
return { error: specificErrorMsg || 'Activation failed. Invalid key, wrong product, or limit reached.' };
|
|
104
104
|
}
|
|
@@ -2596,7 +2596,7 @@ async function seedFakeStoreData(sql: SqlClient, supabaseAdmin: any) {
|
|
|
2596
2596
|
console.log('[Sandbox Reset] Starting fake store data seeding...');
|
|
2597
2597
|
|
|
2598
2598
|
// 1. Ensure Demo User
|
|
2599
|
-
const email = 'demo@nextblock.
|
|
2599
|
+
const email = 'demo@nextblock.dev';
|
|
2600
2600
|
console.log(`[Sandbox Reset] Checking for demo user: ${email}`);
|
|
2601
2601
|
const { data: userData, error: userError } = await supabaseAdmin.auth.admin.listUsers();
|
|
2602
2602
|
if (userError) {
|
|
@@ -2621,6 +2621,20 @@ async function seedFakeStoreData(sql: SqlClient, supabaseAdmin: any) {
|
|
|
2621
2621
|
console.log(`[Sandbox Reset] Created new demo user with ID: ${demoUser.id}`);
|
|
2622
2622
|
} else {
|
|
2623
2623
|
console.log(`[Sandbox Reset] Found existing demo user with ID: ${demoUser.id}`);
|
|
2624
|
+
// The demo credentials are published (README + community posts), so any visitor can
|
|
2625
|
+
// change this account's password and lock everyone else out. The SQL reset below does
|
|
2626
|
+
// not touch auth.users, so re-assert the known-good password on every run — otherwise a
|
|
2627
|
+
// single password change survives every future reset.
|
|
2628
|
+
const { error: resetPwError } = await supabaseAdmin.auth.admin.updateUserById(demoUser.id, {
|
|
2629
|
+
password: 'password',
|
|
2630
|
+
email_confirm: true,
|
|
2631
|
+
});
|
|
2632
|
+
if (resetPwError) {
|
|
2633
|
+
// Non-fatal: the rest of the sandbox reset is still worth doing.
|
|
2634
|
+
console.error('[Sandbox Reset] Failed to restore demo password:', resetPwError);
|
|
2635
|
+
} else {
|
|
2636
|
+
console.log('[Sandbox Reset] Restored demo user password to the published default.');
|
|
2637
|
+
}
|
|
2624
2638
|
}
|
|
2625
2639
|
|
|
2626
2640
|
const userId = demoUser.id;
|
|
@@ -2629,7 +2643,7 @@ async function seedFakeStoreData(sql: SqlClient, supabaseAdmin: any) {
|
|
|
2629
2643
|
console.log('[Sandbox Reset] Seeding invoice branding...');
|
|
2630
2644
|
const branding = {
|
|
2631
2645
|
business_name: 'NextBlock CMS',
|
|
2632
|
-
email: 'billing@nextblock.
|
|
2646
|
+
email: 'billing@nextblock.dev',
|
|
2633
2647
|
phone: '5143188025',
|
|
2634
2648
|
address: {
|
|
2635
2649
|
line1: '',
|