@venizia/ardor-kernel 0.1.1-3 → 0.1.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.
Files changed (72) hide show
  1. package/README.md +1 -1
  2. package/dist/base/applications/abstract.d.ts +27 -22
  3. package/dist/base/applications/abstract.d.ts.map +1 -1
  4. package/dist/base/applications/abstract.js +68 -42
  5. package/dist/base/applications/abstract.js.map +1 -1
  6. package/dist/base/applications/index.d.ts +1 -1
  7. package/dist/base/applications/index.js +1 -1
  8. package/dist/base/decorators/api.d.ts +3 -2
  9. package/dist/base/decorators/api.d.ts.map +1 -1
  10. package/dist/base/decorators/api.js +3 -3
  11. package/dist/base/decorators/api.js.map +1 -1
  12. package/dist/base/decorators/index.d.ts +1 -1
  13. package/dist/base/decorators/index.js +1 -1
  14. package/dist/base/index.d.ts +5 -5
  15. package/dist/base/index.js +5 -5
  16. package/dist/base/metadata/index.d.ts +4 -16
  17. package/dist/base/metadata/index.d.ts.map +1 -1
  18. package/dist/base/metadata/index.js +4 -16
  19. package/dist/base/metadata/index.js.map +1 -1
  20. package/dist/base/providers/base.d.ts +1 -1
  21. package/dist/base/providers/base.js +1 -1
  22. package/dist/base/providers/index.d.ts +1 -1
  23. package/dist/base/providers/index.js +1 -1
  24. package/dist/base/services/auth.d.ts +2 -2
  25. package/dist/base/services/auth.js +2 -2
  26. package/dist/base/services/base.d.ts +1 -1
  27. package/dist/base/services/base.js +1 -1
  28. package/dist/base/services/index.d.ts +3 -4
  29. package/dist/base/services/index.d.ts.map +1 -1
  30. package/dist/base/services/index.js +3 -4
  31. package/dist/base/services/index.js.map +1 -1
  32. package/dist/base/services/network-request.d.ts +6 -20
  33. package/dist/base/services/network-request.d.ts.map +1 -1
  34. package/dist/base/services/network-request.js +19 -57
  35. package/dist/base/services/network-request.js.map +1 -1
  36. package/dist/common/constants.d.ts.map +1 -1
  37. package/dist/common/constants.js +1 -3
  38. package/dist/common/constants.js.map +1 -1
  39. package/dist/common/index.d.ts +3 -3
  40. package/dist/common/index.js +3 -3
  41. package/dist/common/types.d.ts +5 -2
  42. package/dist/common/types.d.ts.map +1 -1
  43. package/dist/helpers/base-helper.d.ts +1 -1
  44. package/dist/helpers/base-helper.js +1 -1
  45. package/dist/helpers/index.d.ts +3 -3
  46. package/dist/helpers/index.js +3 -3
  47. package/dist/helpers/networks/base-request.d.ts +5 -5
  48. package/dist/helpers/networks/base-request.js +3 -3
  49. package/dist/helpers/networks/base-request.js.map +1 -1
  50. package/dist/helpers/networks/common/index.d.ts +1 -1
  51. package/dist/helpers/networks/common/index.js +1 -1
  52. package/dist/helpers/networks/fetchers/abstract.d.ts +1 -1
  53. package/dist/helpers/networks/fetchers/index.d.ts +2 -2
  54. package/dist/helpers/networks/fetchers/index.js +2 -2
  55. package/dist/helpers/networks/fetchers/node-fetch.d.ts +1 -1
  56. package/dist/helpers/networks/fetchers/node-fetch.js +2 -2
  57. package/dist/helpers/networks/index.d.ts +3 -3
  58. package/dist/helpers/networks/index.js +3 -3
  59. package/dist/helpers/socket-io-client.d.ts +2 -2
  60. package/dist/helpers/socket-io-client.js +1 -1
  61. package/dist/index.d.ts +4 -4
  62. package/dist/index.js +4 -4
  63. package/dist/utilities/index.d.ts +4 -4
  64. package/dist/utilities/index.js +4 -4
  65. package/dist/utilities/parse.js +2 -2
  66. package/dist/utilities/parse.js.map +1 -1
  67. package/dist/utilities/url.js +1 -1
  68. package/package.json +13 -13
  69. package/dist/base/services/api.d.ts +0 -9
  70. package/dist/base/services/api.d.ts.map +0 -1
  71. package/dist/base/services/api.js +0 -8
  72. package/dist/base/services/api.js.map +0 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@ which re-exports this package.
