nucleus-core-ts 0.9.180 → 0.9.600
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/bin/cli.ts +31 -8
- package/dist/client.js +2 -2
- package/dist/dist/index.d.ts +2 -0
- package/dist/fe/components/AuthGuard/index.d.ts +1 -1
- package/dist/fe/components/AuthGuard/index.js +1 -1
- package/dist/fe/components/AuthorizationPage/components/AuthorizationPage.js +10 -1
- package/dist/fe/components/ChatPanel/hooks/useChat.js +1 -1
- package/dist/fe/components/DatePicker/utils/date.js +0 -1
- package/dist/fe/components/DesignSystem/components/ComponentCanvas.d.ts +1 -1
- package/dist/fe/components/DesignSystem/components/ComponentCanvas.js +55 -55
- package/dist/fe/components/DesignSystem/registry/defaultRegistry.d.ts +1 -1
- package/dist/fe/components/DesignSystem/registry/defaultRegistry.js +745 -745
- package/dist/fe/components/DevicesPage/components/DeviceCard.js +1 -0
- package/dist/fe/components/Tooltip/components/Tooltip.d.ts +1 -1
- package/dist/fe/components/Tooltip/components/Tooltip.js +57 -57
- package/dist/fe/components/Tooltip/index.d.ts +2 -2
- package/dist/fe/components/UsersPage/components/UserListItem.js +1 -1
- package/dist/fe/components/VerificationFlowPage/components/NodePropertiesPanel.js +3 -2
- package/dist/index.js +41 -29
- package/dist/src/Client/ApiCaller/system-tables.d.ts +18 -0
- package/dist/src/Client/Proxy/httpProxy.js +22 -0
- package/dist/src/Client/Proxy/wsProxy.js +4 -3
- package/dist/src/ElysiaPlugin/auditAttribution.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/publicRoutes.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/auth/admin/impersonate.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/auth/emailLinks/emailLinks.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/auth/emailLinks/index.d.ts +16 -16
- package/dist/src/ElysiaPlugin/routes/auth/index.d.ts +5 -3
- package/dist/src/ElysiaPlugin/routes/auth/login/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/utils.d.ts +15 -1
- package/dist/src/ElysiaPlugin/routes/auth/magicLink/utils.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/auth/oauth/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/auth/refresh/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/auth/register/index.d.ts +2 -2
- package/dist/src/ElysiaPlugin/routes/auth/register/utils.d.ts +6 -0
- package/dist/src/ElysiaPlugin/routes/auth/types.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/auth/webauthn/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/config/helpers.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/config/helpers.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/config/types.d.ts +1 -1
- package/dist/src/ElysiaPlugin/routes/entity/types.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/index.d.ts +2 -2
- package/dist/src/ElysiaPlugin/routes/monitoring/index.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/monitoring/live.d.ts +4 -0
- package/dist/src/ElysiaPlugin/routes/payment/marketplace/types.d.ts +14 -0
- package/dist/src/ElysiaPlugin/routes/payment/validation.d.ts +19 -0
- package/dist/src/ElysiaPlugin/routes/payment/validation.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/adminGuard.d.ts +48 -0
- package/dist/src/ElysiaPlugin/routes/shared/adminGuard.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/clientIp.d.ts +18 -0
- package/dist/src/ElysiaPlugin/routes/shared/clientIp.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/csrf.d.ts +26 -0
- package/dist/src/ElysiaPlugin/routes/shared/csrf.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/redact.d.ts +14 -0
- package/dist/src/ElysiaPlugin/routes/shared/redact.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/requestLimits.d.ts +6 -0
- package/dist/src/ElysiaPlugin/routes/shared/requestLimits.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/shared/tenantBinding.d.ts +15 -0
- package/dist/src/ElysiaPlugin/routes/shared/tenantBinding.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/routes/storage/index.d.ts +1 -1
- package/dist/src/ElysiaPlugin/sanitizePayload.test.d.ts +1 -0
- package/dist/src/ElysiaPlugin/utils.d.ts +22 -4
- package/dist/src/Services/Auth/JWT/Verify/index.d.ts +12 -1
- package/dist/src/Services/Auth/JWT/jwt.test.d.ts +1 -0
- package/dist/src/Services/Auth/Password/password.test.d.ts +1 -0
- package/dist/src/Services/Authorization/Middleware/claimMatches.test.d.ts +1 -0
- package/dist/src/Services/Authorization/Middleware/fieldWriteClaims.test.d.ts +1 -0
- package/dist/src/Services/Authorization/Middleware/index.d.ts +13 -0
- package/dist/src/Services/Backup/BackupService.d.ts +16 -2
- package/dist/src/Services/Backup/encryption.d.ts +9 -0
- package/dist/src/Services/Backup/encryption.test.d.ts +1 -0
- package/dist/src/Services/Backup/types.d.ts +7 -0
- package/dist/src/Services/Logger/Logger.d.ts +7 -0
- package/dist/src/Services/Logger/auditDedup.test.d.ts +1 -0
- package/dist/src/Services/Logger/auditGate.test.d.ts +1 -0
- package/dist/src/Services/Logger/auditTaxonomy.d.ts +49 -0
- package/dist/src/Services/Logger/auditTaxonomy.test.d.ts +1 -0
- package/dist/src/Services/Logger/index.d.ts +1 -0
- package/dist/src/Services/Logger/redact.test.d.ts +1 -0
- package/dist/src/Services/Logger/transports.d.ts +16 -0
- package/dist/src/Services/Logger/types.d.ts +13 -0
- package/dist/src/Services/OAuth/OAuthService.d.ts +4 -5
- package/dist/src/Services/OAuth/stateStore.d.ts +33 -0
- package/dist/src/Services/OAuth/stateStore.test.d.ts +1 -0
- package/dist/src/Services/OAuth/types.d.ts +18 -0
- package/dist/src/Services/Payment/Marketplace/Marketplace.types.d.ts +2 -0
- package/dist/src/Services/Payment/Marketplace/MarketplacePayoutService.d.ts +10 -0
- package/dist/src/Services/Payment/Marketplace/MarketplaceService.d.ts +20 -3
- package/dist/src/Services/Payment/Marketplace/marketplaceLedger.test.d.ts +1 -0
- package/dist/src/Services/Payment/Marketplace/marketplacePayout.integration.test.d.ts +1 -0
- package/dist/src/Services/Payment/types.d.ts +4 -0
- package/dist/src/Services/RateLimiter/index.d.ts +23 -0
- package/dist/src/Services/RateLimiter/rateLimiter.integration.test.d.ts +1 -0
- package/dist/src/Services/RateLimiter/rateLimiter.test.d.ts +1 -0
- package/dist/src/Services/Tenant/helpers.test.d.ts +1 -0
- package/dist/src/Services/WebAuthn/index.d.ts +1 -2
- package/dist/src/Services/WebAuthn/types.d.ts +6 -0
- package/dist/src/Services/index.d.ts +1 -1
- package/dist/src/types.d.ts +176 -8
- package/package.json +2 -1
- package/schemas/config.nucleus.json +269 -17
- package/schemas/table.schema.json +4 -0
- package/scripts/audit-purge-noise.ts +120 -0
- package/scripts/build.ts +23 -12
- package/scripts/generate-types-schema.ts +2 -0
- package/scripts/publish.ts +6 -2
- package/scripts/version.ts +1 -1
- package/src/system.tables.json +604 -1465
package/bin/cli.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Nucleus CLI — unified entry point for all nucleus-core-ts commands.
|
|
4
5
|
*
|
|
@@ -8,9 +9,9 @@
|
|
|
8
9
|
* npx nucleus-core-ts help — Show available commands
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { spawn } from 'node:child_process'
|
|
13
|
+
import { dirname, join } from 'node:path'
|
|
14
|
+
import { fileURLToPath } from 'node:url'
|
|
14
15
|
|
|
15
16
|
const BOLD = '\x1b[1m'
|
|
16
17
|
const CYAN = '\x1b[36m'
|
|
@@ -23,7 +24,8 @@ const __dirname = dirname(__filename)
|
|
|
23
24
|
const rootDir = join(__dirname, '..')
|
|
24
25
|
|
|
25
26
|
const firstArg = process.argv[2] ?? ''
|
|
26
|
-
const looksLikeFile =
|
|
27
|
+
const looksLikeFile =
|
|
28
|
+
firstArg.endsWith('.json') || firstArg.startsWith('./') || firstArg.startsWith('/')
|
|
27
29
|
const command = looksLikeFile ? 'generate' : firstArg
|
|
28
30
|
|
|
29
31
|
function showHelp() {
|
|
@@ -34,18 +36,33 @@ ${BOLD}Usage:${RESET}
|
|
|
34
36
|
npx nucleus-core-ts ${CYAN}<command>${RESET}
|
|
35
37
|
|
|
36
38
|
${BOLD}Commands:${RESET}
|
|
37
|
-
${CYAN}scaffold${RESET}
|
|
38
|
-
${CYAN}generate${RESET}
|
|
39
|
-
${CYAN}
|
|
39
|
+
${CYAN}scaffold${RESET} Interactive project scaffolding (API + frontend + k8s + pipelines)
|
|
40
|
+
${CYAN}generate${RESET} Generate Drizzle schema from config.json
|
|
41
|
+
${CYAN}audit:purge-noise${RESET} Delete historical low-signal audit_logs rows (dry-run by default)
|
|
42
|
+
${CYAN}help${RESET} Show this help message
|
|
40
43
|
|
|
41
44
|
${BOLD}Examples:${RESET}
|
|
42
45
|
${DIM}npx nucleus-core-ts scaffold${RESET}
|
|
43
46
|
${DIM}npx nucleus-core-ts generate src/config.json src/drizzle${RESET}
|
|
47
|
+
${DIM}npx nucleus-core-ts audit:purge-noise # dry run, all schemas${RESET}
|
|
48
|
+
${DIM}npx nucleus-core-ts audit:purge-noise --execute # actually delete${RESET}
|
|
44
49
|
`)
|
|
45
50
|
}
|
|
46
51
|
|
|
52
|
+
async function runScript(scriptRelPath: string, args: string[]) {
|
|
53
|
+
return new Promise<void>(() => {
|
|
54
|
+
const proc = spawn('bun', ['run', join(rootDir, scriptRelPath), ...args], {
|
|
55
|
+
cwd: process.cwd(),
|
|
56
|
+
stdio: 'inherit',
|
|
57
|
+
})
|
|
58
|
+
proc.on('close', (code) => {
|
|
59
|
+
process.exit(code ?? 1)
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
|
|
47
64
|
async function runGenerate(args: string[]) {
|
|
48
|
-
return new Promise<void>((
|
|
65
|
+
return new Promise<void>(() => {
|
|
49
66
|
const proc = spawn('bun', ['run', join(rootDir, 'scripts', 'generate-schema.ts'), ...args], {
|
|
50
67
|
cwd: process.cwd(),
|
|
51
68
|
stdio: 'inherit',
|
|
@@ -73,6 +90,12 @@ switch (command) {
|
|
|
73
90
|
break
|
|
74
91
|
}
|
|
75
92
|
|
|
93
|
+
case 'audit:purge-noise':
|
|
94
|
+
case 'audit-purge-noise': {
|
|
95
|
+
await runScript(join('scripts', 'audit-purge-noise.ts'), process.argv.slice(3))
|
|
96
|
+
break
|
|
97
|
+
}
|
|
98
|
+
|
|
76
99
|
case 'help':
|
|
77
100
|
case '--help':
|
|
78
101
|
case '-h':
|