@digilogiclabs/create-saas-app 1.5.0 → 1.5.1

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 (30) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/templates/web/base/template/package.json +58 -58
  5. package/dist/templates/web/base/template/src/test/setup.ts +78 -78
  6. package/dist/templates/web/ui-auth/template/package.json +50 -50
  7. package/dist/templates/web/ui-auth/template/src/test/setup.ts +78 -78
  8. package/dist/templates/web/ui-auth-payments/template/package.json +52 -52
  9. package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +78 -78
  10. package/dist/templates/web/ui-auth-payments-audio/template/package.json +53 -52
  11. package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +78 -78
  12. package/dist/templates/web/ui-auth-payments-video/template/package.json +53 -52
  13. package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +78 -78
  14. package/dist/templates/web/ui-only/template/package.json +49 -49
  15. package/dist/templates/web/ui-only/template/src/test/setup.ts +78 -78
  16. package/dist/templates/web/ui-package-test/template/package.json +42 -42
  17. package/package.json +1 -1
  18. package/src/templates/web/base/template/package.json +58 -58
  19. package/src/templates/web/base/template/src/test/setup.ts +78 -78
  20. package/src/templates/web/ui-auth/template/package.json +50 -50
  21. package/src/templates/web/ui-auth/template/src/test/setup.ts +78 -78
  22. package/src/templates/web/ui-auth-payments/template/package.json +52 -52
  23. package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +78 -78
  24. package/src/templates/web/ui-auth-payments-audio/template/package.json +53 -52
  25. package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +78 -78
  26. package/src/templates/web/ui-auth-payments-video/template/package.json +53 -52
  27. package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +78 -78
  28. package/src/templates/web/ui-only/template/package.json +49 -49
  29. package/src/templates/web/ui-only/template/src/test/setup.ts +78 -78
  30. package/src/templates/web/ui-package-test/template/package.json +42 -42
