@nextsparkjs/core 0.1.0-beta.160 → 0.1.0-beta.162

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2026-06-09T21:44:36.489Z",
2
+ "generated": "2026-06-09T22:43:24.180Z",
3
3
  "totalClasses": 1081,
4
4
  "classes": [
5
5
  "!text-2xl",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/core",
3
- "version": "0.1.0-beta.160",
3
+ "version": "0.1.0-beta.162",
4
4
  "description": "NextSpark - The complete SaaS framework for Next.js",
5
5
  "license": "MIT",
6
6
  "author": "NextSpark <hello@nextspark.dev>",
@@ -439,6 +439,7 @@
439
439
  "@vercel/blob": "^2.0.0",
440
440
  "better-auth": "^1.3.5",
441
441
  "chalk": "^5.4.1",
442
+ "jiti": "^2.7.0",
442
443
  "kysely": "0.28.17",
443
444
  "class-variance-authority": "^0.7.1",
444
445
  "clsx": "^2.1.1",
@@ -468,7 +469,7 @@
468
469
  "tailwind-merge": "^3.3.1",
469
470
  "uuid": "^13.0.0",
470
471
  "zod": "^4.1.5",
471
- "@nextsparkjs/testing": "0.1.0-beta.160"
472
+ "@nextsparkjs/testing": "0.1.0-beta.162"
472
473
  },
473
474
  "scripts": {
474
475
  "postinstall": "node scripts/postinstall.mjs || true",
@@ -93,8 +93,8 @@ export async function discoverCoreEntities(config) {
93
93
  try {
94
94
  // Extract export name from config file
95
95
  const exportName = await extractExportName(configPath, [
96
- /export\s+const\s+([a-zA-Z]+EntityConfig)\s*[:=]/,
97
- /export\s+const\s+([a-zA-Z]+ChildConfig)\s*[:=]/
96
+ /export\s+const\s+([a-zA-Z_$][\w$]*EntityConfig)\s*[:=]/,
97
+ /export\s+const\s+([a-zA-Z_$][\w$]*ChildConfig)\s*[:=]/
98
98
  ])
99
99
 
100
100
  if (!exportName) {
@@ -42,8 +42,8 @@ export async function discoverNestedEntities(config, basePath, relativePath = ''
42
42
 
43
43
  try {
44
44
  const exportName = await extractExportName(configPath, [
45
- /export\s+const\s+([a-zA-Z]+EntityConfig)\s*[:=]/,
46
- /export\s+const\s+([a-zA-Z]+ChildConfig)\s*[:=]/
45
+ /export\s+const\s+([a-zA-Z_$][\w$]*EntityConfig)\s*[:=]/,
46
+ /export\s+const\s+([a-zA-Z_$][\w$]*ChildConfig)\s*[:=]/
47
47
  ])
48
48
 
49
49
  if (!exportName) {
@@ -163,8 +163,8 @@ export async function discoverNestedEntities(config, basePath, relativePath = ''
163
163
 
164
164
  try {
165
165
  const exportName = await extractExportName(configPath, [
166
- /export\s+const\s+([a-zA-Z]+EntityConfig)\s*[:=]/,
167
- /export\s+const\s+([a-zA-Z]+ChildConfig)\s*[:=]/
166
+ /export\s+const\s+([a-zA-Z_$][\w$]*EntityConfig)\s*[:=]/,
167
+ /export\s+const\s+([a-zA-Z_$][\w$]*ChildConfig)\s*[:=]/
168
168
  ])
169
169
 
170
170
  if (!exportName) {
@@ -42,7 +42,7 @@ export async function discoverThemes(config = DEFAULT_CONFIG) {
42
42
 
43
43
  // Extract theme config export name and plugin dependencies
44
44
  const configContent = await readFile(configPath, 'utf8')
45
- const exportMatch = configContent.match(/export\s+const\s+([a-zA-Z]+ThemeConfig)\s*[:=]/)
45
+ const exportMatch = configContent.match(/export\s+const\s+([a-zA-Z_$][\w$]*ThemeConfig)\s*[:=]/)
46
46
  const exportName = exportMatch ? exportMatch[1] : null
47
47
 
48
48
  // Extract plugin dependencies from theme config
@@ -215,7 +215,7 @@ export async function discoverThemes(config = DEFAULT_CONFIG) {
215
215
 
216
216
  // Extract theme config export name and plugin dependencies
217
217
  const configContent = await readFile(configPath, 'utf8')
218
- const exportMatch = configContent.match(/export\s+const\s+([a-zA-Z]+ThemeConfig)\s*[:=]/)
218
+ const exportMatch = configContent.match(/export\s+const\s+([a-zA-Z_$][\w$]*ThemeConfig)\s*[:=]/)
219
219
  const exportName = exportMatch ? exportMatch[1] : null
220
220
 
221
221
  // Extract plugin dependencies from theme config
@@ -9,7 +9,14 @@
9
9
  import { existsSync } from 'fs'
10
10
  import { readFileSync } from 'fs'
11
11
  import { join } from 'path'
12
- import { createJiti } from 'jiti'
12
+ import { createRequire } from 'module'
13
+ // Resolve jiti via createRequire (its CommonJS build) instead of a static ESM
14
+ // `import { createJiti } from 'jiti'`. Depending on the node_modules layout
15
+ // (e.g. pnpm monorepo hoisting) Node may resolve jiti's CJS build, where the
16
+ // named ESM export isn't statically detectable ("Named export 'createJiti' not
17
+ // found"). The CJS entry reliably exposes createJiti across all layouts.
18
+ const require = createRequire(import.meta.url)
19
+ const { createJiti } = require('jiti')
13
20
 
14
21
  import { log } from '../../../utils/index.mjs'
15
22
  import { convertCorePath } from '../config.mjs'