create-brainerce-store 1.27.4 → 1.27.6

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.
Files changed (32) hide show
  1. package/dist/index.js +12 -1
  2. package/messages/en.json +382 -378
  3. package/messages/he.json +382 -378
  4. package/package.json +46 -46
  5. package/templates/nextjs/base/next.config.ts +31 -31
  6. package/templates/nextjs/base/src/app/account/page.tsx +1 -1
  7. package/templates/nextjs/base/src/app/auth/callback/page.tsx +2 -1
  8. package/templates/nextjs/base/src/app/cart/page.tsx +1 -1
  9. package/templates/nextjs/base/src/app/checkout/page.tsx +973 -972
  10. package/templates/nextjs/base/src/app/forgot-password/page.tsx +1 -1
  11. package/templates/nextjs/base/src/app/layout.tsx.ejs +6 -5
  12. package/templates/nextjs/base/src/app/login/page.tsx +1 -2
  13. package/templates/nextjs/base/src/app/order-confirmation/page.tsx +271 -271
  14. package/templates/nextjs/base/src/app/page.tsx +1 -1
  15. package/templates/nextjs/base/src/app/payment-complete/page.tsx +59 -59
  16. package/templates/nextjs/base/src/app/products/[slug]/product-client-section.tsx +27 -12
  17. package/templates/nextjs/base/src/app/products/page.tsx +8 -3
  18. package/templates/nextjs/base/src/app/register/page.tsx +1 -2
  19. package/templates/nextjs/base/src/app/reset-password/page.tsx +1 -2
  20. package/templates/nextjs/base/src/app/verify-email/page.tsx +1 -2
  21. package/templates/nextjs/base/src/components/auth/login-form.tsx +1 -1
  22. package/templates/nextjs/base/src/components/checkout/custom-fields-step.tsx +258 -184
  23. package/templates/nextjs/base/src/components/checkout/payment-step.tsx +592 -592
  24. package/templates/nextjs/base/src/components/layout/footer.tsx +1 -1
  25. package/templates/nextjs/base/src/components/layout/header.tsx +1 -2
  26. package/templates/nextjs/base/src/components/products/product-card.tsx +1 -2
  27. package/templates/nextjs/base/src/components/products/recommendation-section.tsx +1 -1
  28. package/templates/nextjs/base/src/lib/navigation.tsx.ejs +60 -0
  29. package/templates/nextjs/themes/luxury/globals.css +399 -399
  30. package/templates/nextjs/themes/luxury/theme.json +23 -23
  31. package/templates/nextjs/themes/playful/globals.css +400 -400
  32. package/templates/nextjs/themes/playful/theme.json +23 -23
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
- {
2
- "name": "create-brainerce-store",
3
- "version": "1.27.4",
4
- "description": "Scaffold a production-ready e-commerce storefront connected to Brainerce",
5
- "bin": {
6
- "create-brainerce-store": "dist/index.js"
7
- },
8
- "files": [
9
- "dist",
10
- "templates",
11
- "messages"
12
- ],
13
- "scripts": {
14
- "build": "tsup src/index.ts --format cjs --dts --clean",
15
- "dev": "tsup src/index.ts --format cjs --dts --watch",
16
- "clean": "rimraf dist",
17
- "prepublishOnly": "npm run build"
18
- },
19
- "dependencies": {
20
- "chalk": "^4.1.2",
21
- "commander": "^12.1.0",
22
- "ejs": "^3.1.10",
23
- "fs-extra": "^11.2.0",
24
- "ora": "^5.4.1",
25
- "prompts": "^2.4.2"
26
- },
27
- "devDependencies": {
28
- "@types/ejs": "^3.1.5",
29
- "@types/fs-extra": "^11.0.4",
30
- "@types/prompts": "^2.4.9",
31
- "tsup": "^8.0.0",
32
- "typescript": "^5.4.0"
33
- },
34
- "engines": {
35
- "node": ">=18"
36
- },
37
- "keywords": [
38
- "brainerce",
39
- "ecommerce",
40
- "storefront",
41
- "scaffold",
42
- "create",
43
- "nextjs"
44
- ],
45
- "license": "MIT"
46
- }
1
+ {
2
+ "name": "create-brainerce-store",
3
+ "version": "1.27.6",
4
+ "description": "Scaffold a production-ready e-commerce storefront connected to Brainerce",
5
+ "bin": {
6
+ "create-brainerce-store": "dist/index.js"
7
+ },
8
+ "files": [
9
+ "dist",
10
+ "templates",
11
+ "messages"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsup src/index.ts --format cjs --dts --clean",
15
+ "dev": "tsup src/index.ts --format cjs --dts --watch",
16
+ "clean": "rimraf dist",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "dependencies": {
20
+ "chalk": "^4.1.2",
21
+ "commander": "^12.1.0",
22
+ "ejs": "^3.1.10",
23
+ "fs-extra": "^11.2.0",
24
+ "ora": "^5.4.1",
25
+ "prompts": "^2.4.2"
26
+ },
27
+ "devDependencies": {
28
+ "@types/ejs": "^3.1.5",
29
+ "@types/fs-extra": "^11.0.4",
30
+ "@types/prompts": "^2.4.9",
31
+ "tsup": "^8.0.0",
32
+ "typescript": "^5.4.0"
33
+ },
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "keywords": [
38
+ "brainerce",
39
+ "ecommerce",
40
+ "storefront",
41
+ "scaffold",
42
+ "create",
43
+ "nextjs"
44
+ ],
45
+ "license": "MIT"
46
+ }
@@ -1,31 +1,31 @@
1
- import type { NextConfig } from 'next';
2
-
3
- const nextConfig: NextConfig = {
4
- images: {
5
- remotePatterns: [{ protocol: 'https', hostname: '**' }],
6
- },
7
- async headers() {
8
- return [
9
- {
10
- source: '/(.*)',
11
- headers: [
12
- {
13
- key: 'Content-Security-Policy',
14
- value: [
15
- "default-src 'self'",
16
- "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.meshulam.co.il https://meshulam.co.il https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://js.stripe.com https://pay.google.com",
17
- "style-src 'self' 'unsafe-inline' https://cdn.meshulam.co.il",
18
- "img-src 'self' data: blob: https:",
19
- "font-src 'self' data:",
20
- "frame-src 'self' https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://*.creditguard.co.il https://js.stripe.com https://hooks.stripe.com https://pay.google.com https://secure.cardcom.solutions",
21
- "connect-src 'self' https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://google.com https://pay.google.com https://*.stripe.com https://*.creditguard.co.il",
22
- "worker-src 'self' blob:",
23
- ].join('; '),
24
- },
25
- ],
26
- },
27
- ];
28
- },
29
- };
30
-
31
- export default nextConfig;
1
+ import type { NextConfig } from 'next';
2
+
3
+ const nextConfig: NextConfig = {
4
+ images: {
5
+ remotePatterns: [{ protocol: 'https', hostname: '**' }],
6
+ },
7
+ async headers() {
8
+ return [
9
+ {
10
+ source: '/(.*)',
11
+ headers: [
12
+ {
13
+ key: 'Content-Security-Policy',
14
+ value: [
15
+ "default-src 'self'",
16
+ "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.meshulam.co.il https://meshulam.co.il https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://js.stripe.com https://pay.google.com",
17
+ "style-src 'self' 'unsafe-inline' https://cdn.meshulam.co.il",
18
+ "img-src 'self' data: blob: https:",
19
+ "font-src 'self' data:",
20
+ "frame-src 'self' https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://*.creditguard.co.il https://js.stripe.com https://hooks.stripe.com https://pay.google.com https://secure.cardcom.solutions",
21
+ "connect-src 'self' https://*.meshulam.co.il https://grow.link https://*.grow.link https://*.grow.security https://google.com https://pay.google.com https://*.stripe.com https://*.creditguard.co.il",
22
+ "worker-src 'self' blob:",
23
+ ].join('; '),
24
+ },
25
+ ],
26
+ },
27
+ ];
28
+ },
29
+ };
30
+
31
+ export default nextConfig;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { useEffect, useState } from 'react';
4
- import { useRouter } from 'next/navigation';
4
+ import { useRouter } from '@/lib/navigation';
5
5
  import type { CustomerProfile, Order } from 'brainerce';
6
6
  import { getClient } from '@/lib/brainerce';
7
7
  import { useAuth } from '@/providers/store-provider';
@@ -1,7 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { Suspense, useEffect, useState, useRef } from 'react';
4
- import { useRouter, useSearchParams } from 'next/navigation';
4
+ import { useSearchParams } from 'next/navigation';
5
+ import { useRouter } from '@/lib/navigation';
5
6
  import { useAuth } from '@/providers/store-provider';
6
7
  import { LoadingSpinner } from '@/components/shared/loading-spinner';
7
8
  import { useTranslations } from '@/lib/translations';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { useEffect, useState } from 'react';
4
- import Link from 'next/link';
4
+ import { Link } from '@/lib/navigation';
5
5
  import type {
6
6
  CartRecommendationsResponse,
7
7
  CartUpgradesResponse,