@venizia/ardor-kernel 0.1.1-2 → 0.1.1-4

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 (79) hide show
  1. package/README.md +1 -1
  2. package/dist/base/applications/abstract.d.ts +28 -9
  3. package/dist/base/applications/abstract.d.ts.map +1 -1
  4. package/dist/base/applications/abstract.js +77 -15
  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 -4
  15. package/dist/base/index.d.ts.map +1 -1
  16. package/dist/base/index.js +5 -4
  17. package/dist/base/index.js.map +1 -1
  18. package/dist/base/metadata/index.d.ts +10 -0
  19. package/dist/base/metadata/index.d.ts.map +1 -0
  20. package/dist/base/metadata/index.js +9 -0
  21. package/dist/base/metadata/index.js.map +1 -0
  22. package/dist/base/providers/base.d.ts +1 -1
  23. package/dist/base/providers/base.js +1 -1
  24. package/dist/base/providers/index.d.ts +1 -1
  25. package/dist/base/providers/index.js +1 -1
  26. package/dist/base/repositories/index.d.ts +2 -0
  27. package/dist/base/repositories/index.d.ts.map +1 -0
  28. package/dist/base/repositories/index.js +5 -0
  29. package/dist/base/repositories/index.js.map +1 -0
  30. package/dist/base/services/auth.d.ts +2 -2
  31. package/dist/base/services/auth.js +2 -2
  32. package/dist/base/services/base.d.ts +1 -1
  33. package/dist/base/services/base.js +1 -1
  34. package/dist/base/services/index.d.ts +3 -4
  35. package/dist/base/services/index.d.ts.map +1 -1
  36. package/dist/base/services/index.js +3 -4
  37. package/dist/base/services/index.js.map +1 -1
  38. package/dist/base/services/network-request.d.ts +19 -8
  39. package/dist/base/services/network-request.d.ts.map +1 -1
  40. package/dist/base/services/network-request.js +101 -41
  41. package/dist/base/services/network-request.js.map +1 -1
  42. package/dist/common/constants.d.ts +2 -2
  43. package/dist/common/constants.d.ts.map +1 -1
  44. package/dist/common/constants.js +3 -2
  45. package/dist/common/constants.js.map +1 -1
  46. package/dist/common/index.d.ts +3 -3
  47. package/dist/common/index.js +3 -3
  48. package/dist/common/types.d.ts +5 -2
  49. package/dist/common/types.d.ts.map +1 -1
  50. package/dist/helpers/base-helper.d.ts +1 -1
  51. package/dist/helpers/base-helper.js +1 -1
  52. package/dist/helpers/index.d.ts +3 -3
  53. package/dist/helpers/index.js +3 -3
  54. package/dist/helpers/networks/base-request.d.ts +5 -5
  55. package/dist/helpers/networks/base-request.js +3 -3
  56. package/dist/helpers/networks/base-request.js.map +1 -1
  57. package/dist/helpers/networks/common/index.d.ts +1 -1
  58. package/dist/helpers/networks/common/index.js +1 -1
  59. package/dist/helpers/networks/fetchers/abstract.d.ts +1 -1
  60. package/dist/helpers/networks/fetchers/index.d.ts +2 -2
  61. package/dist/helpers/networks/fetchers/index.js +2 -2
  62. package/dist/helpers/networks/fetchers/node-fetch.d.ts +1 -1
  63. package/dist/helpers/networks/fetchers/node-fetch.js +2 -2
  64. package/dist/helpers/networks/index.d.ts +3 -3
  65. package/dist/helpers/networks/index.js +3 -3
  66. package/dist/helpers/socket-io-client.d.ts +2 -2
  67. package/dist/helpers/socket-io-client.js +1 -1
  68. package/dist/index.d.ts +4 -4
  69. package/dist/index.js +4 -4
  70. package/dist/utilities/index.d.ts +4 -4
  71. package/dist/utilities/index.js +4 -4
  72. package/dist/utilities/parse.js +2 -2
  73. package/dist/utilities/parse.js.map +1 -1
  74. package/dist/utilities/url.js +1 -1
  75. package/package.json +21 -7
  76. package/dist/base/services/api.d.ts +0 -9
  77. package/dist/base/services/api.d.ts.map +0 -1
  78. package/dist/base/services/api.js +0 -8
  79. 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,20 +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