@@ -1,79 +1,79 @@
1
- import '@testing-library/jest-dom'
2
- import { vi } from 'vitest'
3
-
4
- // Mock Next.js router
5
- vi.mock('next/navigation', () => ({
6
- useRouter: () => ({
7
- push: vi.fn(),
8
- back: vi.fn(),
9
- forward: vi.fn(),
10
- refresh: vi.fn(),
11
- replace: vi.fn(),
12
- prefetch: vi.fn(),
13
- }),
14
- useSearchParams: () => new URLSearchParams(),
15
- usePathname: () => '/',
16
- }))
17
-
18
- // Mock SaaS Factory Auth (optional - only if testing auth components)
19
- vi.mock('@digilogiclabs/saas-factory-auth', () => ({
20
- useAuth: () => ({
21
- user: null,
22
- loading: false,
23
- error: null,
24
- signIn: vi.fn(),
25
- signUp: vi.fn(),
26
- signOut: vi.fn(),
27
- signInWithOAuth: vi.fn(),
28
- }),
29
- AuthProvider: ({ children }: { children: React.ReactNode }) => children,
30
- }))
31
-
32
- // Mock SaaS Factory Payments (optional - only if testing payment components)
33
- vi.mock('@digilogiclabs/saas-factory-payments', () => ({
34
- usePayments: () => ({
35
- createCheckoutSession: vi.fn(),
36
- createPortalSession: vi.fn(),
37
- subscription: null,
38
- loading: false,
39
- }),
40
- PaymentsProvider: ({ children }: { children: React.ReactNode }) => children,
41
- }))
42
-
43
- // Global test utilities
44
- global.ResizeObserver = vi.fn().mockImplementation(() => ({
45
- observe: vi.fn(),
46
- unobserve: vi.fn(),
47
- disconnect: vi.fn(),
48
- }))
49
-
50
- // Suppress console warnings in tests unless needed
51
- const originalConsoleError = console.error
52
- const originalConsoleWarn = console.warn
53
-
54
- beforeEach(() => {
55
- console.error = (...args: any[]) => {
56
- if (
57
- typeof args[0] === 'string' &&
58
- args[0].includes('Warning: ReactDOM.render is no longer supported')
59
- ) {
60
- return
61
- }
62
- originalConsoleError.call(console, ...args)
63
- }
64
-
65
- console.warn = (...args: any[]) => {
66
- if (
67
- typeof args[0] === 'string' &&
68
- args[0].includes('useLayoutEffect does nothing on the server')
69
- ) {
70
- return
71
- }
72
- originalConsoleWarn.call(console, ...args)
73
- }
74
- })
75
-
76
- afterAll(() => {
77
- console.error = originalConsoleError
78
- console.warn = originalConsoleWarn
1
+ import '@testing-library/jest-dom'
2
+ import { vi, beforeEach, afterAll } from 'vitest'
3
+
4
+ // Mock Next.js router
5
+ vi.mock('next/navigation', () => ({
6
+ useRouter: () => ({
7
+ push: vi.fn(),
8
+ back: vi.fn(),
9
+ forward: vi.fn(),
10
+ refresh: vi.fn(),
11
+ replace: vi.fn(),
12
+ prefetch: vi.fn(),
13
+ }),
14
+ useSearchParams: () => new URLSearchParams(),
15
+ usePathname: () => '/',
16
+ }))
17
+
18
+ // Mock SaaS Factory Auth (optional - only if testing auth components)
19
+ vi.mock('@digilogiclabs/saas-factory-auth', () => ({
20
+ useAuth: () => ({
21
+ user: null,
22
+ loading: false,
23
+ error: null,
24
+ signIn: vi.fn(),
25
+ signUp: vi.fn(),
26
+ signOut: vi.fn(),
27
+ signInWithOAuth: vi.fn(),
28
+ }),
29
+ AuthProvider: ({ children }: { children: React.ReactNode }) => children,
30
+ }))
31
+
32
+ // Mock SaaS Factory Payments (optional - only if testing payment components)
33
+ vi.mock('@digilogiclabs/saas-factory-payments', () => ({
34
+ usePayments: () => ({
35
+ createCheckoutSession: vi.fn(),
36
+ createPortalSession: vi.fn(),
37
+ subscription: null,
38
+ loading: false,
39
+ }),
40
+ PaymentsProvider: ({ children }: { children: React.ReactNode }) => children,
41
+ }))
42
+
43
+ // Global test utilities
44
+ global.ResizeObserver = vi.fn().mockImplementation(() => ({
45
+ observe: vi.fn(),
46
+ unobserve: vi.fn(),
47
+ disconnect: vi.fn(),
48
+ }))
49
+
50
+ // Suppress console warnings in tests unless needed
51
+ const originalConsoleError = console.error
52
+ const originalConsoleWarn = console.warn
53
+
54
+ beforeEach(() => {
55
+ console.error = (...args: any[]) => {
56
+ if (
57
+ typeof args[0] === 'string' &&
58
+ args[0].includes('Warning: ReactDOM.render is no longer supported')
59
+ ) {
60
+ return
61
+ }
62
+ originalConsoleError.call(console, ...args)
63
+ }
64
+
65
+ console.warn = (...args: any[]) => {
66
+ if (
67
+ typeof args[0] === 'string' &&
68
+ args[0].includes('useLayoutEffect does nothing on the server')
69
+ ) {
70
+ return
71
+ }
72
+ originalConsoleWarn.call(console, ...args)
73
+ }
74
+ })
75
+
76
+ afterAll(() => {
77
+ console.error = originalConsoleError
78
+ console.warn = originalConsoleWarn
79
79
  })
@@ -1,50 +1,50 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "0.1.0",
4
- "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0)",
5
- "private": true,
6
- "scripts": {
7
- "dev": "next dev --turbo",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint",
11
- "type-check": "tsc --noEmit",
12
- "test": "vitest",
13
- "test:ui": "vitest --ui",
14
- "test:run": "vitest run"
15
- },
16
- "dependencies": {
17
- "next": "^15.0.0",
18
- "react": "^19.0.0",
19
- "react-dom": "^19.0.0",
20
- "@digilogiclabs/saas-factory-ui": "^0.11.1",
21
- "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
- "tailwindcss": "^3.3.0",
23
- "autoprefixer": "^10.4.16",
24
- "postcss": "^8.4.31",
25
- "clsx": "^2.0.0",
26
- "class-variance-authority": "^0.7.0",
27
- "tailwind-merge": "^2.0.0",
28
- "next-themes": "^0.2.1",
29
- "lucide-react": "^0.542.0",
30
- "zod": "^3.22.4"
31
- },
32
- "devDependencies": {
33
- "typescript": "^5.0.0",
34
- "@types/node": "^20.0.0",
35
- "@types/react": "^19.0.0",
36
- "@types/react-dom": "^19.0.0",
37
- "eslint": "^8.0.0",
38
- "eslint-config-next": "^15.0.0",
39
- "prettier": "^3.0.0",
40
- "vitest": "^1.0.0",
41
- "@vitejs/plugin-react": "^4.0.0",
42
- "@testing-library/react": "^14.0.0",
43
- "@testing-library/jest-dom": "^6.0.0",
44
- "@testing-library/user-event": "^14.0.0",
45
- "jsdom": "^24.0.0"
46
- },
47
- "engines": {
48
- "node": ">=18.0.0"
49
- }
50
- }
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0)",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "next dev --turbo",
8
+ "build": "next build",
9
+ "start": "next start",
10
+ "lint": "next lint",
11
+ "type-check": "tsc --noEmit",
12
+ "test": "vitest",
13
+ "test:ui": "vitest --ui",
14
+ "test:run": "vitest run"
15
+ },
16
+ "dependencies": {
17
+ "next": "^15.0.0",
18
+ "react": "^19.0.0",
19
+ "react-dom": "^19.0.0",
20
+ "@digilogiclabs/saas-factory-ui": "^0.11.1",
21
+ "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
+ "tailwindcss": "^3.3.0",
23
+ "autoprefixer": "^10.4.16",
24
+ "postcss": "^8.4.31",
25
+ "clsx": "^2.0.0",
26
+ "class-variance-authority": "^0.7.0",
27
+ "tailwind-merge": "^2.0.0",
28
+ "next-themes": "^0.2.1",
29
+ "lucide-react": "^0.542.0",
30
+ "zod": "^3.22.4"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "^5.0.0",
34
+ "@types/node": "^20.0.0",
35
+ "@types/react": "^19.0.0",
36
+ "@types/react-dom": "^19.0.0",
37
+ "eslint": "^8.0.0",
38
+ "eslint-config-next": "^15.0.0",
39
+ "prettier": "^3.0.0",
40
+ "vitest": "^1.0.0",
41
+ "@vitejs/plugin-react": "^4.0.0",
42
+ "@testing-library/react": "^16.0.0",
43
+ "@testing-library/jest-dom": "^6.0.0",
44
+ "@testing-library/user-event": "^14.0.0",
45
+ "jsdom": "^24.0.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ }
50
+ }
@@ -1,79 +1,79 @@
1
- import '@testing-library/jest-dom'
2
- import { vi } from 'vitest'
3
-
4
- // Mock Next.js router
5
- vi.mock('next/navigation', () => ({
6
- useRouter: () => ({
7
- push: vi.fn(),
8
- back: vi.fn(),
9
- forward: vi.fn(),
10
- refresh: vi.fn(),
11
- replace: vi.fn(),
12
- prefetch: vi.fn(),
13
- }),
14
- useSearchParams: () => new URLSearchParams(),
15
- usePathname: () => '/',
16
- }))
17
-
18
- // Mock SaaS Factory Auth (optional - only if testing auth components)
19
- vi.mock('@digilogiclabs/saas-factory-auth', () => ({
20
- useAuth: () => ({
21
- user: null,
22
- loading: false,
23
- error: null,
24
- signIn: vi.fn(),
25
- signUp: vi.fn(),
26
- signOut: vi.fn(),
27
- signInWithOAuth: vi.fn(),
28
- }),
29
- AuthProvider: ({ children }: { children: React.ReactNode }) => children,
30
- }))
31
-
32
- // Mock SaaS Factory Payments (optional - only if testing payment components)
33
- vi.mock('@digilogiclabs/saas-factory-payments', () => ({
34
- usePayments: () => ({
35
- createCheckoutSession: vi.fn(),
36
- createPortalSession: vi.fn(),
37
- subscription: null,
38
- loading: false,
39
- }),
40
- PaymentsProvider: ({ children }: { children: React.ReactNode }) => children,
41
- }))
42
-
43
- // Global test utilities
44
- global.ResizeObserver = vi.fn().mockImplementation(() => ({
45
- observe: vi.fn(),
46
- unobserve: vi.fn(),
47
- disconnect: vi.fn(),
48
- }))
49
-
50
- // Suppress console warnings in tests unless needed
51
- const originalConsoleError = console.error
52
- const originalConsoleWarn = console.warn
53
-
54
- beforeEach(() => {
55
- console.error = (...args: any[]) => {
56
- if (
57
- typeof args[0] === 'string' &&
58
- args[0].includes('Warning: ReactDOM.render is no longer supported')
59
- ) {
60
- return
61
- }
62
- originalConsoleError.call(console, ...args)
63
- }
64
-
65
- console.warn = (...args: any[]) => {
66
- if (
67
- typeof args[0] === 'string' &&
68
- args[0].includes('useLayoutEffect does nothing on the server')
69
- ) {
70
- return
71
- }
72
- originalConsoleWarn.call(console, ...args)
73
- }
74
- })
75
-
76
- afterAll(() => {
77
- console.error = originalConsoleError
78
- console.warn = originalConsoleWarn
1
+ import '@testing-library/jest-dom'
2
+ import { vi, beforeEach, afterAll } from 'vitest'
3
+
4
+ // Mock Next.js router
5
+ vi.mock('next/navigation', () => ({
6
+ useRouter: () => ({
7
+ push: vi.fn(),
8
+ back: vi.fn(),
9
+ forward: vi.fn(),
10
+ refresh: vi.fn(),
11
+ replace: vi.fn(),
12
+ prefetch: vi.fn(),
13
+ }),
14
+ useSearchParams: () => new URLSearchParams(),
15
+ usePathname: () => '/',
16
+ }))
17
+
18
+ // Mock SaaS Factory Auth (optional - only if testing auth components)
19
+ vi.mock('@digilogiclabs/saas-factory-auth', () => ({
20
+ useAuth: () => ({
21
+ user: null,
22
+ loading: false,
23
+ error: null,
24
+ signIn: vi.fn(),
25
+ signUp: vi.fn(),
26
+ signOut: vi.fn(),
27
+ signInWithOAuth: vi.fn(),
28
+ }),
29
+ AuthProvider: ({ children }: { children: React.ReactNode }) => children,
30
+ }))
31
+
32
+ // Mock SaaS Factory Payments (optional - only if testing payment components)
33
+ vi.mock('@digilogiclabs/saas-factory-payments', () => ({
34
+ usePayments: () => ({
35
+ createCheckoutSession: vi.fn(),
36
+ createPortalSession: vi.fn(),
37
+ subscription: null,
38
+ loading: false,
39
+ }),
40
+ PaymentsProvider: ({ children }: { children: React.ReactNode }) => children,
41
+ }))
42
+
43
+ // Global test utilities
44
+ global.ResizeObserver = vi.fn().mockImplementation(() => ({
45
+ observe: vi.fn(),
46
+ unobserve: vi.fn(),
47
+ disconnect: vi.fn(),
48
+ }))
49
+
50
+ // Suppress console warnings in tests unless needed
51
+ const originalConsoleError = console.error
52
+ const originalConsoleWarn = console.warn
53
+
54
+ beforeEach(() => {
55
+ console.error = (...args: any[]) => {
56
+ if (
57
+ typeof args[0] === 'string' &&
58
+ args[0].includes('Warning: ReactDOM.render is no longer supported')
59
+ ) {
60
+ return
61
+ }
62
+ originalConsoleError.call(console, ...args)
63
+ }
64
+
65
+ console.warn = (...args: any[]) => {
66
+ if (
67
+ typeof args[0] === 'string' &&
68
+ args[0].includes('useLayoutEffect does nothing on the server')
69
+ ) {
70
+ return
71
+ }
72
+ originalConsoleWarn.call(console, ...args)
73
+ }
74
+ })
75
+
76
+ afterAll(() => {
77
+ console.error = originalConsoleError
78
+ console.warn = originalConsoleWarn
79
79
  })
@@ -1,52 +1,52 @@
1
- {
2
- "name": "{{packageName}}",
3
- "version": "0.1.0",
4
- "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0 + Payments)",
5
- "private": true,
6
- "scripts": {
7
- "dev": "next dev --turbo",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint",
11
- "type-check": "tsc --noEmit",
12
- "test": "vitest",
13
- "test:ui": "vitest --ui",
14
- "test:run": "vitest run"
15
- },
16
- "dependencies": {
17
- "next": "^15.0.0",
18
- "react": "^19.0.0",
19
- "react-dom": "^19.0.0",
20
- "@digilogiclabs/saas-factory-ui": "^0.11.1",
21
- "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
- "@digilogiclabs/saas-factory-payments": "^1.0.0",
23
- "stripe": "^14.0.0",
24
- "tailwindcss": "^3.3.0",
25
- "autoprefixer": "^10.4.16",
26
- "postcss": "^8.4.31",
27
- "clsx": "^2.0.0",
28
- "class-variance-authority": "^0.7.0",
29
- "tailwind-merge": "^2.0.0",
30
- "next-themes": "^0.2.1",
31
- "lucide-react": "^0.542.0",
32
- "zod": "^3.22.4"
33
- },
34
- "devDependencies": {
35
- "typescript": "^5.0.0",
36
- "@types/node": "^20.0.0",
37
- "@types/react": "^19.0.0",
38
- "@types/react-dom": "^19.0.0",
39
- "eslint": "^8.0.0",
40
- "eslint-config-next": "^15.0.0",
41
- "prettier": "^3.0.0",
42
- "vitest": "^1.0.0",
43
- "@vitejs/plugin-react": "^4.0.0",
44
- "@testing-library/react": "^14.0.0",
45
- "@testing-library/jest-dom": "^6.0.0",
46
- "@testing-library/user-event": "^14.0.0",
47
- "jsdom": "^24.0.0"
48
- },
49
- "engines": {
50
- "node": ">=18.0.0"
51
- }
52
- }
1
+ {
2
+ "name": "{{packageName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{description}} (with UI Package v0.11.1 + Auth v1.0.0 + Payments)",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "next dev --turbo",
8
+ "build": "next build",
9
+ "start": "next start",
10
+ "lint": "next lint",
11
+ "type-check": "tsc --noEmit",
12
+ "test": "vitest",
13
+ "test:ui": "vitest --ui",
14
+ "test:run": "vitest run"
15
+ },
16
+ "dependencies": {
17
+ "next": "^15.0.0",
18
+ "react": "^19.0.0",
19
+ "react-dom": "^19.0.0",
20
+ "@digilogiclabs/saas-factory-ui": "^0.11.1",
21
+ "@digilogiclabs/saas-factory-auth": "^1.0.0",
22
+ "@digilogiclabs/saas-factory-payments": "^1.0.0",
23
+ "stripe": "^14.0.0",
24
+ "tailwindcss": "^3.3.0",
25
+ "autoprefixer": "^10.4.16",
26
+ "postcss": "^8.4.31",
27
+ "clsx": "^2.0.0",
28
+ "class-variance-authority": "^0.7.0",
29
+ "tailwind-merge": "^2.0.0",
30
+ "next-themes": "^0.2.1",
31
+ "lucide-react": "^0.542.0",
32
+ "zod": "^3.22.4"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "^5.0.0",
36
+ "@types/node": "^20.0.0",
37
+ "@types/react": "^19.0.0",
38
+ "@types/react-dom": "^19.0.0",
39
+ "eslint": "^8.0.0",
40
+ "eslint-config-next": "^15.0.0",
41
+ "prettier": "^3.0.0",
42
+ "vitest": "^1.0.0",
43
+ "@vitejs/plugin-react": "^4.0.0",
44
+ "@testing-library/react": "^16.0.0",
45
+ "@testing-library/jest-dom": "^6.0.0",
46
+ "@testing-library/user-event": "^14.0.0",
47
+ "jsdom": "^24.0.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=18.0.0"
51
+ }
52
+ }