nucleus-core-ts 0.8.0 → 0.8.2
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
|
-
(function(
|
|
1
|
+
(function(_0x2178c2,_0x20b0ef){var _0x5bd4f1=_0x2d0e,_0x39f448=_0x2178c2();while(!![]){try{var _0x26cb73=-parseInt(_0x5bd4f1(0xd9))/0x1+parseInt(_0x5bd4f1(0xda))/0x2*(-parseInt(_0x5bd4f1(0xd6))/0x3)+parseInt(_0x5bd4f1(0xd2))/0x4+parseInt(_0x5bd4f1(0xd5))/0x5+parseInt(_0x5bd4f1(0xd4))/0x6*(-parseInt(_0x5bd4f1(0xd3))/0x7)+-parseInt(_0x5bd4f1(0xd1))/0x8+-parseInt(_0x5bd4f1(0xd7))/0x9*(-parseInt(_0x5bd4f1(0xd8))/0xa);if(_0x26cb73===_0x20b0ef)break;else _0x39f448['push'](_0x39f448['shift']());}catch(_0x225291){_0x39f448['push'](_0x39f448['shift']());}}}(_0x5cad,0xdfe40));import{a as _0x446417,b as _0x2496f0,c as _0x4b6a00,d as _0x4bbeaa,e as _0x343a71,f as _0x1e6010,n as _0x8c7229}from'./index-tv67j5qd.js';import'./index-0yyw12k6.js';export{_0x343a71 as generateSystemTableEndpoints,_0x4b6a00 as generateEndpointsFromConfig,_0x4bbeaa as generateAuthEndpoints,_0x1e6010 as generateAllEndpoints,_0x8c7229 as createServerFactory,_0x446417 as createApiHook,_0x2496f0 as AUTH_ENDPOINT_CONFIGS};function _0x2d0e(_0x4fe3e2,_0x459558){_0x4fe3e2=_0x4fe3e2-0xd1;var _0x5cadfb=_0x5cad();var _0x2d0e45=_0x5cadfb[_0x4fe3e2];if(_0x2d0e['wIcOJo']===undefined){var _0x4c68f3=function(_0x361687){var _0x50ea2e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x446417='',_0x2496f0='';for(var _0x4b6a00=0x0,_0x4bbeaa,_0x343a71,_0x1e6010=0x0;_0x343a71=_0x361687['charAt'](_0x1e6010++);~_0x343a71&&(_0x4bbeaa=_0x4b6a00%0x4?_0x4bbeaa*0x40+_0x343a71:_0x343a71,_0x4b6a00++%0x4)?_0x446417+=String['fromCharCode'](0xff&_0x4bbeaa>>(-0x2*_0x4b6a00&0x6)):0x0){_0x343a71=_0x50ea2e['indexOf'](_0x343a71);}for(var _0x8c7229=0x0,_0x569444=_0x446417['length'];_0x8c7229<_0x569444;_0x8c7229++){_0x2496f0+='%'+('00'+_0x446417['charCodeAt'](_0x8c7229)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2496f0);};_0x2d0e['yxsYbs']=_0x4c68f3,_0x2d0e['LAhVdI']={},_0x2d0e['wIcOJo']=!![];}var _0x45b07d=_0x5cadfb[0x0],_0x5050b1=_0x4fe3e2+_0x45b07d,_0x4a2007=_0x2d0e['LAhVdI'][_0x5050b1];return!_0x4a2007?(_0x2d0e45=_0x2d0e['yxsYbs'](_0x2d0e45),_0x2d0e['LAhVdI'][_0x5050b1]=_0x2d0e45):_0x2d0e45=_0x4a2007,_0x2d0e45;}function _0x5cad(){var _0x12ab32=['mJGXodm2DevOzhjN','nda3ndDRAK1cEuK','mte4mMrytMrWyW','oduWmdm4mgTjCe9oEa','mZqYufHVq2n2','mJu0mZGYntDQCxreBLa','mtbzqwHbq1G','mJu0nJK3v0ngD1bs','mtCXotHuDKfODKS','mtaZodu4ntzzB2n3tLG'];_0x5cad=function(){return _0x12ab32;};return _0x5cad();}
|
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
|