@venizia/ignis-kernel 0.2.0-35 → 0.2.0-37

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.
@@ -11,14 +11,16 @@ export declare abstract class BaseComponent<ConfigurableOptions extends object =
11
11
  protected bindings: Record<TBindingKey, Binding>;
12
12
  protected initDefault: TInitDefault;
13
13
  protected isConfigured: boolean;
14
- /** What `application.component(Ctor, { options })` handed this instance. Set before `binding()` runs, so a component reads its options there instead of reimplementing `configure`. */
15
- protected configuredOptions?: ConfigurableOptions;
14
+ /** What `application.component(Ctor, { options })` handed this instance, set before `binding()` runs. Optional, not defaulted to `{}`: a component registered through `configs.artifacts` gets no options and uses `??` to fall back to its binding, which an empty object would silently defeat. */
15
+ options?: ConfigurableOptions;
16
16
  constructor(opts: {
17
17
  scope: string;
18
18
  initDefault?: TInitDefault;
19
19
  bindings?: Record<TBindingKey, Binding>;
20
20
  });
21
21
  abstract binding(): ValueOrPromise<void>;
22
+ /** Override this, not the field, to resolve options lazily. */
23
+ getOptions(): ConfigurableOptions | undefined;
22
24
  protected initDefaultBindings(opts: {
23
25
  container: Container;
24
26
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/components/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAY,MAAM,6BAA6B,CAAC;AAEnE,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAE/E,8BAAsB,aAAa,CAAC,mBAAmB,SAAS,MAAM,GAAG,EAAE,CACzE,SAAQ,UACR,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IAEjD,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC;IACpC,SAAS,CAAC,YAAY,UAAS;IAE/B,qSAAqS;IACrS,OAAO,CAAC,EAAE,mBAAmB,CAAC;gBAElB,IAAI,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;KACzC;IAOD,QAAQ,CAAC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC;IAExC,+DAA+D;IAC/D,UAAU,IAAI,mBAAmB,GAAG,SAAS;IAI7C,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE;IAkBtD,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB3D"}
@@ -9,6 +9,10 @@ class BaseComponent extends core_1.BaseHelper {
9
9
  this.initDefault = opts.initDefault ?? { enable: false };
10
10
  this.bindings = opts.bindings ?? {};
11
11
  }
12
+ /** Override this, not the field, to resolve options lazily. */
13
+ getOptions() {
14
+ return this.options;
15
+ }
12
16
  initDefaultBindings(opts) {
13
17
  const { container } = opts;
14
18
  if (!container) {
@@ -28,11 +32,8 @@ class BaseComponent extends core_1.BaseHelper {
28
32
  return;
29
33
  }
30
34
  const t = performance.now();
31
- this.configuredOptions = opts;
32
- const configureOptions = opts ?? {};
33
- this.logger
34
- .for(this.binding.name)
35
- .info('START | Binding component | Options: %j', configureOptions);
35
+ this.options = opts;
36
+ this.logger.for(this.binding.name).info('START | Binding component | Options: %j', opts ?? {});
36
37
  if (this.initDefault?.enable) {
37
38
  this.initDefaultBindings({ container: this.initDefault.container });
38
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/base/components/base.ts"],"names":[],"mappings":";;;AAEA,sDAAmE;AAInE,MAAsB,aACpB,SAAQ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EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAA0B;QACxC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QAED,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAE5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,yCAAyC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;QAE/F,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,mBAAmB,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QAErB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,MAAM;aACR,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;aACtB,IAAI,CAAC,0CAA0C,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7E,CAAC;CACF;AAtED,sCAsEC"}
@@ -1,12 +1,9 @@
1
1
  import { z } from '@hono/zod-openapi';
2
2
  /**
3
- * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
4
- *
5
- * `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
6
- * that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
7
- * mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
8
- * browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
9
- * non-REST consumer can reach.
3
+ * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE. `z.object()` runs at
4
+ * module load, so any bundle reaching this file carries the whole of zod. While these lived beside
5
+ * `ControllerTransports`, which the container's controller mixin imports, importing `Container`
6
+ * alone cost 437 KB - 423 KB of it zod - for a four-line const class.
10
7
  */
11
8
  export declare const trackableHeaders: z.ZodObject<{
12
9
  "x-request-id": z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
@@ -4,13 +4,10 @@ exports.defaultRequestHeaders = exports.countableHeaders = exports.trackableHead
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const common_1 = require("@venizia/ignis-helpers/common");
6
6
  /**
7
- * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
8
- *
9
- * `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
10
- * that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
11
- * mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
12
- * browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
13
- * non-REST consumer can reach.
7
+ * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE. `z.object()` runs at
8
+ * module load, so any bundle reaching this file carries the whole of zod. While these lived beside
9
+ * `ControllerTransports`, which the container's controller mixin imports, importing `Container`
10
+ * alone cost 437 KB - 423 KB of it zod - for a four-line const class.
14
11
  */
15
12
  exports.trackableHeaders = zod_openapi_1.z.object({
16
13
  [common_1.HTTP.Headers.REQUEST_TRACING_ID]: zod_openapi_1.z.string().optional().openapi({
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":";;;AAAA,mDAAsC;AACtC,0DAAqD;AAErD;;;;;;;;GAQG;AACU,QAAA,gBAAgB,GAAG,eAAC,CAAC,MAAM,CAAC;IACvC,CAAC,aAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,eAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QAC/D,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,CAAC,aAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,eAAC;SAC9B,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;KACvC,CAAC;IACJ,CAAC,aAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,eAAC;SAClC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;KACjD,CAAC;CACL,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,eAAC,CAAC,MAAM,CAAC;IACvC,CAAC,aAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,eAAC;SACjC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,0GAA0G;QAC5G,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAA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AAG,wBAAgB,CAAC,MAAM,CAAC,wBAAgB,CAAC,KAAK,CAAC,CAAC"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * How a class is MARKED as an artifact, and nothing about how one is served.
2
+ * How a class is MARKED as an artifact, and nothing about how one is served. 23 KB gzipped against
3
+ * the root barrel's 161 KB, which carries the REST surface and is right to.
3
4
  *
4
- * The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
5
- * for a consumer that only registers and resolves classes.
6
- *
7
- * Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
8
- * of the transport surface but promises nothing. The point of a sub-path is a surface someone
9
- * DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
10
- * the barrel is about 2 KB; the boundary is the product.
11
- *
12
- * The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
5
+ * Listed export by export rather than re-exporting `base/metadata`: a sub-path is a surface someone
6
+ * decided on, not whatever a directory grows into. Weight is a contract, checked by
7
+ * `src/__tests__/bundle/browser-weight.test.ts`.
13
8
  */
14
9
  export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable';
15
10
  export { datasource, model, repository } from './base/metadata/persistents';
16
11
  export { inject } from './base/metadata/injectors';
17
- export { ArtifactNamespaces, BindingNamespaces, CoreBindings } from './common/bindings';
12
+ export { ArtifactNamespaces, BindingNamespaces } from './common/bindings';
18
13
  export type { TBindingNamespace } from './common/bindings';
14
+ /**
15
+ * `CoreBindings` is deliberately NOT here. The namespaces above are the GRAMMAR of a binding key;
16
+ * `CoreBindings` is one application's DICTIONARY (`APPLICATION_SERVER`, `APPLICATION_ROOT_ROUTER`).
17
+ * A sibling framework ships a class of the same name whose `APPLICATION_INSTANCE` is a different
18
+ * string, so shipping ours beside the stereotypes means binding under one key and resolving under
19
+ * another, with nothing failing until run time. It stays on the root barrel.
20
+ */
19
21
  export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion';
20
22
  export type { IArtifactMetadata, IArtifactRegistrationOptions, TBindingScope, } from './helpers/inversion';
21
23
  //# sourceMappingURL=metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxF,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
@@ -1,19 +1,14 @@
1
1
  "use strict";
2
2
  /**
3
- * How a class is MARKED as an artifact, and nothing about how one is served.
3
+ * How a class is MARKED as an artifact, and nothing about how one is served. 23 KB gzipped against
4
+ * the root barrel's 161 KB, which carries the REST surface and is right to.
4
5
  *
5
- * The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
6
- * for a consumer that only registers and resolves classes.
7
- *
8
- * Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
9
- * of the transport surface but promises nothing. The point of a sub-path is a surface someone
10
- * DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
11
- * the barrel is about 2 KB; the boundary is the product.
12
- *
13
- * The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
6
+ * Listed export by export rather than re-exporting `base/metadata`: a sub-path is a surface someone
7
+ * decided on, not whatever a directory grows into. Weight is a contract, checked by
8
+ * `src/__tests__/bundle/browser-weight.test.ts`.
14
9
  */
15
10
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.MetadataRegistry = exports.BindingKeys = exports.ArtifactTypes = exports.CoreBindings = exports.BindingNamespaces = exports.ArtifactNamespaces = exports.inject = exports.repository = exports.model = exports.datasource = exports.service = exports.provide = exports.pickRegistrationOptions = exports.injectable = exports.configuration = exports.component = void 0;
11
+ exports.MetadataRegistry = exports.BindingKeys = exports.ArtifactTypes = exports.BindingNamespaces = exports.ArtifactNamespaces = exports.inject = exports.repository = exports.model = exports.datasource = exports.service = exports.provide = exports.pickRegistrationOptions = exports.injectable = exports.configuration = exports.component = void 0;
17
12
  var injectable_1 = require("./base/metadata/injectable");
18
13
  Object.defineProperty(exports, "component", { enumerable: true, get: function () { return injectable_1.component; } });
19
14
  Object.defineProperty(exports, "configuration", { enumerable: true, get: function () { return injectable_1.configuration; } });
@@ -30,7 +25,13 @@ Object.defineProperty(exports, "inject", { enumerable: true, get: function () {
30
25
  var bindings_1 = require("./common/bindings");
31
26
  Object.defineProperty(exports, "ArtifactNamespaces", { enumerable: true, get: function () { return bindings_1.ArtifactNamespaces; } });
32
27
  Object.defineProperty(exports, "BindingNamespaces", { enumerable: true, get: function () { return bindings_1.BindingNamespaces; } });
33
- Object.defineProperty(exports, "CoreBindings", { enumerable: true, get: function () { return bindings_1.CoreBindings; } });
28
+ /**
29
+ * `CoreBindings` is deliberately NOT here. The namespaces above are the GRAMMAR of a binding key;
30
+ * `CoreBindings` is one application's DICTIONARY (`APPLICATION_SERVER`, `APPLICATION_ROOT_ROUTER`).
31
+ * A sibling framework ships a class of the same name whose `APPLICATION_INSTANCE` is a different
32
+ * string, so shipping ours beside the stereotypes means binding under one key and resolving under
33
+ * another, with nothing failing until run time. It stays on the root barrel.
34
+ */
34
35
  var inversion_1 = require("./helpers/inversion");
35
36
  Object.defineProperty(exports, "ArtifactTypes", { enumerable: true, get: function () { return inversion_1.ArtifactTypes; } });
36
37
  Object.defineProperty(exports, "BindingKeys", { enumerable: true, get: function () { return inversion_1.BindingKeys; } });
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,yDAOoC;AANlC,uGAAA,SAAS,OAAA;AACT,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,qHAAA,uBAAuB,OAAA;AACvB,qGAAA,OAAO,OAAA;AACP,qGAAA,OAAO,OAAA;AAET,2DAA4E;AAAnE,yGAAA,UAAU,OAAA;AAAE,oGAAA,KAAK,OAAA;AAAE,yGAAA,UAAU,OAAA;AACtC,uDAAmD;AAA1C,mGAAA,MAAM,OAAA;AAEf,8CAAwF;AAA/E,8GAAA,kBAAkB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAAE,wGAAA,YAAY,OAAA;AAG5D,iDAAmF;AAA1E,0GAAA,aAAa,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,6GAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,yDAOoC;AANlC,uGAAA,SAAS,OAAA;AACT,2GAAA,aAAa,OAAA;AACb,wGAAA,UAAU,OAAA;AACV,qHAAA,uBAAuB,OAAA;AACvB,qGAAA,OAAO,OAAA;AACP,qGAAA,OAAO,OAAA;AAET,2DAA4E;AAAnE,yGAAA,UAAU,OAAA;AAAE,oGAAA,KAAK,OAAA;AAAE,yGAAA,UAAU,OAAA;AACtC,uDAAmD;AAA1C,mGAAA,MAAM,OAAA;AAEf,8CAA0E;AAAjE,8GAAA,kBAAkB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAG9C;;;;;;GAMG;AAEH,iDAAmF;AAA1E,0GAAA,aAAa,OAAA;AAAE,wGAAA,WAAW,OAAA;AAAE,6GAAA,gBAAgB,OAAA"}
@@ -11,14 +11,16 @@ export declare abstract class BaseComponent<ConfigurableOptions extends object =
11
11
  protected bindings: Record<TBindingKey, Binding>;
12
12
  protected initDefault: TInitDefault;
13
13
  protected isConfigured: boolean;
14
- /** What `application.component(Ctor, { options })` handed this instance. Set before `binding()` runs, so a component reads its options there instead of reimplementing `configure`. */
15
- protected configuredOptions?: ConfigurableOptions;
14
+ /** What `application.component(Ctor, { options })` handed this instance, set before `binding()` runs. Optional, not defaulted to `{}`: a component registered through `configs.artifacts` gets no options and uses `??` to fall back to its binding, which an empty object would silently defeat. */
15
+ options?: ConfigurableOptions;
16
16
  constructor(opts: {
17
17
  scope: string;
18
18
  initDefault?: TInitDefault;
19
19
  bindings?: Record<TBindingKey, Binding>;
20
20
  });
21
21
  abstract binding(): ValueOrPromise<void>;
22
+ /** Override this, not the field, to resolve options lazily. */
23
+ getOptions(): ConfigurableOptions | undefined;
22
24
  protected initDefaultBindings(opts: {
23
25
  container: Container;
24
26
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/components/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAY,MAAM,6BAA6B,CAAC;AAEnE,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAE/E,8BAAsB,aAAa,CAAC,mBAAmB,SAAS,MAAM,GAAG,EAAE,CACzE,SAAQ,UACR,YAAW,aAAa,CAAC,mBAAmB,CAAC;IAE7C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAEjD,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC;IACpC,SAAS,CAAC,YAAY,UAAS;IAE/B,uLAAuL;IACvL,SAAS,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;gBAEtC,IAAI,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;KACzC;IAOD,QAAQ,CAAC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC;IAExC,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE;IAkBtD,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAyB3D"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/base/components/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAY,MAAM,6BAA6B,CAAC;AAEnE,KAAK,YAAY,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAE/E,8BAAsB,aAAa,CAAC,mBAAmB,SAAS,MAAM,GAAG,EAAE,CACzE,SAAQ,UACR,YAAW,aAAa,CAAC,mBAAmB,CAAC;IAE7C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAEjD,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC;IACpC,SAAS,CAAC,YAAY,UAAS;IAE/B,qSAAqS;IACrS,OAAO,CAAC,EAAE,mBAAmB,CAAC;gBAElB,IAAI,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;KACzC;IAOD,QAAQ,CAAC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC;IAExC,+DAA+D;IAC/D,UAAU,IAAI,mBAAmB,GAAG,SAAS;IAI7C,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE;IAkBtD,SAAS,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB3D"}
@@ -6,6 +6,10 @@ export class BaseComponent extends BaseHelper {
6
6
  this.initDefault = opts.initDefault ?? { enable: false };
7
7
  this.bindings = opts.bindings ?? {};
8
8
  }
9
+ /** Override this, not the field, to resolve options lazily. */
10
+ getOptions() {
11
+ return this.options;
12
+ }
9
13
  initDefaultBindings(opts) {
10
14
  const { container } = opts;
11
15
  if (!container) {
@@ -25,11 +29,8 @@ export class BaseComponent extends BaseHelper {
25
29
  return;
26
30
  }
27
31
  const t = performance.now();
28
- this.configuredOptions = opts;
29
- const configureOptions = opts ?? {};
30
- this.logger
31
- .for(this.binding.name)
32
- .info('START | Binding component | Options: %j', configureOptions);
32
+ this.options = opts;
33
+ this.logger.for(this.binding.name).info('START | Binding component | Options: %j', opts ?? {});
33
34
  if (this.initDefault?.enable) {
34
35
  this.initDefaultBindings({ container: this.initDefault.container });
35
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/base/components/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAInE,MAAM,OAAgB,aACpB,SAAQ,UAAU;IAWlB,YAAY,IAIX;QACC,KAAK,CAAC,IAAI,CAAC,CAAC;QAVJ,iBAAY,GAAG,KAAK,CAAC;QAY7B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC;IACtC,CAAC;IAIS,mBAAmB,CAAC,IAA8B;QAC1D,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAE3B,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,uDAAuD;aACjE,CAAC,CAAC;QACL,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;gBAC/B,SAAS;YACX,CAAC;YAED,SAAS,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QA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;aACR,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;aACtB,IAAI,CAAC,0CAA0C,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7E,CAAC;CACF"}
@@ -1,12 +1,9 @@
1
1
  import { z } from '@hono/zod-openapi';
2
2
  /**
3
- * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
4
- *
5
- * `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
6
- * that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
7
- * mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
8
- * browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
9
- * non-REST consumer can reach.
3
+ * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE. `z.object()` runs at
4
+ * module load, so any bundle reaching this file carries the whole of zod. While these lived beside
5
+ * `ControllerTransports`, which the container's controller mixin imports, importing `Container`
6
+ * alone cost 437 KB - 423 KB of it zod - for a four-line const class.
10
7
  */
11
8
  export declare const trackableHeaders: z.ZodObject<{
12
9
  "x-request-id": z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;iBAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAS3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;iBAAkD,CAAC"}
@@ -1,13 +1,10 @@
1
1
  import { z } from '@hono/zod-openapi';
2
2
  import { HTTP } from '@venizia/ignis-helpers/common';
3
3
  /**
4
- * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE.
5
- *
6
- * `z.object()` runs at module load, so a file that calls it pulls the whole of zod into any bundle
7
- * that touches it. `constants.ts` carries `ControllerTransports`, which the container's controller
8
- * mixin imports - so while these lived beside it, importing `Container` alone cost 437 KB in a
9
- * browser bundle, 423 KB of it zod, for a four-line const class. Keep this file out of any path a
10
- * non-REST consumer can reach.
4
+ * The zod-backed request schemas, kept apart from `constants.ts` ON PURPOSE. `z.object()` runs at
5
+ * module load, so any bundle reaching this file carries the whole of zod. While these lived beside
6
+ * `ControllerTransports`, which the container's controller mixin imports, importing `Container`
7
+ * alone cost 437 KB - 423 KB of it zod - for a four-line const class.
11
8
  */
12
9
  export const trackableHeaders = z.object({
13
10
  [HTTP.Headers.REQUEST_TRACING_ID]: z.string().optional().openapi({
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/base/controllers/common/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QAC/D,WAAW,EAAE,qBAAqB;KACnC,CAAC;IACF,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;SAC9B,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP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,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC;KACvC,CAAC;IACJ,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;SAClC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC;KACjD,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;SACjC,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,0GAA0G;QAC5G,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC;KACtC,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC"}
@@ -1,21 +1,23 @@
1
1
  /**
2
- * How a class is MARKED as an artifact, and nothing about how one is served.
2
+ * How a class is MARKED as an artifact, and nothing about how one is served. 23 KB gzipped against
3
+ * the root barrel's 161 KB, which carries the REST surface and is right to.
3
4
  *
4
- * The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
5
- * for a consumer that only registers and resolves classes.
6
- *
7
- * Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
8
- * of the transport surface but promises nothing. The point of a sub-path is a surface someone
9
- * DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
10
- * the barrel is about 2 KB; the boundary is the product.
11
- *
12
- * The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
5
+ * Listed export by export rather than re-exporting `base/metadata`: a sub-path is a surface someone
6
+ * decided on, not whatever a directory grows into. Weight is a contract, checked by
7
+ * `src/__tests__/bundle/browser-weight.test.ts`.
13
8
  */
14
9
  export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable.js';
15
10
  export { datasource, model, repository } from './base/metadata/persistents.js';
16
11
  export { inject } from './base/metadata/injectors.js';
17
- export { ArtifactNamespaces, BindingNamespaces, CoreBindings } from './common/bindings.js';
12
+ export { ArtifactNamespaces, BindingNamespaces } from './common/bindings.js';
18
13
  export type { TBindingNamespace } from './common/bindings.js';
14
+ /**
15
+ * `CoreBindings` is deliberately NOT here. The namespaces above are the GRAMMAR of a binding key;
16
+ * `CoreBindings` is one application's DICTIONARY (`APPLICATION_SERVER`, `APPLICATION_ROOT_ROUTER`).
17
+ * A sibling framework ships a class of the same name whose `APPLICATION_INSTANCE` is a different
18
+ * string, so shipping ours beside the stereotypes means binding under one key and resolving under
19
+ * another, with nothing failing until run time. It stays on the root barrel.
20
+ */
19
21
  export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion/index.js';
20
22
  export type { IArtifactMetadata, IArtifactRegistrationOptions, TBindingScope, } from './helpers/inversion/index.js';
21
23
  //# sourceMappingURL=metadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxF,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,aAAa,GACd,MAAM,qBAAqB,CAAC"}
@@ -1,19 +1,21 @@
1
1
  /**
2
- * How a class is MARKED as an artifact, and nothing about how one is served.
2
+ * How a class is MARKED as an artifact, and nothing about how one is served. 23 KB gzipped against
3
+ * the root barrel's 161 KB, which carries the REST surface and is right to.
3
4
  *
4
- * The root barrel is 161 KB gzipped, correctly - it carries the REST surface. This entry is 23 KB,
5
- * for a consumer that only registers and resolves classes.
6
- *
7
- * Listed export by export rather than re-exporting `base/metadata`, which today happens to be free
8
- * of the transport surface but promises nothing. The point of a sub-path is a surface someone
9
- * DECIDED on: what lands here is a choice, not whatever that directory grows into. The saving over
10
- * the barrel is about 2 KB; the boundary is the product.
11
- *
12
- * The weight is a contract, checked by `src/__tests__/bundle/browser-weight.test.ts`.
5
+ * Listed export by export rather than re-exporting `base/metadata`: a sub-path is a surface someone
6
+ * decided on, not whatever a directory grows into. Weight is a contract, checked by
7
+ * `src/__tests__/bundle/browser-weight.test.ts`.
13
8
  */
14
9
  export { component, configuration, injectable, pickRegistrationOptions, provide, service, } from './base/metadata/injectable.js';
15
10
  export { datasource, model, repository } from './base/metadata/persistents.js';
16
11
  export { inject } from './base/metadata/injectors.js';
17
- export { ArtifactNamespaces, BindingNamespaces, CoreBindings } from './common/bindings.js';
12
+ export { ArtifactNamespaces, BindingNamespaces } from './common/bindings.js';
13
+ /**
14
+ * `CoreBindings` is deliberately NOT here. The namespaces above are the GRAMMAR of a binding key;
15
+ * `CoreBindings` is one application's DICTIONARY (`APPLICATION_SERVER`, `APPLICATION_ROOT_ROUTER`).
16
+ * A sibling framework ships a class of the same name whose `APPLICATION_INSTANCE` is a different
17
+ * string, so shipping ours beside the stereotypes means binding under one key and resolving under
18
+ * another, with nothing failing until run time. It stays on the root barrel.
19
+ */
18
20
  export { ArtifactTypes, BindingKeys, MetadataRegistry } from './helpers/inversion/index.js';
19
21
  //# sourceMappingURL=metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGxF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,OAAO,EACP,OAAO,GACR,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG1E;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/ignis-kernel",
3
- "version": "0.2.0-35",
3
+ "version": "0.2.0-37",
4
4
  "description": "Browser-pure kernel of the IGNIS framework: dependency injection, lifecycle, REST controllers, repository and datasource abstractions, and the authentication and authorization seams. No node builtin and no server-only peer, so the same kernel serves a Bun server and a browser Worker.",
5
5
  "keywords": [
6
6
  "authentication",
@@ -85,9 +85,9 @@
85
85
  "prepublishOnly": "bun run rebuild"
86
86
  },
87
87
  "dependencies": {
88
- "@venizia/ignis-filter": "^0.2.0-14",
89
- "@venizia/ignis-helpers": "^0.2.0-30",
90
- "@venizia/ignis-inversion": "^0.2.0-14",
88
+ "@venizia/ignis-filter": "^0.2.0-16",
89
+ "@venizia/ignis-helpers": "^0.2.0-32",
90
+ "@venizia/ignis-inversion": "^0.2.0-16",
91
91
  "lodash": "^4.18.1",
92
92
  "reflect-metadata": "^0.2.2",
93
93
  "zod": "^4.5.4"
@@ -113,7 +113,7 @@
113
113
  "devDependencies": {
114
114
  "@types/bun": "^1.4.1",
115
115
  "@types/lodash": "^4.17.25",
116
- "@venizia/dev-configs": "^0.2.0-7",
116
+ "@venizia/dev-configs": "^0.2.0-9",
117
117
  "casbin": "^5.51.1",
118
118
  "eslint": "^10.10.0",
119
119
  "prettier": "^3.9.6",