nucleus-core-ts 0.8.0 → 0.8.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.
- package/README.md +84 -14
- package/dist/client.js +1 -1
- package/dist/dist/index.d.ts +3 -3
- package/dist/fe/index.js +1 -1
- package/dist/index-0yyw12k6.js +1 -1
- package/dist/index-tv67j5qd.js +1 -1
- package/dist/index.js +1 -1
- package/dist/infra/scripts/nucleus-init.d.ts +3 -0
- package/dist/infra/templates/backend/src/index.d.ts +2 -0
- package/dist/infra/templates/frontend/app/change-password/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/devices/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/forgot-password/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/layout.d.ts +7 -0
- package/dist/infra/templates/frontend/app/login/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/profile/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/register/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/reset-password/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/set-password/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/verify-email/page.d.ts +2 -0
- package/dist/infra/templates/frontend/app/verify-magic-link/page.d.ts +2 -0
- package/dist/infra/templates/frontend/lib/api/endpoints.d.ts +10 -0
- package/dist/infra/templates/frontend/lib/api/factory.d.ts +2 -0
- package/dist/infra/templates/frontend/lib/api/hook.d.ts +4 -0
- package/dist/infra/templates/frontend/next.config.d.ts +4 -0
- package/dist/infra/templates/frontend/postcss.config.d.mts +7 -0
- package/dist/infra/templates/frontend/server.d.ts +4 -0
- package/dist/src/Client/Proxy/index.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/package.json +2 -2
- package/schemas/config.nucleus.json +1027 -1009
- package/schemas/nucleus.tables.schema.json +20 -18
- package/schemas/table.schema.json +529 -497
package/README.md
CHANGED
|
@@ -134,33 +134,103 @@ import { ... } from "nucleus-core-ts/proxy";
|
|
|
134
134
|
|
|
135
135
|
## Configuration
|
|
136
136
|
|
|
137
|
-
Create a `nucleus.
|
|
137
|
+
Create a `config.nucleus.json` in your project root:
|
|
138
138
|
|
|
139
139
|
```json
|
|
140
140
|
{
|
|
141
|
+
"$schema": "node_modules/nucleus-core-ts/schemas/config.nucleus.json",
|
|
142
|
+
"appId": "my-app",
|
|
143
|
+
"mode": "development",
|
|
144
|
+
|
|
141
145
|
"database": {
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"password": "secret"
|
|
146
|
+
"url": "DATABASE_URL",
|
|
147
|
+
"type": "postgres",
|
|
148
|
+
"isMultiTenant": false,
|
|
149
|
+
"schemas": ["main"]
|
|
147
150
|
},
|
|
151
|
+
|
|
148
152
|
"redis": {
|
|
149
|
-
"
|
|
150
|
-
"port": 6379
|
|
153
|
+
"url": "REDIS_URL"
|
|
151
154
|
},
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
"
|
|
155
|
+
|
|
156
|
+
"authentication": {
|
|
157
|
+
"enabled": true,
|
|
158
|
+
"accessToken": {
|
|
159
|
+
"secret": "JWT_SECRET",
|
|
160
|
+
"expiresIn": "15m",
|
|
161
|
+
"algorithm": "HS256"
|
|
162
|
+
},
|
|
163
|
+
"refreshToken": {
|
|
164
|
+
"secret": "JWT_REFRESH_SECRET",
|
|
165
|
+
"expiresIn": "7d"
|
|
166
|
+
},
|
|
167
|
+
"login": { "enabled": true },
|
|
168
|
+
"register": { "enabled": true },
|
|
169
|
+
"logout": { "enabled": true },
|
|
170
|
+
"sessions": {
|
|
171
|
+
"enabled": true,
|
|
172
|
+
"maxActiveSessions": 5,
|
|
173
|
+
"allowMultipleDevices": true
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
"authorization": {
|
|
178
|
+
"enabled": true,
|
|
179
|
+
"autoSeedClaims": true,
|
|
180
|
+
"godminEmail": "admin@example.com"
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
"rateLimit": {
|
|
184
|
+
"enabled": true,
|
|
185
|
+
"strategy": "sliding-window",
|
|
186
|
+
"authRoutes": {
|
|
187
|
+
"login": { "window": "1m", "max": 5 },
|
|
188
|
+
"register": { "window": "1h", "max": 10 }
|
|
189
|
+
}
|
|
156
190
|
},
|
|
191
|
+
|
|
157
192
|
"monitoring": {
|
|
158
193
|
"enabled": true,
|
|
159
|
-
"
|
|
160
|
-
|
|
194
|
+
"system": {
|
|
195
|
+
"enabled": true,
|
|
196
|
+
"collectInterval": "30s",
|
|
197
|
+
"metrics": { "cpu": true, "memory": true, "disk": true }
|
|
198
|
+
},
|
|
199
|
+
"alerts": {
|
|
200
|
+
"enabled": true,
|
|
201
|
+
"thresholds": {
|
|
202
|
+
"cpuPercent": 80,
|
|
203
|
+
"memoryPercent": 85
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
"storage": {
|
|
209
|
+
"enabled": true,
|
|
210
|
+
"basePath": "./uploads",
|
|
211
|
+
"maxFileSizeBytes": 10485760,
|
|
212
|
+
"cdn": { "enabled": true }
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
"entities": []
|
|
161
216
|
}
|
|
162
217
|
```
|
|
163
218
|
|
|
219
|
+
### Config Options
|
|
220
|
+
|
|
221
|
+
| Section | Description |
|
|
222
|
+
|---------|-------------|
|
|
223
|
+
| **database** | PostgreSQL connection, multi-tenant support |
|
|
224
|
+
| **redis** | Redis connection, Dapr integration |
|
|
225
|
+
| **authentication** | JWT tokens, sessions, login/register/logout routes |
|
|
226
|
+
| **authorization** | Role-based access, auto claim generation |
|
|
227
|
+
| **rateLimit** | Request throttling per route/user/IP |
|
|
228
|
+
| **monitoring** | System metrics, alerts, streaming endpoints |
|
|
229
|
+
| **storage** | File uploads, CDN serving |
|
|
230
|
+
| **notification** | Email & platform notifications |
|
|
231
|
+
| **verification** | Approval workflows with signatures |
|
|
232
|
+
| **audit** | Action logging per operation type |
|
|
233
|
+
|
|
164
234
|
## License
|
|
165
235
|
|
|
166
236
|
This is proprietary software. See [LICENSE](./LICENSE) for details.
|
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0xc32b(_0x4c6beb,_0x1ad2cd){_0x4c6beb=_0x4c6beb-0xcc;var _0x51a6dd=_0x51a6();var _0xc32bc3=_0x51a6dd[_0x4c6beb];if(_0xc32b['MndKJl']===undefined){var _0x5c14d2=function(_0x2753a6){var _0x2a5748='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1a09df='',_0xdf14d8='';for(var _0x36f63d=0x0,_0x4faec1,_0x19d418,_0x585919=0x0;_0x19d418=_0x2753a6['charAt'](_0x585919++);~_0x19d418&&(_0x4faec1=_0x36f63d%0x4?_0x4faec1*0x40+_0x19d418:_0x19d418,_0x36f63d++%0x4)?_0x1a09df+=String['fromCharCode'](0xff&_0x4faec1>>(-0x2*_0x36f63d&0x6)):0x0){_0x19d418=_0x2a5748['indexOf'](_0x19d418);}for(var _0x12107e=0x0,_0x5bf707=_0x1a09df['length'];_0x12107e<_0x5bf707;_0x12107e++){_0xdf14d8+='%'+('00'+_0x1a09df['charCodeAt'](_0x12107e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xdf14d8);};_0xc32b['tjcdxC']=_0x5c14d2,_0xc32b['dfKkmn']={},_0xc32b['MndKJl']=!![];}var _0x37e39f=_0x51a6dd[0x0],_0x494649=_0x4c6beb+_0x37e39f,_0x3c2dcb=_0xc32b['dfKkmn'][_0x494649];return!_0x3c2dcb?(_0xc32bc3=_0xc32b['tjcdxC'](_0xc32bc3),_0xc32b['dfKkmn'][_0x494649]=_0xc32bc3):_0xc32bc3=_0x3c2dcb,_0xc32bc3;}(function(_0x5f1cfe,_0x360f9a){var _0x23a582=_0xc32b,_0x1c9408=_0x5f1cfe();while(!![]){try{var _0xbb6539=-parseInt(_0x23a582(0xd6))/0x1*(parseInt(_0x23a582(0xcc))/0x2)+-parseInt(_0x23a582(0xd5))/0x3+-parseInt(_0x23a582(0xcd))/0x4*(parseInt(_0x23a582(0xd0))/0x5)+-parseInt(_0x23a582(0xd3))/0x6*(-parseInt(_0x23a582(0xd2))/0x7)+-parseInt(_0x23a582(0xcf))/0x8+parseInt(_0x23a582(0xd4))/0x9*(-parseInt(_0x23a582(0xd1))/0xa)+parseInt(_0x23a582(0xce))/0xb;if(_0xbb6539===_0x360f9a)break;else _0x1c9408['push'](_0x1c9408['shift']());}catch(_0x448b02){_0x1c9408['push'](_0x1c9408['shift']());}}}(_0x51a6,0xec4d0));import{a as _0x1a09df,b as _0xdf14d8,c as _0x36f63d,d as _0x4faec1,e as _0x19d418,f as _0x585919,n as _0x12107e}from'./index-tv67j5qd.js';function _0x51a6(){var _0x422fdf=['ntK0ote2mtLzDfL1vhi','mJu1mdy4mhbXAKPSwq','mZq1wK14tvLy','mJbZD1nNAKi','mZvuuhH5tNC','nJKYodq0Eej2rfby','ody5ndi0m1nvv0XcyW','mJi1mtaWnwvjuNnTsG','ntKZnJy5EfvxufbH','mMvvC2DOAq','odi0odHHuMnezxm'];_0x51a6=function(){return _0x422fdf;};return _0x51a6();}import'./index-0yyw12k6.js';export{_0x19d418 as generateSystemTableEndpoints,_0x36f63d as generateEndpointsFromConfig,_0x4faec1 as generateAuthEndpoints,_0x585919 as generateAllEndpoints,_0x12107e as createServerFactory,_0x1a09df as createApiHook,_0xdf14d8 as AUTH_ENDPOINT_CONFIGS};
|
package/dist/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { m as xm } from "./index-tv67j5qd.js";
|
|
2
|
-
import { e as
|
|
2
|
+
import { e as uO } from "./index-tv67j5qd.js";
|
|
3
3
|
import { c as RO } from "./index-tv67j5qd.js";
|
|
4
4
|
import { d as kO } from "./index-tv67j5qd.js";
|
|
5
5
|
import { f as MO } from "./index-tv67j5qd.js";
|
|
6
|
-
import { n as
|
|
6
|
+
import { n as eO } from "./index-tv67j5qd.js";
|
|
7
7
|
import { a as $O } from "./index-tv67j5qd.js";
|
|
8
8
|
import { l as Cm } from "./index-tv67j5qd.js";
|
|
9
9
|
declare function o9(r: any): Promise<Td<"", {
|
|
@@ -36,5 +36,5 @@ declare function o9(r: any): Promise<Td<"", {
|
|
|
36
36
|
}>>;
|
|
37
37
|
import { b as AO } from "./index-tv67j5qd.js";
|
|
38
38
|
import Td from "elysia";
|
|
39
|
-
export { xm as serverFetch,
|
|
39
|
+
export { xm as serverFetch, uO as generateSystemTableEndpoints, RO as generateEndpointsFromConfig, kO as generateAuthEndpoints, MO as generateAllEndpoints, eO as createServerFactory, $O as createApiHook, Cm as ServerFetch, o9 as NucleusElysiaPlugin, AO as AUTH_ENDPOINT_CONFIGS };
|
|
40
40
|
//# sourceMappingURL=index.d.ts.map
|