15
15
  | Area | Exports |
16
16
  |---|---|
17
17
  | Application | `AbstractArdorApplication`, `BaseArdorApplication` - an IGNIS inversion `Container` with `injectable()` and `service()` helpers |
18
- | Services | `BaseService`, `BaseApiService`, `DefaultAuthService`, `DefaultNetworkRequestService` |
18
+ | Services | `BaseService`, `DefaultAuthService`, `DefaultNetworkRequestService` |
19
19
  | Providers | `BaseProvider` |
20
20
  | Decorators | `api()` - logs and rethrows a failing API method |
21
21
  | Bindings | `CoreBindings`, `LocalStorageKeys` |
@@ -1,34 +1,39 @@
1
- import { Container, type TClass } from '@venizia/ignis-inversion';
2
- import { type IApplicationInfo, type IArdorApplication, type ValueOrPromise } from '../../common';
1
+ import { type Binding, Container, type TBindingScope, type TClass } from '@venizia/ignis-inversion';
2
+ import { type IApplicationInfo, type IArdorApplication, type ValueOrPromise } from '../../common/index.js';
3
+ /** Per-registration choices for `service()`, `repository()`, `dataSource()` and `component()`. */
4
+ export interface IArtifactRegistration {
5
+ /** Bind under this key instead of `<namespace>.<ClassName>`. */
6
+ binding?: {
7
+ namespace: string;
8
+ key: string;
9
+ };
10
+ scope?: TBindingScope;
11
+ /** `false` refuses to replace a binding already under the key. */
12
+ allowOverride?: boolean;
13
+ }
14
+ /**
15
+ * Two ways to register, as in IGNIS: stereotype discovery, or `service()`/`repository()`/
16
+ * `dataSource()`/`component()` by hand. Both record the key on the class. Every kind defaults to
17
+ * SINGLETON (IGNIS's server uses transient): a hook resolves on every render.
18
+ */
3
19
  export declare abstract class AbstractArdorApplication extends Container implements IArdorApplication {
4
20
  abstract bindContext(): ValueOrPromise<void>;
5
21
  abstract getAppInfo(): ValueOrPromise<IApplicationInfo>;
6
22
  preConfigure(): ValueOrPromise<void>;
7
- /**
8
- * Binds every class a stereotype marked - `@service()`, `@component()` and the rest from
9
- * `@venizia/ignis-kernel/metadata`.
10
- *
11
- * The stereotype does two things at import time: it records the binding key ON THE CLASS through
12
- * `reflect-metadata`, and it appends the class to a module-level discovery list. This reads that
13
- * list and binds each entry under the key the class already carries, so nothing here derives a key
14
- * and nothing a minifier renames is ever compared against a string a human typed.
15
- *
16
- * The list is global, not per application. Two applications in one process therefore bind the same
17
- * classes - which is what a test suite wants, and what a browser never encounters, since a page
18
- * runs one application.
19
- */
23
+ /** Binds every stereotyped class under the key and scope it declares. */
20
24
  registerArtifacts(): void;
21
- /**
22
- * Classes bound under an explicit key, before `bindContext()` runs. This is the production-safe
23
- * registration: `service(Class)` keys on `Class.name`, which a minifier rewrites, so a bundle
24
- * built with mangled class names resolves `services.ProductApi` to nothing. A literal key here
25
- * survives any build, and `keyof ReturnType<Application['bindingList']>` types `useInjectable`.
26
- */
25
+ /** Classes bound under literal keys before `bindContext()` runs. */
27
26
  bindingList(): Record<string, TClass<unknown>>;
28
27
  postConfigure(): ValueOrPromise<void>;
28
+ service<T>(target: TClass<T>, opts?: IArtifactRegistration): Binding<T>;
29
+ repository<T>(target: TClass<T>, opts?: IArtifactRegistration): Binding<T>;
30
+ dataSource<T>(target: TClass<T>, opts?: IArtifactRegistration): Binding<T>;
31
+ component<T>(target: TClass<T>, opts?: IArtifactRegistration): Binding<T>;
32
+ /** `<scope>.<ClassName>`, singleton, with tags. Prefer the per-kind methods above. */
29
33
  injectable<T>(scope: string, value: TClass<T>, tags?: Array<string>): void;
30
- service<T>(value: TClass<T>): void;
31
34
  start(): Promise<void>;
35
+ /** Key: explicit `binding` > the class's stereotype > `<namespace>.<ClassName>`. Same for scope. */
36
+ private registerArtifact;
32
37
  }
