alepha 0.18.2 → 0.18.3
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/assets/devtools-ui/200.html +2 -2
- package/assets/devtools-ui/200.html.br +0 -0
- package/assets/devtools-ui/404.html +2 -2
- package/assets/devtools-ui/404.html.br +0 -0
- package/assets/devtools-ui/{asset.BfSBZ5Dd.css → asset.hG_f8HuK.css} +1 -1
- package/assets/devtools-ui/asset.hG_f8HuK.css.br +0 -0
- package/assets/devtools-ui/chunk.B3au4Lhg.js +1 -0
- package/assets/devtools-ui/chunk.B3au4Lhg.js.br +0 -0
- package/assets/devtools-ui/chunk.BLOrlnMB.js +1 -0
- package/assets/devtools-ui/chunk.BLOrlnMB.js.br +0 -0
- package/assets/devtools-ui/chunk.BLR01ljW.js +1 -0
- package/assets/devtools-ui/chunk.BLR01ljW.js.br +0 -0
- package/assets/devtools-ui/chunk.BTXaIUlA.js +1 -0
- package/assets/devtools-ui/chunk.BTXaIUlA.js.br +0 -0
- package/assets/devtools-ui/{chunk.lJL-lgnW.js → chunk.BhJaxmm8.js} +1 -1
- package/assets/devtools-ui/chunk.BhJaxmm8.js.br +0 -0
- package/assets/devtools-ui/chunk.BtoNxFuL.js +1 -0
- package/assets/devtools-ui/chunk.BtoNxFuL.js.br +0 -0
- package/assets/devtools-ui/chunk.C8YUV2Wd.js +1 -0
- package/assets/devtools-ui/chunk.C8YUV2Wd.js.br +0 -0
- package/assets/devtools-ui/{chunk.M6wyKO_3.js → chunk.CBbIgDzE.js} +2 -2
- package/assets/devtools-ui/chunk.CBbIgDzE.js.br +0 -0
- package/assets/devtools-ui/chunk.CFqIniwA.js +1 -0
- package/assets/devtools-ui/chunk.CFqIniwA.js.br +0 -0
- package/assets/devtools-ui/chunk.CLFF7f7-.js +1 -0
- package/assets/devtools-ui/chunk.CLFF7f7-.js.br +0 -0
- package/assets/devtools-ui/chunk.CRsBbA10.js +1 -0
- package/assets/devtools-ui/chunk.CRsBbA10.js.br +0 -0
- package/assets/devtools-ui/{chunk.DbEH1oOB.js → chunk.CZPo6v95.js} +1 -1
- package/assets/devtools-ui/chunk.CZPo6v95.js.br +0 -0
- package/assets/devtools-ui/chunk.D0fWgNos.js +1 -0
- package/assets/devtools-ui/chunk.D0fWgNos.js.br +1 -0
- package/assets/devtools-ui/chunk.D7-0ziQ6.js +1 -0
- package/assets/devtools-ui/chunk.D7-0ziQ6.js.br +0 -0
- package/assets/devtools-ui/chunk.DAewe0vm.js +1 -0
- package/assets/devtools-ui/chunk.DAewe0vm.js.br +0 -0
- package/assets/devtools-ui/chunk.DJRQEYqK.js +1 -0
- package/assets/devtools-ui/chunk.DJRQEYqK.js.br +0 -0
- package/assets/devtools-ui/{chunk.CZl6J9DF.js → chunk.DMAxv14p.js} +1 -1
- package/assets/devtools-ui/chunk.DMAxv14p.js.br +0 -0
- package/assets/devtools-ui/{chunk.BT2IiBkZ.js → chunk.DMImnNjU.js} +1 -1
- package/assets/devtools-ui/chunk.DMImnNjU.js.br +0 -0
- package/assets/devtools-ui/chunk.DeeQsidk.js +9 -0
- package/assets/devtools-ui/chunk.DeeQsidk.js.br +0 -0
- package/assets/devtools-ui/chunk.DqEwn9Vj.js +7 -0
- package/assets/devtools-ui/chunk.DqEwn9Vj.js.br +0 -0
- package/assets/devtools-ui/chunk.Dt8OsQey.js +1 -0
- package/assets/devtools-ui/chunk.Dt8OsQey.js.br +0 -0
- package/assets/devtools-ui/{chunk.B9pX3zit.js → chunk.Dtp8oa_f.js} +1 -1
- package/assets/devtools-ui/chunk.Dtp8oa_f.js.br +0 -0
- package/assets/devtools-ui/chunk.Dx3JzAYM.js +1 -0
- package/assets/devtools-ui/chunk.Dx3JzAYM.js.br +0 -0
- package/assets/devtools-ui/chunk.GCOj1-5E.js +1 -0
- package/assets/devtools-ui/chunk.GCOj1-5E.js.br +0 -0
- package/assets/devtools-ui/chunk.IC1LD8BH.js +1 -0
- package/assets/devtools-ui/chunk.IC1LD8BH.js.br +0 -0
- package/assets/devtools-ui/chunk.IwuB_TqW.js +1 -0
- package/assets/devtools-ui/chunk.IwuB_TqW.js.br +0 -0
- package/assets/devtools-ui/chunk.Qqapj2zq.js +1 -0
- package/assets/devtools-ui/chunk.Qqapj2zq.js.br +0 -0
- package/assets/devtools-ui/{chunk.C79YouPp.js → chunk.TKKKndOy.js} +1 -1
- package/assets/devtools-ui/chunk.TKKKndOy.js.br +0 -0
- package/assets/devtools-ui/chunk.YHTVhFQT.js +1 -0
- package/assets/devtools-ui/chunk.YHTVhFQT.js.br +0 -0
- package/assets/devtools-ui/chunk.fnod6uEi.js +1 -0
- package/assets/devtools-ui/chunk.fnod6uEi.js.br +0 -0
- package/assets/devtools-ui/chunk.mOCRmXjo.js +1 -0
- package/assets/devtools-ui/chunk.mOCRmXjo.js.br +0 -0
- package/assets/devtools-ui/chunk.qZTNEAK0.js +1 -0
- package/assets/devtools-ui/chunk.qZTNEAK0.js.br +0 -0
- package/assets/devtools-ui/chunk.rc9m0y4-.js +1 -0
- package/assets/devtools-ui/chunk.rc9m0y4-.js.br +0 -0
- package/assets/devtools-ui/entry.Cxc5QLCU.js +80 -0
- package/assets/devtools-ui/entry.Cxc5QLCU.js.br +0 -0
- package/assets/devtools-ui/index.html +2 -2
- package/assets/devtools-ui/index.html.br +0 -0
- package/assets/swagger-ui/swagger-ui-bundle.js +1 -1
- package/assets/swagger-ui/swagger-ui.css +1 -1
- package/dist/api/audits/index.d.ts +61 -5
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/files/index.d.ts +61 -5
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/jobs/index.d.ts +61 -5
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +4 -2
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +5 -5
- package/dist/api/notifications/index.browser.js +44 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +187 -2
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +143 -8
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +61 -5
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/users/index.d.ts +330 -93
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +27 -36
- package/dist/api/users/index.js.map +1 -1
- package/dist/cli/config/index.d.ts +46 -0
- package/dist/cli/config/index.d.ts.map +1 -0
- package/dist/cli/config/index.js +20 -0
- package/dist/cli/config/index.js.map +1 -0
- package/dist/cli/core/index.d.ts +69 -66
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +329 -196
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +302 -63
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +455 -25
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/core/index.browser.js +125 -87
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +62 -53
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +125 -87
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +125 -87
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +125 -87
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/crypto/index.d.ts +18 -1
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +29 -3
- package/dist/crypto/index.js.map +1 -1
- package/dist/devtools/index.js +3 -12
- package/dist/devtools/index.js.map +1 -1
- package/dist/logger/index.d.ts +10 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +19 -9
- package/dist/logger/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +57 -1
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +378 -19
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +328 -9
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +384 -21
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js +49 -17
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +47 -21
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js +52 -17
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/react/core/index.d.ts +1 -1
- package/dist/react/core/index.d.ts.map +1 -1
- package/dist/react/core/index.js +6 -1
- package/dist/react/core/index.js.map +1 -1
- package/dist/react/form/index.d.ts +28 -18
- package/dist/react/form/index.d.ts.map +1 -1
- package/dist/react/form/index.js +92 -56
- package/dist/react/form/index.js.map +1 -1
- package/dist/react/router/index.browser.js +448 -116
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +102 -40
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +453 -92
- package/dist/react/router/index.js.map +1 -1
- package/dist/security/index.d.ts +3 -11
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +6 -11
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +22 -24
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +102 -82
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +7 -4
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +13 -12
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +288 -4
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +375 -2
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/links/index.browser.js +10 -71
- package/dist/server/links/index.browser.js.map +1 -1
- package/dist/server/links/index.d.ts +32 -49
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +73 -100
- package/dist/server/links/index.js.map +1 -1
- package/dist/system/index.browser.js +221 -2
- package/dist/system/index.browser.js.map +1 -1
- package/dist/system/index.d.ts +63 -1
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +221 -1
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.workerd.js +224 -4
- package/dist/system/index.workerd.js.map +1 -1
- package/package.json +10 -5
- package/src/api/jobs/providers/JobProvider.ts +6 -3
- package/src/api/notifications/controllers/AdminNotificationController.ts +83 -0
- package/src/api/notifications/index.browser.ts +3 -0
- package/src/api/notifications/index.ts +14 -2
- package/src/api/notifications/jobs/NotificationJobs.ts +11 -2
- package/src/api/notifications/schemas/notificationDetailResourceSchema.ts +20 -0
- package/src/api/notifications/schemas/notificationQuerySchema.ts +19 -0
- package/src/api/notifications/schemas/notificationResourceSchema.ts +18 -0
- package/src/api/notifications/services/NotificationSenderService.ts +15 -2
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +28 -32
- package/src/api/users/buckets/UserBuckets.ts +1 -1
- package/src/api/users/jobs/UserJobs.ts +1 -1
- package/src/api/users/primitives/$realm.ts +8 -49
- package/src/api/users/providers/RealmProvider.ts +2 -3
- package/src/api/users/services/RegistrationService.spec.ts +7 -7
- package/src/api/users/services/RegistrationService.ts +3 -3
- package/src/api/users/services/SessionService.spec.ts +4 -4
- package/src/api/users/services/SessionService.ts +3 -3
- package/src/cli/{core → config}/defineConfig.ts +14 -20
- package/src/cli/config/index.ts +1 -0
- package/src/cli/core/commands/db.ts +65 -1
- package/src/cli/core/commands/dev.ts +1 -0
- package/src/cli/core/commands/init.ts +2 -192
- package/src/cli/core/index.ts +34 -11
- package/src/cli/core/providers/ViteDevServerProvider.ts +52 -13
- package/src/cli/core/services/PackageManagerUtils.ts +43 -21
- package/src/cli/core/services/ProjectScaffolder.ts +214 -2
- package/src/cli/core/services/ViteUtils.ts +57 -0
- package/src/cli/core/tasks/BuildClientTask.ts +7 -2
- package/src/cli/core/tasks/BuildCloudflareTask.ts +4 -12
- package/src/cli/core/tasks/BuildServerTask.ts +2 -0
- package/src/cli/core/tasks/BuildVercelTask.ts +165 -168
- package/src/cli/core/templates/alephaConfigTs.ts +1 -1
- package/src/cli/core/templates/apiAppSecurityTs.ts +5 -8
- package/src/cli/core/templates/tsconfigJson.ts +6 -1
- package/src/cli/platform/adapters/CloudflareAdapter.spec.ts +1 -1
- package/src/cli/platform/adapters/CloudflareAdapter.ts +30 -29
- package/src/cli/platform/atoms/platformOptions.ts +21 -0
- package/src/cli/platform/commands/SecretsCommand.spec.ts +298 -0
- package/src/cli/platform/commands/SecretsCommand.ts +283 -0
- package/src/cli/platform/commands/platform.ts +12 -0
- package/src/cli/platform/index.ts +14 -28
- package/src/cli/platform/providers/GitHubSecretStore.spec.ts +153 -0
- package/src/cli/platform/providers/GitHubSecretStore.ts +112 -0
- package/src/cli/platform/providers/MemorySecretStore.ts +114 -0
- package/src/cli/platform/providers/SecretStoreProvider.ts +39 -0
- package/src/cli/platform/schemas/cloudflare.ts +2 -0
- package/src/cli/platform/services/CloudflareApi.ts +5 -2
- package/src/cli/platform/services/DockerComposeGenerator.spec.ts +115 -0
- package/src/cli/platform/services/DockerComposeGenerator.ts +46 -1
- package/src/cli/platform/services/SecretFilterService.spec.ts +111 -0
- package/src/cli/platform/services/SecretFilterService.ts +54 -0
- package/src/core/Alepha.ts +94 -25
- package/src/core/__tests__/Alepha-parseEnv.spec.ts +20 -0
- package/src/core/primitives/$memoize.ts +38 -26
- package/src/core/providers/AlsProvider.ts +2 -0
- package/src/core/providers/EventManager.ts +4 -0
- package/src/core/providers/KeylessJsonSchemaCodec.spec.ts +1 -4
- package/src/core/providers/KeylessJsonSchemaCodec.ts +19 -125
- package/src/core/providers/SchemaValidator.spec.ts +36 -0
- package/src/core/providers/SchemaValidator.ts +9 -0
- package/src/crypto/index.ts +6 -1
- package/src/crypto/providers/SecretProvider.ts +36 -0
- package/src/devtools/providers/DevToolsProvider.ts +3 -12
- package/src/logger/index.ts +33 -6
- package/src/logger/providers/PrettyFormatterProvider.ts +5 -3
- package/src/orm/__tests__/orm-next-tests.ts +492 -0
- package/src/orm/__tests__/orm-next.spec.ts +140 -0
- package/src/orm/core/constants/PG_SYMBOLS.ts +17 -0
- package/src/orm/core/index.bun.ts +3 -6
- package/src/orm/core/index.shared-server.ts +2 -0
- package/src/orm/core/index.shared.ts +2 -0
- package/src/orm/core/index.ts +5 -7
- package/src/orm/core/interfaces/AggregateQuery.ts +103 -0
- package/src/orm/core/interfaces/PgQueryWhere.ts +7 -0
- package/src/orm/core/primitives/$entity.ts +8 -0
- package/src/orm/core/primitives/$repository.ts +6 -3
- package/src/orm/core/primitives/$view.ts +88 -0
- package/src/orm/core/providers/DbCacheProvider.ts +66 -0
- package/src/orm/core/providers/DrizzleKitProvider.ts +42 -0
- package/src/orm/core/providers/drivers/BunSqliteProvider.ts +2 -3
- package/src/orm/core/providers/drivers/CloudflareD1Provider.ts +12 -0
- package/src/orm/core/providers/drivers/DatabaseProvider.ts +39 -0
- package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +2 -3
- package/src/orm/core/schemas/databaseEnvSchema.ts +31 -0
- package/src/orm/core/schemas/insertSchema.ts +13 -3
- package/src/orm/core/schemas/updateSchema.ts +14 -3
- package/src/orm/core/services/ModelBuilder.ts +26 -14
- package/src/orm/core/services/QueryManager.ts +13 -0
- package/src/orm/core/services/Repository.ts +307 -5
- package/src/orm/core/services/SqliteModelBuilder.ts +38 -0
- package/src/orm/postgres/index.bun.ts +4 -7
- package/src/orm/postgres/index.ts +4 -7
- package/src/orm/postgres/providers/BunPostgresProvider.ts +12 -2
- package/src/orm/postgres/providers/NodePostgresProvider.ts +7 -0
- package/src/orm/postgres/providers/PglitePostgresProvider.ts +10 -17
- package/src/orm/postgres/providers/PostgresProvider.ts +7 -36
- package/src/orm/postgres/schemas/postgresEnvSchema.ts +32 -0
- package/src/orm/postgres/services/PostgresModelBuilder.ts +40 -0
- package/src/react/core/components/ErrorBoundary.tsx +5 -2
- package/src/react/form/hooks/useFieldValue.ts +34 -0
- package/src/react/form/hooks/useForm.browser.spec.tsx +94 -9
- package/src/react/form/hooks/useForm.ts +14 -2
- package/src/react/form/hooks/useFormState.ts +10 -10
- package/src/react/form/hooks/useFormValues.ts +29 -0
- package/src/react/form/index.ts +3 -1
- package/src/react/form/services/FormModel.ts +53 -122
- package/src/react/router/components/ErrorViewer.tsx +333 -34
- package/src/react/router/components/NestedView.tsx +10 -3
- package/src/react/router/primitives/$page.browser.spec.tsx +34 -0
- package/src/react/router/primitives/$page.spec.tsx +20 -0
- package/src/react/router/primitives/$page.ts +24 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +14 -2
- package/src/react/router/providers/ReactPageProvider.ts +156 -73
- package/src/react/router/providers/ReactServerProvider.ts +40 -2
- package/src/react/router/providers/ReactServerTemplateProvider.ts +13 -1
- package/src/security/providers/SecurityProvider.ts +5 -27
- package/src/server/auth/primitives/$auth.ts +52 -19
- package/src/server/auth/providers/ServerAuthProvider.ts +145 -139
- package/src/server/cookies/providers/ServerCookiesProvider.ts +12 -24
- package/src/server/core/index.ts +3 -1
- package/src/server/core/primitives/$sse.spec.ts +315 -0
- package/src/server/core/primitives/$sse.ts +715 -0
- package/src/server/links/index.browser.ts +1 -3
- package/src/server/links/index.ts +0 -3
- package/src/server/links/providers/LinkProvider.spec.ts +12 -21
- package/src/server/links/providers/LinkProvider.ts +20 -52
- package/src/server/links/providers/ServerLinksProvider.spec.ts +106 -0
- package/src/server/links/providers/ServerLinksProvider.ts +113 -73
- package/src/server/links/schemas/apiLinksResponseSchema.ts +4 -21
- package/src/server/links/services/BatchCollector.ts +5 -3
- package/src/system/index.browser.ts +1 -0
- package/src/system/index.ts +3 -0
- package/src/system/index.workerd.ts +39 -1
- package/src/system/providers/WorkerdFileSystemProvider.ts +365 -0
- package/assets/devtools-ui/asset.BfSBZ5Dd.css.br +0 -0
- package/assets/devtools-ui/chunk.2NYaoqWt.js +0 -1
- package/assets/devtools-ui/chunk.2NYaoqWt.js.br +0 -0
- package/assets/devtools-ui/chunk.B052Z_xQ.js +0 -1
- package/assets/devtools-ui/chunk.B052Z_xQ.js.br +0 -0
- package/assets/devtools-ui/chunk.B4kVY90C.js +0 -1
- package/assets/devtools-ui/chunk.B4kVY90C.js.br +0 -0
- package/assets/devtools-ui/chunk.B7QJXctB.js +0 -1
- package/assets/devtools-ui/chunk.B7QJXctB.js.br +0 -0
- package/assets/devtools-ui/chunk.B9pX3zit.js.br +0 -0
- package/assets/devtools-ui/chunk.BKF9JxIo.js +0 -1
- package/assets/devtools-ui/chunk.BKF9JxIo.js.br +0 -0
- package/assets/devtools-ui/chunk.BOHgdTP-.js +0 -1
- package/assets/devtools-ui/chunk.BOHgdTP-.js.br +0 -0
- package/assets/devtools-ui/chunk.BOVFxkYC.js +0 -1
- package/assets/devtools-ui/chunk.BOVFxkYC.js.br +0 -0
- package/assets/devtools-ui/chunk.BR842zj5.js +0 -1
- package/assets/devtools-ui/chunk.BR842zj5.js.br +0 -0
- package/assets/devtools-ui/chunk.BT2IiBkZ.js.br +0 -0
- package/assets/devtools-ui/chunk.C79YouPp.js.br +0 -0
- package/assets/devtools-ui/chunk.C8mlBrjW.js +0 -9
- package/assets/devtools-ui/chunk.C8mlBrjW.js.br +0 -0
- package/assets/devtools-ui/chunk.CK0ow3AZ.js +0 -1
- package/assets/devtools-ui/chunk.CK0ow3AZ.js.br +0 -0
- package/assets/devtools-ui/chunk.CZl6J9DF.js.br +0 -0
- package/assets/devtools-ui/chunk.CdNr0YzS.js +0 -1
- package/assets/devtools-ui/chunk.CdNr0YzS.js.br +0 -0
- package/assets/devtools-ui/chunk.Ce6_6iIF.js +0 -1
- package/assets/devtools-ui/chunk.Ce6_6iIF.js.br +0 -0
- package/assets/devtools-ui/chunk.CpyDMr6O.js +0 -1
- package/assets/devtools-ui/chunk.CpyDMr6O.js.br +0 -0
- package/assets/devtools-ui/chunk.CyPmvPnY.js +0 -1
- package/assets/devtools-ui/chunk.CyPmvPnY.js.br +0 -0
- package/assets/devtools-ui/chunk.DTI_geWu.js +0 -1
- package/assets/devtools-ui/chunk.DTI_geWu.js.br +0 -0
- package/assets/devtools-ui/chunk.DbEH1oOB.js.br +0 -0
- package/assets/devtools-ui/chunk.Ddeqj5gv.js +0 -1
- package/assets/devtools-ui/chunk.Ddeqj5gv.js.br +0 -0
- package/assets/devtools-ui/chunk.DpRnB4vJ.js +0 -1
- package/assets/devtools-ui/chunk.DpRnB4vJ.js.br +0 -0
- package/assets/devtools-ui/chunk.DxPGTlsg.js +0 -1
- package/assets/devtools-ui/chunk.DxPGTlsg.js.br +0 -0
- package/assets/devtools-ui/chunk.G7_MMBJS.js +0 -1
- package/assets/devtools-ui/chunk.G7_MMBJS.js.br +0 -0
- package/assets/devtools-ui/chunk.M6wyKO_3.js.br +0 -0
- package/assets/devtools-ui/chunk.OUxNGmQ6.js +0 -1
- package/assets/devtools-ui/chunk.OUxNGmQ6.js.br +0 -0
- package/assets/devtools-ui/chunk.T1kle-fF.js +0 -1
- package/assets/devtools-ui/chunk.T1kle-fF.js.br +0 -0
- package/assets/devtools-ui/chunk.WjpsbQAv.js +0 -1
- package/assets/devtools-ui/chunk.WjpsbQAv.js.br +0 -0
- package/assets/devtools-ui/chunk.c6YgVx86.js +0 -1
- package/assets/devtools-ui/chunk.c6YgVx86.js.br +0 -0
- package/assets/devtools-ui/chunk.dwU3E_MU.js +0 -1
- package/assets/devtools-ui/chunk.dwU3E_MU.js.br +0 -0
- package/assets/devtools-ui/chunk.lJL-lgnW.js.br +0 -0
- package/assets/devtools-ui/chunk.lPWRmvA-.js +0 -7
- package/assets/devtools-ui/chunk.lPWRmvA-.js.br +0 -0
- package/assets/devtools-ui/chunk.p3HJvugM.js +0 -1
- package/assets/devtools-ui/chunk.p3HJvugM.js.br +0 -0
- package/assets/devtools-ui/chunk.r_Xoa_CI.js +0 -1
- package/assets/devtools-ui/chunk.r_Xoa_CI.js.br +0 -0
- package/assets/devtools-ui/chunk.sRNuTYXb.js +0 -1
- package/assets/devtools-ui/chunk.sRNuTYXb.js.br +0 -0
- package/assets/devtools-ui/chunk.tUjcyX5C.js +0 -1
- package/assets/devtools-ui/chunk.tUjcyX5C.js.br +0 -0
- package/assets/devtools-ui/chunk.thjBxvCA.js +0 -1
- package/assets/devtools-ui/chunk.thjBxvCA.js.br +0 -0
- package/assets/devtools-ui/entry.GYhBVRpC.js +0 -78
- package/assets/devtools-ui/entry.GYhBVRpC.js.br +0 -0
- package/src/server/links/services/DefinitionsPool.spec.ts +0 -86
- package/src/server/links/services/DefinitionsPool.ts +0 -43
|
@@ -35,6 +35,12 @@ export class ServerAuthProvider {
|
|
|
35
35
|
protected readonly dateTimeProvider = $inject(DateTimeProvider);
|
|
36
36
|
protected readonly serverLinksProvider = $inject(ServerLinksProvider);
|
|
37
37
|
|
|
38
|
+
public get identities(): Array<AuthPrimitive> {
|
|
39
|
+
return this.alepha
|
|
40
|
+
.primitives($auth)
|
|
41
|
+
.filter((auth) => !auth.options.disabled);
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
protected readonly authorizationCode = $cookie({
|
|
39
45
|
name: "authorizationCode",
|
|
40
46
|
ttl: [15, "minutes"],
|
|
@@ -58,47 +64,6 @@ export class ServerAuthProvider {
|
|
|
58
64
|
schema: tokensSchema,
|
|
59
65
|
});
|
|
60
66
|
|
|
61
|
-
public get identities(): Array<AuthPrimitive> {
|
|
62
|
-
return this.alepha
|
|
63
|
-
.primitives($auth)
|
|
64
|
-
.filter((auth) => !auth.options.disabled);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
public getAuthenticationProviders(
|
|
68
|
-
filters: { realmName?: string } = {},
|
|
69
|
-
): AuthenticationProvider[] {
|
|
70
|
-
const providers: AuthenticationProvider[] = [];
|
|
71
|
-
|
|
72
|
-
for (const identity of this.identities) {
|
|
73
|
-
if (filters.realmName) {
|
|
74
|
-
const issuer = identity.issuer;
|
|
75
|
-
if (!issuer || issuer.name !== filters.realmName) {
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const type =
|
|
81
|
-
"oidc" in identity.options
|
|
82
|
-
? "OIDC"
|
|
83
|
-
: "oauth" in identity.options
|
|
84
|
-
? "OAUTH2"
|
|
85
|
-
: "credentials" in identity.options
|
|
86
|
-
? "CREDENTIALS"
|
|
87
|
-
: undefined;
|
|
88
|
-
|
|
89
|
-
if (!type) {
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
providers.push({
|
|
94
|
-
name: identity.name,
|
|
95
|
-
type,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return providers;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
67
|
protected readonly configure = $hook({
|
|
103
68
|
on: "configure",
|
|
104
69
|
handler: async () => {
|
|
@@ -108,20 +73,6 @@ export class ServerAuthProvider {
|
|
|
108
73
|
},
|
|
109
74
|
});
|
|
110
75
|
|
|
111
|
-
protected getAccessTokens(tokens: Tokens) {
|
|
112
|
-
const idp = this.provider(tokens.provider);
|
|
113
|
-
|
|
114
|
-
if (
|
|
115
|
-
"oidc" in idp.options &&
|
|
116
|
-
!("realm" in idp.options) &&
|
|
117
|
-
idp.options.oidc?.useIdToken
|
|
118
|
-
) {
|
|
119
|
-
return tokens.id_token;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return tokens.access_token;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
76
|
/**
|
|
126
77
|
* Fill request headers with access token from cookies or fallback to provider's fallback function.
|
|
127
78
|
*/
|
|
@@ -135,7 +86,7 @@ export class ServerAuthProvider {
|
|
|
135
86
|
if (cookies) {
|
|
136
87
|
const tokens = await this.cookiesToTokens(cookies);
|
|
137
88
|
if (tokens) {
|
|
138
|
-
request.headers.authorization = `Bearer ${this.
|
|
89
|
+
request.headers.authorization = `Bearer ${this.extractAccessToken(tokens)}`;
|
|
139
90
|
this.log.trace("Access token set in request headers", {
|
|
140
91
|
provider: tokens.provider,
|
|
141
92
|
});
|
|
@@ -157,86 +108,6 @@ export class ServerAuthProvider {
|
|
|
157
108
|
},
|
|
158
109
|
});
|
|
159
110
|
|
|
160
|
-
/**
|
|
161
|
-
* Convert cookies to tokens.
|
|
162
|
-
* If the tokens are expired, try to refresh them using the refresh token.
|
|
163
|
-
*/
|
|
164
|
-
protected async cookiesToTokens(
|
|
165
|
-
cookies: Cookies,
|
|
166
|
-
): Promise<Tokens | undefined> {
|
|
167
|
-
const tokens = this.getTokens(cookies);
|
|
168
|
-
if (!tokens) {
|
|
169
|
-
// no cookie, no tokens
|
|
170
|
-
this.log.trace("No tokens found in cookies");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
this.log.trace("Tokens found in cookies", {
|
|
175
|
-
expires_in: tokens.expires_in,
|
|
176
|
-
issued_at: tokens.issued_at,
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
// check if tokens are expired
|
|
180
|
-
const refreshedTokens = await this.refreshTokens(tokens);
|
|
181
|
-
if (!refreshedTokens) {
|
|
182
|
-
this.tokens.del({ cookies });
|
|
183
|
-
// 08/25: exception here will go to Server error handler, not the React one
|
|
184
|
-
// better to remove cookie & session and let the page handle 401 Unauthorized
|
|
185
|
-
//throw new SessionExpiredError("Session expired. Please login again.");
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (refreshedTokens.access_token !== tokens.access_token) {
|
|
190
|
-
this.setTokens(refreshedTokens, cookies);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return refreshedTokens;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
protected async refreshTokens(tokens: Tokens): Promise<Tokens | undefined> {
|
|
197
|
-
if (tokens.expires_in && tokens.issued_at) {
|
|
198
|
-
const gracePeriodSec = 10;
|
|
199
|
-
const expiresAt = tokens.issued_at + (tokens.expires_in - gracePeriodSec);
|
|
200
|
-
|
|
201
|
-
if (expiresAt < this.dateTimeProvider.now().unix()) {
|
|
202
|
-
this.log.trace("Tokens are expired");
|
|
203
|
-
|
|
204
|
-
// oh no, it is expired
|
|
205
|
-
if (tokens.refresh_token) {
|
|
206
|
-
this.log.trace("Trying to refresh tokens using refresh token");
|
|
207
|
-
// but has refresh token!
|
|
208
|
-
try {
|
|
209
|
-
const provider = this.provider(tokens);
|
|
210
|
-
const result = await provider.refresh(
|
|
211
|
-
tokens.refresh_token,
|
|
212
|
-
tokens.access_token,
|
|
213
|
-
);
|
|
214
|
-
const newTokens = {
|
|
215
|
-
...result,
|
|
216
|
-
provider: tokens.provider,
|
|
217
|
-
issued_at: this.dateTimeProvider.now().unix(),
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
this.log.debug("Tokens refreshed successfully");
|
|
221
|
-
|
|
222
|
-
return newTokens;
|
|
223
|
-
} catch (e) {
|
|
224
|
-
this.log.warn("Failed to refresh token", e);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// session expired and no (valid) refresh token
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (!tokens.issued_at && tokens.access_token) {
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
return tokens;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
111
|
// -------------------------------------------------------------------------------------------------------------------
|
|
241
112
|
|
|
242
113
|
/**
|
|
@@ -412,7 +283,7 @@ export class ServerAuthProvider {
|
|
|
412
283
|
provider: query.provider,
|
|
413
284
|
realm: query.realm,
|
|
414
285
|
});
|
|
415
|
-
const oauth = provider.
|
|
286
|
+
const oauth = await provider.getOAuth();
|
|
416
287
|
if (!oauth) {
|
|
417
288
|
throw new SecurityError(
|
|
418
289
|
`Auth provider '${query.provider}' does not support OAuth2`,
|
|
@@ -495,7 +366,7 @@ export class ServerAuthProvider {
|
|
|
495
366
|
}
|
|
496
367
|
|
|
497
368
|
const provider = this.provider(authorizationCode);
|
|
498
|
-
const oauth = provider.
|
|
369
|
+
const oauth = await provider.getOAuth();
|
|
499
370
|
if (!oauth) {
|
|
500
371
|
throw new SecurityError(
|
|
501
372
|
`Auth provider '${provider.name}' does not support OAuth2`,
|
|
@@ -586,7 +457,7 @@ export class ServerAuthProvider {
|
|
|
586
457
|
}
|
|
587
458
|
}
|
|
588
459
|
|
|
589
|
-
const oauth = provider.
|
|
460
|
+
const oauth = await provider.getOAuth();
|
|
590
461
|
if (!oauth) {
|
|
591
462
|
reply.redirect(redirect, 302);
|
|
592
463
|
return;
|
|
@@ -623,6 +494,45 @@ export class ServerAuthProvider {
|
|
|
623
494
|
},
|
|
624
495
|
});
|
|
625
496
|
|
|
497
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
498
|
+
|
|
499
|
+
public getAuthenticationProviders(
|
|
500
|
+
filters: { realmName?: string } = {},
|
|
501
|
+
): AuthenticationProvider[] {
|
|
502
|
+
const providers: AuthenticationProvider[] = [];
|
|
503
|
+
|
|
504
|
+
for (const identity of this.identities) {
|
|
505
|
+
if (filters.realmName) {
|
|
506
|
+
const issuer = identity.issuer;
|
|
507
|
+
if (!issuer || issuer.name !== filters.realmName) {
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
const type =
|
|
513
|
+
"oidc" in identity.options
|
|
514
|
+
? "OIDC"
|
|
515
|
+
: "oauth" in identity.options
|
|
516
|
+
? "OAUTH2"
|
|
517
|
+
: "credentials" in identity.options
|
|
518
|
+
? "CREDENTIALS"
|
|
519
|
+
: undefined;
|
|
520
|
+
|
|
521
|
+
if (!type) {
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
providers.push({
|
|
526
|
+
name: identity.name,
|
|
527
|
+
type,
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return providers;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
535
|
+
|
|
626
536
|
/**
|
|
627
537
|
* Find an auth provider by name and optionally by realm.
|
|
628
538
|
* When realm is specified, it filters providers by both name and realm.
|
|
@@ -655,6 +565,42 @@ export class ServerAuthProvider {
|
|
|
655
565
|
return identity;
|
|
656
566
|
}
|
|
657
567
|
|
|
568
|
+
/**
|
|
569
|
+
* Convert cookies to tokens.
|
|
570
|
+
* If the tokens are expired, try to refresh them using the refresh token.
|
|
571
|
+
*/
|
|
572
|
+
protected async cookiesToTokens(
|
|
573
|
+
cookies: Cookies,
|
|
574
|
+
): Promise<Tokens | undefined> {
|
|
575
|
+
const tokens = this.getTokens(cookies);
|
|
576
|
+
if (!tokens) {
|
|
577
|
+
// no cookie, no tokens
|
|
578
|
+
this.log.trace("No tokens found in cookies");
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
this.log.trace("Tokens found in cookies", {
|
|
583
|
+
expires_in: tokens.expires_in,
|
|
584
|
+
issued_at: tokens.issued_at,
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
// check if tokens are expired
|
|
588
|
+
const refreshedTokens = await this.refreshTokens(tokens);
|
|
589
|
+
if (!refreshedTokens) {
|
|
590
|
+
this.tokens.del({ cookies });
|
|
591
|
+
// 08/25: exception here will go to Server error handler, not the React one
|
|
592
|
+
// better to remove cookie & session and let the page handle 401 Unauthorized
|
|
593
|
+
//throw new SessionExpiredError("Session expired. Please login again.");
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
if (refreshedTokens.access_token !== tokens.access_token) {
|
|
598
|
+
this.setTokens(refreshedTokens, cookies);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return refreshedTokens;
|
|
602
|
+
}
|
|
603
|
+
|
|
658
604
|
protected getTokens(cookies?: Cookies): Tokens | undefined {
|
|
659
605
|
return this.tokens.get({ cookies });
|
|
660
606
|
}
|
|
@@ -674,8 +620,68 @@ export class ServerAuthProvider {
|
|
|
674
620
|
ttl,
|
|
675
621
|
});
|
|
676
622
|
}
|
|
623
|
+
|
|
624
|
+
protected extractAccessToken(tokens: Tokens) {
|
|
625
|
+
const idp = this.provider(tokens.provider);
|
|
626
|
+
|
|
627
|
+
if (
|
|
628
|
+
"oidc" in idp.options &&
|
|
629
|
+
!("realm" in idp.options) &&
|
|
630
|
+
idp.options.oidc?.useIdToken
|
|
631
|
+
) {
|
|
632
|
+
return tokens.id_token;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return tokens.access_token;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
protected async refreshTokens(tokens: Tokens): Promise<Tokens | undefined> {
|
|
639
|
+
if (tokens.expires_in && tokens.issued_at) {
|
|
640
|
+
const gracePeriodSec = 10;
|
|
641
|
+
const expiresAt = tokens.issued_at + (tokens.expires_in - gracePeriodSec);
|
|
642
|
+
|
|
643
|
+
if (expiresAt < this.dateTimeProvider.now().unix()) {
|
|
644
|
+
this.log.trace("Tokens are expired");
|
|
645
|
+
|
|
646
|
+
// oh no, it is expired
|
|
647
|
+
if (tokens.refresh_token) {
|
|
648
|
+
this.log.trace("Trying to refresh tokens using refresh token");
|
|
649
|
+
// but has refresh token!
|
|
650
|
+
try {
|
|
651
|
+
const provider = this.provider(tokens);
|
|
652
|
+
const result = await provider.refresh(
|
|
653
|
+
tokens.refresh_token,
|
|
654
|
+
tokens.access_token,
|
|
655
|
+
);
|
|
656
|
+
const newTokens = {
|
|
657
|
+
...result,
|
|
658
|
+
provider: tokens.provider,
|
|
659
|
+
issued_at: this.dateTimeProvider.now().unix(),
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
this.log.debug("Tokens refreshed successfully");
|
|
663
|
+
|
|
664
|
+
return newTokens;
|
|
665
|
+
} catch (e) {
|
|
666
|
+
this.log.warn("Failed to refresh token", e);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// session expired and no (valid) refresh token
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (!tokens.issued_at && tokens.access_token) {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
return tokens;
|
|
680
|
+
}
|
|
677
681
|
}
|
|
678
682
|
|
|
683
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
684
|
+
|
|
679
685
|
export interface OAuth2Profile {
|
|
680
686
|
sub: string; // Subject - unique ID per user (required by OpenID)
|
|
681
687
|
email?: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCipheriv,
|
|
3
3
|
createDecipheriv,
|
|
4
|
+
createHash,
|
|
4
5
|
createHmac,
|
|
5
6
|
randomBytes,
|
|
6
7
|
timingSafeEqual,
|
|
7
8
|
} from "node:crypto";
|
|
8
9
|
import { deflateRawSync, inflateRawSync } from "node:zlib";
|
|
9
10
|
import {
|
|
10
|
-
$env,
|
|
11
11
|
$hook,
|
|
12
12
|
$inject,
|
|
13
13
|
Alepha,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
type Static,
|
|
16
16
|
type TSchema,
|
|
17
17
|
} from "alepha";
|
|
18
|
+
import { SecretProvider } from "alepha/crypto";
|
|
18
19
|
import { DateTimeProvider } from "alepha/datetime";
|
|
19
20
|
import { $logger } from "alepha/logger";
|
|
20
|
-
import { alephaSecurityEnvSchema } from "alepha/security";
|
|
21
21
|
import type {
|
|
22
22
|
Cookie,
|
|
23
23
|
CookiePrimitiveOptions,
|
|
@@ -30,7 +30,7 @@ export class ServerCookiesProvider {
|
|
|
30
30
|
protected readonly log = $logger();
|
|
31
31
|
protected readonly cookieParser = $inject(CookieParser);
|
|
32
32
|
protected readonly dateTimeProvider = $inject(DateTimeProvider);
|
|
33
|
-
protected readonly
|
|
33
|
+
protected readonly secretProvider = $inject(SecretProvider);
|
|
34
34
|
|
|
35
35
|
// crypto constants
|
|
36
36
|
protected readonly ALGORITHM = "aes-256-gcm";
|
|
@@ -186,11 +186,7 @@ export class ServerCookiesProvider {
|
|
|
186
186
|
|
|
187
187
|
protected encrypt(text: string): string {
|
|
188
188
|
const iv = randomBytes(this.IV_LENGTH);
|
|
189
|
-
const cipher = createCipheriv(
|
|
190
|
-
this.ALGORITHM,
|
|
191
|
-
Buffer.from(this.secretKey()),
|
|
192
|
-
iv,
|
|
193
|
-
);
|
|
189
|
+
const cipher = createCipheriv(this.ALGORITHM, this.deriveKey(), iv);
|
|
194
190
|
const encrypted = Buffer.concat([
|
|
195
191
|
cipher.update(text, "utf8"),
|
|
196
192
|
cipher.final(),
|
|
@@ -208,11 +204,7 @@ export class ServerCookiesProvider {
|
|
|
208
204
|
);
|
|
209
205
|
|
|
210
206
|
const encrypted = data.subarray(this.IV_LENGTH + this.AUTH_TAG_LENGTH);
|
|
211
|
-
const decipher = createDecipheriv(
|
|
212
|
-
this.ALGORITHM,
|
|
213
|
-
Buffer.from(this.secretKey()),
|
|
214
|
-
iv,
|
|
215
|
-
);
|
|
207
|
+
const decipher = createDecipheriv(this.ALGORITHM, this.deriveKey(), iv);
|
|
216
208
|
|
|
217
209
|
decipher.setAuthTag(authTag);
|
|
218
210
|
|
|
@@ -224,19 +216,15 @@ export class ServerCookiesProvider {
|
|
|
224
216
|
return decrypted.toString("utf8");
|
|
225
217
|
}
|
|
226
218
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
// truncate secret to 32 bytes
|
|
234
|
-
secret = secret.substring(0, 32);
|
|
235
|
-
}
|
|
236
|
-
return secret;
|
|
219
|
+
/**
|
|
220
|
+
* Derives a 32-byte key from APP_SECRET via SHA-256.
|
|
221
|
+
* Accepts any string length — no padding or truncation needed.
|
|
222
|
+
*/
|
|
223
|
+
protected deriveKey(): Buffer {
|
|
224
|
+
return createHash("sha256").update(this.secretProvider.secretKey).digest();
|
|
237
225
|
}
|
|
238
226
|
|
|
239
227
|
protected sign(data: string): string {
|
|
240
|
-
return createHmac("sha256", this.
|
|
228
|
+
return createHmac("sha256", this.deriveKey()).update(data).digest("hex");
|
|
241
229
|
}
|
|
242
230
|
}
|
package/src/server/core/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "./primitives/$action.ts";
|
|
18
18
|
import { $middleware } from "./primitives/$middleware.ts";
|
|
19
19
|
import { $route } from "./primitives/$route.ts";
|
|
20
|
+
import { $sse } from "./primitives/$sse.ts";
|
|
20
21
|
import { BunHttpServerProvider } from "./providers/BunHttpServerProvider.ts";
|
|
21
22
|
import { NodeHttpServerProvider } from "./providers/NodeHttpServerProvider.ts";
|
|
22
23
|
import { ServerBodyParserProvider } from "./providers/ServerBodyParserProvider.ts";
|
|
@@ -111,6 +112,7 @@ export * from "./primitives/$action.ts";
|
|
|
111
112
|
export * from "./primitives/$circuit.ts";
|
|
112
113
|
export * from "./primitives/$middleware.ts";
|
|
113
114
|
export * from "./primitives/$route.ts";
|
|
115
|
+
export * from "./primitives/$sse.ts";
|
|
114
116
|
export * from "./providers/BunHttpServerProvider.ts";
|
|
115
117
|
export * from "./providers/NodeHttpServerProvider.ts";
|
|
116
118
|
export * from "./providers/ServerCompressProvider.ts";
|
|
@@ -146,7 +148,7 @@ export * from "./services/UserAgentParser.ts";
|
|
|
146
148
|
*/
|
|
147
149
|
export const AlephaServer = $module({
|
|
148
150
|
name: "alepha.server",
|
|
149
|
-
primitives: [$route, $action, $middleware],
|
|
151
|
+
primitives: [$route, $action, $middleware, $sse],
|
|
150
152
|
services: [
|
|
151
153
|
ServerProvider,
|
|
152
154
|
BunHttpServerProvider,
|