@nextsparkjs/core 0.1.0-beta.26 → 0.1.0-beta.28
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/components/docs/docs-sidebar.d.ts +6 -0
- package/dist/components/docs/docs-sidebar.d.ts.map +1 -1
- package/dist/components/docs/docs-sidebar.js +86 -264
- package/dist/components/docs/index.d.ts +1 -0
- package/dist/components/docs/index.d.ts.map +1 -1
- package/dist/components/docs/index.js +3 -1
- package/dist/components/docs/superadmin-docs-sidebar.d.ts +7 -0
- package/dist/components/docs/superadmin-docs-sidebar.d.ts.map +1 -0
- package/dist/components/docs/superadmin-docs-sidebar.js +122 -0
- package/dist/components/superadmin/layouts/SuperadminSidebar.d.ts.map +1 -1
- package/dist/components/superadmin/layouts/SuperadminSidebar.js +9 -1
- package/dist/lib/config/types.d.ts +14 -19
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/styles/classes.json +2 -3
- package/dist/styles/ui.css +1 -1
- package/dist/templates/contents/themes/starter/config/app.config.ts +14 -11
- package/dist/templates/contents/themes/starter/docs/superadmin/01-setup/01-configuration.md +31 -0
- package/dist/templates/contents/themes/starter/tests/cypress.config.ts +5 -5
- package/dist/templates/contents/themes/starter/tests/jest/jest.config.cjs +2 -1
- package/dist/templates/contents/themes/starter/tests/jest/tsconfig.jest.json +8 -0
- package/dist/templates/scripts/cy-tags.cjs +83 -0
- package/dist/types/docs.d.ts +11 -6
- package/dist/types/docs.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/build/docs-registry.mjs +59 -135
- package/templates/contents/themes/starter/config/app.config.ts +14 -11
- package/templates/contents/themes/starter/docs/superadmin/01-setup/01-configuration.md +31 -0
- package/templates/contents/themes/starter/tests/cypress.config.ts +5 -5
- package/templates/contents/themes/starter/tests/jest/jest.config.cjs +2 -1
- package/templates/contents/themes/starter/tests/jest/tsconfig.jest.json +8 -0
- package/templates/scripts/cy-tags.cjs +83 -0
- /package/dist/templates/contents/themes/starter/docs/{01-overview → public/01-overview}/01-introduction.md +0 -0
- /package/dist/templates/contents/themes/starter/docs/{01-overview → public/01-overview}/02-customization.md +0 -0
- /package/templates/contents/themes/starter/docs/{01-overview → public/01-overview}/01-introduction.md +0 -0
- /package/templates/contents/themes/starter/docs/{01-overview → public/01-overview}/02-customization.md +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Cypress Tags Runner
|
|
4
|
+
*
|
|
5
|
+
* A wrapper script that converts --tags to --env grepTags for @cypress/grep
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* pnpm cy:tags "@smoke" # Run tests with @smoke tag
|
|
9
|
+
* pnpm cy:tags "@P0+@auth" # Run tests with @P0 AND @auth tags
|
|
10
|
+
* pnpm cy:tags "@smoke @auth" # Run tests with @smoke OR @auth tags
|
|
11
|
+
* pnpm cy:tags "-@slow" # Exclude tests with @slow tag
|
|
12
|
+
* pnpm cy:tags "@smoke" --headed # Run with browser visible
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const { spawnSync } = require('child_process')
|
|
16
|
+
const path = require('path')
|
|
17
|
+
const fs = require('fs')
|
|
18
|
+
|
|
19
|
+
// Get arguments after script name
|
|
20
|
+
const args = process.argv.slice(2)
|
|
21
|
+
|
|
22
|
+
// First argument is the tag(s), rest are additional cypress args
|
|
23
|
+
const tags = args[0] || ''
|
|
24
|
+
const extraArgs = args.slice(1)
|
|
25
|
+
|
|
26
|
+
// Find the active theme's cypress config
|
|
27
|
+
function findCypressConfig() {
|
|
28
|
+
const contentsDir = path.join(process.cwd(), 'contents', 'themes')
|
|
29
|
+
|
|
30
|
+
if (!fs.existsSync(contentsDir)) {
|
|
31
|
+
console.error('Error: contents/themes directory not found')
|
|
32
|
+
process.exit(1)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const themes = fs.readdirSync(contentsDir).filter((name) => {
|
|
36
|
+
const themePath = path.join(contentsDir, name)
|
|
37
|
+
return fs.statSync(themePath).isDirectory()
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
// Check NEXT_PUBLIC_ACTIVE_THEME env var first
|
|
41
|
+
const activeTheme = process.env.NEXT_PUBLIC_ACTIVE_THEME
|
|
42
|
+
|
|
43
|
+
if (activeTheme && themes.includes(activeTheme)) {
|
|
44
|
+
const configPath = path.join(contentsDir, activeTheme, 'tests', 'cypress.config.ts')
|
|
45
|
+
if (fs.existsSync(configPath)) {
|
|
46
|
+
return configPath
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Otherwise use the first theme found
|
|
51
|
+
for (const theme of themes) {
|
|
52
|
+
const configPath = path.join(contentsDir, theme, 'tests', 'cypress.config.ts')
|
|
53
|
+
if (fs.existsSync(configPath)) {
|
|
54
|
+
return configPath
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.error('Error: No cypress.config.ts found in any theme')
|
|
59
|
+
process.exit(1)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const configFile = findCypressConfig()
|
|
63
|
+
|
|
64
|
+
// Build cypress arguments
|
|
65
|
+
const cypressArgs = ['cypress', 'run', '--config-file', configFile]
|
|
66
|
+
|
|
67
|
+
if (tags) {
|
|
68
|
+
cypressArgs.push('--env', `grepTags=${tags}`)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Add any extra arguments
|
|
72
|
+
cypressArgs.push(...extraArgs)
|
|
73
|
+
|
|
74
|
+
console.log(`Running: npx ${cypressArgs.join(' ')}`)
|
|
75
|
+
|
|
76
|
+
// Execute cypress
|
|
77
|
+
const result = spawnSync('npx', cypressArgs, {
|
|
78
|
+
stdio: 'inherit',
|
|
79
|
+
shell: true,
|
|
80
|
+
cwd: process.cwd(),
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
process.exit(result.status || 0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|