@starci/hfs 5.2.0 → 5.4.0
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/CHANGELOG.md +43 -0
- package/README.md +2 -1
- package/cache/hfs-family.d.mts +2 -3
- package/cache/hfs-family.mjs +4 -9
- package/cache/secret-records.d.mts +7 -0
- package/cache/secret-records.mjs +12 -0
- package/cache/session.mjs +4 -2
- package/codemod/account-doors.d.mts +36 -0
- package/codemod/account-doors.mjs +134 -0
- package/codemod/app-prettier.d.mts +5 -0
- package/codemod/app-prettier.mjs +27 -0
- package/codemod/explicit-surface.mjs +1 -25
- package/codemod/main.mjs +35 -1
- package/codemod/module-definition.d.mts +59 -0
- package/codemod/module-definition.mjs +257 -0
- package/codemod/quality-binding.d.mts +33 -0
- package/codemod/quality-binding.mjs +38 -0
- package/codemod/secrets-cache.d.mts +35 -0
- package/codemod/secrets-cache.mjs +70 -0
- package/codemod/sops-rules.d.mts +34 -0
- package/codemod/sops-rules.mjs +69 -0
- package/codemod/theme-tokens.mjs +48 -2
- package/lint/run.d.mts +6 -0
- package/lint/run.mjs +63 -10
- package/package.json +1 -1
- package/runtime/knowledge/hfs/canon-pins.yaml +43 -10
- package/runtime/knowledge/hfs/fe-stack.yaml +3 -3
- package/runtime/knowledge/hfs/rules.yaml +13 -9
- package/runtime/knowledge/hfs/slots.yaml +105 -12
- package/runtime/modules/kernel/failure-codes.yaml +5 -4
- package/runtime/scripts/hfs/architecture/config.d.mts +4 -0
- package/runtime/scripts/hfs/architecture/config.mjs +25 -1
- package/runtime/scripts/hfs/architecture/module-per-transport.d.mts +1 -1
- package/runtime/scripts/hfs/architecture/module-per-transport.mjs +6 -1
- package/runtime/scripts/hfs/architecture/root-packages.d.mts +26 -0
- package/runtime/scripts/hfs/architecture/root-packages.mjs +78 -0
- package/runtime/scripts/hfs/architecture/type-context.d.mts +4 -1
- package/runtime/scripts/hfs/architecture/type-context.mjs +30 -0
- package/runtime/scripts/hfs/architecture/typescript.d.mts +7 -1
- package/runtime/scripts/hfs/architecture/typescript.mjs +21 -1
- package/runtime/scripts/hfs/explicit-surface-rule.mjs +1 -1
- package/runtime/scripts/hfs/rules/database-access.mjs +39 -1
- package/runtime/scripts/hfs/rules/monorepo.d.mts +4 -0
- package/runtime/scripts/hfs/rules/monorepo.mjs +10 -5
- package/runtime/scripts/hfs/rules/secrets.mjs +11 -0
- package/runtime/scripts/hfs/secret-errors.d.mts +3 -0
- package/runtime/scripts/hfs/secret-errors.mjs +8 -0
- package/runtime/scripts/hfs/secret-init.d.mts +6 -0
- package/runtime/scripts/hfs/secret-init.mjs +23 -0
- package/runtime/scripts/hfs/secret-sops.mjs +9 -1
- package/runtime/scripts/hfs/secret-standard.d.mts +20 -0
- package/runtime/scripts/hfs/secret-standard.mjs +106 -0
- package/runtime/scripts/hfs/secret.mjs +5 -1
- package/runtime/scripts/hfs/view.d.mts +23 -0
- package/runtime/scripts/hfs/view.mjs +68 -0
- package/runtime/scripts/lib/declaration-surface.d.mts +4 -0
- package/runtime/scripts/lib/declaration-surface.mjs +55 -1
- package/runtime/scripts/lib/secret-records.d.mts +13 -0
- package/runtime/scripts/lib/secret-records.mjs +83 -0
- package/scaffold/add-inbox-lite.mjs +2 -2
- package/scaffold/add-queue-lite.mjs +1 -3
- package/scaffold/app.d.mts +2 -2
- package/scaffold/app.mjs +10 -12
- package/scaffold/lite-exports.mjs +1 -15
- package/scripts/sync-bundles.d.mts +8 -0
- package/stack/images/openclaw-runtime/Dockerfile +18 -0
- package/stack/images/openclaw-runtime/entrypoint.sh +23 -0
- package/stack/images/openclaw-runtime/openclaw-init.mjs +101 -0
- package/stack/images/openclaw-runtime/openclaw-relay.mjs +25 -0
- package/stack/local-up.mjs +3 -0
- package/stack/runtime-layers.d.mts +21 -0
- package/stack/runtime-layers.mjs +67 -0
- package/sync/compile-guard.d.mts +36 -0
- package/sync/compile-guard.mjs +189 -0
- package/sync/hygiene.mjs +3 -1
- package/sync/index.d.mts +11 -1
- package/sync/index.mjs +61 -10
- package/templates/app/auth-doors.sql.partial +115 -0
- package/templates/app/ci-workflows/github/workflows/ci.yml +1 -1
- package/templates/app/ci-workflows-lite/github/workflows/ci.yml +1 -1
- package/templates/app/package-scripts/core.json +1 -1
- package/templates/app/package-scripts/package.json +1 -1
- package/templates/app/package-scripts-lite/package.json +1 -1
- package/templates/app/skeleton-lite/.starcistacks/application-stacks.yaml +9 -0
- package/templates/app/skeleton-lite/.starcistacks/dev/README.md +3 -1
- package/templates/app/skeleton-lite/.starcistacks/dev/infra/compose/compose.yaml +19 -1
- package/templates/app/skeleton-lite/.starcistacks/dev/runtime/env/KEYS.md +3 -0
- package/templates/app/skeleton-lite/.starcistacks/production/infra/swarm/stack.yaml +5 -0
- package/templates/app/skeleton-lite/.starcistacks/production/runtime/env/KEYS.md +4 -0
- package/templates/app/skeleton-lite/db/migrations/__timestamp___baseline.sql +27 -5
- package/templates/be/auth-lite/src/features/api/auth/application/auth.contracts.ts +33 -0
- package/templates/be/auth-lite/src/features/api/auth/application/confirm.command.ts +11 -0
- package/templates/be/auth-lite/src/features/api/auth/application/confirm.handler.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/application/forgot.command.ts +11 -0
- package/templates/be/auth-lite/src/features/api/auth/application/forgot.handler.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/application/resend.command.ts +11 -0
- package/templates/be/auth-lite/src/features/api/auth/application/resend.handler.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/application/reset.command.ts +11 -0
- package/templates/be/auth-lite/src/features/api/auth/application/reset.handler.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/application/signup.command.ts +11 -0
- package/templates/be/auth-lite/src/features/api/auth/application/signup.handler.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/auth.module-definition.ts +3 -10
- package/templates/be/auth-lite/src/features/api/auth/auth.module.ts +6 -1
- package/templates/be/auth-lite/src/features/api/auth/transport/http/auth-http.module-definition.ts +3 -10
- package/templates/be/auth-lite/src/features/api/auth/transport/http/auth.controller.ts +56 -1
- package/templates/be/auth-lite/src/features/api/auth/transport/http/dto/forgot.request.ts +16 -0
- package/templates/be/auth-lite/src/features/api/auth/transport/http/dto/resend.request.ts +16 -0
- package/templates/be/auth-lite/src/features/api/auth/transport/http/dto/reset.request.ts +18 -0
- package/templates/be/auth-lite/src/features/api/auth/transport/http/dto/signup.request.ts +22 -0
- package/templates/be/auth-lite/src/features/api/auth/transport/http/dto/token.request.ts +11 -0
- package/templates/be/auth-lite/src/modules/domain/identity/account-directory.service.spec.ts +30 -30
- package/templates/be/auth-lite/src/modules/domain/identity/account-directory.service.ts +7 -16
- package/templates/be/auth-lite/src/modules/domain/identity/authenticator.service.spec.ts +113 -49
- package/templates/be/auth-lite/src/modules/domain/identity/authenticator.service.ts +42 -53
- package/templates/be/auth-lite/src/modules/domain/identity/identity-email.log-events.ts +6 -0
- package/templates/be/auth-lite/src/modules/domain/identity/identity-email.service.spec.ts +233 -0
- package/templates/be/auth-lite/src/modules/domain/identity/identity-email.service.ts +176 -0
- package/templates/be/auth-lite/src/modules/domain/identity/identity-sign-in.log-events.ts +6 -0
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/account-doors.port.ts +98 -0
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/entities/identity-email-token.entity.ts +34 -0
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/entities/identity-refresh-token.entity.ts +4 -0
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/entities/index.ts +3 -10
- package/templates/be/auth-lite/src/modules/domain/identity/session-store.service.spec.ts +6 -3
- package/templates/be/auth-lite/src/modules/domain/identity/session-store.service.ts +6 -1
- package/templates/be/auth-lite/src/modules/domain/identity/sign-in.service.spec.ts +17 -0
- package/templates/be/auth-lite/src/modules/domain/identity/sign-in.service.ts +6 -0
- package/templates/be/auth-lite/src/tests/fixtures/builders/identity.builder.ts +29 -33
- package/templates/be/inbox/module-definition.ts.tpl +2 -9
- package/templates/be/inbox/platform/event-bus/event-bus.module-definition.ts.tpl +2 -11
- package/templates/be/inbox/platform/inbox/inbox.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/api/feature.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/api/graphql.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/cli/group.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/event-bus/platform/event-bus.module-definition.ts.tpl +3 -10
- package/templates/be/patterns/idempotency/platform/inbox/inbox.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/jobs/job.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/jobs/job.queue.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/jobs/platform/jobs.module-definition.ts.tpl +3 -10
- package/templates/be/patterns/projections/projection.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/queues/platform/queue.module-definition.ts.tpl +3 -10
- package/templates/be/patterns/queues/queue.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/reactors/message.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/reactors/reactor.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/realtime/channel.graphql.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/realtime/channel.sse.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/realtime/channel.websocket.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/saga/saga.message.module-definition.ts.tpl +3 -9
- package/templates/be/patterns/saga/saga.module-definition.ts.tpl +2 -9
- package/templates/be/patterns/webhooks/webhook.http.module-definition.ts.tpl +3 -9
- package/templates/be/platform/graphql/graphql.module-definition.ts +2 -9
- package/templates/be/skeleton/src/features/api/system-health/system-health.module-definition.ts +3 -9
- package/templates/be/skeleton/src/features/api/system-health/transport/http/system-health-http.module-definition.ts +3 -9
- package/templates/be/skeleton/src/features/cli/cli.module-definition.ts +2 -9
- package/templates/be/skeleton/src/features/cli/migrate/migrate.module-definition.ts +3 -9
- package/templates/be/skeleton/src/features/cli/seed/seed.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/domain/identity/identity.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/domain/liveness/liveness.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/domain/note/note.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/platform/clock/clock.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.contracts.ts +2 -0
- package/templates/be/skeleton/src/modules/platform/cqrs/cqrs.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/platform/database/database.module-definition.ts +3 -13
- package/templates/be/skeleton/src/modules/platform/errors/errors.module-definition.ts +4 -11
- package/templates/be/skeleton/src/modules/platform/http/http.module-definition.ts +4 -9
- package/templates/be/skeleton/src/modules/platform/http-security/http-security.module-definition.ts +5 -11
- package/templates/be/skeleton/src/modules/platform/i18n/i18n.module-definition.ts +4 -11
- package/templates/be/skeleton/src/modules/platform/ids/ids.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/platform/logging/logging.module-definition.ts +2 -9
- package/templates/be/skeleton/src/modules/platform/retry/retry.module-definition.ts +2 -9
- package/templates/be/skeleton-lite/apps/api/src/api.env.ts +4 -0
- package/templates/be/skeleton-lite/apps/api/src/api.options.ts +3 -0
- package/templates/be/skeleton-lite/apps/api/src/compose/integrations.ts +3 -1
- package/templates/be/skeleton-lite/src/modules/domain/identity/errors/identity.error.ts +6 -0
- package/templates/be/skeleton-lite/src/modules/domain/identity/identity.module.ts +3 -0
- package/templates/be/skeleton-lite/src/modules/domain/identity/index.ts +1 -0
- package/templates/be/skeleton-lite/src/modules/domain/identity/messages/identity-mail.messages.ts +65 -0
- package/templates/be/skeleton-lite/src/modules/domain/identity/messages/identity.messages.ts +4 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/index.ts +6 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/mail.config.ts +33 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/mail.decorators.ts +14 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/mail.module-definition.ts +12 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/mail.module.ts +27 -0
- package/templates/be/skeleton-lite/src/modules/integrations/mail/mail.options.ts +22 -0
- package/templates/be/skeleton-lite/src/modules/integrations/object-storage/object-storage.module-definition.ts +2 -9
- package/templates/be/skeleton-lite/src/modules/integrations/passport/index.ts +1 -1
- package/templates/be/skeleton-lite/src/modules/platform/database/index.ts +1 -0
- package/templates/be/skeleton-lite/src/modules/platform/http-security/rate-limit.guard.spec.ts +11 -0
- package/templates/be/skeleton-lite/src/tests/fixtures/builders/api.builder.ts +11 -0
- package/templates/be/table/api/feature.module-definition.ts.tpl +3 -9
- package/templates/be/table/api/graphql.module-definition.ts.tpl +3 -9
- package/templates/be/table/module-definition.ts.tpl +2 -9
- package/templates/fe/auth-lite/apps/web/src/modules/auth/email-doors.ts +16 -0
- package/templates/fe/auth-lite/apps/web/src/modules/auth/index.ts +5 -0
- package/templates/fe/skeleton/packages/__project__-i18n/src/index.ts +30 -67
- package/templates/fe/skeleton/packages/__project__-i18n/src/proxy.ts +6 -21
- package/templates/fe/skeleton/packages/__project__-i18n/src/routing.ts +10 -16
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/auth/confirm/page.tsx +9 -0
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/auth/forgot/page.tsx +9 -0
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/auth/resend/page.tsx +9 -0
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/auth/reset/page.tsx +9 -0
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/auth/signup/page.tsx +9 -0
- package/templates/fe/skeleton-lite/apps/web/src/app/[locale]/layout.tsx +5 -9
- package/templates/fe/skeleton-lite/apps/web/src/components/blocks/EmailDoorForm/component.tsx +51 -0
- package/templates/fe/skeleton-lite/apps/web/src/components/blocks/EmailDoorForm/index.tsx +84 -0
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppConfirmPage/index.tsx +25 -0
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppForgotPage/index.tsx +21 -0
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppHomePage/component.tsx +11 -3
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppHomePage/index.tsx +4 -1
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppResendPage/index.tsx +21 -0
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppResetPage/index.tsx +25 -0
- package/templates/fe/skeleton-lite/apps/web/src/features/pages/AppSignupPage/index.tsx +21 -0
- package/templates/fe/skeleton-lite/apps/web/src/hooks/emailAuth/emailAuth.shared.ts +12 -0
- package/templates/fe/skeleton-lite/apps/web/src/hooks/emailAuth/index.ts +2 -0
- package/templates/fe/skeleton-lite/apps/web/src/hooks/emailAuth/useEmailDoor.ts +32 -0
- package/templates/fe/skeleton-lite/apps/web/src/modules/i18n/index.ts +2 -2
- package/templates/fe/skeleton-lite/apps/web/src/modules/i18n/messages/en.json +50 -1
- package/templates/fe/skeleton-lite/apps/web/src/modules/i18n/messages/vi.json +50 -1
- package/templates/fe/skeleton-lite/apps/web/src/modules/i18n/request.ts +7 -30
- package/templates/fe/skeleton-lite/apps/web/src/modules/i18n/routing.ts +13 -14
- package/templates/fe/skeleton-lite/apps/web/src/modules/routes/index.ts +5 -0
- package/templates/fe/skeleton-lite/apps/web/src/proxy.ts +4 -17
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/entities/auth-identity.entity.ts +0 -38
- package/templates/be/auth-lite/src/modules/domain/identity/persistence/entities/auth-user.entity.ts +0 -54
|
@@ -48,6 +48,23 @@ describe("IdentitySignInService", () => {
|
|
|
48
48
|
expect(await subject.jwks()).toEqual({ keys: [] })
|
|
49
49
|
})
|
|
50
50
|
|
|
51
|
+
it("signs the caller out of every other device, keeping the session of the token", async () => {
|
|
52
|
+
const { subject, sessions } = await build()
|
|
53
|
+
sessions.endOthers.mockResolvedValue()
|
|
54
|
+
|
|
55
|
+
await subject.endOthers({ id: "u-1", role: "authenticated", sessionId: "s-1" })
|
|
56
|
+
|
|
57
|
+
expect(sessions.endOthers).toHaveBeenCalledWith("u-1", "s-1")
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it("refuses to sign out the other devices of a token that names no session", async () => {
|
|
61
|
+
const { subject, sessions } = await build()
|
|
62
|
+
sessions.endOthers.mockRejectedValue(new AuthError("IDENTITY_UNAUTHENTICATED"))
|
|
63
|
+
|
|
64
|
+
await expect(subject.endOthers({ id: "u-1", role: "authenticated" })).rejects.toMatchObject({ code: IdentityErrorCode.Unauthenticated })
|
|
65
|
+
expect(sessions.endOthers).toHaveBeenCalledWith("u-1", undefined)
|
|
66
|
+
})
|
|
67
|
+
|
|
51
68
|
it("turns a refusal of the package into the error family that owns its code", async () => {
|
|
52
69
|
const { subject, doors } = await build()
|
|
53
70
|
doors.refresh.mockRejectedValue(new AuthError("IDENTITY_REFRESH_REUSED"))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Managed by starci app sync (slot be.identity.sign-in); do not edit: run "npx starci app sync --execute".
|
|
2
2
|
import { Injectable } from "@nestjs/common"
|
|
3
3
|
import { AuthError, PassportError, PassportErrorCode } from "@modules/integrations/passport"
|
|
4
|
+
import type { Principal } from "@modules/platform/cqrs"
|
|
4
5
|
import { IdentityError, IdentityErrorCode } from "./errors/identity.error"
|
|
5
6
|
import { InjectAuthDoors, InjectAuthSessions } from "./identity.decorators"
|
|
6
7
|
import type { AccessGrant, AuthDoors, AuthSessions, GoogleRedirect, HttpExchange, JwksDocument } from "@modules/integrations/passport"
|
|
@@ -71,6 +72,11 @@ export class IdentitySignInService {
|
|
|
71
72
|
return this.refusing(() => this.doors.completeGoogle(exchange))
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
/** Signs the person out of every other device; the session of the caller stays. */
|
|
76
|
+
endOthers(principal: Principal): Promise<void> {
|
|
77
|
+
return this.refusing(() => this.sessions.endOthers(principal.id, principal.sessionId))
|
|
78
|
+
}
|
|
79
|
+
|
|
74
80
|
/** The public key document access tokens verify against. */
|
|
75
81
|
jwks(): Promise<JwksDocument> {
|
|
76
82
|
return this.refusing(() => this.sessions.jwks())
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
// Managed by starci app sync (slot be.identity.sign-in); do not edit: run "npx starci app sync --execute".
|
|
2
2
|
const BEFORE = new Date("2026-02-03T04:00:00.000Z")
|
|
3
|
-
const AFTER = new Date("2026-02-03T05:00:00.000Z")
|
|
4
3
|
|
|
5
|
-
/** The kinds of account
|
|
6
|
-
export type
|
|
4
|
+
/** The kinds of account the sign-in reads by address. */
|
|
5
|
+
export type AccountByEmailVariant = "live" | "disabled" | "unconfirmed" | "passwordless" | "invited"
|
|
7
6
|
|
|
8
|
-
/**
|
|
9
|
-
export
|
|
7
|
+
/** The kinds of account the sign-in reads by id. */
|
|
8
|
+
export type AccountByIdVariant = "live" | "disabled" | "addressless"
|
|
9
|
+
|
|
10
|
+
/** A row of the by-address door: `disabled` is what the database decided at its own now(). */
|
|
11
|
+
export interface AccountByEmailRow {
|
|
10
12
|
id: string
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
emailConfirmedAt: Date | null
|
|
16
|
-
lastSignInAt: Date | null
|
|
17
|
-
bannedUntil: Date | null
|
|
18
|
-
deletedAt: Date | null
|
|
19
|
-
isAnonymous: boolean
|
|
20
|
-
createdAt: Date | null
|
|
21
|
-
updatedAt: Date | null
|
|
13
|
+
email: string
|
|
14
|
+
encrypted_password: string | null
|
|
15
|
+
email_confirmed_at: Date | null
|
|
16
|
+
disabled: boolean
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
/** A row of the by-id door. */
|
|
20
|
+
export interface AccountByIdRow {
|
|
21
|
+
id: string
|
|
22
|
+
email: string | null
|
|
23
|
+
disabled: boolean
|
|
28
24
|
}
|
|
29
25
|
|
|
30
|
-
/**
|
|
31
|
-
export const
|
|
32
|
-
id:
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
/** The row the by-address door answers for a confirmed password account of the given variant. */
|
|
27
|
+
export const accountByEmailRow = (variant: AccountByEmailVariant = "live"): AccountByEmailRow => ({
|
|
28
|
+
id: "u-1",
|
|
29
|
+
email: "a@example.test",
|
|
30
|
+
encrypted_password: variant === "passwordless" || variant === "invited" ? null : "hash",
|
|
31
|
+
email_confirmed_at: variant === "unconfirmed" || variant === "invited" ? null : BEFORE,
|
|
32
|
+
disabled: variant === "disabled",
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
/** The row the by-id door answers for the account of the given variant; `id` is the account the spec stands for. */
|
|
36
|
+
export const accountByIdRow = (variant: AccountByIdVariant = "live", id = "u-1"): AccountByIdRow => ({
|
|
37
|
+
id,
|
|
35
38
|
email: variant === "addressless" ? null : "a@example.test",
|
|
36
|
-
|
|
37
|
-
emailConfirmedAt: variant === "unconfirmed" ? null : BEFORE,
|
|
38
|
-
lastSignInAt: null,
|
|
39
|
-
bannedUntil: bannedUntilOf(variant),
|
|
40
|
-
deletedAt: variant === "deleted" ? BEFORE : null,
|
|
41
|
-
isAnonymous: false,
|
|
42
|
-
createdAt: BEFORE,
|
|
43
|
-
updatedAt: BEFORE,
|
|
39
|
+
disabled: variant === "disabled",
|
|
44
40
|
})
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Provider@@InboxOptions } from "./@@provider@@-inbox.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Provider@@InboxOptions>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<@@Provider@@InboxOptions, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module class the module extends. */
|
|
10
|
-
export const
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<@@Provider@@InboxOptions>()
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { EventBusOptions } from "./event-bus.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<EventBusOptions>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<EventBusOptions, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module class the module extends. */
|
|
10
|
-
export const
|
|
11
|
-
/** The injection token of the registered options. */
|
|
12
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
13
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
14
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineCapabilityModule<EventBusOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { InboxOptions } from "./inbox.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<InboxOptions>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<InboxOptions, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module class the module extends. */
|
|
10
|
-
export const
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<InboxOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Feature@@ApiOptions } from "./@@feature@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Feature@@ApiOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Feature@@ApiOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@feature@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Feature@@ApiOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Feature@@GraphqlOptions } from "./@@feature@@-graphql.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Feature@@GraphqlOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Feature@@GraphqlOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@feature@@-graphql module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Feature@@GraphqlOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Group@@Options } from "./@@group@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Group@@Options>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Group@@Options, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@group@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<@@Group@@Options>()
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import { EVENT_BUS_OPTIONS } from "./event-bus.decorators"
|
|
3
3
|
import type { EventBusOptions } from "./event-bus.options"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** The configurable-module base of the event bus; `isGlobal` is decided by the app root. */
|
|
6
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<EventBusOptions>({
|
|
6
7
|
optionsInjectionToken: EVENT_BUS_OPTIONS,
|
|
7
8
|
})
|
|
8
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
9
|
-
.build()
|
|
10
|
-
type Host = ConfigurableModuleHost<EventBusOptions, "register", "create", { isGlobal: boolean }>
|
|
11
|
-
|
|
12
|
-
/** The configurable-module base of the event bus; `isGlobal` is decided by the app root. */
|
|
13
|
-
export const ConfigurableModuleClass: Host["ConfigurableModuleClass"] = built.ConfigurableModuleClass
|
|
14
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
15
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { InboxOptions } from "./inbox.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<InboxOptions>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<InboxOptions, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module base of the inbox capability; `isGlobal` is decided by the app root. */
|
|
10
|
-
export const
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<InboxOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Job@@Options } from "./@@job@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Job@@Options>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Job@@Options, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@job@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<@@Job@@Options>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Job@@QueueOptions } from "./@@job@@-queue.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Job@@QueueOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Job@@QueueOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@job@@-queue module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Job@@QueueOptions>()
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import { JOBS_OPTIONS } from "./jobs.decorators"
|
|
3
3
|
import type { JobsOptions } from "./jobs.options"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** The configurable-module base of the jobs; `isGlobal` is decided by the app root. */
|
|
6
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<JobsOptions>({
|
|
6
7
|
optionsInjectionToken: JOBS_OPTIONS,
|
|
7
8
|
})
|
|
8
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
9
|
-
.build()
|
|
10
|
-
type Host = ConfigurableModuleHost<JobsOptions, "register", "create", { isGlobal: boolean }>
|
|
11
|
-
|
|
12
|
-
/** The configurable-module base of the jobs; `isGlobal` is decided by the app root. */
|
|
13
|
-
export const ConfigurableModuleClass: Host["ConfigurableModuleClass"] = built.ConfigurableModuleClass
|
|
14
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
15
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Name@@Options } from "./@@name@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Name@@Options>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<@@Name@@Options, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module base of the @@name@@ projection; `isGlobal` is decided by the app root. */
|
|
10
|
-
export const
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<@@Name@@Options>()
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import { QUEUE_OPTIONS } from "./queue.decorators"
|
|
3
3
|
import type { QueueRegistrationOptions } from "./queue.options"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** The configurable-module base of the queues; `isGlobal` is decided by the app root. */
|
|
6
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<QueueRegistrationOptions>({
|
|
6
7
|
optionsInjectionToken: QUEUE_OPTIONS,
|
|
7
8
|
})
|
|
8
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
9
|
-
.build()
|
|
10
|
-
type Host = ConfigurableModuleHost<QueueRegistrationOptions, "register", "create", { isGlobal: boolean }>
|
|
11
|
-
|
|
12
|
-
/** The configurable-module base of the queues; `isGlobal` is decided by the app root. */
|
|
13
|
-
export const ConfigurableModuleClass: Host["ConfigurableModuleClass"] = built.ConfigurableModuleClass
|
|
14
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
15
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Queue@@Options } from "./@@queue@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Queue@@Options>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Queue@@Options, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@queue@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<@@Queue@@Options>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Reactor@@MessageOptions } from "./@@reactor@@-message.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Reactor@@MessageOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Reactor@@MessageOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@reactor@@-message module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Reactor@@MessageOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Reactor@@Options } from "./@@reactor@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Reactor@@Options>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Reactor@@Options, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@reactor@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<@@Reactor@@Options>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Channel@@GraphqlOptions } from "./@@channel@@-graphql.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Channel@@GraphqlOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Channel@@GraphqlOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@channel@@-graphql module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Channel@@GraphqlOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Channel@@SseOptions } from "./@@channel@@-sse.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Channel@@SseOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Channel@@SseOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@channel@@-sse module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Channel@@SseOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Channel@@WebsocketOptions } from "./@@channel@@-websocket.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Channel@@WebsocketOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Channel@@WebsocketOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@channel@@-websocket module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Channel@@WebsocketOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Saga@@MessageOptions } from "./@@saga@@-message.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Saga@@MessageOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Saga@@MessageOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@saga@@-message module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Saga@@MessageOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Saga@@Options } from "./@@saga@@.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Saga@@Options>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Saga@@Options, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@saga@@ module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<@@Saga@@Options>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { @@Provider@@HttpOptions } from "./@@provider@@-http.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<@@Provider@@HttpOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<@@Provider@@HttpOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the @@provider@@-http module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<@@Provider@@HttpOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineCapabilityModule } from "@starci/nest-kit"
|
|
2
2
|
import type { GraphqlOptions } from "./graphql.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<GraphqlOptions>()
|
|
5
|
-
.setExtras({ isGlobal: false }, (definition, extras) => ({ ...definition, global: extras.isGlobal }))
|
|
6
|
-
.build()
|
|
7
|
-
type Host = ConfigurableModuleHost<GraphqlOptions, "register", "create", { isGlobal: boolean }>
|
|
8
|
-
|
|
9
4
|
/** The configurable-module base of the graphql capability; `isGlobal` is decided by the app root. */
|
|
10
|
-
export const
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, OPTIONS_TYPE } = defineCapabilityModule<GraphqlOptions>()
|
package/templates/be/skeleton/src/features/api/system-health/system-health.module-definition.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { SystemHealthOptions } from "./system-health.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<SystemHealthOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<SystemHealthOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the system-health module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<SystemHealthOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { SystemHealthHttpOptions } from "./system-health-http.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<SystemHealthHttpOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<SystemHealthHttpOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the system-health-http module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<SystemHealthHttpOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { CliOptions } from "./cli.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<CliOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<CliOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the cli module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<CliOptions>()
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { MigrateOptions } from "./migrate.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<MigrateOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<MigrateOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the migrate module. */
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } =
|
|
6
|
+
defineConfigurableModule<MigrateOptions>()
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineConfigurableModule } from "@starci/nest-kit"
|
|
2
2
|
import type { SeedOptions } from "./seed.options"
|
|
3
3
|
|
|
4
|
-
const built = new ConfigurableModuleBuilder<SeedOptions>().setClassMethodName("register").build()
|
|
5
|
-
type Host = ConfigurableModuleHost<SeedOptions, "register", "create", {}>
|
|
6
|
-
|
|
7
4
|
/** The configurable-module base of the seed module. */
|
|
8
|
-
export const
|
|
9
|
-
/** The injection token of the registered options. */
|
|
10
|
-
export const MODULE_OPTIONS_TOKEN: Host["MODULE_OPTIONS_TOKEN"] = built.MODULE_OPTIONS_TOKEN
|
|
11
|
-
/** The options of a synchronous registration, for the register signature. */
|
|
12
|
-
export const OPTIONS_TYPE: Host["OPTIONS_TYPE"] = built.OPTIONS_TYPE
|
|
5
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, OPTIONS_TYPE } = defineConfigurableModule<SeedOptions>()
|