@venizia/ignis-atlas 0.1.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +104 -0
- package/README.md +144 -0
- package/dist/cjs/cli/modes.d.ts +29 -0
- package/dist/cjs/cli/modes.d.ts.map +1 -0
- package/dist/cjs/cli/modes.js +70 -0
- package/dist/cjs/cli/modes.js.map +1 -0
- package/dist/cjs/cli.d.ts +3 -0
- package/dist/cjs/cli.d.ts.map +1 -0
- package/dist/cjs/cli.js +60 -0
- package/dist/cjs/cli.js.map +1 -0
- package/dist/cjs/common/constants.d.ts +22 -0
- package/dist/cjs/common/constants.d.ts.map +1 -0
- package/dist/cjs/common/constants.js +32 -0
- package/dist/cjs/common/constants.js.map +1 -0
- package/dist/cjs/common/index.d.ts +3 -0
- package/dist/cjs/common/index.d.ts.map +1 -0
- package/dist/cjs/common/index.js +19 -0
- package/dist/cjs/common/index.js.map +1 -0
- package/dist/cjs/common/logger.d.ts +21 -0
- package/dist/cjs/common/logger.d.ts.map +1 -0
- package/dist/cjs/common/logger.js +50 -0
- package/dist/cjs/common/logger.js.map +1 -0
- package/dist/cjs/common/types.d.ts +5 -0
- package/dist/cjs/common/types.d.ts.map +1 -0
- package/dist/cjs/common/types.js +3 -0
- package/dist/cjs/common/types.js.map +1 -0
- package/dist/cjs/corpus/chunker.d.ts +12 -0
- package/dist/cjs/corpus/chunker.d.ts.map +1 -0
- package/dist/cjs/corpus/chunker.js +298 -0
- package/dist/cjs/corpus/chunker.js.map +1 -0
- package/dist/cjs/corpus/common/index.d.ts +2 -0
- package/dist/cjs/corpus/common/index.d.ts.map +1 -0
- package/dist/cjs/corpus/common/index.js +18 -0
- package/dist/cjs/corpus/common/index.js.map +1 -0
- package/dist/cjs/corpus/common/types.d.ts +37 -0
- package/dist/cjs/corpus/common/types.d.ts.map +1 -0
- package/dist/cjs/corpus/common/types.js +3 -0
- package/dist/cjs/corpus/common/types.js.map +1 -0
- package/dist/cjs/corpus/frontmatter.d.ts +13 -0
- package/dist/cjs/corpus/frontmatter.d.ts.map +1 -0
- package/dist/cjs/corpus/frontmatter.js +31 -0
- package/dist/cjs/corpus/frontmatter.js.map +1 -0
- package/dist/cjs/corpus/index.d.ts +6 -0
- package/dist/cjs/corpus/index.d.ts.map +1 -0
- package/dist/cjs/corpus/index.js +22 -0
- package/dist/cjs/corpus/index.js.map +1 -0
- package/dist/cjs/corpus/loader.d.ts +16 -0
- package/dist/cjs/corpus/loader.d.ts.map +1 -0
- package/dist/cjs/corpus/loader.js +72 -0
- package/dist/cjs/corpus/loader.js.map +1 -0
- package/dist/cjs/corpus/roots.d.ts +9 -0
- package/dist/cjs/corpus/roots.d.ts.map +1 -0
- package/dist/cjs/corpus/roots.js +30 -0
- package/dist/cjs/corpus/roots.js.map +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/protocol/common/constants.d.ts +9 -0
- package/dist/cjs/protocol/common/constants.d.ts.map +1 -0
- package/dist/cjs/protocol/common/constants.js +13 -0
- package/dist/cjs/protocol/common/constants.js.map +1 -0
- package/dist/cjs/protocol/common/index.d.ts +4 -0
- package/dist/cjs/protocol/common/index.d.ts.map +1 -0
- package/dist/cjs/protocol/common/index.js +20 -0
- package/dist/cjs/protocol/common/index.js.map +1 -0
- package/dist/cjs/protocol/common/rpc-error.d.ts +9 -0
- package/dist/cjs/protocol/common/rpc-error.d.ts.map +1 -0
- package/dist/cjs/protocol/common/rpc-error.js +12 -0
- package/dist/cjs/protocol/common/rpc-error.js.map +1 -0
- package/dist/cjs/protocol/common/types.d.ts +32 -0
- package/dist/cjs/protocol/common/types.d.ts.map +1 -0
- package/dist/cjs/protocol/common/types.js +3 -0
- package/dist/cjs/protocol/common/types.js.map +1 -0
- package/dist/cjs/protocol/index.d.ts +3 -0
- package/dist/cjs/protocol/index.d.ts.map +1 -0
- package/dist/cjs/protocol/index.js +19 -0
- package/dist/cjs/protocol/index.js.map +1 -0
- package/dist/cjs/protocol/transport.d.ts +28 -0
- package/dist/cjs/protocol/transport.d.ts.map +1 -0
- package/dist/cjs/protocol/transport.js +155 -0
- package/dist/cjs/protocol/transport.js.map +1 -0
- package/dist/cjs/search/common/constants.d.ts +23 -0
- package/dist/cjs/search/common/constants.d.ts.map +1 -0
- package/dist/cjs/search/common/constants.js +56 -0
- package/dist/cjs/search/common/constants.js.map +1 -0
- package/dist/cjs/search/common/index.d.ts +3 -0
- package/dist/cjs/search/common/index.d.ts.map +1 -0
- package/dist/cjs/search/common/index.js +19 -0
- package/dist/cjs/search/common/index.js.map +1 -0
- package/dist/cjs/search/common/types.d.ts +18 -0
- package/dist/cjs/search/common/types.d.ts.map +1 -0
- package/dist/cjs/search/common/types.js +3 -0
- package/dist/cjs/search/common/types.js.map +1 -0
- package/dist/cjs/search/index.d.ts +4 -0
- package/dist/cjs/search/index.d.ts.map +1 -0
- package/dist/cjs/search/index.js +20 -0
- package/dist/cjs/search/index.js.map +1 -0
- package/dist/cjs/search/planner.d.ts +13 -0
- package/dist/cjs/search/planner.d.ts.map +1 -0
- package/dist/cjs/search/planner.js +58 -0
- package/dist/cjs/search/planner.js.map +1 -0
- package/dist/cjs/search/store.d.ts +37 -0
- package/dist/cjs/search/store.d.ts.map +1 -0
- package/dist/cjs/search/store.js +141 -0
- package/dist/cjs/search/store.js.map +1 -0
- package/dist/cjs/server/freshness.d.ts +40 -0
- package/dist/cjs/server/freshness.d.ts.map +1 -0
- package/dist/cjs/server/freshness.js +85 -0
- package/dist/cjs/server/freshness.js.map +1 -0
- package/dist/cjs/server.d.ts +12 -0
- package/dist/cjs/server.d.ts.map +1 -0
- package/dist/cjs/server.js +65 -0
- package/dist/cjs/server.js.map +1 -0
- package/dist/cjs/tools/common/index.d.ts +2 -0
- package/dist/cjs/tools/common/index.d.ts.map +1 -0
- package/dist/cjs/tools/common/index.js +18 -0
- package/dist/cjs/tools/common/index.js.map +1 -0
- package/dist/cjs/tools/common/schemas.d.ts +23 -0
- package/dist/cjs/tools/common/schemas.d.ts.map +1 -0
- package/dist/cjs/tools/common/schemas.js +37 -0
- package/dist/cjs/tools/common/schemas.js.map +1 -0
- package/dist/cjs/tools/get.tool.d.ts +6 -0
- package/dist/cjs/tools/get.tool.d.ts.map +1 -0
- package/dist/cjs/tools/get.tool.js +115 -0
- package/dist/cjs/tools/get.tool.js.map +1 -0
- package/dist/cjs/tools/index.d.ts +4 -0
- package/dist/cjs/tools/index.d.ts.map +1 -0
- package/dist/cjs/tools/index.js +20 -0
- package/dist/cjs/tools/index.js.map +1 -0
- package/dist/cjs/tools/search.tool.d.ts +6 -0
- package/dist/cjs/tools/search.tool.d.ts.map +1 -0
- package/dist/cjs/tools/search.tool.js +58 -0
- package/dist/cjs/tools/search.tool.js.map +1 -0
- package/dist/corpus/changelogs/2025-12-16-initial-architecture.md +145 -0
- package/dist/corpus/changelogs/2025-12-16-model-repo-datasource-refactor.md +300 -0
- package/dist/corpus/changelogs/2025-12-17-refactor.md +90 -0
- package/dist/corpus/changelogs/2025-12-18-performance-optimizations.md +130 -0
- package/dist/corpus/changelogs/2025-12-18-repository-validation-security.md +255 -0
- package/dist/corpus/changelogs/2025-12-26-nested-relations-and-generics.md +86 -0
- package/dist/corpus/changelogs/2025-12-26-transaction-support.md +57 -0
- package/dist/corpus/changelogs/2025-12-29-dynamic-binding-registration.md +104 -0
- package/dist/corpus/changelogs/2025-12-29-snowflake-uid-helper.md +100 -0
- package/dist/corpus/changelogs/2025-12-30-repository-enhancements.md +214 -0
- package/dist/corpus/changelogs/2025-12-31-json-path-filtering-array-operators.md +214 -0
- package/dist/corpus/changelogs/2025-12-31-string-id-custom-generator.md +137 -0
- package/dist/corpus/changelogs/2026-01-02-default-filter-and-repository-mixins.md +421 -0
- package/dist/corpus/changelogs/2026-01-05-range-queries-content-range.md +184 -0
- package/dist/corpus/changelogs/2026-01-06-basic-authentication.md +103 -0
- package/dist/corpus/changelogs/2026-01-07-controller-route-customization.md +190 -0
- package/dist/corpus/changelogs/2026-01-11-logger-optimization-hf-logger.md +254 -0
- package/dist/corpus/changelogs/2026-02-06-socket-io-integration-fix.md +541 -0
- package/dist/corpus/changelogs/2026-02-10-websocket-heartbeat-payload.md +173 -0
- package/dist/corpus/changelogs/2026-02-11-crypto-refactor-ecdh.md +217 -0
- package/dist/corpus/changelogs/2026-02-11-websocket-encrypted-delivery.md +209 -0
- package/dist/corpus/changelogs/2026-02-11-websocket-generic-types.md +134 -0
- package/dist/corpus/changelogs/2026-02-16-authorization-system.md +378 -0
- package/dist/corpus/changelogs/2026-02-26-core-helpers-decoupling.md +145 -0
- package/dist/corpus/changelogs/2026-02-27-jwks-authentication.md +391 -0
- package/dist/corpus/changelogs/2026-03-02-model-authorize-settings.md +155 -0
- package/dist/corpus/changelogs/2026-03-04-jwt-payload-field-codecs.md +219 -0
- package/dist/corpus/changelogs/2026-03-06-filter-offset-skip-fix.md +88 -0
- package/dist/corpus/changelogs/2026-03-10-kafka-helpers-refactor.md +225 -0
- package/dist/corpus/changelogs/2026-03-12-kafka-helpers-enhancement.md +169 -0
- package/dist/corpus/changelogs/2026-03-15-grpc-controller-system.md +281 -0
- package/dist/corpus/changelogs/2026-03-30-row-level-locking.md +134 -0
- package/dist/corpus/changelogs/2026-03-31-typescript-6-and-toolchain.md +100 -0
- package/dist/corpus/changelogs/2026-04-23-error-response-extra-fields.md +131 -0
- package/dist/corpus/changelogs/2026-05-05-refresh-token-endpoint.md +116 -0
- package/dist/corpus/changelogs/2026-05-08-crud-route-toggles-and-typed-responses.md +136 -0
- package/dist/corpus/changelogs/2026-05-20-relation-scope-default-limit.md +133 -0
- package/dist/corpus/changelogs/2026-05-21-mass-mutation-guards.md +102 -0
- package/dist/corpus/changelogs/2026-05-22-casbin-adapter-schema-qualification.md +72 -0
- package/dist/corpus/changelogs/2026-05-25-per-model-default-limit.md +68 -0
- package/dist/corpus/changelogs/2026-05-27-casbin-domain-matching-function.md +90 -0
- package/dist/corpus/changelogs/2026-06-02-authorize-scoped-rbac.md +105 -0
- package/dist/corpus/changelogs/2026-06-14-validation-codes-and-error-hardening.md +124 -0
- package/dist/corpus/changelogs/2026-06-18-auth-user-information-endpoint.md +69 -0
- package/dist/corpus/changelogs/2026-06-25-redis-helpers-refactor.md +199 -0
- package/dist/corpus/changelogs/2026-07-05-unified-repository-connectors.md +206 -0
- package/dist/corpus/changelogs/2026-07-08-typesense-advanced-search.md +72 -0
- package/dist/corpus/changelogs/2026-07-11-connectors-consistency-hardening.md +192 -0
- package/dist/corpus/changelogs/2026-07-11-postgres-driver-seam-supabase.md +146 -0
- package/dist/corpus/changelogs/2026-07-12-core-consolidation-dedup.md +127 -0
- package/dist/corpus/changelogs/2026-07-13-hardening-round.md +99 -0
- package/dist/corpus/changelogs/2026-07-14-driver-class-bundling.md +100 -0
- package/dist/corpus/changelogs/2026-07-16-error-catalog-and-structured-message.md +64 -0
- package/dist/corpus/changelogs/2026-07-16-secrets-vault-integration.md +72 -0
- package/dist/corpus/changelogs/2026-07-17-error-module-redesign.md +202 -0
- package/dist/corpus/changelogs/2026-07-17-logger-correctness-pass.md +46 -0
- package/dist/corpus/changelogs/2026-07-17-secrets-bundler-invisible-peers.md +30 -0
- package/dist/corpus/changelogs/2026-07-18-dependency-refresh.md +55 -0
- package/dist/corpus/changelogs/2026-07-18-logger-overhaul.md +104 -0
- package/dist/corpus/changelogs/2026-07-18-repository-read-retry.md +74 -0
- package/dist/corpus/changelogs/2026-07-20-casbin-custom-grants.md +72 -0
- package/dist/corpus/changelogs/2026-07-20-casbin-single-wave-extraction.md +58 -0
- package/dist/corpus/changelogs/2026-07-20-error-from-error-client.md +66 -0
- package/dist/corpus/changelogs/2026-07-21-casbin-connector-resolution-fix.md +36 -0
- package/dist/corpus/changelogs/2026-07-25-error-logging.md +129 -0
- package/dist/corpus/changelogs/2026-07-25-ignis-filter-package.md +75 -0
- package/dist/corpus/changelogs/2026-07-26-search-and-mail-error-codes.md +58 -0
- package/dist/corpus/changelogs/2026-08-01-relational-connector-lift.md +403 -0
- package/dist/corpus/changelogs/2026-08-02-sqlite-and-pglite-connectors.md +177 -0
- package/dist/corpus/changelogs/2026-08-05-search-dialect-relational-parity.md +90 -0
- package/dist/corpus/changelogs/2026-08-06-aes-pbkdf2-and-key-rotation.md +131 -0
- package/dist/corpus/changelogs/2026-08-07-default-query-by.md +62 -0
- package/dist/corpus/changelogs/2026-08-07-nested-fields-and-order-validation.md +75 -0
- package/dist/corpus/changelogs/2026-08-07-typesense-multi-search-transport.md +97 -0
- package/dist/corpus/changelogs/2026-08-12-json-log-arguments.md +69 -0
- package/dist/corpus/changelogs/2026-08-13-browser-pure-kernel.md +130 -0
- package/dist/corpus/changelogs/2026-08-18-esm-builds-and-one-default-stack.md +104 -0
- package/dist/corpus/changelogs/2026-08-18-opaque-uid-helper.md +43 -0
- package/dist/corpus/changelogs/2026-08-19-browser-bff-multi-tab.md +88 -0
- package/dist/corpus/changelogs/2026-08-19-service-authentication-phase-1.md +157 -0
- package/dist/corpus/changelogs/2026-08-21-service-authentication-strategy.md +127 -0
- package/dist/corpus/changelogs/2026-08-22-logger-color-off-outside-development.md +48 -0
- package/dist/corpus/changelogs/2026-08-24-query-wrapper-schemas.md +77 -0
- package/dist/corpus/changelogs/2026-08-29-casbin-domain-hierarchy.md +66 -0
- package/dist/corpus/changelogs/2026-08-30-authorize-no-enforcer-fails-closed.md +60 -0
- package/dist/corpus/changelogs/2026-08-30-crypto-hashing.md +158 -0
- package/dist/corpus/changelogs/2026-08-30-policy-definition-extra-variants.md +62 -0
- package/dist/corpus/changelogs/2026-08-30-row-scope-filter.md +221 -0
- package/dist/corpus/changelogs/2026-08-30-search-connector-health-and-import-contract.md +46 -0
- package/dist/corpus/changelogs/2026-08-30-tree-and-recursive-sql.md +188 -0
- package/dist/corpus/changelogs/2026-08-30-typed-where-clauses.md +114 -0
- package/dist/corpus/changelogs/2026-08-31-entity-id-brand.md +70 -0
- package/dist/corpus/changelogs/2026-08-31-event-bus-retry.md +143 -0
- package/dist/corpus/changelogs/2026-08-31-policy-domain-split-release-b.md +54 -0
- package/dist/corpus/changelogs/2026-08-31-policy-domain-split.md +175 -0
- package/dist/corpus/changelogs/2026-08-31-scope-filter-boot-checks.md +77 -0
- package/dist/corpus/changelogs/2026-09-02-bundle-safe-helpers.md +71 -0
- package/dist/corpus/changelogs/2026-09-02-decorator-artifact-registration.md +119 -0
- package/dist/corpus/changelogs/2026-09-03-deprecated-boot-api-removed.md +133 -0
- package/dist/corpus/changelogs/2026-09-04-dependency-floors-raised.md +61 -0
- package/dist/corpus/changelogs/2026-09-05-boot-checks.md +57 -0
- package/dist/corpus/changelogs/2026-09-05-core-drops-boot-dependency.md +44 -0
- package/dist/corpus/changelogs/2026-09-05-list-response-contract.md +74 -0
- package/dist/corpus/changelogs/2026-09-06-bun-serve-options.md +51 -0
- package/dist/corpus/changelogs/2026-09-06-ignis-atlas.md +54 -0
- package/dist/corpus/changelogs/2026-09-06-repository-inheritance-and-quiet-cli.md +46 -0
- package/dist/corpus/changelogs/2026-09-06-shared-singletons-across-module-copies.md +43 -0
- package/dist/corpus/changelogs/index.md +135 -0
- package/dist/corpus/changelogs/planned-schema-migrator.md +553 -0
- package/dist/corpus/changelogs/template.md +64 -0
- package/dist/corpus/wiki/best-practices/api-usage-examples.md +617 -0
- package/dist/corpus/wiki/best-practices/architectural-patterns.md +437 -0
- package/dist/corpus/wiki/best-practices/architecture-decisions.md +524 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/advanced-patterns.md +283 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/constants-configuration.md +240 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/control-flow.md +280 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/documentation.md +241 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/function-patterns.md +178 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/index.md +114 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/naming-conventions.md +200 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/route-definitions.md +205 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/tooling.md +168 -0
- package/dist/corpus/wiki/best-practices/code-style-standards/type-safety.md +199 -0
- package/dist/corpus/wiki/best-practices/common-pitfalls.md +447 -0
- package/dist/corpus/wiki/best-practices/contribution-workflow.md +211 -0
- package/dist/corpus/wiki/best-practices/data-modeling.md +548 -0
- package/dist/corpus/wiki/best-practices/deployment-strategies.md +736 -0
- package/dist/corpus/wiki/best-practices/error-handling.md +604 -0
- package/dist/corpus/wiki/best-practices/index.md +206 -0
- package/dist/corpus/wiki/best-practices/performance-optimization.md +437 -0
- package/dist/corpus/wiki/best-practices/security-guidelines.md +523 -0
- package/dist/corpus/wiki/best-practices/testing-strategies.md +639 -0
- package/dist/corpus/wiki/best-practices/troubleshooting-tips.md +227 -0
- package/dist/corpus/wiki/extensions/atlas/index.md +65 -0
- package/dist/corpus/wiki/extensions/components/api-reference.md +268 -0
- package/dist/corpus/wiki/extensions/components/authentication/api.md +643 -0
- package/dist/corpus/wiki/extensions/components/authentication/errors.md +211 -0
- package/dist/corpus/wiki/extensions/components/authentication/index.md +171 -0
- package/dist/corpus/wiki/extensions/components/authentication/usage.md +464 -0
- package/dist/corpus/wiki/extensions/components/authorization/api.md +1509 -0
- package/dist/corpus/wiki/extensions/components/authorization/errors.md +397 -0
- package/dist/corpus/wiki/extensions/components/authorization/getting-started.md +227 -0
- package/dist/corpus/wiki/extensions/components/authorization/index.md +155 -0
- package/dist/corpus/wiki/extensions/components/authorization/usage.md +587 -0
- package/dist/corpus/wiki/extensions/components/health-check.md +227 -0
- package/dist/corpus/wiki/extensions/components/index.md +26 -0
- package/dist/corpus/wiki/extensions/components/mail/api.md +773 -0
- package/dist/corpus/wiki/extensions/components/mail/errors.md +190 -0
- package/dist/corpus/wiki/extensions/components/mail/index.md +182 -0
- package/dist/corpus/wiki/extensions/components/mail/usage.md +370 -0
- package/dist/corpus/wiki/extensions/components/request-tracker.md +152 -0
- package/dist/corpus/wiki/extensions/components/socket-io/api.md +728 -0
- package/dist/corpus/wiki/extensions/components/socket-io/errors.md +119 -0
- package/dist/corpus/wiki/extensions/components/socket-io/index.md +116 -0
- package/dist/corpus/wiki/extensions/components/socket-io/usage.md +429 -0
- package/dist/corpus/wiki/extensions/components/static-asset/api.md +593 -0
- package/dist/corpus/wiki/extensions/components/static-asset/errors.md +159 -0
- package/dist/corpus/wiki/extensions/components/static-asset/index.md +160 -0
- package/dist/corpus/wiki/extensions/components/static-asset/usage.md +253 -0
- package/dist/corpus/wiki/extensions/components/template/api-page.md +125 -0
- package/dist/corpus/wiki/extensions/components/template/errors-page.md +100 -0
- package/dist/corpus/wiki/extensions/components/template/index.md +104 -0
- package/dist/corpus/wiki/extensions/components/template/setup-page.md +134 -0
- package/dist/corpus/wiki/extensions/components/template/single-page.md +132 -0
- package/dist/corpus/wiki/extensions/components/template/usage-page.md +127 -0
- package/dist/corpus/wiki/extensions/components/websocket/api.md +416 -0
- package/dist/corpus/wiki/extensions/components/websocket/errors.md +128 -0
- package/dist/corpus/wiki/extensions/components/websocket/index.md +127 -0
- package/dist/corpus/wiki/extensions/components/websocket/usage.md +257 -0
- package/dist/corpus/wiki/extensions/helpers/cron/index.md +116 -0
- package/dist/corpus/wiki/extensions/helpers/crypto/index.md +136 -0
- package/dist/corpus/wiki/extensions/helpers/crypto/reference.md +544 -0
- package/dist/corpus/wiki/extensions/helpers/env/index.md +119 -0
- package/dist/corpus/wiki/extensions/helpers/error/index.md +373 -0
- package/dist/corpus/wiki/extensions/helpers/index.md +63 -0
- package/dist/corpus/wiki/extensions/helpers/inversion/index.md +142 -0
- package/dist/corpus/wiki/extensions/helpers/inversion/reference.md +531 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/admin.md +210 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/compile-binary.md +125 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/consumer.md +422 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/examples.md +154 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/index.md +84 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/producer.md +408 -0
- package/dist/corpus/wiki/extensions/helpers/kafka/schema-registry.md +194 -0
- package/dist/corpus/wiki/extensions/helpers/logger/hf-logger.md +220 -0
- package/dist/corpus/wiki/extensions/helpers/logger/index.md +156 -0
- package/dist/corpus/wiki/extensions/helpers/logger/pino.md +107 -0
- package/dist/corpus/wiki/extensions/helpers/logger/reference.md +938 -0
- package/dist/corpus/wiki/extensions/helpers/network/api.md +1067 -0
- package/dist/corpus/wiki/extensions/helpers/network/index.md +189 -0
- package/dist/corpus/wiki/extensions/helpers/queue/index.md +165 -0
- package/dist/corpus/wiki/extensions/helpers/queue/reference.md +490 -0
- package/dist/corpus/wiki/extensions/helpers/redis/index.md +159 -0
- package/dist/corpus/wiki/extensions/helpers/redis/reference.md +784 -0
- package/dist/corpus/wiki/extensions/helpers/secrets/index.md +136 -0
- package/dist/corpus/wiki/extensions/helpers/socket-io/api.md +618 -0
- package/dist/corpus/wiki/extensions/helpers/socket-io/index.md +167 -0
- package/dist/corpus/wiki/extensions/helpers/storage/api.md +1021 -0
- package/dist/corpus/wiki/extensions/helpers/storage/index.md +162 -0
- package/dist/corpus/wiki/extensions/helpers/template/index.md +69 -0
- package/dist/corpus/wiki/extensions/helpers/template/single-page.md +126 -0
- package/dist/corpus/wiki/extensions/helpers/types/index.md +143 -0
- package/dist/corpus/wiki/extensions/helpers/types/reference.md +708 -0
- package/dist/corpus/wiki/extensions/helpers/uid/index.md +259 -0
- package/dist/corpus/wiki/extensions/helpers/websocket/api.md +888 -0
- package/dist/corpus/wiki/extensions/helpers/websocket/index.md +139 -0
- package/dist/corpus/wiki/extensions/helpers/worker-thread/index.md +142 -0
- package/dist/corpus/wiki/extensions/helpers/worker-thread/reference.md +434 -0
- package/dist/corpus/wiki/extensions/index.md +46 -0
- package/dist/corpus/wiki/guides/core-concepts/application/bootstrapping.md +274 -0
- package/dist/corpus/wiki/guides/core-concepts/application/index.md +239 -0
- package/dist/corpus/wiki/guides/core-concepts/components-guide.md +513 -0
- package/dist/corpus/wiki/guides/core-concepts/components.md +155 -0
- package/dist/corpus/wiki/guides/core-concepts/dependency-injection.md +336 -0
- package/dist/corpus/wiki/guides/core-concepts/grpc-controllers.md +296 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/datasources.md +195 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/index.md +132 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/models.md +331 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/pglite.md +218 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/postgres-drivers.md +207 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/repositories.md +311 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/search-meilisearch.md +195 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/search-typesense.md +443 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/sqlite.md +296 -0
- package/dist/corpus/wiki/guides/core-concepts/persistent/transactions.md +238 -0
- package/dist/corpus/wiki/guides/core-concepts/rest-controllers.md +465 -0
- package/dist/corpus/wiki/guides/core-concepts/secrets-vault.md +177 -0
- package/dist/corpus/wiki/guides/core-concepts/services.md +389 -0
- package/dist/corpus/wiki/guides/get-started/5-minute-quickstart.md +163 -0
- package/dist/corpus/wiki/guides/get-started/philosophy.md +135 -0
- package/dist/corpus/wiki/guides/get-started/setup.md +136 -0
- package/dist/corpus/wiki/guides/index.md +82 -0
- package/dist/corpus/wiki/guides/migrations/boot-api-removal-migration.md +79 -0
- package/dist/corpus/wiki/guides/migrations/redis-helpers-migration.md +178 -0
- package/dist/corpus/wiki/guides/migrations/scoped-rbac-migration.md +300 -0
- package/dist/corpus/wiki/guides/migrations/unified-connectors-migration.md +114 -0
- package/dist/corpus/wiki/guides/reference/glossary.md +250 -0
- package/dist/corpus/wiki/guides/tutorials/building-a-crud-api.md +704 -0
- package/dist/corpus/wiki/guides/tutorials/complete-installation.md +440 -0
- package/dist/corpus/wiki/guides/tutorials/ecommerce-api.md +1442 -0
- package/dist/corpus/wiki/guides/tutorials/realtime-chat.md +1571 -0
- package/dist/corpus/wiki/guides/tutorials/testing.md +264 -0
- package/dist/corpus/wiki/index.md +5 -0
- package/dist/corpus/wiki/public/apple-touch-icon.png +0 -0
- package/dist/corpus/wiki/public/logo.svg +1 -0
- package/dist/corpus/wiki/public/og-image.png +0 -0
- package/dist/corpus/wiki/public/site.webmanifest +11 -0
- package/dist/corpus/wiki/references/base/application.md +482 -0
- package/dist/corpus/wiki/references/base/bootstrapping.md +351 -0
- package/dist/corpus/wiki/references/base/components.md +883 -0
- package/dist/corpus/wiki/references/base/connectors.md +121 -0
- package/dist/corpus/wiki/references/base/controllers.md +1022 -0
- package/dist/corpus/wiki/references/base/datasources-reference.md +598 -0
- package/dist/corpus/wiki/references/base/datasources.md +165 -0
- package/dist/corpus/wiki/references/base/dependency-injection.md +423 -0
- package/dist/corpus/wiki/references/base/filter-system/application-usage.md +215 -0
- package/dist/corpus/wiki/references/base/filter-system/array-operators.md +135 -0
- package/dist/corpus/wiki/references/base/filter-system/comparison-operators.md +110 -0
- package/dist/corpus/wiki/references/base/filter-system/default-filter.md +267 -0
- package/dist/corpus/wiki/references/base/filter-system/fields-order-pagination.md +244 -0
- package/dist/corpus/wiki/references/base/filter-system/index.md +149 -0
- package/dist/corpus/wiki/references/base/filter-system/json-filtering.md +122 -0
- package/dist/corpus/wiki/references/base/filter-system/list-operators.md +56 -0
- package/dist/corpus/wiki/references/base/filter-system/logical-operators.md +148 -0
- package/dist/corpus/wiki/references/base/filter-system/null-operators.md +80 -0
- package/dist/corpus/wiki/references/base/filter-system/pattern-matching.md +105 -0
- package/dist/corpus/wiki/references/base/filter-system/quick-reference.md +172 -0
- package/dist/corpus/wiki/references/base/filter-system/range-operators.md +53 -0
- package/dist/corpus/wiki/references/base/filter-system/tips.md +154 -0
- package/dist/corpus/wiki/references/base/filter-system/use-cases.md +394 -0
- package/dist/corpus/wiki/references/base/grpc-controllers.md +1020 -0
- package/dist/corpus/wiki/references/base/index.md +112 -0
- package/dist/corpus/wiki/references/base/middlewares.md +543 -0
- package/dist/corpus/wiki/references/base/models-reference.md +886 -0
- package/dist/corpus/wiki/references/base/models.md +154 -0
- package/dist/corpus/wiki/references/base/providers.md +728 -0
- package/dist/corpus/wiki/references/base/repositories/advanced.md +627 -0
- package/dist/corpus/wiki/references/base/repositories/index.md +152 -0
- package/dist/corpus/wiki/references/base/repositories/mixins.md +103 -0
- package/dist/corpus/wiki/references/base/repositories/relations.md +379 -0
- package/dist/corpus/wiki/references/base/repositories/soft-deletable.md +307 -0
- package/dist/corpus/wiki/references/base/secrets.md +267 -0
- package/dist/corpus/wiki/references/base/services.md +417 -0
- package/dist/corpus/wiki/references/configuration/environment-variables.md +498 -0
- package/dist/corpus/wiki/references/configuration/index.md +132 -0
- package/dist/corpus/wiki/references/index.md +172 -0
- package/dist/corpus/wiki/references/quick-reference.md +594 -0
- package/dist/corpus/wiki/references/utilities/date.md +50 -0
- package/dist/corpus/wiki/references/utilities/duration.md +85 -0
- package/dist/corpus/wiki/references/utilities/index.md +81 -0
- package/dist/corpus/wiki/references/utilities/jsx-reference.md +298 -0
- package/dist/corpus/wiki/references/utilities/jsx.md +131 -0
- package/dist/corpus/wiki/references/utilities/module.md +110 -0
- package/dist/corpus/wiki/references/utilities/parse.md +55 -0
- package/dist/corpus/wiki/references/utilities/performance.md +54 -0
- package/dist/corpus/wiki/references/utilities/promise.md +54 -0
- package/dist/corpus/wiki/references/utilities/request.md +85 -0
- package/dist/corpus/wiki/references/utilities/retry.md +148 -0
- package/dist/corpus/wiki/references/utilities/schema.md +69 -0
- package/dist/corpus/wiki/references/utilities/statuses-reference.md +360 -0
- package/dist/corpus/wiki/references/utilities/statuses.md +122 -0
- package/package.json +74 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Registering artifacts
|
|
3
|
+
description: Decorate the class, generate the index once per build, pass it in the config - application.ts lists nothing
|
|
4
|
+
difficulty: beginner
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Registering artifacts
|
|
8
|
+
|
|
9
|
+
An IGNIS application registers its datasources, components, repositories, services and controllers from one generated file. You decorate the class, `ignis-artifacts generate` writes the index, and `configs.artifacts` hands it to the boot sequence. `application.ts` no longer names a single class.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// src/services/product.service.ts
|
|
13
|
+
@service()
|
|
14
|
+
export class ProductService extends BaseService {}
|
|
15
|
+
|
|
16
|
+
// src/application.ts
|
|
17
|
+
import { GeneratedArtifacts } from './generated/artifacts';
|
|
18
|
+
|
|
19
|
+
export const configs: IApplicationConfigs = {
|
|
20
|
+
path: { base: '/api', isStrict: true },
|
|
21
|
+
artifacts: GeneratedArtifacts,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This page is the how-to. The [reference](/references/base/bootstrapping) has every option, and the [changelog](/changelogs/2026-09-02-decorator-artifact-registration) has the migration from `boot()`.
|
|
26
|
+
|
|
27
|
+
## Before you start
|
|
28
|
+
|
|
29
|
+
- `@venizia/ignis` 0.1.x or later, `@venizia/ignis-boot` as a devDependency (it ships the `ignis-artifacts` binary).
|
|
30
|
+
- `experimentalDecorators: true` in the application's own `tsconfig.json`. Under bun, a flag inherited only through `extends` is not enough - see the [gotcha](#if-bun-runs-your-source-directly).
|
|
31
|
+
|
|
32
|
+
## 1. Decorate every class the application owns
|
|
33
|
+
|
|
34
|
+
| Decorator | Marks | Binding key | Scope |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
| `@datasource({ ... })` | a datasource | `datasources.<Class>` | `SINGLETON` |
|
|
37
|
+
| `@component()` | a component | `components.<Class>` | `SINGLETON` |
|
|
38
|
+
| `@repository({ model, dataSource })` | a repository | `repositories.<Class>` | `TRANSIENT` |
|
|
39
|
+
| `@service()` | a service | `services.<Class>` | `TRANSIENT` |
|
|
40
|
+
| `@controller({ path })` | a controller | `controllers.<Class>` | `SINGLETON` |
|
|
41
|
+
|
|
42
|
+
`@datasource`, `@repository`, `@controller` and `@model` already exist in your code. The new work is `@service()` on services and `@component()` on components. A `@model` class is referenced by its repository and is never registered on its own.
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { component, service } from '@venizia/ignis';
|
|
46
|
+
|
|
47
|
+
@service()
|
|
48
|
+
export class PricingService extends BaseService {}
|
|
49
|
+
|
|
50
|
+
@component()
|
|
51
|
+
export class MetricsComponent extends BaseComponent {}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The class must be a **named export** (`export class`, not `export default`) and must not be `abstract`. Anything else is skipped with a warning at generate time.
|
|
55
|
+
|
|
56
|
+
## 2. Generate the index
|
|
57
|
+
|
|
58
|
+
Add two scripts to `package.json`:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"scripts": {
|
|
63
|
+
"generate:artifacts": "ignis-artifacts generate --root src --out src/generated/artifacts.ts",
|
|
64
|
+
"check:artifacts": "ignis-artifacts check --root src --out src/generated/artifacts.ts"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Run the generator:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
bun run generate:artifacts
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
It scans `src/` with the TypeScript compiler API and writes one file of plain static imports:
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
// AUTO-GENERATED by @venizia/ignis-boot - do not edit. Regenerate: ignis-artifacts generate --root src --out src/generated/artifacts.ts
|
|
79
|
+
import { MetricsComponent } from '../components/metrics.component';
|
|
80
|
+
import { PostgresDataSource } from '../datasources/postgres.datasource';
|
|
81
|
+
import { ProductRepository } from '../repositories/product.repository';
|
|
82
|
+
import { PricingService } from '../services/pricing.service';
|
|
83
|
+
import { ProductController } from '../controllers/product.controller';
|
|
84
|
+
|
|
85
|
+
export const GeneratedArtifacts = {
|
|
86
|
+
dataSources: [PostgresDataSource],
|
|
87
|
+
components: [MetricsComponent],
|
|
88
|
+
repositories: [ProductRepository],
|
|
89
|
+
services: [PricingService],
|
|
90
|
+
controllers: [ProductController],
|
|
91
|
+
};
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Commit the file. Never edit it by hand - the next `generate` overwrites it.
|
|
95
|
+
|
|
96
|
+
## 3. Pass the index in the config
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { ApiReferenceComponent, HealthCheckComponent } from '@venizia/ignis';
|
|
100
|
+
import { GeneratedArtifacts } from './generated/artifacts';
|
|
101
|
+
|
|
102
|
+
export const configs: IApplicationConfigs = {
|
|
103
|
+
path: { base: '/api', isStrict: true },
|
|
104
|
+
artifacts: [
|
|
105
|
+
GeneratedArtifacts,
|
|
106
|
+
{ components: [HealthCheckComponent, ApiReferenceComponent] },
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The framework components you turn on are listed once, by hand, next to the generated index. Order inside the array does not matter for dependencies: the kernel registers datasources first, then components, repositories, services, controllers, across every index it was given.
|
|
112
|
+
|
|
113
|
+
Registering means binding a class to its key; nothing is constructed at this step. Datasources are constructed at `registerDataSources` and components at `registerComponents`, both after `preConfigure()`, so an option you bind in `preConfigure()` (or provide through `@provide`) is in place when the component starts. What the index cannot do is share a connection a hook already opened: a helper that `preConfigure()` connects and a component that connects again on construction collide, whichever way the component was registered.
|
|
114
|
+
|
|
115
|
+
Delete the registration calls from `preConfigure()`. Keep what is not a binding - a registry call such as `AuthenticationStrategyRegistry.getInstance().register(...)` stays where it was.
|
|
116
|
+
|
|
117
|
+
## 4. Provide the options a framework component reads
|
|
118
|
+
|
|
119
|
+
A framework component reads its options from a binding key at configure time. Put those values in a component of your own, one `@provide` method per key:
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { component, provide, HealthCheckBindingKeys } from '@venizia/ignis';
|
|
123
|
+
import type { IHealthCheckOptions } from '@venizia/ignis';
|
|
124
|
+
|
|
125
|
+
@component()
|
|
126
|
+
export class PlatformComponent extends BaseComponent {
|
|
127
|
+
constructor(
|
|
128
|
+
@inject({ key: CoreBindings.APPLICATION_INSTANCE }) private application: BaseApplication,
|
|
129
|
+
) {
|
|
130
|
+
super({ scope: PlatformComponent.name });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
override binding(): void {
|
|
134
|
+
// Every option below is a provider; nothing to bind eagerly.
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@provide({ key: HealthCheckBindingKeys.HEALTH_CHECK_OPTIONS })
|
|
138
|
+
healthCheckOptions(): IHealthCheckOptions {
|
|
139
|
+
return { restOptions: { path: '/health-check' } };
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Each `@provide` key is bound to a lazy provider when the component is registered. The component is resolved and the method called on the first `get`, so a provided value may read a datasource or a secret that does not exist yet at registration time. The value is a `SINGLETON` unless `@provide({ scope })` says otherwise.
|
|
145
|
+
|
|
146
|
+
## Conditional and ordered registration
|
|
147
|
+
|
|
148
|
+
Every stereotype accepts the same five options. Use them on the class, never at a call site.
|
|
149
|
+
|
|
150
|
+
| Option | Use it when | Example |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `when` | the class registers only in some deployments | `@component({ when: () => process.env.KAFKA_BROKERS !== undefined })` |
|
|
153
|
+
| `order` | two classes of one kind must register in a fixed order | `@component({ order: -10 })` registers before the default `0` |
|
|
154
|
+
| `scope` | the default scope is wrong for this class | `@service({ scope: BindingScopes.SINGLETON })` |
|
|
155
|
+
| `binding` | the key must differ from `<namespace>.<Class>` | `@controller({ path: '/v2/users', binding: { namespace: 'controllers', key: 'UsersV2' } })` |
|
|
156
|
+
| `allowOverride` | a same-key re-registration must throw instead of silently winning - or, under `bootChecks.binding.allowOverride: false`, this one class must be allowed to win | `@repository({ model, dataSource, allowOverride: false })` |
|
|
157
|
+
|
|
158
|
+
`when` runs at the `registerArtifacts` boot step, before `preConfigure`, so it may read config and environment and nothing from the container. It may be `async`. A skipped class is logged at debug: `Skipped by condition | kind: components | class: KafkaComponent`.
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
@component({ when: () => process.env.KAFKA_BROKERS !== undefined })
|
|
162
|
+
export class KafkaComponent extends BaseComponent {}
|
|
163
|
+
|
|
164
|
+
@controller({ path: '/test', when: () => process.env.NODE_ENV !== Environment.PRODUCTION })
|
|
165
|
+
export class TestController extends BaseRestController {}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Composing indexes across packages
|
|
169
|
+
|
|
170
|
+
A library ships its own index - generated the same way, or written by hand in the same shape - and the application lists it beside its own:
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
import { InventoryArtifacts } from '@acme/inventory';
|
|
174
|
+
import { GeneratedArtifacts } from './generated/artifacts';
|
|
175
|
+
|
|
176
|
+
artifacts: [InventoryArtifacts, GeneratedArtifacts, { components: [HealthCheckComponent] }],
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Arrays nest to any depth. A class listed twice registers once at its first position; a class registered by hand before the step keeps its earlier position. Both are same-key re-registrations, which `bootChecks.binding.allowOverride: false` refuses.
|
|
180
|
+
|
|
181
|
+
## Keep the index fresh
|
|
182
|
+
|
|
183
|
+
A stale index registers yesterday's classes and passes every other gate. Put the check where lint runs:
|
|
184
|
+
|
|
185
|
+
```makefile
|
|
186
|
+
lint: artifacts-check
|
|
187
|
+
bun run lint
|
|
188
|
+
|
|
189
|
+
artifacts-check:
|
|
190
|
+
bun run check:artifacts
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`check` renders the index in memory and compares it with the committed file. It exits `1` and prints the `generate` command when they differ.
|
|
194
|
+
|
|
195
|
+
## Verify
|
|
196
|
+
|
|
197
|
+
Start with debug logging and read the boot log:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Boot step 5/15 registerArtifacts
|
|
201
|
+
Skipped by condition | kind: controllers | class: TestController
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Or ask the container from a script, before `start()`:
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
application.init();
|
|
208
|
+
await application.registerArtifacts(configs.artifacts!);
|
|
209
|
+
application.isBound({ key: 'services.PricingService' }); // true
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
A bound key is not yet a resolvable one: a dependency a `when` excluded, or an `@inject` key nobody binds, only fails at the first `get`. Turn on the boot checks while you migrate, and the boot itself proves all three:
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
export const configs: IApplicationConfigs = {
|
|
216
|
+
path: { base: '/api', isStrict: true },
|
|
217
|
+
artifacts: GeneratedArtifacts,
|
|
218
|
+
bootChecks: {
|
|
219
|
+
binding: {
|
|
220
|
+
doVerify: process.env.NODE_ENV !== 'production',
|
|
221
|
+
allowManual: false,
|
|
222
|
+
allowOverride: false,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`doVerify` resolves every service and repository once at the end of the sequence and fails with the whole list of broken keys. `allowManual: false` fails on any registration call left in `preConfigure()` or `postConfigure()` - the hand call would otherwise run after the index step and override it silently. `allowOverride: false` fails on any two registrations behind one key, such as two run-mode datasources that share a `binding` and whose `when` conditions overlap; the class that must win says `allowOverride: true` on its decorator. The three are one group of required booleans: without the group nothing is checked. See [`bootChecks`](/references/base/bootstrapping#bootchecks).
|
|
229
|
+
|
|
230
|
+
## If bun runs your source directly
|
|
231
|
+
|
|
232
|
+
`bun src/index.ts` transpiles each file without type information. A decorated member whose type comes from a value import - `@provide` returning `IHealthCheckOptions`, a constructor taking `IControllerOptions` - keeps that import alive for `design:*` metadata, and the import then fails to link because the name is a type. Import such names with `import type`. An application that runs `tsc` first and then `bun dist/index.js` is not affected, because `tsc` elides type imports.
|
|
233
|
+
|
|
234
|
+
## Compiling with `bun build --compile`
|
|
235
|
+
|
|
236
|
+
Four rules, each backed by a measurement:
|
|
237
|
+
|
|
238
|
+
1. Pass `--env=disable`. Without it `process.env.NODE_ENV` is a literal baked in at build time. Read the environment through `Environment.ambient` or `Environment.current`, never the dot form.
|
|
239
|
+
2. Do not pass `--minify`. It minifies identifiers and every class name becomes two letters. Use `--minify-whitespace --minify-syntax`.
|
|
240
|
+
3. Register a logger provider at the entrypoint: `LoggerFactory.use({ provider: WinstonLogger })` from `@venizia/ignis-helpers/winston`. The winston default is loaded with `createRequire`, which cannot resolve inside a binary.
|
|
241
|
+
4. Build every binding key from `Class.name`. bun renames a bundled decorated class (`UserService` -> `UserService2`), so a literal `'services.UserService'` matches nothing.
|
|
242
|
+
|
|
243
|
+
```json
|
|
244
|
+
"compile:linux": "bun build --compile --minify-whitespace --minify-syntax --sourcemap --env=disable --target=bun-linux-x64 ./src/index.ts --outfile ./dist/app"
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
To prove a binary, run it against refused ports: `APP_ENV_POSTGRES_HOST=127.0.0.1 APP_ENV_POSTGRES_PORT=1 ./dist/app`. It must reach `postConfigure` and fail with `ECONNREFUSED`, never at import.
|
|
248
|
+
|
|
249
|
+
## Migrating from `boot()`
|
|
250
|
+
|
|
251
|
+
The runtime boot system - `Bootstrapper`, the four booters, `BootMixin`, `bootOptions`, `boot()` - is fully removed. A compiled binary (`bun build --compile`) cannot glob files at runtime; a generated index is plain imports it can see.
|
|
252
|
+
|
|
253
|
+
1. Decorate services and components, generate the index, pass `artifacts` (steps 1-3 above).
|
|
254
|
+
2. In `index.ts`, replace the boot chain with one awaited `start()`:
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
// Before
|
|
258
|
+
application.boot().then(() => application.start());
|
|
259
|
+
|
|
260
|
+
// After
|
|
261
|
+
await application.start();
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
3. Delete `bootOptions` from the config and any `override boot()` - both are removed, so the code will not compile until they're gone.
|
|
265
|
+
|
|
266
|
+
One production application went from 286 lines and 99 `this.controller(...)`-style calls in `application.ts` to a config entry and two lifecycle methods.
|
|
267
|
+
|
|
268
|
+
## See also
|
|
269
|
+
|
|
270
|
+
- [Artifact registration reference](/references/base/bootstrapping) - every option, the CLI, detection rules
|
|
271
|
+
- [Application reference](/references/base/application) - the 15-step boot sequence
|
|
272
|
+
- [Components](/references/base/components) - writing a component
|
|
273
|
+
- [Changelog 2026-09-02](/changelogs/2026-09-02-decorator-artifact-registration) - what changed and who is affected
|
|
274
|
+
- [Changelog 2026-09-03](/changelogs/2026-09-03-deprecated-boot-api-removed) - the deprecated boot API removed
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# The Application Class
|
|
2
|
+
|
|
3
|
+
The Application class orchestrates your application's configuration, lifecycle, and resource registration (components, controllers, services).
|
|
4
|
+
|
|
5
|
+
> **Deep Dive:** See [Application Reference](../../../references/base/application.md) for technical details.
|
|
6
|
+
|
|
7
|
+
## Creating an Application
|
|
8
|
+
|
|
9
|
+
Extend `BaseApplication` and implement the hook methods:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// src/application.ts
|
|
13
|
+
import {
|
|
14
|
+
BaseApplication,
|
|
15
|
+
IApplicationConfigs,
|
|
16
|
+
IApplicationInfo,
|
|
17
|
+
ValueOrPromise,
|
|
18
|
+
} from "@venizia/ignis";
|
|
19
|
+
import packageJson from "./../package.json";
|
|
20
|
+
|
|
21
|
+
// Application configurations
|
|
22
|
+
export const appConfigs: IApplicationConfigs = {
|
|
23
|
+
host: process.env.APP_ENV_SERVER_HOST,
|
|
24
|
+
port: +(process.env.APP_ENV_SERVER_PORT ?? 3000),
|
|
25
|
+
path: {
|
|
26
|
+
base: process.env.APP_ENV_SERVER_BASE_PATH ?? "/",
|
|
27
|
+
isStrict: true,
|
|
28
|
+
},
|
|
29
|
+
debug: {
|
|
30
|
+
shouldShowRoutes: process.env.NODE_ENV !== "production",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Main Application class
|
|
35
|
+
export class Application extends BaseApplication {
|
|
36
|
+
override getAppInfo(): ValueOrPromise<IApplicationInfo> {
|
|
37
|
+
return packageJson;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
staticConfigure(): void {
|
|
41
|
+
// e.g., this.static({ folderPath: './public' })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
preConfigure(): ValueOrPromise<void> {
|
|
45
|
+
// Register your resources
|
|
46
|
+
this.dataSource(MyDataSource);
|
|
47
|
+
this.service(MyService);
|
|
48
|
+
this.controller(MyController);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
postConfigure(): ValueOrPromise<void> {
|
|
52
|
+
// Logic to run after everything is configured
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
setupMiddlewares(): ValueOrPromise<void> {
|
|
56
|
+
// Add any custom application-wide middlewares
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Application Lifecycle
|
|
62
|
+
|
|
63
|
+
The `IGNIS` application has a well-defined lifecycle, managed primarily by the `start()` and `initialize()` methods.
|
|
64
|
+
|
|
65
|
+
| Method | Description |
|
|
66
|
+
| :--- | :--- |
|
|
67
|
+
| **`constructor(opts)`** | Initializes the application, sets up the Hono server (`OpenAPIHono`), and detects the runtime (Bun/Node). The `Application` extends `Container` (IoC container). |
|
|
68
|
+
| **`start()`** | The main entry point. It calls `initialize()`, sets up middlewares, mounts the root router, and starts the HTTP server. |
|
|
69
|
+
| **`stop()`** | Stops the application server (calls `Bun.serve.stop()` or `node-server.close()`). |
|
|
70
|
+
| **`initialize()`** | Orchestrates the entire setup process, calling the various configuration and registration methods in the correct order. |
|
|
71
|
+
|
|
72
|
+
The `BaseApplication` class provides several **overridable hook methods** that allow you to customize the startup process. These are the primary places you'll write your application-specific setup code.
|
|
73
|
+
|
|
74
|
+
| Hook Method | Purpose |
|
|
75
|
+
| :--- | :--- |
|
|
76
|
+
| `getAppInfo()` | **Required.** Return application metadata, usually from `package.json`. Used for OpenAPI docs. |
|
|
77
|
+
| `staticConfigure()` | Configure static file serving. Called before `preConfigure()`. |
|
|
78
|
+
| `preConfigure()` | Register what the artifact index cannot express - registry calls, hand-made bindings. Classes come from `configs.artifacts`, see [Registering artifacts](./bootstrapping). |
|
|
79
|
+
| `postConfigure()` | Perform actions *after* all resources have been configured and instantiated. Note: do not bind new datasources, components, or controllers here -- they will not be auto-configured. |
|
|
80
|
+
| `setupMiddlewares()`| Add custom application-level middlewares to the Hono instance. Called after `initialize()` completes. |
|
|
81
|
+
|
|
82
|
+
## Lifecycle Diagram
|
|
83
|
+
|
|
84
|
+
This diagram shows the sequence of operations during application startup.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
start()
|
|
88
|
+
│
|
|
89
|
+
▼
|
|
90
|
+
initialize()
|
|
91
|
+
│
|
|
92
|
+
├─► printStartUpInfo
|
|
93
|
+
├─► validateEnvs
|
|
94
|
+
├─► registerDefaultMiddlewares (error handler, contextStorage, RequestTracker, favicon)
|
|
95
|
+
├─► staticConfigure() ← Override hook
|
|
96
|
+
├─► preConfigure() ← Override hook
|
|
97
|
+
├─► registerDataSources() (configures all datasource bindings)
|
|
98
|
+
├─► registerComponents() (configures all component bindings)
|
|
99
|
+
├─► registerControllers() (REST + gRPC transport components)
|
|
100
|
+
└─► postConfigure() ← Override hook
|
|
101
|
+
│
|
|
102
|
+
▼
|
|
103
|
+
setupMiddlewares() ← Override hook
|
|
104
|
+
│
|
|
105
|
+
▼
|
|
106
|
+
Mount Root Router (server.route(basePath, rootRouter))
|
|
107
|
+
│
|
|
108
|
+
▼
|
|
109
|
+
Start HTTP Server (Bun.serve or @hono/node-server)
|
|
110
|
+
│
|
|
111
|
+
▼
|
|
112
|
+
executePostStartHooks()
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Configuration
|
|
116
|
+
|
|
117
|
+
Application configuration is passed to the `BaseApplication` constructor via an `IApplicationConfigs` object.
|
|
118
|
+
|
|
119
|
+
### Configuration Options
|
|
120
|
+
|
|
121
|
+
| Option | Type | Default | Description |
|
|
122
|
+
| :--- | :--- | :--- | :--- |
|
|
123
|
+
| `host` | `string` | `'localhost'` | The host address. Falls back to `HOST` or `APP_ENV_SERVER_HOST` env vars. |
|
|
124
|
+
| `port` | `number` | `3000` | The port to listen on. Falls back to `PORT` or `APP_ENV_SERVER_PORT` env vars. |
|
|
125
|
+
| `path.base`| `string` | `'/'` | The base path for all application routes (e.g., `/api`). |
|
|
126
|
+
| `path.isStrict`| `boolean`| `true` | If `true`, the router is strict about trailing slashes. |
|
|
127
|
+
| `debug.shouldShowRoutes`| `boolean`| `false`| If `true`, prints all registered routes to the console on startup. |
|
|
128
|
+
| `favicon` | `string` | `'🔥'` | An emoji to be used as the application's favicon. |
|
|
129
|
+
| `artifacts` | `TArtifactIndexInput` | `undefined` | The generated artifact index (or several) to register before `preConfigure()`. See [Registering artifacts](./bootstrapping). |
|
|
130
|
+
| `asyncContext.enable` | `boolean` | `true` | Enable Hono's async context storage (powered by `contextStorage()`). |
|
|
131
|
+
| `transports` | `TControllerTransport[]` | `['rest']` | Controller transports to enable. Add `'grpc'` for gRPC support. |
|
|
132
|
+
| `error.rootKey` | `string` | `undefined` | Optional root key for error response wrapping. |
|
|
133
|
+
| `strictPath` | `boolean` | `true` | Controls trailing slash strictness on the main Hono server. |
|
|
134
|
+
|
|
135
|
+
### Example Configuration
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import { ControllerTransports } from '@venizia/ignis';
|
|
139
|
+
|
|
140
|
+
export const appConfigs: IApplicationConfigs = {
|
|
141
|
+
host: "0.0.0.0",
|
|
142
|
+
port: 3000,
|
|
143
|
+
path: {
|
|
144
|
+
base: "/api",
|
|
145
|
+
isStrict: true,
|
|
146
|
+
},
|
|
147
|
+
debug: {
|
|
148
|
+
shouldShowRoutes: true,
|
|
149
|
+
},
|
|
150
|
+
transports: [ControllerTransports.REST, ControllerTransports.GRPC],
|
|
151
|
+
};
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Registering Resources
|
|
155
|
+
|
|
156
|
+
Register resources in `preConfigure()` to tell the DI container about your classes:
|
|
157
|
+
|
|
158
|
+
| Method | Example | Binding Scope | When to Use |
|
|
159
|
+
|--------|---------|---------------|-------------|
|
|
160
|
+
| `this.dataSource(...)` | `this.dataSource(PostgresDataSource)` | **Singleton** | Register database connection |
|
|
161
|
+
| `this.component(...)` | `this.component(AuthComponent)` | **Singleton** | Register reusable modules |
|
|
162
|
+
| `this.repository(...)` | `this.repository(UserRepository)` | Transient | Register data access |
|
|
163
|
+
| `this.service(...)` | `this.service(UserService)` | Transient | Register business logic |
|
|
164
|
+
| `this.controller(...)` | `this.controller(UserController)` | **Singleton** | Register API endpoints |
|
|
165
|
+
|
|
166
|
+
All registration methods accept an optional second parameter to customize the binding key:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
// Default binding (key: 'controllers.UserController')
|
|
170
|
+
this.controller(UserController);
|
|
171
|
+
|
|
172
|
+
// Custom binding key
|
|
173
|
+
this.controller(UserController, {
|
|
174
|
+
binding: { namespace: 'controllers', key: 'CustomUserController' }
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Registration order:**
|
|
179
|
+
1. DataSources first (database connections)
|
|
180
|
+
2. Repositories (depend on DataSources)
|
|
181
|
+
3. Services (depend on Repositories)
|
|
182
|
+
4. Controllers (depend on Services)
|
|
183
|
+
5. Components (can add more datasources/controllers during configuration)
|
|
184
|
+
|
|
185
|
+
> **Deep Dive:** See [Dependency Injection](../dependency-injection.md) for how registration and injection work together.
|
|
186
|
+
|
|
187
|
+
## Runtime Support
|
|
188
|
+
|
|
189
|
+
The application detects the runtime automatically via `RuntimeModules.detect()`:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
// Bun (default) - uses Bun.serve
|
|
193
|
+
Bun.serve({ port, hostname, fetch: server.fetch })
|
|
194
|
+
|
|
195
|
+
// Node.js - requires @hono/node-server
|
|
196
|
+
import { serve } from '@hono/node-server'
|
|
197
|
+
serve({ fetch: server.fetch, port, hostname })
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Post-Start Hooks
|
|
201
|
+
|
|
202
|
+
Register hooks that execute after the HTTP server has started:
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
this.registerPostStartHook({
|
|
206
|
+
identifier: 'cache-warmup',
|
|
207
|
+
hook: async () => {
|
|
208
|
+
// Warm up caches, start background jobs, etc.
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Static File Serving
|
|
214
|
+
|
|
215
|
+
Serve static files with runtime-aware implementation:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
staticConfigure(): void {
|
|
219
|
+
this.static({ restPath: '/public/*', folderPath: './public' });
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Uses `hono/bun` `serveStatic` for Bun runtime, `@hono/node-server/serve-static` for Node.js.
|
|
224
|
+
|
|
225
|
+
## See Also
|
|
226
|
+
|
|
227
|
+
- **Related Concepts:**
|
|
228
|
+
- [Registering artifacts](./bootstrapping) - Decorators, the generated index, `configs.artifacts`
|
|
229
|
+
- [REST Controllers](/guides/core-concepts/rest-controllers) | [gRPC Controllers](/guides/core-concepts/grpc-controllers) - Creating HTTP/gRPC endpoints
|
|
230
|
+
- [Services](/guides/core-concepts/services) - Business logic layer
|
|
231
|
+
- [Dependency Injection](/guides/core-concepts/dependency-injection) - How DI works in IGNIS
|
|
232
|
+
|
|
233
|
+
- **References:**
|
|
234
|
+
- [BaseApplication API](/references/base/application) - Complete API reference
|
|
235
|
+
- [Environment Variables](/references/configuration/environment-variables) - Configuration management
|
|
236
|
+
|
|
237
|
+
- **Tutorials:**
|
|
238
|
+
- [5-Minute Quickstart](/guides/get-started/5-minute-quickstart) - Create your first app
|
|
239
|
+
- [Building a CRUD API](/guides/tutorials/building-a-crud-api) - Complete application example
|