@nextsparkjs/core 0.1.0-beta.60 → 0.1.0-beta.62
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/dist/messages/de/index.d.ts +2 -0
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/de/teams.json +3 -1
- package/dist/messages/en/index.d.ts +2 -0
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/en/teams.json +3 -1
- package/dist/messages/es/index.d.ts +2 -0
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/es/teams.json +3 -1
- package/dist/messages/fr/index.d.ts +2 -0
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/fr/teams.json +3 -1
- package/dist/messages/it/index.d.ts +2 -0
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/it/teams.json +3 -1
- package/dist/messages/pt/index.d.ts +2 -0
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/messages/pt/teams.json +3 -1
- package/dist/migrations/001_better_auth_and_functions.sql +18 -0
- package/dist/styles/classes.json +1 -1
- package/dist/templates/contents/themes/starter/tests/cypress.config.ts +49 -0
- package/migrations/001_better_auth_and_functions.sql +18 -0
- package/package.json +2 -1
- package/scripts/build/registry/discovery/permissions.mjs +11 -1
- package/scripts/build/registry/discovery/permissions.test.mjs +190 -0
- package/scripts/build/registry/generators/permissions-registry.mjs +63 -0
- package/scripts/postinstall.mjs +163 -0
- package/templates/contents/themes/starter/tests/cypress.config.ts +49 -0
|
@@ -1899,6 +1899,7 @@ declare const _default: {
|
|
|
1899
1899
|
switch: string;
|
|
1900
1900
|
manage: string;
|
|
1901
1901
|
invite: string;
|
|
1902
|
+
inviting: string;
|
|
1902
1903
|
removeMember: string;
|
|
1903
1904
|
changeRole: string;
|
|
1904
1905
|
makeRole: string;
|
|
@@ -2009,6 +2010,7 @@ declare const _default: {
|
|
|
2009
2010
|
messages: {
|
|
2010
2011
|
created: string;
|
|
2011
2012
|
loading: string;
|
|
2013
|
+
memberInvited: string;
|
|
2012
2014
|
};
|
|
2013
2015
|
errors: {
|
|
2014
2016
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/de/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/de/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wBAoBU"}
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"switch": "Team wechseln",
|
|
50
50
|
"manage": "Team verwalten",
|
|
51
51
|
"invite": "Mitglied einladen",
|
|
52
|
+
"inviting": "Einladung wird gesendet...",
|
|
52
53
|
"removeMember": "Mitglied entfernen",
|
|
53
54
|
"changeRole": "Rolle aendern",
|
|
54
55
|
"makeRole": "Zu {role} machen",
|
|
@@ -197,6 +198,7 @@
|
|
|
197
198
|
|
|
198
199
|
"messages": {
|
|
199
200
|
"created": "Team erfolgreich erstellt",
|
|
200
|
-
"loading": "Teams werden geladen..."
|
|
201
|
+
"loading": "Teams werden geladen...",
|
|
202
|
+
"memberInvited": "Mitglied erfolgreich eingeladen"
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -1988,6 +1988,7 @@ declare const _default: {
|
|
|
1988
1988
|
switch: string;
|
|
1989
1989
|
manage: string;
|
|
1990
1990
|
invite: string;
|
|
1991
|
+
inviting: string;
|
|
1991
1992
|
removeMember: string;
|
|
1992
1993
|
changeRole: string;
|
|
1993
1994
|
makeRole: string;
|
|
@@ -2098,6 +2099,7 @@ declare const _default: {
|
|
|
2098
2099
|
messages: {
|
|
2099
2100
|
created: string;
|
|
2100
2101
|
loading: string;
|
|
2102
|
+
memberInvited: string;
|
|
2101
2103
|
};
|
|
2102
2104
|
errors: {
|
|
2103
2105
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/en/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/en/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wBAoBU"}
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"switch": "Switch Team",
|
|
50
50
|
"manage": "Manage Team",
|
|
51
51
|
"invite": "Invite Member",
|
|
52
|
+
"inviting": "Inviting...",
|
|
52
53
|
"removeMember": "Remove Member",
|
|
53
54
|
"changeRole": "Change Role",
|
|
54
55
|
"makeRole": "Make {role}",
|
|
@@ -197,6 +198,7 @@
|
|
|
197
198
|
|
|
198
199
|
"messages": {
|
|
199
200
|
"created": "Team created successfully",
|
|
200
|
-
"loading": "Loading teams..."
|
|
201
|
+
"loading": "Loading teams...",
|
|
202
|
+
"memberInvited": "Member invited successfully"
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -1987,6 +1987,7 @@ declare const _default: {
|
|
|
1987
1987
|
switch: string;
|
|
1988
1988
|
manage: string;
|
|
1989
1989
|
invite: string;
|
|
1990
|
+
inviting: string;
|
|
1990
1991
|
removeMember: string;
|
|
1991
1992
|
changeRole: string;
|
|
1992
1993
|
makeRole: string;
|
|
@@ -2097,6 +2098,7 @@ declare const _default: {
|
|
|
2097
2098
|
messages: {
|
|
2098
2099
|
created: string;
|
|
2099
2100
|
loading: string;
|
|
2101
|
+
memberInvited: string;
|
|
2100
2102
|
};
|
|
2101
2103
|
errors: {
|
|
2102
2104
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/es/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wBAoBU"}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"switch": "Cambiar Equipo",
|
|
45
45
|
"manage": "Gestionar Equipo",
|
|
46
46
|
"invite": "Invitar Miembro",
|
|
47
|
+
"inviting": "Invitando...",
|
|
47
48
|
"removeMember": "Eliminar Miembro",
|
|
48
49
|
"changeRole": "Cambiar Rol",
|
|
49
50
|
"makeRole": "Hacer {role}",
|
|
@@ -164,7 +165,8 @@
|
|
|
164
165
|
|
|
165
166
|
"messages": {
|
|
166
167
|
"created": "Equipo creado exitosamente",
|
|
167
|
-
"loading": "Cargando equipos..."
|
|
168
|
+
"loading": "Cargando equipos...",
|
|
169
|
+
"memberInvited": "Miembro invitado exitosamente"
|
|
168
170
|
},
|
|
169
171
|
|
|
170
172
|
"errors": {
|
|
@@ -1899,6 +1899,7 @@ declare const _default: {
|
|
|
1899
1899
|
switch: string;
|
|
1900
1900
|
manage: string;
|
|
1901
1901
|
invite: string;
|
|
1902
|
+
inviting: string;
|
|
1902
1903
|
removeMember: string;
|
|
1903
1904
|
changeRole: string;
|
|
1904
1905
|
makeRole: string;
|
|
@@ -2009,6 +2010,7 @@ declare const _default: {
|
|
|
2009
2010
|
messages: {
|
|
2010
2011
|
created: string;
|
|
2011
2012
|
loading: string;
|
|
2013
|
+
memberInvited: string;
|
|
2012
2014
|
};
|
|
2013
2015
|
errors: {
|
|
2014
2016
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/fr/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wBAoBU"}
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"switch": "Changer d'equipe",
|
|
50
50
|
"manage": "Gerer l'equipe",
|
|
51
51
|
"invite": "Inviter un membre",
|
|
52
|
+
"inviting": "Envoi de l'invitation...",
|
|
52
53
|
"removeMember": "Supprimer le membre",
|
|
53
54
|
"changeRole": "Changer le role",
|
|
54
55
|
"makeRole": "Faire {role}",
|
|
@@ -197,6 +198,7 @@
|
|
|
197
198
|
|
|
198
199
|
"messages": {
|
|
199
200
|
"created": "Equipe creee avec succes",
|
|
200
|
-
"loading": "Chargement des equipes..."
|
|
201
|
+
"loading": "Chargement des equipes...",
|
|
202
|
+
"memberInvited": "Membre invite avec succes"
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -1899,6 +1899,7 @@ declare const _default: {
|
|
|
1899
1899
|
switch: string;
|
|
1900
1900
|
manage: string;
|
|
1901
1901
|
invite: string;
|
|
1902
|
+
inviting: string;
|
|
1902
1903
|
removeMember: string;
|
|
1903
1904
|
changeRole: string;
|
|
1904
1905
|
makeRole: string;
|
|
@@ -2009,6 +2010,7 @@ declare const _default: {
|
|
|
2009
2010
|
messages: {
|
|
2010
2011
|
created: string;
|
|
2011
2012
|
loading: string;
|
|
2013
|
+
memberInvited: string;
|
|
2012
2014
|
};
|
|
2013
2015
|
errors: {
|
|
2014
2016
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/it/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/it/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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isci Team",
|
|
51
51
|
"invite": "Invita Membro",
|
|
52
|
+
"inviting": "Invio in corso...",
|
|
52
53
|
"removeMember": "Rimuovi Membro",
|
|
53
54
|
"changeRole": "Cambia Ruolo",
|
|
54
55
|
"makeRole": "Rendi {role}",
|
|
@@ -197,6 +198,7 @@
|
|
|
197
198
|
|
|
198
199
|
"messages": {
|
|
199
200
|
"created": "Team creato con successo",
|
|
200
|
-
"loading": "Caricamento team..."
|
|
201
|
+
"loading": "Caricamento team...",
|
|
202
|
+
"memberInvited": "Membro invitato con successo"
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -1899,6 +1899,7 @@ declare const _default: {
|
|
|
1899
1899
|
switch: string;
|
|
1900
1900
|
manage: string;
|
|
1901
1901
|
invite: string;
|
|
1902
|
+
inviting: string;
|
|
1902
1903
|
removeMember: string;
|
|
1903
1904
|
changeRole: string;
|
|
1904
1905
|
makeRole: string;
|
|
@@ -2009,6 +2010,7 @@ declare const _default: {
|
|
|
2009
2010
|
messages: {
|
|
2010
2011
|
created: string;
|
|
2011
2012
|
loading: string;
|
|
2013
|
+
memberInvited: string;
|
|
2012
2014
|
};
|
|
2013
2015
|
errors: {
|
|
2014
2016
|
notFound: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/pt/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wBAoBU"}
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"switch": "Trocar Equipe",
|
|
50
50
|
"manage": "Gerenciar Equipe",
|
|
51
51
|
"invite": "Convidar Membro",
|
|
52
|
+
"inviting": "Convidando...",
|
|
52
53
|
"removeMember": "Remover Membro",
|
|
53
54
|
"changeRole": "Alterar Funcao",
|
|
54
55
|
"makeRole": "Tornar {role}",
|
|
@@ -197,6 +198,7 @@
|
|
|
197
198
|
|
|
198
199
|
"messages": {
|
|
199
200
|
"created": "Equipe criada com sucesso",
|
|
200
|
-
"loading": "Carregando equipes..."
|
|
201
|
+
"loading": "Carregando equipes...",
|
|
202
|
+
"memberInvited": "Membro convidado com sucesso"
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
-- Description: Extensiones y funciones de identidad para Better Auth
|
|
3
3
|
-- Date: 2025-01-19
|
|
4
4
|
|
|
5
|
+
-- =============================================================================
|
|
6
|
+
-- ROLES FOR RLS (Row Level Security)
|
|
7
|
+
-- These roles are pre-created in Supabase but not in vanilla PostgreSQL (Neon, etc.)
|
|
8
|
+
-- =============================================================================
|
|
9
|
+
DO $$
|
|
10
|
+
BEGIN
|
|
11
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'authenticated') THEN
|
|
12
|
+
CREATE ROLE authenticated;
|
|
13
|
+
END IF;
|
|
14
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'anon') THEN
|
|
15
|
+
CREATE ROLE anon;
|
|
16
|
+
END IF;
|
|
17
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'service_role') THEN
|
|
18
|
+
CREATE ROLE service_role;
|
|
19
|
+
END IF;
|
|
20
|
+
END
|
|
21
|
+
$$;
|
|
22
|
+
|
|
5
23
|
-- Extensiones
|
|
6
24
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|
7
25
|
|
package/dist/styles/classes.json
CHANGED
|
@@ -11,6 +11,7 @@ import { defineConfig } from 'cypress'
|
|
|
11
11
|
import path from 'path'
|
|
12
12
|
import fs from 'fs'
|
|
13
13
|
import { fileURLToPath } from 'url'
|
|
14
|
+
import webpackPreprocessor from '@cypress/webpack-preprocessor'
|
|
14
15
|
|
|
15
16
|
// ESM-compatible __dirname
|
|
16
17
|
const __filename = fileURLToPath(import.meta.url)
|
|
@@ -111,6 +112,54 @@ export default defineConfig({
|
|
|
111
112
|
},
|
|
112
113
|
|
|
113
114
|
async setupNodeEvents(on, config) {
|
|
115
|
+
// =================================================================
|
|
116
|
+
// WEBPACK PREPROCESSOR - Enable "exports" field support
|
|
117
|
+
// =================================================================
|
|
118
|
+
// Fix for: "Package path ./selectors is not exported from package @nextsparkjs/core"
|
|
119
|
+
// Cypress default webpack doesn't support package.json "exports" field properly.
|
|
120
|
+
// This custom config enables it.
|
|
121
|
+
const webpackOptions = {
|
|
122
|
+
resolve: {
|
|
123
|
+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs'],
|
|
124
|
+
// CRITICAL: Enable package.json "exports" field resolution
|
|
125
|
+
exportsFields: ['exports'],
|
|
126
|
+
conditionNames: ['import', 'module', 'default'],
|
|
127
|
+
mainFields: ['module', 'main'],
|
|
128
|
+
// Polyfills for Node.js core modules (webpack 5 doesn't include them)
|
|
129
|
+
fallback: {
|
|
130
|
+
tty: false,
|
|
131
|
+
util: false,
|
|
132
|
+
fs: false,
|
|
133
|
+
path: false,
|
|
134
|
+
os: false,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
module: {
|
|
138
|
+
rules: [
|
|
139
|
+
{
|
|
140
|
+
test: /\.tsx?$/,
|
|
141
|
+
use: [
|
|
142
|
+
{
|
|
143
|
+
loader: 'ts-loader',
|
|
144
|
+
options: {
|
|
145
|
+
transpileOnly: true,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
exclude: /node_modules/,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
test: /\.m?js$/,
|
|
153
|
+
resolve: {
|
|
154
|
+
fullySpecified: false,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
on('file:preprocessor', webpackPreprocessor({ webpackOptions }))
|
|
162
|
+
|
|
114
163
|
// Allure plugin setup (allure-cypress)
|
|
115
164
|
const { allureCypress } = await import('allure-cypress/reporter')
|
|
116
165
|
allureCypress(on, config, {
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
-- Description: Extensiones y funciones de identidad para Better Auth
|
|
3
3
|
-- Date: 2025-01-19
|
|
4
4
|
|
|
5
|
+
-- =============================================================================
|
|
6
|
+
-- ROLES FOR RLS (Row Level Security)
|
|
7
|
+
-- These roles are pre-created in Supabase but not in vanilla PostgreSQL (Neon, etc.)
|
|
8
|
+
-- =============================================================================
|
|
9
|
+
DO $$
|
|
10
|
+
BEGIN
|
|
11
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'authenticated') THEN
|
|
12
|
+
CREATE ROLE authenticated;
|
|
13
|
+
END IF;
|
|
14
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'anon') THEN
|
|
15
|
+
CREATE ROLE anon;
|
|
16
|
+
END IF;
|
|
17
|
+
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'service_role') THEN
|
|
18
|
+
CREATE ROLE service_role;
|
|
19
|
+
END IF;
|
|
20
|
+
END
|
|
21
|
+
$$;
|
|
22
|
+
|
|
5
23
|
-- Extensiones
|
|
6
24
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|
7
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.62",
|
|
4
4
|
"description": "NextSpark - The complete SaaS framework for Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -370,6 +370,7 @@
|
|
|
370
370
|
"zod": "^4.1.5"
|
|
371
371
|
},
|
|
372
372
|
"scripts": {
|
|
373
|
+
"postinstall": "node scripts/postinstall.mjs || true",
|
|
373
374
|
"build": "tsup && pnpm build:dts && pnpm build:ui-css",
|
|
374
375
|
"build:js": "tsup",
|
|
375
376
|
"build:dts": "tsc -p tsconfig.dts.json || echo '⚠️ DTS generation completed with some type errors (partial coverage)'",
|
|
@@ -103,7 +103,17 @@ function parseEntitiesFromConfig(content) {
|
|
|
103
103
|
const entitiesContent = entitiesMatch[1]
|
|
104
104
|
|
|
105
105
|
// Match each entity block: entityName: [ ... ]
|
|
106
|
-
|
|
106
|
+
// Supports: customers:, "ai-agents":, 'landing-metrics':
|
|
107
|
+
// The key can be:
|
|
108
|
+
// - Simple word: customers
|
|
109
|
+
// - Quoted with hyphens: "ai-agents" or 'ai-agents'
|
|
110
|
+
//
|
|
111
|
+
// Lookahead handles:
|
|
112
|
+
// - Next entity (quoted or unquoted)
|
|
113
|
+
// - End of content ($)
|
|
114
|
+
// - Trailing comments (// ...)
|
|
115
|
+
// - Closing brace of entities object (})
|
|
116
|
+
const entityBlockRegex = /["']?([\w-]+)["']?:\s*\[([\s\S]*?)\],?(?=\s*(?:\/\/[^\n]*\n)?\s*(?:["'][\w-]+["']:|[\w-]+:|\}|$))/g
|
|
107
117
|
let entityMatch
|
|
108
118
|
|
|
109
119
|
while ((entityMatch = entityBlockRegex.exec(entitiesContent)) !== null) {
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for parseEntitiesFromConfig function
|
|
3
|
+
*
|
|
4
|
+
* Run with: node --test packages/core/scripts/build/registry/discovery/permissions.test.mjs
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { describe, it } from 'node:test'
|
|
8
|
+
import assert from 'node:assert'
|
|
9
|
+
|
|
10
|
+
// Import the regex pattern directly since parseEntitiesFromConfig is not exported
|
|
11
|
+
// We'll test the regex patterns directly
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Test the entity block regex pattern
|
|
15
|
+
*/
|
|
16
|
+
describe('Entity Block Regex', () => {
|
|
17
|
+
// The regex pattern from permissions.mjs
|
|
18
|
+
const entityBlockRegex = /["']?([\w-]+)["']?:\s*\[([\s\S]*?)\],?(?=\s*(?:\/\/[^\n]*\n)?\s*(?:["'][\w-]+["']:|[\w-]+:|\}|$))/g
|
|
19
|
+
|
|
20
|
+
it('should match simple entity keys', () => {
|
|
21
|
+
const content = `
|
|
22
|
+
customers: [
|
|
23
|
+
{ action: 'create', roles: ['owner'] }
|
|
24
|
+
],
|
|
25
|
+
tasks: [
|
|
26
|
+
{ action: 'read', roles: ['member'] }
|
|
27
|
+
]
|
|
28
|
+
}`
|
|
29
|
+
|
|
30
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
31
|
+
assert.strictEqual(matches.length, 2)
|
|
32
|
+
assert.strictEqual(matches[0][1], 'customers')
|
|
33
|
+
assert.strictEqual(matches[1][1], 'tasks')
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('should match quoted entity keys with hyphens (double quotes)', () => {
|
|
37
|
+
const content = `
|
|
38
|
+
"ai-agents": [
|
|
39
|
+
{ action: 'create', roles: ['owner'] }
|
|
40
|
+
],
|
|
41
|
+
"landing-pages": [
|
|
42
|
+
{ action: 'read', roles: ['member'] }
|
|
43
|
+
]
|
|
44
|
+
}`
|
|
45
|
+
|
|
46
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
47
|
+
assert.strictEqual(matches.length, 2)
|
|
48
|
+
assert.strictEqual(matches[0][1], 'ai-agents')
|
|
49
|
+
assert.strictEqual(matches[1][1], 'landing-pages')
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it('should match quoted entity keys with hyphens (single quotes)', () => {
|
|
53
|
+
const content = `
|
|
54
|
+
'ai-agents': [
|
|
55
|
+
{ action: 'create', roles: ['owner'] }
|
|
56
|
+
],
|
|
57
|
+
'user-profiles': [
|
|
58
|
+
{ action: 'read', roles: ['member'] }
|
|
59
|
+
]
|
|
60
|
+
}`
|
|
61
|
+
|
|
62
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
63
|
+
assert.strictEqual(matches.length, 2)
|
|
64
|
+
assert.strictEqual(matches[0][1], 'ai-agents')
|
|
65
|
+
assert.strictEqual(matches[1][1], 'user-profiles')
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it('should match mixed quoted and unquoted keys', () => {
|
|
69
|
+
const content = `
|
|
70
|
+
customers: [
|
|
71
|
+
{ action: 'create', roles: ['owner'] }
|
|
72
|
+
],
|
|
73
|
+
"ai-agents": [
|
|
74
|
+
{ action: 'read', roles: ['member'] }
|
|
75
|
+
],
|
|
76
|
+
tasks: [
|
|
77
|
+
{ action: 'update', roles: ['admin'] }
|
|
78
|
+
]
|
|
79
|
+
}`
|
|
80
|
+
|
|
81
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
82
|
+
assert.strictEqual(matches.length, 3)
|
|
83
|
+
assert.strictEqual(matches[0][1], 'customers')
|
|
84
|
+
assert.strictEqual(matches[1][1], 'ai-agents')
|
|
85
|
+
assert.strictEqual(matches[2][1], 'tasks')
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
it('should handle last entity without trailing comma', () => {
|
|
89
|
+
const content = `
|
|
90
|
+
customers: [
|
|
91
|
+
{ action: 'create', roles: ['owner'] }
|
|
92
|
+
],
|
|
93
|
+
tasks: [
|
|
94
|
+
{ action: 'read', roles: ['member'] }
|
|
95
|
+
]
|
|
96
|
+
}`
|
|
97
|
+
|
|
98
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
99
|
+
assert.strictEqual(matches.length, 2)
|
|
100
|
+
assert.strictEqual(matches[1][1], 'tasks')
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it('should handle entity followed by closing brace', () => {
|
|
104
|
+
const content = `
|
|
105
|
+
customers: [
|
|
106
|
+
{ action: 'create', roles: ['owner'] }
|
|
107
|
+
]
|
|
108
|
+
}`
|
|
109
|
+
|
|
110
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
111
|
+
assert.strictEqual(matches.length, 1)
|
|
112
|
+
assert.strictEqual(matches[0][1], 'customers')
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
it('should handle entities with comments between them', () => {
|
|
116
|
+
const content = `
|
|
117
|
+
customers: [
|
|
118
|
+
{ action: 'create', roles: ['owner'] }
|
|
119
|
+
],
|
|
120
|
+
// This is a comment about tasks
|
|
121
|
+
tasks: [
|
|
122
|
+
{ action: 'read', roles: ['member'] }
|
|
123
|
+
]
|
|
124
|
+
}`
|
|
125
|
+
|
|
126
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
127
|
+
assert.strictEqual(matches.length, 2)
|
|
128
|
+
assert.strictEqual(matches[0][1], 'customers')
|
|
129
|
+
assert.strictEqual(matches[1][1], 'tasks')
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
it('should handle entity with multiple hyphens', () => {
|
|
133
|
+
const content = `
|
|
134
|
+
"ai-landing-page-templates": [
|
|
135
|
+
{ action: 'create', roles: ['owner'] }
|
|
136
|
+
]
|
|
137
|
+
}`
|
|
138
|
+
|
|
139
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
140
|
+
assert.strictEqual(matches.length, 1)
|
|
141
|
+
assert.strictEqual(matches[0][1], 'ai-landing-page-templates')
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
it('should handle empty actions array', () => {
|
|
145
|
+
const content = `
|
|
146
|
+
customers: [],
|
|
147
|
+
tasks: [
|
|
148
|
+
{ action: 'read', roles: ['member'] }
|
|
149
|
+
]
|
|
150
|
+
}`
|
|
151
|
+
|
|
152
|
+
const matches = [...content.matchAll(entityBlockRegex)]
|
|
153
|
+
assert.strictEqual(matches.length, 2)
|
|
154
|
+
assert.strictEqual(matches[0][1], 'customers')
|
|
155
|
+
assert.strictEqual(matches[0][2].trim(), '')
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Test the action regex pattern
|
|
161
|
+
*/
|
|
162
|
+
describe('Action Block Regex', () => {
|
|
163
|
+
const actionRegex = /\{\s*action:\s*['"](\w+)['"][^}]*\}/g
|
|
164
|
+
|
|
165
|
+
it('should extract action names', () => {
|
|
166
|
+
const content = `
|
|
167
|
+
{ action: 'create', label: 'Create', roles: ['owner'] },
|
|
168
|
+
{ action: 'read', label: 'Read', roles: ['member'] },
|
|
169
|
+
{ action: 'update', label: 'Update', roles: ['admin'] }
|
|
170
|
+
`
|
|
171
|
+
|
|
172
|
+
const matches = [...content.matchAll(actionRegex)]
|
|
173
|
+
assert.strictEqual(matches.length, 3)
|
|
174
|
+
assert.strictEqual(matches[0][1], 'create')
|
|
175
|
+
assert.strictEqual(matches[1][1], 'read')
|
|
176
|
+
assert.strictEqual(matches[2][1], 'update')
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
it('should handle action with dangerous flag', () => {
|
|
180
|
+
const content = `
|
|
181
|
+
{ action: 'delete', label: 'Delete', roles: ['owner'], dangerous: true }
|
|
182
|
+
`
|
|
183
|
+
|
|
184
|
+
const matches = [...content.matchAll(actionRegex)]
|
|
185
|
+
assert.strictEqual(matches.length, 1)
|
|
186
|
+
assert.strictEqual(matches[0][1], 'delete')
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
console.log('\n✅ All permission parsing tests passed!\n')
|
|
@@ -48,10 +48,73 @@ export async function generatePermissionsRegistry(permissionsConfig, entities, c
|
|
|
48
48
|
const entityPermissions = []
|
|
49
49
|
const processedEntities = new Set()
|
|
50
50
|
|
|
51
|
+
// Build a Set of all known entity slugs for validation
|
|
52
|
+
// Entities come from theme + plugins, use 'name' which matches directory/slug
|
|
53
|
+
const knownEntitySlugs = new Set(entities.map(e => e.name))
|
|
54
|
+
|
|
51
55
|
// PRIORITY 1: Read from permissions.config.ts -> entities (centralized definition)
|
|
52
56
|
// This allows custom roles like 'editor' to be included directly in roles
|
|
53
57
|
if (hasThemeConfig && permissionsConfig.entities) {
|
|
54
58
|
log(' 📋 Reading entity permissions from permissions.config.ts (centralized)', 'info')
|
|
59
|
+
|
|
60
|
+
// =========================================================================
|
|
61
|
+
// VALIDATION: Ensure all entity keys in permissions.config.ts match
|
|
62
|
+
// discovered entity slugs. This prevents runtime permission resolution bugs.
|
|
63
|
+
// =========================================================================
|
|
64
|
+
const permissionEntityKeys = Object.keys(permissionsConfig.entities)
|
|
65
|
+
const unmatchedEntities = []
|
|
66
|
+
|
|
67
|
+
for (const entityKey of permissionEntityKeys) {
|
|
68
|
+
if (!knownEntitySlugs.has(entityKey)) {
|
|
69
|
+
// Try to find similar slugs for helpful error message
|
|
70
|
+
const similarSlugs = [...knownEntitySlugs].filter(slug => {
|
|
71
|
+
// Check for common variations: kebab vs camelCase, plural vs singular
|
|
72
|
+
const normalized = slug.toLowerCase().replace(/-/g, '')
|
|
73
|
+
const keyNormalized = entityKey.toLowerCase().replace(/-/g, '')
|
|
74
|
+
return normalized === keyNormalized ||
|
|
75
|
+
slug.includes(entityKey) ||
|
|
76
|
+
entityKey.includes(slug)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
unmatchedEntities.push({
|
|
80
|
+
key: entityKey,
|
|
81
|
+
suggestions: similarSlugs
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (unmatchedEntities.length > 0) {
|
|
87
|
+
const errorLines = [
|
|
88
|
+
'',
|
|
89
|
+
'╔══════════════════════════════════════════════════════════════════════════════╗',
|
|
90
|
+
'║ PERMISSIONS CONFIG ERROR: Entity slug mismatch detected ║',
|
|
91
|
+
'╚══════════════════════════════════════════════════════════════════════════════╝',
|
|
92
|
+
'',
|
|
93
|
+
'The following keys in permissions.config.ts → entities do not match any',
|
|
94
|
+
'discovered entity slug. This will cause permission checks to fail at runtime.',
|
|
95
|
+
''
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
for (const { key, suggestions } of unmatchedEntities) {
|
|
99
|
+
errorLines.push(` ❌ "${key}" - No entity found with this slug`)
|
|
100
|
+
if (suggestions.length > 0) {
|
|
101
|
+
errorLines.push(` Did you mean: ${suggestions.map(s => `"${s}"`).join(', ')}?`)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
errorLines.push('')
|
|
106
|
+
errorLines.push('Available entity slugs:')
|
|
107
|
+
errorLines.push(` ${[...knownEntitySlugs].sort().join(', ')}`)
|
|
108
|
+
errorLines.push('')
|
|
109
|
+
errorLines.push('Fix: Ensure the key in permissions.config.ts → entities matches')
|
|
110
|
+
errorLines.push(' the "slug" field in the corresponding entity.config.ts')
|
|
111
|
+
errorLines.push('')
|
|
112
|
+
|
|
113
|
+
throw new Error(errorLines.join('\n'))
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
log(' ✅ All permission entity keys validated against discovered entities', 'info')
|
|
117
|
+
|
|
55
118
|
for (const [entitySlug, actions] of Object.entries(permissionsConfig.entities)) {
|
|
56
119
|
if (!Array.isArray(actions)) continue
|
|
57
120
|
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @nextsparkjs/core postinstall hook
|
|
4
|
+
*
|
|
5
|
+
* Automatically syncs /app folder with core templates when the package is updated.
|
|
6
|
+
* Only runs in NextSpark projects (not in the monorepo or other contexts).
|
|
7
|
+
*
|
|
8
|
+
* Debug mode: Set NEXTSPARK_DEBUG=1 to see detailed logs
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { execSync } from 'child_process';
|
|
12
|
+
import { existsSync, readFileSync } from 'fs';
|
|
13
|
+
import { join, resolve, isAbsolute } from 'path';
|
|
14
|
+
|
|
15
|
+
const DEBUG = process.env.NEXTSPARK_DEBUG === '1';
|
|
16
|
+
|
|
17
|
+
function debug(message) {
|
|
18
|
+
if (DEBUG) {
|
|
19
|
+
console.log(` [DEBUG] ${message}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Find the project root by walking up from the current directory
|
|
25
|
+
* until we find a package.json that isn't inside node_modules
|
|
26
|
+
*/
|
|
27
|
+
function findProjectRoot() {
|
|
28
|
+
// When running postinstall, we're in node_modules/@nextsparkjs/core
|
|
29
|
+
// We need to find the project root (where the user's package.json is)
|
|
30
|
+
let current = process.cwd();
|
|
31
|
+
|
|
32
|
+
// If we're inside node_modules, walk up to find the project root
|
|
33
|
+
if (current.includes('node_modules')) {
|
|
34
|
+
// Go up until we're out of node_modules
|
|
35
|
+
const parts = current.split('node_modules');
|
|
36
|
+
current = parts[0].replace(/[/\\]$/, ''); // Remove trailing slash
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return current;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Validate that the project root path is safe to use
|
|
44
|
+
*/
|
|
45
|
+
function validateProjectRoot(projectRoot) {
|
|
46
|
+
// Must be an absolute path
|
|
47
|
+
if (!isAbsolute(projectRoot)) {
|
|
48
|
+
debug(`Invalid path: not absolute - ${projectRoot}`);
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Must exist
|
|
53
|
+
if (!existsSync(projectRoot)) {
|
|
54
|
+
debug(`Invalid path: does not exist - ${projectRoot}`);
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Resolve to canonical path and verify it doesn't escape
|
|
59
|
+
const resolved = resolve(projectRoot);
|
|
60
|
+
if (resolved !== projectRoot && !projectRoot.startsWith(resolved)) {
|
|
61
|
+
debug(`Invalid path: resolution mismatch - ${projectRoot} vs ${resolved}`);
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Detect if we're in a NextSpark project (not the monorepo)
|
|
70
|
+
*/
|
|
71
|
+
function isNextSparkProject(projectRoot) {
|
|
72
|
+
// If we're in the monorepo, skip
|
|
73
|
+
const pnpmWorkspace = join(projectRoot, 'pnpm-workspace.yaml');
|
|
74
|
+
if (existsSync(pnpmWorkspace)) {
|
|
75
|
+
debug('Skipping: monorepo detected (pnpm-workspace.yaml exists)');
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Check for package.json with nextspark dependency
|
|
80
|
+
const pkgPath = join(projectRoot, 'package.json');
|
|
81
|
+
if (!existsSync(pkgPath)) {
|
|
82
|
+
debug('Skipping: no package.json found');
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
88
|
+
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
89
|
+
|
|
90
|
+
const hasNextSpark = !!(deps['@nextsparkjs/core'] || deps['@nextsparkjs/cli']);
|
|
91
|
+
if (!hasNextSpark) {
|
|
92
|
+
debug('Skipping: no NextSpark dependencies found');
|
|
93
|
+
}
|
|
94
|
+
return hasNextSpark;
|
|
95
|
+
} catch {
|
|
96
|
+
debug('Skipping: failed to parse package.json');
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Check if the project has an /app folder (already initialized)
|
|
103
|
+
*/
|
|
104
|
+
function hasAppFolder(projectRoot) {
|
|
105
|
+
const hasApp = existsSync(join(projectRoot, 'app'));
|
|
106
|
+
if (!hasApp) {
|
|
107
|
+
debug('Skipping: no /app folder found (project not initialized)');
|
|
108
|
+
}
|
|
109
|
+
return hasApp;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Check if nextspark CLI is available
|
|
114
|
+
*/
|
|
115
|
+
function hasNextsparkCli(projectRoot) {
|
|
116
|
+
// Check in node_modules/.bin
|
|
117
|
+
const binPath = join(projectRoot, 'node_modules', '.bin', 'nextspark');
|
|
118
|
+
const hasCli = existsSync(binPath);
|
|
119
|
+
if (!hasCli) {
|
|
120
|
+
debug('Skipping: CLI not yet available (parallel install in progress)');
|
|
121
|
+
}
|
|
122
|
+
return hasCli;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Main execution
|
|
126
|
+
try {
|
|
127
|
+
const projectRoot = findProjectRoot();
|
|
128
|
+
debug(`Project root: ${projectRoot}`);
|
|
129
|
+
|
|
130
|
+
// Validate project root path
|
|
131
|
+
if (!validateProjectRoot(projectRoot)) {
|
|
132
|
+
debug('Skipping: invalid project root path');
|
|
133
|
+
process.exit(0);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Only run in NextSpark projects with an existing /app folder
|
|
137
|
+
if (isNextSparkProject(projectRoot) && hasAppFolder(projectRoot)) {
|
|
138
|
+
console.log('\n 📦 @nextsparkjs/core updated - syncing /app folder...\n');
|
|
139
|
+
|
|
140
|
+
// Check if CLI is available
|
|
141
|
+
if (hasNextsparkCli(projectRoot)) {
|
|
142
|
+
try {
|
|
143
|
+
execSync('npx nextspark sync:app --force', {
|
|
144
|
+
stdio: 'inherit',
|
|
145
|
+
cwd: projectRoot
|
|
146
|
+
});
|
|
147
|
+
} catch (syncError) {
|
|
148
|
+
console.warn('\n ⚠️ Auto-sync failed. Run manually: npx nextspark sync:app\n');
|
|
149
|
+
debug(`Sync error: ${syncError.message}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// If CLI not available, skip silently - this is expected during initial setup
|
|
153
|
+
}
|
|
154
|
+
} catch (error) {
|
|
155
|
+
// Postinstall hooks should not break installations
|
|
156
|
+
// The user can always run the sync manually
|
|
157
|
+
if (DEBUG) {
|
|
158
|
+
console.warn('\n [DEBUG] Postinstall error:', error.message);
|
|
159
|
+
if (error.stack) {
|
|
160
|
+
console.warn(error.stack);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -11,6 +11,7 @@ import { defineConfig } from 'cypress'
|
|
|
11
11
|
import path from 'path'
|
|
12
12
|
import fs from 'fs'
|
|
13
13
|
import { fileURLToPath } from 'url'
|
|
14
|
+
import webpackPreprocessor from '@cypress/webpack-preprocessor'
|
|
14
15
|
|
|
15
16
|
// ESM-compatible __dirname
|
|
16
17
|
const __filename = fileURLToPath(import.meta.url)
|
|
@@ -111,6 +112,54 @@ export default defineConfig({
|
|
|
111
112
|
},
|
|
112
113
|
|
|
113
114
|
async setupNodeEvents(on, config) {
|
|
115
|
+
// =================================================================
|
|
116
|
+
// WEBPACK PREPROCESSOR - Enable "exports" field support
|
|
117
|
+
// =================================================================
|
|
118
|
+
// Fix for: "Package path ./selectors is not exported from package @nextsparkjs/core"
|
|
119
|
+
// Cypress default webpack doesn't support package.json "exports" field properly.
|
|
120
|
+
// This custom config enables it.
|
|
121
|
+
const webpackOptions = {
|
|
122
|
+
resolve: {
|
|
123
|
+
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs'],
|
|
124
|
+
// CRITICAL: Enable package.json "exports" field resolution
|
|
125
|
+
exportsFields: ['exports'],
|
|
126
|
+
conditionNames: ['import', 'module', 'default'],
|
|
127
|
+
mainFields: ['module', 'main'],
|
|
128
|
+
// Polyfills for Node.js core modules (webpack 5 doesn't include them)
|
|
129
|
+
fallback: {
|
|
130
|
+
tty: false,
|
|
131
|
+
util: false,
|
|
132
|
+
fs: false,
|
|
133
|
+
path: false,
|
|
134
|
+
os: false,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
module: {
|
|
138
|
+
rules: [
|
|
139
|
+
{
|
|
140
|
+
test: /\.tsx?$/,
|
|
141
|
+
use: [
|
|
142
|
+
{
|
|
143
|
+
loader: 'ts-loader',
|
|
144
|
+
options: {
|
|
145
|
+
transpileOnly: true,
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
exclude: /node_modules/,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
test: /\.m?js$/,
|
|
153
|
+
resolve: {
|
|
154
|
+
fullySpecified: false,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
on('file:preprocessor', webpackPreprocessor({ webpackOptions }))
|
|
162
|
+
|
|
114
163
|
// Allure plugin setup (allure-cypress)
|
|
115
164
|
const { allureCypress } = await import('allure-cypress/reporter')
|
|
116
165
|
allureCypress(on, config, {
|