- * Classes bound under an explicit key, before `bindContext()` runs. This is the production-safe
9
- * registration: `service(Class)` keys on `Class.name`, which a minifier rewrites, so a bundle
10
- * built with mangled class names resolves `services.ProductApi` to nothing. A literal key here
11
- * survives any build, and `keyof ReturnType<Application['bindingList']>` types `useInjectable`.
12
- */
23
+ /** Binds every stereotyped class under the key and scope it declares. */
24
+ registerArtifacts(): void;
25
+ /** Classes bound under literal keys before `bindContext()` runs. */
13
26
  bindingList(): Record<string, TClass<unknown>>;
14
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. */
15
33
  injectable<T>(scope: string, value: TClass<T>, tags?: Array<string>): void;
16
- service<T>(value: TClass<T>): void;
17
34
  start(): Promise<void>;
35
+ /** Key: explicit `binding` > the class's stereotype > `<namespace>.<ClassName>`. Same for scope. */
36
+ private registerArtifact;
18
37
  }
19
38
  export declare abstract class BaseArdorApplication extends AbstractArdorApplication {
20
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.d.ts","sourceRoot":"","sources":["../../../src/base/applications/abstract.ts"],"names":[],"mappings":"AAAA,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,IAAI,cAAc,CAAC,IAAI,CAAC;IAWpC;;;;;OAKG;IACH,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;I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ErC,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,40 +1,102 @@
1
- import { BindingScopes, Container } from '@venizia/ignis-inversion';
2
- 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
+ */
3
9
  export class AbstractArdorApplication extends Container {
4
10
  preConfigure() {
5
11
  this.bind({ key: CoreBindings.APPLICATION_INSTANCE }).toValue(this);
6
12
  this.bind({ key: CoreBindings.APPLICATION_INFO }).toValue(this.getAppInfo());
13
+ // Least explicit first, so the most explicit wins: stereotype, bindingList(), bindContext().
14
+ this.registerArtifacts();
7
15
  for (const [key, target] of Object.entries(this.bindingList())) {
16
+ this.getMetadataRegistry().setBindingKey({ target, key });
8
17
  this.bind({ key }).toClass(target).setScope(BindingScopes.SINGLETON);
9
18
  }
10
19
  return this.bindContext();
11
20
  }
12
- /**
13
- * Classes bound under an explicit key, before `bindContext()` runs. This is the production-safe
14
- * registration: `service(Class)` keys on `Class.name`, which a minifier rewrites, so a bundle
15
- * built with mangled class names resolves `services.ProductApi` to nothing. A literal key here
16
- * survives any build, and `keyof ReturnType<Application['bindingList']>` types `useInjectable`.
17
- */
21
+ /** Binds every stereotyped class under the key and scope it declares. */
22
+ registerArtifacts() {
23
+ const registry = MetadataRegistry.getInstance();
24
+ for (const target of registry.getDiscoveredArtifacts()) {
25
+ const key = this.getMetadataRegistry().getBindingKey({ target });
26
+ if (!key) {
27
+ continue;
28
+ }
29
+ this.bind({ key })
30
+ .toClass(target)
31
+ .setScope(registry.getArtifactMetadata({ target })?.scope ?? BindingScopes.SINGLETON);
32
+ }
33
+ }
34
+ /** Classes bound under literal keys before `bindContext()` runs. */
18
35
  bindingList() {
19
36
  return {};
20
37
  }
21
38
  postConfigure() { }
22
- // Singleton by default: a service or provider registered by class is one instance per
23
- // application, which is what every consumer bound by hand before this default existed.
24
- // 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. */
25
72
  injectable(scope, value, tags) {
26
- this.bind({ key: `${scope}.${value.name}` })
73
+ const key = `${scope}.${value.name}`;
74
+ this.getMetadataRegistry().setBindingKey({ target: value, key });
75
+ this.bind({ key })
27
76
  .toClass(value)
28
77
  .setScope(BindingScopes.SINGLETON)
29
78
  .setTags(...(tags ?? []));
30
79
  }
31
- service(value) {
32
- this.injectable('services', value);
33
- }
34
80
  async start() {
35
81
  await this.preConfigure();
36
82
  await this.postConfigure();
37
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
+ }
38
100
  }
39
101
  export class BaseArdorApplication extends AbstractArdorApplication {
40
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"abstract.js","sourceRoot":"","sources":["../../../src/base/applications/abstract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAe,MAAM,0BAA0B,CAAC;AAEjF,OAAO,EACL,YAAY,GAIb,MA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AAE,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,5 +1,6 @@
1
- export * from './applications';
2
- export * from './decorators';
3
- export * from './providers';
4
- 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';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -1,5 +1,6 @@
1
- export * from './applications';
2
- export * from './decorators';
3
- export * from './providers';
4
- 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';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
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`.
4
+ */
5
+ export { component, configuration, datasource, inject, injectable, model, provide, repository, service, } from '@venizia/ignis-kernel/metadata';
6
+ export { ArtifactNamespaces, ArtifactTypes, BindingKeys, BindingNamespaces, } from '@venizia/ignis-kernel/metadata';
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';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,9 @@
1
+ /**
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`.
4
+ */
5
+ export { component, configuration, datasource, inject, injectable, model, provide, repository, service, } from '@venizia/ignis-kernel/metadata';
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';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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
@@ -0,0 +1,2 @@
1
+ export * from '@venizia/ignis-connectors/http';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/repositories/index.ts"],"names":[],"mappings":"AAGA,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,5 @@
1
+ // The HTTP repository lives in IGNIS, where a server calling another server needs the same thing.
2
+ // ARDOR re-exports it on a sub-path so the root stays inside its budget, and so an app that never
3
+ // reads through a repository never has to install `@venizia/ignis-connectors`, an optional peer.
4
+ export * from '@venizia/ignis-connectors/http';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/repositories/index.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,kGAAkG;AAClG,iGAAiG;AACjG,cAAc,gCAAgC,CAAC"}
@@ -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,11 +1,21 @@
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
+ export interface IAuthTokenRecord {
5
+ type?: string;
6
+ value: string;
7
+ provider?: string;
8
+ }
9
+ /** Where a token comes from when none was set on the service. */
10
+ export type TAuthTokenResolver = () => IAuthTokenRecord | undefined;
11
+ /**
12
+ * Reads the stored token, and `undefined` outside a browser. Also the resolver to hand
13
+ * `HttpDataSource`, so both transports send the same token.
14
+ */
15
+ export declare const readAuthTokenFromStorage: TAuthTokenResolver;
4
16
  export declare class DefaultNetworkRequestService extends BaseService {
5
- protected authToken?: {
6
- type?: string;
7
- value: string;
8
- };
17
+ protected authToken?: IAuthTokenRecord;
18
+ protected authTokenResolver: TAuthTokenResolver;
9
19
  protected useAuth: boolean;
10
20
  protected noAuthPaths?: string[];
11
21
  protected noAuthPathRegexes: RegExp[];
@@ -19,6 +29,7 @@ export declare class DefaultNetworkRequestService extends BaseService {
19
29
  baseUrl?: string;
20
30
  headers?: HeadersInit;
21
31
  authRecovery?: IAuthRecoveryOptions;
32
+ authTokenResolver?: TAuthTokenResolver;
22
33
  });
23
34
  isNoAuthPath(opts: {
24
35
  resource?: string;
@@ -30,7 +41,7 @@ export declare class DefaultNetworkRequestService extends BaseService {
30
41
  private ensureRefreshed;
31
42
  private canRecover;
32
43
  getRequestAuthorizationHeader(): {
33
- provider: any;
44
+ provider: string | undefined;
34
45
  token: string;
35
46
  };
36
47
  setAuthToken(opts: {
@@ -1 +1 @@
1
- {"version":3,"file":"network-request.d.ts","sourceRoot":"","sources":["../../../src/base/services/network-request.ts"],"names":[],"mappings":"AAIA,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;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AA6ErC,qBAAa,4BAA6B,SAAQ,WAAW;IAC3D,SAAS,CAAC,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,SAAS,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IACtC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,SAAS,CAAC,cAAc,EAAE,uBAAuB,CAAC;IAClD,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAE9C,OAAO,CAAC,UAAU,CAAiC;gBAGjD,IAAI,EAAE,cAAc,GAAG;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AAC,CAAC;KACzD,GAAG;QACF,IAAI,EAAE,KAAK,CAAC;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,MAA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