alepha 0.15.2 → 0.15.4
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 +68 -80
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +8 -0
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.d.ts +170 -170
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +1 -0
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +3 -0
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js +1 -0
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.js +1 -0
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +260 -260
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +10 -0
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/users/index.d.ts +12 -1
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +18 -2
- package/dist/api/users/index.js.map +1 -1
- package/dist/batch/index.d.ts +4 -4
- package/dist/bucket/index.d.ts +8 -0
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +7 -2
- package/dist/bucket/index.js.map +1 -1
- package/dist/cli/index.d.ts +196 -74
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +234 -50
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +10 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +67 -13
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +28 -21
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +28 -21
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +28 -21
- package/dist/core/index.native.js.map +1 -1
- package/dist/email/index.d.ts +21 -13
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +10561 -4
- package/dist/email/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +6 -1
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js +9 -1
- package/dist/lock/core/index.js.map +1 -1
- package/dist/mcp/index.d.ts +5 -5
- package/dist/orm/index.bun.js +32 -16
- package/dist/orm/index.bun.js.map +1 -1
- package/dist/orm/index.d.ts +4 -1
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +34 -22
- package/dist/orm/index.js.map +1 -1
- package/dist/react/auth/index.browser.js +2 -1
- package/dist/react/auth/index.browser.js.map +1 -1
- package/dist/react/auth/index.js +2 -1
- package/dist/react/auth/index.js.map +1 -1
- package/dist/react/core/index.d.ts +3 -3
- package/dist/react/router/index.browser.js +9 -15
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +305 -407
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +581 -781
- package/dist/react/router/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +13 -1
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +42 -4
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +42 -42
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +8 -7
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +167 -167
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +1 -0
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/health/index.d.ts +17 -17
- package/dist/server/links/index.d.ts +39 -39
- package/dist/server/links/index.js +1 -1
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/static/index.js +7 -2
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +8 -0
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +7 -2
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +8 -0
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +7 -2
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js +734 -12
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +8 -0
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +7 -2
- package/dist/system/index.js.map +1 -1
- package/dist/vite/index.d.ts +3 -2
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +42 -8
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.d.ts +34 -34
- package/dist/websocket/index.d.ts.map +1 -1
- package/package.json +9 -4
- package/src/api/audits/controllers/AdminAuditController.ts +8 -0
- package/src/api/files/controllers/AdminFileStatsController.ts +1 -0
- package/src/api/jobs/controllers/AdminJobController.ts +3 -0
- package/src/api/logs/TODO.md +13 -10
- package/src/api/notifications/controllers/AdminNotificationController.ts +1 -0
- package/src/api/parameters/controllers/AdminConfigController.ts +10 -0
- package/src/api/users/controllers/AdminIdentityController.ts +3 -0
- package/src/api/users/controllers/AdminSessionController.ts +3 -0
- package/src/api/users/controllers/AdminUserController.ts +5 -0
- package/src/cli/apps/AlephaPackageBuilderCli.ts +9 -0
- package/src/cli/atoms/buildOptions.ts +99 -9
- package/src/cli/commands/build.ts +150 -32
- package/src/cli/commands/db.ts +5 -7
- package/src/cli/commands/init.spec.ts +50 -6
- package/src/cli/commands/init.ts +28 -5
- package/src/cli/providers/ViteDevServerProvider.ts +31 -9
- package/src/cli/services/AlephaCliUtils.ts +16 -0
- package/src/cli/services/PackageManagerUtils.ts +2 -0
- package/src/cli/services/ProjectScaffolder.spec.ts +97 -0
- package/src/cli/services/ProjectScaffolder.ts +28 -6
- package/src/cli/templates/agentMd.ts +6 -1
- package/src/cli/templates/apiAppSecurityTs.ts +11 -0
- package/src/cli/templates/apiIndexTs.ts +18 -4
- package/src/cli/templates/webAppRouterTs.ts +25 -1
- package/src/cli/templates/webHelloComponentTsx.ts +15 -5
- package/src/command/helpers/Runner.spec.ts +135 -0
- package/src/command/helpers/Runner.ts +4 -1
- package/src/command/providers/CliProvider.spec.ts +325 -0
- package/src/command/providers/CliProvider.ts +117 -7
- package/src/core/Alepha.ts +32 -25
- package/src/email/index.workerd.ts +36 -0
- package/src/email/providers/WorkermailerEmailProvider.ts +221 -0
- package/src/lock/core/primitives/$lock.ts +13 -1
- package/src/orm/index.bun.ts +1 -1
- package/src/orm/index.ts +2 -6
- package/src/orm/providers/drivers/BunSqliteProvider.ts +4 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +57 -30
- package/src/orm/providers/drivers/DatabaseProvider.ts +9 -1
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +4 -1
- package/src/react/auth/services/ReactAuth.ts +3 -1
- package/src/react/router/atoms/ssrManifestAtom.ts +7 -0
- package/src/react/router/hooks/useActive.ts +1 -1
- package/src/react/router/hooks/useRouter.ts +1 -1
- package/src/react/router/index.ts +4 -0
- package/src/react/router/primitives/$page.browser.spec.tsx +24 -24
- package/src/react/router/primitives/$page.spec.tsx +0 -32
- package/src/react/router/primitives/$page.ts +6 -14
- package/src/react/router/providers/ReactBrowserProvider.ts +6 -3
- package/src/react/router/providers/ReactPageProvider.ts +1 -1
- package/src/react/router/providers/ReactPreloadProvider.spec.ts +142 -0
- package/src/react/router/providers/ReactPreloadProvider.ts +85 -0
- package/src/react/router/providers/ReactServerProvider.ts +21 -82
- package/src/react/router/providers/ReactServerTemplateProvider.spec.ts +210 -0
- package/src/react/router/providers/ReactServerTemplateProvider.ts +228 -665
- package/src/react/router/providers/SSRManifestProvider.ts +7 -0
- package/src/react/router/services/ReactRouter.ts +13 -13
- package/src/scheduler/index.workerd.ts +43 -0
- package/src/scheduler/providers/CronProvider.ts +53 -6
- package/src/scheduler/providers/WorkerdCronProvider.ts +102 -0
- package/src/security/__tests__/ServerSecurityProvider.spec.ts +77 -0
- package/src/security/providers/ServerSecurityProvider.ts +30 -22
- package/src/server/compress/providers/ServerCompressProvider.ts +6 -0
- package/src/server/core/providers/NodeHttpServerProvider.spec.ts +9 -3
- package/src/server/links/providers/ServerLinksProvider.spec.ts +332 -0
- package/src/server/links/providers/ServerLinksProvider.ts +1 -1
- package/src/system/index.browser.ts +25 -0
- package/src/system/index.workerd.ts +1 -0
- package/src/system/providers/FileSystemProvider.ts +8 -0
- package/src/system/providers/NodeFileSystemProvider.ts +11 -2
- package/src/vite/tasks/buildServer.ts +2 -12
- package/src/vite/tasks/generateCloudflare.ts +47 -8
- package/src/vite/tasks/generateDocker.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/websocket/errors/WebSocketError.ts","../../src/websocket/primitives/$channel.ts","../../src/websocket/interfaces/WebSocketInterfaces.ts","../../src/websocket/providers/WebSocketServerProvider.ts","../../src/websocket/primitives/$websocket.ts","../../src/websocket/services/RoomManager.ts","../../src/websocket/services/WebSocketClient.ts","../../src/websocket/services/WebSocketTopicService.ts","../../src/websocket/providers/NodeWebSocketServerProvider.ts","../../src/websocket/index.ts"],"mappings":";;;;;;;;;;;cAGa,cAAA,SAAuB,KAAA;EAAA,SAGhB,IAAA;cADhB,OAAA,UACgB,IAAA;AAAA;;AAHpB;;cAaa,wBAAA,SAAiC,cAAA;cAChC,OAAA,UAAiB,IAAA;AAAA;;;;cASlB,wBAAA,SAAiC,cAAA;cAChC,OAAA;AAAA;;;KClBF,SAAA,GAAY,OAAA,GAAU,MAAA;;;;UAKjB,uBAAA,iBACC,SAAA,kBACA,SAAA;;;ADblB;ECkBE,IAAA;;;;EAKA,WAAA;;;;EAKA,MAAA;IDzB+B;AAUjC;;;;ICqBI,MAAA,GAAS,OAAA;;;;;IAMT,EAAA,EAAI,OAAA;IDjBK;;;;ICuBT,GAAA,EAAK,OAAA;EAAA;AAAA;;;;;;AAxCT;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA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CAAmB,OAAA,EAAS,OAAA;EAAA;;cAMlB,kBAAA,iBACK,SAAA,kBACA,SAAA,UACR,SAAA,CAAU,yBAAA,CAA0B,OAAA,EAAS,OAAA;EAAA,mBAClC,uBAAA,EAAuB,uBAAA;EAAA,UAEhC,MAAA,CAAA;EHvBJ;;;;;;;;;;;;;;;;;;;AAwER;;;;;;;;;EGjBe,IAAA,CAAK,OAAA,EAAS,WAAA,CAAY,OAAA,IAAW,OAAA;AAAA;;;;;;;;;cC1FvC,WAAA;EAAA,mBACQ,GAAA,EADG,cAAA,CACA,MAAA;ELNX;;;EAAA,mBKWQ,KAAA,EAAK,GAAA,SAAA,GAAA;ELXU;;;;EAAA,mBKiBf,eAAA,EAAe,GAAA,SAAA,GAAA;ELdH;;AAUjC;EKSS,SAAA,CAAU,YAAA,UAAsB,OAAA;;;;EAShC,QAAA,CAAS,YAAA,UAAsB,MAAA;ELjB1B;;;EKwCL,SAAA,CAAU,YAAA,UAAsB,MAAA;EL/B5B;;;EKwDJ,aAAA,CAAc,YAAA;ELxDuB;;;EK+ErC,kBAAA,CAAmB,MAAA;EL9EC;;;EKsFpB,kBAAA,CAAmB,YAAA;EJxGhB;;;EIgHH,QAAA,CAAS,YAAA,UAAsB,MAAA;EJhHA;AAKxC;;EImHS,WAAA,CAAA;EJlHS;;;EIyHT,mBAAA,CAAA;EJvFA;;;EI8FA,QAAA,CAAA;IACL,UAAA;IACA,gBAAA;IACA,SAAA,EAAW,GAAA;EAAA;AAAA;;;cCtIT,WAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/websocket/errors/WebSocketError.ts","../../src/websocket/primitives/$channel.ts","../../src/websocket/interfaces/WebSocketInterfaces.ts","../../src/websocket/providers/WebSocketServerProvider.ts","../../src/websocket/primitives/$websocket.ts","../../src/websocket/services/RoomManager.ts","../../src/websocket/services/WebSocketClient.ts","../../src/websocket/services/WebSocketTopicService.ts","../../src/websocket/providers/NodeWebSocketServerProvider.ts","../../src/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A,GAAc,cAAA;EAIZ,IAAA,CAAK,OAAA,QAAe,OAAA;EAkBpB,KAAA,CAAM,IAAA,WAAe,MAAA,YAAkB,OAAA;EAIvC,aAAA,CAAc,IAAA,QAAY,OAAA;AAAA;;;;YCpd7B,KAAA;;;;IAIR,mBAAA;MACE,YAAA;MACA,IAAA;IAAA;IThBsB;;;ISsBxB,sBAAA;MACE,YAAA;MACA,IAAA;MACA,IAAA;MACA,MAAA;IAAA;ITvB2B;AAUjC;;ISmBI,mBAAA;MACE,YAAA;MACA,IAAA;MACA,OAAA;IAAA;ITrByB;;;IS2B3B,iBAAA;MACE,YAAA;MACA,IAAA;MACA,KAAA,EAAO,KAAA;IAAA;EAAA;AAAA;;;;ARtCb;;;;;AAKA;;;;;;;;;cQ8Da,eAAA,EAAe,QAAA,CAAA,OAAA,CAkB1B,QAAA,CAlB0B,MAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "alepha",
|
|
3
3
|
"description": "Easy-to-use modern TypeScript framework for building many kind of applications.",
|
|
4
4
|
"author": "Nicolas Foures",
|
|
5
|
-
"version": "0.15.
|
|
5
|
+
"version": "0.15.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.0.0"
|
|
@@ -19,14 +19,13 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@redis/client": "^5.10.0",
|
|
22
|
-
"@vitejs/plugin-react": "^5.1.2",
|
|
23
22
|
"dayjs": "^1.11.19",
|
|
24
23
|
"drizzle-kit": "^0.31.8",
|
|
25
24
|
"drizzle-orm": "^0.45.1",
|
|
26
|
-
"nodemailer": "^7.0.13",
|
|
27
25
|
"postgres": "^3.4.8",
|
|
28
26
|
"tsx": "^4.21.0",
|
|
29
27
|
"typebox": "^1.0.80",
|
|
28
|
+
"typescript": "^5.9.3",
|
|
30
29
|
"vite": "^7.3.1",
|
|
31
30
|
"vite-bundle-analyzer": "^1.3.2",
|
|
32
31
|
"ws": "^8.19.0"
|
|
@@ -42,16 +41,19 @@
|
|
|
42
41
|
"@types/react": "^19.2.10",
|
|
43
42
|
"@types/react-dom": "^19.2.3",
|
|
44
43
|
"@types/ws": "^8.18.1",
|
|
44
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
45
45
|
"cron-schedule": "^6.0.0",
|
|
46
46
|
"jose": "^6.1.3",
|
|
47
47
|
"jsdom": "^27.4.0",
|
|
48
|
+
"nodemailer": "^7.0.13",
|
|
48
49
|
"openid-client": "^6.8.1",
|
|
49
50
|
"prom-client": "^15.1.3",
|
|
50
51
|
"react": "^19.2.4",
|
|
51
52
|
"react-dom": "^19.2.4",
|
|
52
53
|
"swagger-ui-dist": "^5.31.0",
|
|
53
54
|
"tsdown": "^0.20.1",
|
|
54
|
-
"vitest": "^4.0.18"
|
|
55
|
+
"vitest": "^4.0.18",
|
|
56
|
+
"worker-mailer": "^1.2.1"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
59
|
"react": "^19",
|
|
@@ -192,6 +194,7 @@
|
|
|
192
194
|
},
|
|
193
195
|
"./email": {
|
|
194
196
|
"types": "./dist/email/index.d.ts",
|
|
197
|
+
"workerd": "./src/email/index.workerd.ts",
|
|
195
198
|
"import": "./dist/email/index.js",
|
|
196
199
|
"default": "./dist/email/index.js"
|
|
197
200
|
},
|
|
@@ -297,6 +300,7 @@
|
|
|
297
300
|
},
|
|
298
301
|
"./scheduler": {
|
|
299
302
|
"types": "./dist/scheduler/index.d.ts",
|
|
303
|
+
"workerd": "./src/scheduler/index.workerd.ts",
|
|
300
304
|
"import": "./dist/scheduler/index.js",
|
|
301
305
|
"default": "./dist/scheduler/index.js"
|
|
302
306
|
},
|
|
@@ -398,6 +402,7 @@
|
|
|
398
402
|
"./system": {
|
|
399
403
|
"types": "./dist/system/index.d.ts",
|
|
400
404
|
"react-native": "./dist/system/index.browser.js",
|
|
405
|
+
"workerd": "./src/system/index.workerd.ts",
|
|
401
406
|
"browser": "./dist/system/index.browser.js",
|
|
402
407
|
"import": "./dist/system/index.js",
|
|
403
408
|
"default": "./dist/system/index.js"
|
|
@@ -25,6 +25,7 @@ export class AdminAuditController {
|
|
|
25
25
|
public readonly findAudits = $action({
|
|
26
26
|
path: this.url,
|
|
27
27
|
group: this.group,
|
|
28
|
+
secure: true,
|
|
28
29
|
description: "Find audit entries with filtering and pagination",
|
|
29
30
|
schema: {
|
|
30
31
|
query: auditQuerySchema,
|
|
@@ -39,6 +40,7 @@ export class AdminAuditController {
|
|
|
39
40
|
public readonly getAudit = $action({
|
|
40
41
|
path: `${this.url}/:id`,
|
|
41
42
|
group: this.group,
|
|
43
|
+
secure: true,
|
|
42
44
|
description: "Get a single audit entry by ID",
|
|
43
45
|
schema: {
|
|
44
46
|
params: t.object({
|
|
@@ -56,6 +58,7 @@ export class AdminAuditController {
|
|
|
56
58
|
method: "POST",
|
|
57
59
|
path: this.url,
|
|
58
60
|
group: this.group,
|
|
61
|
+
secure: true,
|
|
59
62
|
description: "Create a new audit entry",
|
|
60
63
|
schema: {
|
|
61
64
|
body: createAuditSchema,
|
|
@@ -70,6 +73,7 @@ export class AdminAuditController {
|
|
|
70
73
|
public readonly findByUser = $action({
|
|
71
74
|
path: `${this.url}/user/:userId`,
|
|
72
75
|
group: this.group,
|
|
76
|
+
secure: true,
|
|
73
77
|
description: "Get audit entries for a specific user",
|
|
74
78
|
schema: {
|
|
75
79
|
params: t.object({
|
|
@@ -88,6 +92,7 @@ export class AdminAuditController {
|
|
|
88
92
|
public readonly findByResource = $action({
|
|
89
93
|
path: `${this.url}/resource/:resourceType/:resourceId`,
|
|
90
94
|
group: this.group,
|
|
95
|
+
secure: true,
|
|
91
96
|
description: "Get audit entries for a specific resource",
|
|
92
97
|
schema: {
|
|
93
98
|
params: t.object({
|
|
@@ -111,6 +116,7 @@ export class AdminAuditController {
|
|
|
111
116
|
public readonly getStats = $action({
|
|
112
117
|
path: `${this.url}/stats`,
|
|
113
118
|
group: this.group,
|
|
119
|
+
secure: true,
|
|
114
120
|
description: "Get audit statistics for a time period",
|
|
115
121
|
schema: {
|
|
116
122
|
query: t.object({
|
|
@@ -144,6 +150,7 @@ export class AdminAuditController {
|
|
|
144
150
|
public readonly getTypes = $action({
|
|
145
151
|
path: `${this.url}/types`,
|
|
146
152
|
group: this.group,
|
|
153
|
+
secure: true,
|
|
147
154
|
description: "Get all registered audit types",
|
|
148
155
|
schema: {
|
|
149
156
|
response: t.array(
|
|
@@ -163,6 +170,7 @@ export class AdminAuditController {
|
|
|
163
170
|
public readonly getFilterOptions = $action({
|
|
164
171
|
path: `${this.url}/filters`,
|
|
165
172
|
group: this.group,
|
|
173
|
+
secure: true,
|
|
166
174
|
description: "Get distinct values for audit filters",
|
|
167
175
|
schema: {
|
|
168
176
|
response: t.object({
|
|
@@ -13,6 +13,7 @@ export class AdminJobController {
|
|
|
13
13
|
public readonly getJobs = $action({
|
|
14
14
|
path: this.url,
|
|
15
15
|
group: this.group,
|
|
16
|
+
secure: true,
|
|
16
17
|
schema: {
|
|
17
18
|
response: t.array(t.string()),
|
|
18
19
|
},
|
|
@@ -22,6 +23,7 @@ export class AdminJobController {
|
|
|
22
23
|
public readonly getJobExecutions = $action({
|
|
23
24
|
path: `${this.url}/executions`,
|
|
24
25
|
group: this.group,
|
|
26
|
+
secure: true,
|
|
25
27
|
schema: {
|
|
26
28
|
query: jobExecutionQuerySchema,
|
|
27
29
|
response: t.page(jobExecutionResourceSchema),
|
|
@@ -33,6 +35,7 @@ export class AdminJobController {
|
|
|
33
35
|
method: "POST",
|
|
34
36
|
path: `${this.url}/trigger`,
|
|
35
37
|
group: this.group,
|
|
38
|
+
secure: true,
|
|
36
39
|
schema: {
|
|
37
40
|
body: triggerJobSchema,
|
|
38
41
|
response: okSchema,
|
package/src/api/logs/TODO.md
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
|
|
2
|
+
# Alepha Logs
|
|
2
3
|
|
|
4
|
+
3 modules across different locations:
|
|
3
5
|
|
|
6
|
+
## `alepha/api/logs` - AlephaApiLogs (Server)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
Module for handling logs collected from various sources.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
- 1-2 days retention policy for logs (configurable)
|
|
11
|
+
- Independent SQLite storage for logs with querying capabilities
|
|
12
|
+
- Output can be sent to Postgres (TimescaleDB) if big data storage is needed
|
|
8
13
|
|
|
9
|
-
-
|
|
10
|
-
- Independent Sqlite storage for logs with querying capabilities.
|
|
11
|
-
- Output can be sent to Postgres (TimeScaleDB) if big data storage is needed.
|
|
14
|
+
## `alepha/api/logs-client` - AlephaApiLogsClient (Client)
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Client module for interacting with AlephaApiLogs automatically.
|
|
14
17
|
|
|
15
|
-
-
|
|
18
|
+
- Uses Alepha micro-services features to collect logs from different services
|
|
16
19
|
- Keyless Codec, Batching, ...
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
## `@alepha/ui/logs` - AlephaUiLogs (UI)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
UI components for displaying and managing logs within the Alepha framework.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
- Devtools UI for log visualization and querying
|
|
23
26
|
|
|
24
27
|
--- CLIENT ----
|
|
25
28
|
|
|
@@ -15,6 +15,7 @@ export class AdminNotificationController {
|
|
|
15
15
|
public readonly findNotifications = $action({
|
|
16
16
|
path: this.url,
|
|
17
17
|
group: this.group,
|
|
18
|
+
secure: true,
|
|
18
19
|
description: "Find notifications with pagination and filtering",
|
|
19
20
|
schema: {
|
|
20
21
|
query: notificationQuerySchema,
|
|
@@ -41,6 +41,7 @@ export class AdminConfigController {
|
|
|
41
41
|
*/
|
|
42
42
|
getConfigTree = $action({
|
|
43
43
|
group: this.group,
|
|
44
|
+
secure: true,
|
|
44
45
|
description:
|
|
45
46
|
"Get tree structure of all configuration names for navigation.",
|
|
46
47
|
path: "/configs/tree",
|
|
@@ -58,6 +59,7 @@ export class AdminConfigController {
|
|
|
58
59
|
*/
|
|
59
60
|
listConfigNames = $action({
|
|
60
61
|
group: this.group,
|
|
62
|
+
secure: true,
|
|
61
63
|
description: "List all unique configuration names.",
|
|
62
64
|
path: "/configs",
|
|
63
65
|
method: "GET",
|
|
@@ -75,6 +77,7 @@ export class AdminConfigController {
|
|
|
75
77
|
*/
|
|
76
78
|
getByStatus = $action({
|
|
77
79
|
group: this.group,
|
|
80
|
+
secure: true,
|
|
78
81
|
description: "Get all configurations with a specific status.",
|
|
79
82
|
path: "/configs/status/:status",
|
|
80
83
|
method: "GET",
|
|
@@ -95,6 +98,7 @@ export class AdminConfigController {
|
|
|
95
98
|
*/
|
|
96
99
|
getHistory = $action({
|
|
97
100
|
group: this.group,
|
|
101
|
+
secure: true,
|
|
98
102
|
description: "Get all versions of a specific configuration.",
|
|
99
103
|
path: "/configs/:name/history",
|
|
100
104
|
method: "GET",
|
|
@@ -115,6 +119,7 @@ export class AdminConfigController {
|
|
|
115
119
|
*/
|
|
116
120
|
getCurrent = $action({
|
|
117
121
|
group: this.group,
|
|
122
|
+
secure: true,
|
|
118
123
|
description: "Get current and next scheduled values for a configuration.",
|
|
119
124
|
path: "/configs/:name",
|
|
120
125
|
method: "GET",
|
|
@@ -139,6 +144,7 @@ export class AdminConfigController {
|
|
|
139
144
|
*/
|
|
140
145
|
getVersion = $action({
|
|
141
146
|
group: this.group,
|
|
147
|
+
secure: true,
|
|
142
148
|
description: "Get a specific version of a configuration.",
|
|
143
149
|
path: "/configs/:name/versions/:version",
|
|
144
150
|
method: "GET",
|
|
@@ -157,6 +163,7 @@ export class AdminConfigController {
|
|
|
157
163
|
*/
|
|
158
164
|
createVersion = $action({
|
|
159
165
|
group: this.group,
|
|
166
|
+
secure: true,
|
|
160
167
|
description:
|
|
161
168
|
"Create a new version of a configuration (immediate or scheduled).",
|
|
162
169
|
path: "/configs/:name",
|
|
@@ -184,6 +191,7 @@ export class AdminConfigController {
|
|
|
184
191
|
*/
|
|
185
192
|
rollback = $action({
|
|
186
193
|
group: this.group,
|
|
194
|
+
secure: true,
|
|
187
195
|
description:
|
|
188
196
|
"Rollback a configuration to a previous version (creates new version with old content).",
|
|
189
197
|
path: "/configs/:name/rollback",
|
|
@@ -207,6 +215,7 @@ export class AdminConfigController {
|
|
|
207
215
|
*/
|
|
208
216
|
activateNow = $action({
|
|
209
217
|
group: this.group,
|
|
218
|
+
secure: true,
|
|
210
219
|
description: "Activate a future/next configuration version immediately.",
|
|
211
220
|
path: "/configs/:name/activate",
|
|
212
221
|
method: "POST",
|
|
@@ -248,6 +257,7 @@ export class AdminConfigController {
|
|
|
248
257
|
*/
|
|
249
258
|
checkScheduled = $action({
|
|
250
259
|
group: this.group,
|
|
260
|
+
secure: true,
|
|
251
261
|
description:
|
|
252
262
|
"Manually trigger activation check for all scheduled configurations.",
|
|
253
263
|
path: "/configs/activate-scheduled",
|
|
@@ -15,6 +15,7 @@ export class AdminIdentityController {
|
|
|
15
15
|
public readonly findIdentities = $action({
|
|
16
16
|
path: this.url,
|
|
17
17
|
group: this.group,
|
|
18
|
+
secure: true,
|
|
18
19
|
description: "Find identities with pagination and filtering",
|
|
19
20
|
schema: {
|
|
20
21
|
query: t.extend(identityQuerySchema, {
|
|
@@ -34,6 +35,7 @@ export class AdminIdentityController {
|
|
|
34
35
|
public readonly getIdentity = $action({
|
|
35
36
|
path: `${this.url}/:id`,
|
|
36
37
|
group: this.group,
|
|
38
|
+
secure: true,
|
|
37
39
|
description: "Get an identity by ID",
|
|
38
40
|
schema: {
|
|
39
41
|
params: t.object({
|
|
@@ -55,6 +57,7 @@ export class AdminIdentityController {
|
|
|
55
57
|
method: "DELETE",
|
|
56
58
|
path: `${this.url}/:id`,
|
|
57
59
|
group: this.group,
|
|
60
|
+
secure: true,
|
|
58
61
|
description: "Delete an identity",
|
|
59
62
|
schema: {
|
|
60
63
|
params: t.object({
|
|
@@ -15,6 +15,7 @@ export class AdminSessionController {
|
|
|
15
15
|
public readonly findSessions = $action({
|
|
16
16
|
path: this.url,
|
|
17
17
|
group: this.group,
|
|
18
|
+
secure: true,
|
|
18
19
|
description: "Find sessions with pagination and filtering",
|
|
19
20
|
schema: {
|
|
20
21
|
query: t.extend(sessionQuerySchema, {
|
|
@@ -34,6 +35,7 @@ export class AdminSessionController {
|
|
|
34
35
|
public readonly getSession = $action({
|
|
35
36
|
path: `${this.url}/:id`,
|
|
36
37
|
group: this.group,
|
|
38
|
+
secure: true,
|
|
37
39
|
description: "Get a session by ID",
|
|
38
40
|
schema: {
|
|
39
41
|
params: t.object({
|
|
@@ -55,6 +57,7 @@ export class AdminSessionController {
|
|
|
55
57
|
method: "DELETE",
|
|
56
58
|
path: `${this.url}/:id`,
|
|
57
59
|
group: this.group,
|
|
60
|
+
secure: true,
|
|
58
61
|
description: "Delete a session",
|
|
59
62
|
schema: {
|
|
60
63
|
params: t.object({
|
|
@@ -17,6 +17,7 @@ export class AdminUserController {
|
|
|
17
17
|
public readonly findUsers = $action({
|
|
18
18
|
path: this.url,
|
|
19
19
|
group: this.group,
|
|
20
|
+
secure: true,
|
|
20
21
|
description: "Find users with pagination and filtering",
|
|
21
22
|
schema: {
|
|
22
23
|
query: t.extend(userQuerySchema, {
|
|
@@ -36,6 +37,7 @@ export class AdminUserController {
|
|
|
36
37
|
public readonly getUser = $action({
|
|
37
38
|
path: `${this.url}/:id`,
|
|
38
39
|
group: this.group,
|
|
40
|
+
secure: true,
|
|
39
41
|
description: "Get a user by ID",
|
|
40
42
|
schema: {
|
|
41
43
|
params: t.object({
|
|
@@ -57,6 +59,7 @@ export class AdminUserController {
|
|
|
57
59
|
method: "POST",
|
|
58
60
|
path: this.url,
|
|
59
61
|
group: this.group,
|
|
62
|
+
secure: true,
|
|
60
63
|
description: "Create a new user",
|
|
61
64
|
schema: {
|
|
62
65
|
query: t.object({
|
|
@@ -76,6 +79,7 @@ export class AdminUserController {
|
|
|
76
79
|
method: "PATCH",
|
|
77
80
|
path: `${this.url}/:id`,
|
|
78
81
|
group: this.group,
|
|
82
|
+
secure: true,
|
|
79
83
|
description: "Update a user",
|
|
80
84
|
schema: {
|
|
81
85
|
params: t.object({
|
|
@@ -98,6 +102,7 @@ export class AdminUserController {
|
|
|
98
102
|
method: "DELETE",
|
|
99
103
|
path: `${this.url}/:id`,
|
|
100
104
|
group: this.group,
|
|
105
|
+
secure: true,
|
|
101
106
|
description: "Delete a user",
|
|
102
107
|
schema: {
|
|
103
108
|
params: t.object({
|
|
@@ -11,6 +11,7 @@ interface Module {
|
|
|
11
11
|
dependencies: string[];
|
|
12
12
|
native?: boolean;
|
|
13
13
|
browser?: boolean;
|
|
14
|
+
workerd?: boolean;
|
|
14
15
|
bun?: boolean;
|
|
15
16
|
node?: boolean;
|
|
16
17
|
}
|
|
@@ -53,6 +54,10 @@ export class AlephaPackageBuilderCli {
|
|
|
53
54
|
`./src/${item.name}/index.browser.ts`;
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
if (item.workerd) {
|
|
58
|
+
pkgData.exports[path].workerd = `./src/${item.name}/index.workerd.ts`;
|
|
59
|
+
}
|
|
60
|
+
|
|
56
61
|
if (item.browser) {
|
|
57
62
|
pkgData.exports[path].browser = `./src/${item.name}/index.browser.ts`;
|
|
58
63
|
}
|
|
@@ -321,6 +326,9 @@ export async function analyzeModules(
|
|
|
321
326
|
);
|
|
322
327
|
const hasBun = await fileExists(join(modulePath, "index.bun.ts"));
|
|
323
328
|
const hasNode = await fileExists(join(modulePath, "index.node.ts"));
|
|
329
|
+
const hasEdge = await fileExists(
|
|
330
|
+
join(modulePath, "index.workerd.ts"),
|
|
331
|
+
);
|
|
324
332
|
|
|
325
333
|
// Get all .ts/.tsx files in this module
|
|
326
334
|
const files = await getAllFiles(modulePath);
|
|
@@ -353,6 +361,7 @@ export async function analyzeModules(
|
|
|
353
361
|
};
|
|
354
362
|
|
|
355
363
|
if (hasNative) module.native = true;
|
|
364
|
+
if (hasEdge) module.workerd = true;
|
|
356
365
|
if (hasBrowser) module.browser = true;
|
|
357
366
|
if (hasBun) module.bun = true;
|
|
358
367
|
if (hasNode) module.node = true;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import { type Static, t } from "alepha";
|
|
2
2
|
import { $atom } from "../../core/primitives/$atom.ts";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Deployment target for the build output.
|
|
6
|
+
*
|
|
7
|
+
* - `docker` - Generate Dockerfile for containerized deployment
|
|
8
|
+
* - `vercel` - Generate Vercel deployment configuration (forces node runtime)
|
|
9
|
+
* - `cloudflare` - Generate Cloudflare Workers configuration (forces workerd runtime)
|
|
10
|
+
*/
|
|
11
|
+
export type BuildTarget = "bare" | "docker" | "vercel" | "cloudflare";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* JavaScript runtime for the build output.
|
|
15
|
+
*
|
|
16
|
+
* - `node` - Node.js runtime (default)
|
|
17
|
+
* - `bun` - Bun runtime (uses bun export conditions)
|
|
18
|
+
* - `workerd` - Cloudflare Workers runtime (auto-set with cloudflare target)
|
|
19
|
+
*/
|
|
20
|
+
export type BuildRuntime = "node" | "bun" | "workerd";
|
|
21
|
+
|
|
4
22
|
/**
|
|
5
23
|
* Build options atom for CLI build command.
|
|
6
24
|
*
|
|
7
25
|
* Defines the available build configuration options with their defaults.
|
|
8
|
-
* Options can be overridden via
|
|
26
|
+
* Options can be overridden via alepha.config.ts or CLI flags.
|
|
9
27
|
*/
|
|
10
28
|
export const buildOptions = $atom({
|
|
11
29
|
name: "alepha.cli.build.options",
|
|
@@ -17,7 +35,32 @@ export const buildOptions = $atom({
|
|
|
17
35
|
stats: t.optional(t.boolean({ default: false })),
|
|
18
36
|
|
|
19
37
|
/**
|
|
20
|
-
*
|
|
38
|
+
* Deployment target for the build output.
|
|
39
|
+
*
|
|
40
|
+
* - `docker` - Generate Dockerfile for containerized deployment
|
|
41
|
+
* - `vercel` - Generate Vercel deployment configuration (forces node runtime)
|
|
42
|
+
* - `cloudflare` - Generate Cloudflare Workers configuration (forces workerd runtime)
|
|
43
|
+
*/
|
|
44
|
+
target: t.optional(t.enum(["bare", "docker", "vercel", "cloudflare"])),
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* JavaScript runtime for the build output.
|
|
48
|
+
*
|
|
49
|
+
* - `node` - Node.js runtime (default)
|
|
50
|
+
* - `bun` - Bun runtime (uses bun export conditions)
|
|
51
|
+
* - `workerd` - Cloudflare Workers runtime (auto-set with cloudflare target)
|
|
52
|
+
*
|
|
53
|
+
* Note: Some targets force a specific runtime:
|
|
54
|
+
* - `cloudflare` always uses `workerd`
|
|
55
|
+
* - `vercel` always uses `node`
|
|
56
|
+
*/
|
|
57
|
+
runtime: t.optional(t.enum(["node", "bun", "workerd"])),
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Vercel-specific deployment configuration.
|
|
61
|
+
*
|
|
62
|
+
* Note: Set `target: "vercel"` to enable Vercel deployment.
|
|
63
|
+
* This object is only for additional configuration.
|
|
21
64
|
*/
|
|
22
65
|
vercel: t.optional(
|
|
23
66
|
t.object({
|
|
@@ -40,7 +83,10 @@ export const buildOptions = $atom({
|
|
|
40
83
|
),
|
|
41
84
|
|
|
42
85
|
/**
|
|
43
|
-
* Cloudflare
|
|
86
|
+
* Cloudflare-specific deployment configuration.
|
|
87
|
+
*
|
|
88
|
+
* Note: Set `target: "cloudflare"` to enable Cloudflare deployment.
|
|
89
|
+
* This object is only for additional configuration.
|
|
44
90
|
*/
|
|
45
91
|
cloudflare: t.optional(
|
|
46
92
|
t.object({
|
|
@@ -49,21 +95,65 @@ export const buildOptions = $atom({
|
|
|
49
95
|
),
|
|
50
96
|
|
|
51
97
|
/**
|
|
52
|
-
* Docker deployment configuration.
|
|
98
|
+
* Docker-specific deployment configuration.
|
|
99
|
+
*
|
|
100
|
+
* Note: Set `target: "docker"` to enable Docker deployment.
|
|
101
|
+
* This object is only for additional configuration.
|
|
53
102
|
*/
|
|
54
103
|
docker: t.optional(
|
|
55
104
|
t.object({
|
|
56
105
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
106
|
+
* Base image for the Dockerfile (FROM instruction).
|
|
107
|
+
*
|
|
108
|
+
* @default "node:24-alpine" for node runtime
|
|
109
|
+
* @default "oven/bun:alpine" for bun runtime
|
|
59
110
|
*/
|
|
60
|
-
|
|
111
|
+
from: t.optional(t.string()),
|
|
61
112
|
|
|
62
113
|
/**
|
|
63
114
|
* Command to run in the Docker container.
|
|
64
|
-
*
|
|
115
|
+
*
|
|
116
|
+
* @default "node" for node runtime
|
|
117
|
+
* @default "bun" for bun runtime
|
|
118
|
+
*/
|
|
119
|
+
command: t.optional(t.string()),
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Docker build options (used when --image flag is passed).
|
|
65
123
|
*/
|
|
66
|
-
|
|
124
|
+
image: t.optional(
|
|
125
|
+
t.object({
|
|
126
|
+
/**
|
|
127
|
+
* Default image tag (name without version).
|
|
128
|
+
*
|
|
129
|
+
* Used when --image is provided without a full override:
|
|
130
|
+
* - `--image` → `tag:latest`
|
|
131
|
+
* - `--image=1.3.4` → `tag:1.3.4`
|
|
132
|
+
* - `--image=other/img:v1` → `other/img:v1` (full override)
|
|
133
|
+
*
|
|
134
|
+
* @example "myproject/myapp"
|
|
135
|
+
* @example "ghcr.io/myorg/myapp"
|
|
136
|
+
*/
|
|
137
|
+
tag: t.string(),
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Additional arguments to pass to `docker build`.
|
|
141
|
+
*
|
|
142
|
+
* @example '--platform linux/amd64 --no-cache'
|
|
143
|
+
*/
|
|
144
|
+
args: t.optional(t.string()),
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Auto-add OCI standard labels (revision, created, version).
|
|
148
|
+
*
|
|
149
|
+
* Adds:
|
|
150
|
+
* - org.opencontainers.image.revision (git commit SHA)
|
|
151
|
+
* - org.opencontainers.image.created (build timestamp)
|
|
152
|
+
* - org.opencontainers.image.version (from image tag)
|
|
153
|
+
*/
|
|
154
|
+
oci: t.optional(t.boolean()),
|
|
155
|
+
}),
|
|
156
|
+
),
|
|
67
157
|
}),
|
|
68
158
|
),
|
|
69
159
|
|