33
38
  export declare abstract class BaseArdorApplication extends AbstractArdorApplication {
34
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/base/applications/abstract.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEjF,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAElB,8BAAsB,wBAAyB,SAAQ,SAAU,YAAW,iBAAiB;IAC3F,QAAQ,CAAC,WAAW,IAAI,cAAc,CAAC,IAAI,CAAC;IAC5C,QAAQ,CAAC,UAAU,IAAI,cAAc,CAAC,gBAAgB,CAAC;IAEvD,YAAY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C;IAepC,yEAAyE;IACzE,iBAAiB,IAAI,IAAI;IAezB,oEAAoE;IACpE,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAI9C,aAAa,IAAI,cAAc,CAAC,IAAI,CAAC;IAErC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC;IASvE,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC;IAS1E,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC;IAS1E,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC;IASzE,sFAAsF;IACtF,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;IAS7D,KAAK;IAKX,oGAAoG;IACpG,OAAO,CAAC,gBAAgB;CAwBzB;AAED,8BAAsB,oBAAqB,SAAQ,wBAAwB;CAAG"}
@@ -1,76 +1,102 @@
1
- import { MetadataRegistry } from '@venizia/ignis-kernel/metadata';
2
- import { BindingScopes, Container } from '@venizia/ignis-inversion';
3
- import { CoreBindings, } from '../../common';
1
+ import { BindingNamespaces, MetadataRegistry } from '@venizia/ignis-kernel/metadata';
2
+ import { BindingKeys, BindingScopes, Container, getError, } from '@venizia/ignis-inversion';
3
+ import { CoreBindings, } from '../../common/index.js';
4
+ /**
5
+ * Two ways to register, as in IGNIS: stereotype discovery, or `service()`/`repository()`/
6
+ * `dataSource()`/`component()` by hand. Both record the key on the class. Every kind defaults to
7
+ * SINGLETON (IGNIS's server uses transient): a hook resolves on every render.
8
+ */
4
9
  export class AbstractArdorApplication extends Container {
5
10
  preConfigure() {
6
11
  this.bind({ key: CoreBindings.APPLICATION_INSTANCE }).toValue(this);
7
12
  this.bind({ key: CoreBindings.APPLICATION_INFO }).toValue(this.getAppInfo());
8
- // Least explicit first, so the more explicit one lands last and wins:
9
- //
10
- // stereotype -> bindingList() -> bindContext()
11
- //
12
- // A stereotype is what a class declares about itself. `bindingList()` is what THIS application
13
- // decided for this build, by hand. An override that loses to a decorator is an override that
14
- // was ignored with nothing to show it.
13
+ // Least explicit first, so the most explicit wins: stereotype, bindingList(), bindContext().
15
14
  this.registerArtifacts();
16
15
  for (const [key, target] of Object.entries(this.bindingList())) {
16
+ this.getMetadataRegistry().setBindingKey({ target, key });
17
17
  this.bind({ key }).toClass(target).setScope(BindingScopes.SINGLETON);
18
18
  }
19
19
  return this.bindContext();
20
20
  }
21
- /**
22
- * Binds every class a stereotype marked - `@service()`, `@component()` and the rest from
23
- * `@venizia/ignis-kernel/metadata`.
24
- *
25
- * The stereotype does two things at import time: it records the binding key ON THE CLASS through
26
- * `reflect-metadata`, and it appends the class to a module-level discovery list. This reads that
27
- * list and binds each entry under the key the class already carries, so nothing here derives a key
28
- * and nothing a minifier renames is ever compared against a string a human typed.
29
- *
30
- * The list is global, not per application. Two applications in one process therefore bind the same
31
- * classes - which is what a test suite wants, and what a browser never encounters, since a page
32
- * runs one application.
33
- */
21
+ /** Binds every stereotyped class under the key and scope it declares. */
34
22
  registerArtifacts() {
35
- const registry = this.getMetadataRegistry();
36
- for (const target of MetadataRegistry.getInstance().getDiscoveredArtifacts()) {
37
- const key = registry.getBindingKey({ target });
38
- // A discovered class with no key is not an error to raise here: the stereotype that failed to
39
- // record one is the bug, and it reports itself where it ran.
23
+ const registry = MetadataRegistry.getInstance();
24
+ for (const target of registry.getDiscoveredArtifacts()) {
25
+ const key = this.getMetadataRegistry().getBindingKey({ target });
40
26
  if (!key) {
41
27
  continue;
42
28
  }
43
29
  this.bind({ key })
44
30
  .toClass(target)
45
- .setScope(BindingScopes.SINGLETON);
31
+ .setScope(registry.getArtifactMetadata({ target })?.scope ?? BindingScopes.SINGLETON);
46
32
  }
47
33
  }
48
- /**
49
- * Classes bound under an explicit key, before `bindContext()` runs. This is the production-safe
50
- * registration: `service(Class)` keys on `Class.name`, which a minifier rewrites, so a bundle
51
- * built with mangled class names resolves `services.ProductApi` to nothing. A literal key here
52
- * survives any build, and `keyof ReturnType<Application['bindingList']>` types `useInjectable`.
53
- */
34
+ /** Classes bound under literal keys before `bindContext()` runs. */
54
35
  bindingList() {
55
36
  return {};
56
37
  }
57
38
  postConfigure() { }
58
- // Singleton by default: a service or provider registered by class is one instance per
59
- // application, which is what every consumer bound by hand before this default existed.
60
- // Keys on `value.name` - see `bindingList()` for the build-proof form.
39
+ service(target, opts) {
40
+ return this.registerArtifact({
41
+ target,
42
+ namespace: BindingNamespaces.SERVICE,
43
+ caller: 'service',
44
+ opts,
45
+ });
46
+ }
47
+ repository(target, opts) {
48
+ return this.registerArtifact({
49
+ target,
50
+ namespace: BindingNamespaces.REPOSITORY,
51
+ caller: 'repository',
52
+ opts,
53
+ });
54
+ }
55
+ dataSource(target, opts) {
56
+ return this.registerArtifact({
57
+ target,
58
+ namespace: BindingNamespaces.DATASOURCE,
59
+ caller: 'dataSource',
60
+ opts,
61
+ });
62
+ }
63
+ component(target, opts) {
64
+ return this.registerArtifact({
65
+ target,
66
+ namespace: BindingNamespaces.COMPONENT,
67
+ caller: 'component',
68
+ opts,
69
+ });
70
+ }
71
+ /** `<scope>.<ClassName>`, singleton, with tags. Prefer the per-kind methods above. */
61
72
  injectable(scope, value, tags) {
62
- this.bind({ key: `${scope}.${value.name}` })
73
+ const key = `${scope}.${value.name}`;
74
+ this.getMetadataRegistry().setBindingKey({ target: value, key });
75
+ this.bind({ key })
63
76
  .toClass(value)
64
77
  .setScope(BindingScopes.SINGLETON)
65
78
  .setTags(...(tags ?? []));
66
79
  }
67
- service(value) {
68
- this.injectable('services', value);
69
- }
70
80
  async start() {
71
81
  await this.preConfigure();
72
82
  await this.postConfigure();
73
83
  }
84
+ /** Key: explicit `binding` > the class's stereotype > `<namespace>.<ClassName>`. Same for scope. */
85
+ registerArtifact(opts) {
86
+ const { target, namespace, caller } = opts;
87
+ const declared = MetadataRegistry.getInstance().getArtifactMetadata({ target });
88
+ const key = BindingKeys.build(opts.opts?.binding ?? declared?.binding ?? { namespace, key: target.name });
89
+ const allowOverride = opts.opts?.allowOverride ?? declared?.allowOverride ?? true;
90
+ if (!allowOverride && this.isBound({ key })) {
91
+ throw getError({
92
+ message: `[${caller}] '${key}' is already bound and allowOverride is false | Pass a distinct binding key`,
93
+ });
94
+ }
95
+ this.getMetadataRegistry().setBindingKey({ target, key });
96
+ return this.bind({ key })
97
+ .toClass(target)
98
+ .setScope(opts.opts?.scope ?? declared?.scope ?? BindingScopes.SINGLETON);
99
+ }
74
100
  }
75
101
  export class BaseArdorApplication extends AbstractArdorApplication {
76
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../src/base/applications/abstract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAe,MAAM,0BAA0B,CAAC;AAEjF,OAAO,EACL,YAAY,GAIb,MAAM,UAAU,CAAC;AAElB,MAAM,OAAgB,wBAAyB,SAAQ,SAAS;IAI9D,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,gBAAgB,EAAE,CAAC,CAAC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CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAChF,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAC3B,IAAI,CAAC,IAAI,EAAE,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,CAC3E,CAAC;QAEF,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,EAAE,aAAa,IAAI,QAAQ,EAAE,aAAa,IAAI,IAAI,CAAC;QAClF,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;YAC5C,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,IAAI,MAAM,MAAM,GAAG,6EAA6E;aAC1G,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,mBAAmB,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAI,EAAE,GAAG,EAAE,CAAC;aACzB,OAAO,CAAC,MAAM,CAAC;aACf,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,QAAQ,EAAE,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;IAC9E,CAAC;CACF;AAED,MAAM,OAAgB,oBAAqB,SAAQ,wBAAwB;CAAG"}
@@ -1,2 +1,2 @@
1
- export * from './abstract';
1
+ export * from './abstract.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './abstract';
1
+ export * from './abstract.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,4 @@
1
- import { BaseApiService } from '../services';
2
- export declare function api(): (_target: BaseApiService, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
1
+ import { type BaseService } from '../services/index.js';
2
+ /** Logs a failing method with its name, and its `resource` when the class has one, then rethrows. */
3
+ export declare function api(): (_target: BaseService, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
3
4
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/base/decorators/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAgB,GAAG,KACA,SAAS,cAAc,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,wBAgB9F"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/base/decorators/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,qGAAqG;AACrG,wBAAgB,GAAG,KACA,SAAS,WAAW,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,wBAuB3F"}
@@ -1,13 +1,13 @@
1
+ /** Logs a failing method with its name, and its `resource` when the class has one, then rethrows. */
1
2
  export function api() {
2
3
  return function (_target, propertyKey, descriptor) {
3
4
  const originalMethod = descriptor.value;
4
5
  descriptor.value = async function (...args) {
5
6
  try {
6
- const result = await Reflect.apply(originalMethod, this, args);
7
- return result;
7
+ return await Reflect.apply(originalMethod, this, args);
8
8
  }
9
9
  catch (error) {
10
- this.logger.error('[%s] resource: %s | error: %o', propertyKey, this.resource, error);
10
+ this.logger.error('[%s] resource: %s | error: %o', propertyKey, this.resource ?? '-', error);
11
11
  throw error;
12
12
  }
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/base/decorators/api.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG;IACjB,OAAO,UAAU,OAAuB,EAAE,WAAmB,EAAE,UAA8B;QAC3F,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG,KAAK,WAAiC,GAAG,IAAe;YACzE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC/D,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;gBAEtF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/base/decorators/api.ts"],"names":[],"mappings":"AAIA,qGAAqG;AACrG,MAAM,UAAU,GAAG;IACjB,OAAO,UAAU,OAAoB,EAAE,WAAmB,EAAE,UAA8B;QACxF,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;QAExC,UAAU,CAAC,KAAK,GAAG,KAAK,WAEtB,GAAG,IAAe;YAElB,IAAI,CAAC;gBACH,OAAO,MAAM,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACzD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,+BAA+B,EAC/B,WAAW,EACX,IAAI,CAAC,QAAQ,IAAI,GAAG,EACpB,KAAK,CACN,CAAC;gBAEF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './api';
1
+ export * from './api.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './api';
1
+ export * from './api.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- export * from './applications';
2
- export * from './decorators';
3
- export * from './metadata';
4
- export * from './providers';
5
- export * from './services';
1
+ export * from './applications/index.js';
2
+ export * from './decorators/index.js';
3
+ export * from './metadata/index.js';
4
+ export * from './providers/index.js';
5
+ export * from './services/index.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- export * from './applications';
2
- export * from './decorators';
3
- export * from './metadata';
4
- export * from './providers';
5
- export * from './services';
1
+ export * from './applications/index.js';
2
+ export * from './decorators/index.js';
3
+ export * from './metadata/index.js';
4
+ export * from './providers/index.js';
5
+ export * from './services/index.js';
6
6
  //# sourceMappingURL=index.js.map
@@ -1,22 +1,10 @@
1
1
  /**
2
- * The stereotypes an ARDOR application declares its classes with, re-exported from
3
- * `@venizia/ignis-kernel/metadata`.
4
- *
5
- * ARDOR does not define its own. A stereotype writes the binding key onto the class through
6
- * `reflect-metadata` and appends it to a discovery list that `AbstractArdorApplication.registerArtifacts`
7
- * reads - one mechanism for the whole VENIZIA family, so a class written for a worker and a class
8
- * written for a browser register the same way.
9
- *
10
- * Listed export by export rather than `export *`. What ARDOR publishes is a decision, not whatever
11
- * the upstream sub-path grows into: a name added there tomorrow must be added here on purpose, and a
12
- * name that would collide with ARDOR's own surface is caught at this line instead of in a consumer.
13
- *
14
- * `CoreBindings` is the collision that already happened. IGNIS's and ARDOR's are different
15
- * dictionaries that share the member `APPLICATION_INSTANCE` with different values - `'@app/instance'`
16
- * against `'@app/application/instance'`. Upstream dropped theirs from `./metadata` for that reason;
17
- * ARDOR's own stays the only one reachable from this package.
2
+ * The IGNIS stereotypes, re-exported name by name so ARDOR's surface changes only on purpose.
3
+ * `CoreBindings` is deliberately absent: IGNIS's disagrees with ARDOR's on `APPLICATION_INSTANCE`.
18
4
  */
19
5
  export { component, configuration, datasource, inject, injectable, model, provide, repository, service, } from '@venizia/ignis-kernel/metadata';
20
6
  export { ArtifactNamespaces, ArtifactTypes, BindingKeys, BindingNamespaces, } from '@venizia/ignis-kernel/metadata';
21
7
  export type { IArtifactMetadata, IArtifactRegistrationOptions, TBindingNamespace, TBindingScope, } from '@venizia/ignis-kernel/metadata';
8
+ export { RepositoryTypes } from '@venizia/ignis-kernel/repository';
9
+ export type { TRepositoryType } from '@venizia/ignis-kernel/repository';
22
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/metadata/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AAExC,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,GACd,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/metadata/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AAExC,YAAY,EACV,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,aAAa,GACd,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
@@ -1,21 +1,9 @@
1
1
  /**
2
- * The stereotypes an ARDOR application declares its classes with, re-exported from
3
- * `@venizia/ignis-kernel/metadata`.
4
- *
5
- * ARDOR does not define its own. A stereotype writes the binding key onto the class through
6
- * `reflect-metadata` and appends it to a discovery list that `AbstractArdorApplication.registerArtifacts`
7
- * reads - one mechanism for the whole VENIZIA family, so a class written for a worker and a class
8
- * written for a browser register the same way.
9
- *
10
- * Listed export by export rather than `export *`. What ARDOR publishes is a decision, not whatever
11
- * the upstream sub-path grows into: a name added there tomorrow must be added here on purpose, and a
12
- * name that would collide with ARDOR's own surface is caught at this line instead of in a consumer.
13
- *
14
- * `CoreBindings` is the collision that already happened. IGNIS's and ARDOR's are different
15
- * dictionaries that share the member `APPLICATION_INSTANCE` with different values - `'@app/instance'`
16
- * against `'@app/application/instance'`. Upstream dropped theirs from `./metadata` for that reason;
17
- * ARDOR's own stays the only one reachable from this package.
2
+ * The IGNIS stereotypes, re-exported name by name so ARDOR's surface changes only on purpose.
3
+ * `CoreBindings` is deliberately absent: IGNIS's disagrees with ARDOR's on `APPLICATION_INSTANCE`.
18
4
  */
19
5
  export { component, configuration, datasource, inject, injectable, model, provide, repository, service, } from '@venizia/ignis-kernel/metadata';
20
6
  export { ArtifactNamespaces, ArtifactTypes, BindingKeys, BindingNamespaces, } from '@venizia/ignis-kernel/metadata';
7
+ // The `type` of `@repository`: `REMOTE` for an `HttpRepository`, which has no model.
8
+ export { RepositoryTypes } from '@venizia/ignis-kernel/repository';
21
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/metadata/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/metadata/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,SAAS,EACT,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AASxC,qFAAqF;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Container, type IProvider } from '@venizia/ignis-inversion';
2
- import { BaseHelper } from '../../helpers/base-helper';
2
+ import { BaseHelper } from '../../helpers/base-helper.js';
3
3
  export declare abstract class BaseProvider<T> extends BaseHelper implements IProvider<T> {
4
4
  abstract value(container: Container): T;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { BaseHelper } from '../../helpers/base-helper';
1
+ import { BaseHelper } from '../../helpers/base-helper.js';
2
2
  export class BaseProvider extends BaseHelper {
3
3
  }
4
4
  //# sourceMappingURL=base.js.map
@@ -1,2 +1,2 @@
1
- export * from './base';
1
+ export * from './base.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './base';
1
+ export * from './base.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { type IdType } from '../../common';
2
- import { BaseService } from './base';
1
+ import { type IdType } from '../../common/index.js';
2
+ import { BaseService } from './base.js';
3
3
  export declare class DefaultAuthService extends BaseService {
4
4
  constructor();
5
5
  getUser(): any;
@@ -1,5 +1,5 @@
1
- import { LocalStorageKeys } from '../../common';
2
- import { BaseService } from './base';
1
+ import { LocalStorageKeys } from '../../common/index.js';
2
+ import { BaseService } from './base.js';
3
3
  export class DefaultAuthService extends BaseService {
4
4
  constructor() {
5
5
  super({ scope: DefaultAuthService.name });
@@ -1,4 +1,4 @@
1
- import { Logger } from '../../helpers';
1
+ import { Logger } from '../../helpers/index.js';
2
2
  export declare class BaseService {
3
3
  protected logger: Logger;
4
4
  constructor(opts: {
@@ -1,4 +1,4 @@
1
- import { Logger } from '../../helpers';
1
+ import { Logger } from '../../helpers/index.js';
2
2
  export class BaseService {
3
3
  constructor(opts) {
4
4
  this.logger = Logger.getInstance({ scope: opts.scope });
@@ -1,5 +1,4 @@
1
- export * from './api';
2
- export * from './auth';
3
- export * from './base';
4
- export * from './network-request';
1
+ export * from './auth.js';
2
+ export * from './base.js';
3
+ export * from './network-request.js';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
@@ -1,5 +1,4 @@
1
- export * from './api';
2
- export * from './auth';
3
- export * from './base';
4
- export * from './network-request';
1
+ export * from './auth.js';
2
+ export * from './base.js';
3
+ export * from './network-request.js';
5
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC"}
@@ -1,30 +1,16 @@
1
- import { type AnyType, type IAuthRecoveryOptions, type IGetRequestPropsParams, type IGetRequestPropsResult, type INoAuthOptions, RequestCountData, type TConstValue, type TNoAuthPathRegex, type TRequestMethod, type TRequestType } from '../../common';
2
- import { NodeFetchNetworkRequest } from '../../helpers';
3
- import { BaseService } from './base';
1
+ import { type AnyType, type IAuthRecoveryOptions, type IGetRequestPropsParams, type IGetRequestPropsResult, type INoAuthOptions, RequestCountData, type TConstValue, type TNoAuthPathRegex, type TRequestMethod, type TRequestType } from '../../common/index.js';
2
+ import { NodeFetchNetworkRequest } from '../../helpers/index.js';
3
+ import { BaseService } from './base.js';
4
4
  export interface IAuthTokenRecord {
5
5
  type?: string;
6
6
  value: string;
7
7
  provider?: string;
8
8
  }
9
- /**
10
- * Where a token comes from when none was set on the service.
11
- *
12
- * `localStorage` is the browser's answer, not the only one: the same transport pointed at another
13
- * server has its token in memory or in the environment, and a server has no `localStorage` to read.
14
- * Keeping the lookup behind a function is the whole difference between a transport that runs in one
15
- * place and one that runs in both.
16
- */
9
+ /** Where a token comes from when none was set on the service. */
17
10
  export type TAuthTokenResolver = () => IAuthTokenRecord | undefined;
18
11
  /**
19
- * The browser resolver: read the stored token, and say nothing where there is no browser.
20
- *
21
- * It is this service's default, and it is exported for the same job elsewhere: `HttpDataSource` from
22
- * `@venizia/ignis-connectors/http` ships no browser lookup by design, so an ARDOR app hands it this -
23
- * `authTokenResolver: readAuthTokenFromStorage` - and both transports read the one stored token.
24
- *
25
- * The guard is not defensive padding - this used to be an unguarded `localStorage.getItem` that ran
26
- * before the in-memory token was even consulted, so a caller that had supplied a token explicitly
27
- * still crashed with `ReferenceError` the moment the code left a DOM.
12
+ * Reads the stored token, and `undefined` outside a browser. Also the resolver to hand
13
+ * `HttpDataSource`, so both transports send the same token.
28
14
  */
29
15
  export declare const readAuthTokenFromStorage: TAuthTokenResolver;
30
16
  export declare class DefaultNetworkRequestService extends BaseService {
@@ -1 +1 @@
1
- {"version":3,"file":"network-request.d.ts","sourceRoot":"","sources":["../../../src/base/services/network-request.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,OAAO,E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AC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;YA0Da,aAAa;IA8CrB,SAAS,CAAC,UAAU,GAAG,OAAO,EAClC,IAAI,EAAE,sBAAsB,GAAG;QAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,IAAI,EAAE,YAAY,CAAC;QACnB,MAAM,EAAE,cAAc,CAAC;QACvB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;KACzD,GACA,OAAO,CAAC;QACT,IAAI,EAAE,UAAU,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CAyDH"}
1
+ {"version":3,"file":"network-request.d.ts","sourceRoot":"","sources":["../../../src/base/services/network-request.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EAInB,gBAAgB,EAGhB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAsIrC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iEAAiE;AACjE,MAAM,MAAM,kBAAkB,GAAG,MAAM,gBAAgB,GAAG,SAAS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