@venizia/ignis-inversion 0.2.0-8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +0 -1
- package/README.md +83 -117
- package/dist/cjs/common/utilities.d.ts +31 -3
- package/dist/cjs/common/utilities.d.ts.map +1 -1
- package/dist/cjs/common/utilities.js +61 -5
- package/dist/cjs/common/utilities.js.map +1 -1
- package/dist/cjs/modules/binding/common/constants.d.ts.map +1 -1
- package/dist/cjs/modules/binding/common/constants.js +2 -6
- package/dist/cjs/modules/binding/common/constants.js.map +1 -1
- package/dist/cjs/modules/container/container.js +1 -1
- package/dist/cjs/modules/container/container.js.map +1 -1
- package/dist/cjs/modules/error/app-error.js +2 -5
- package/dist/cjs/modules/error/app-error.js.map +1 -1
- package/dist/cjs/modules/registry/registry.d.ts.map +1 -1
- package/dist/cjs/modules/registry/registry.js +3 -1
- package/dist/cjs/modules/registry/registry.js.map +1 -1
- package/dist/esm/common/index.d.ts +4 -4
- package/dist/esm/common/index.js +4 -4
- package/dist/esm/common/utilities.d.ts +32 -4
- package/dist/esm/common/utilities.d.ts.map +1 -1
- package/dist/esm/common/utilities.js +58 -4
- package/dist/esm/common/utilities.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/modules/binding/binding.d.ts +5 -5
- package/dist/esm/modules/binding/binding.js +4 -4
- package/dist/esm/modules/binding/common/constants.d.ts +1 -1
- package/dist/esm/modules/binding/common/constants.d.ts.map +1 -1
- package/dist/esm/modules/binding/common/constants.js +3 -4
- package/dist/esm/modules/binding/common/constants.js.map +1 -1
- package/dist/esm/modules/binding/common/index.d.ts +2 -2
- package/dist/esm/modules/binding/common/index.js +2 -2
- package/dist/esm/modules/binding/common/types.d.ts +3 -3
- package/dist/esm/modules/binding/index.d.ts +2 -2
- package/dist/esm/modules/binding/index.js +2 -2
- package/dist/esm/modules/container/abstract.d.ts +5 -5
- package/dist/esm/modules/container/abstract.js +1 -1
- package/dist/esm/modules/container/base.d.ts +4 -4
- package/dist/esm/modules/container/base.js +5 -5
- package/dist/esm/modules/container/common/index.d.ts +1 -1
- package/dist/esm/modules/container/common/index.js +1 -1
- package/dist/esm/modules/container/common/types.d.ts +3 -3
- package/dist/esm/modules/container/container.d.ts +2 -2
- package/dist/esm/modules/container/container.js +4 -4
- package/dist/esm/modules/container/container.js.map +1 -1
- package/dist/esm/modules/container/index.d.ts +4 -4
- package/dist/esm/modules/container/index.js +4 -4
- package/dist/esm/modules/error/app-error.d.ts +1 -1
- package/dist/esm/modules/error/app-error.js +3 -3
- package/dist/esm/modules/error/app-error.js.map +1 -1
- package/dist/esm/modules/error/common/index.d.ts +1 -1
- package/dist/esm/modules/error/common/index.js +1 -1
- package/dist/esm/modules/error/common/types.d.ts +1 -1
- package/dist/esm/modules/error/definition.d.ts +1 -1
- package/dist/esm/modules/error/index.d.ts +4 -4
- package/dist/esm/modules/error/index.js +4 -4
- package/dist/esm/modules/error/message-code.d.ts +2 -2
- package/dist/esm/modules/index.d.ts +5 -5
- package/dist/esm/modules/index.js +5 -5
- package/dist/esm/modules/metadata/common/index.d.ts +1 -1
- package/dist/esm/modules/metadata/common/index.js +1 -1
- package/dist/esm/modules/metadata/index.d.ts +2 -2
- package/dist/esm/modules/metadata/index.js +2 -2
- package/dist/esm/modules/metadata/injectors.d.ts +2 -2
- package/dist/esm/modules/metadata/injectors.js +2 -2
- package/dist/esm/modules/registry/common/index.d.ts +1 -1
- package/dist/esm/modules/registry/common/index.js +1 -1
- package/dist/esm/modules/registry/common/types.d.ts +1 -1
- package/dist/esm/modules/registry/index.d.ts +2 -2
- package/dist/esm/modules/registry/index.js +2 -2
- package/dist/esm/modules/registry/registry.d.ts +3 -3
- package/dist/esm/modules/registry/registry.d.ts.map +1 -1
- package/dist/esm/modules/registry/registry.js +6 -4
- package/dist/esm/modules/registry/registry.js.map +1 -1
- package/dist/esm/package.json +6 -0
- package/package.json +3 -5
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import type { AnyType, TClass, TInjectTarget, TValueOrAsyncResolver, TValueOrResolver } from './types';
|
|
1
|
+
import type { AnyType, TClass, TInjectTarget, TValueOrAsyncResolver, TValueOrResolver } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* True for a value carrying nothing: `null`/`undefined`, an empty string, array, `Map`, `Set`, or an
|
|
4
|
+
* object with no own enumerable keys. A number, boolean or function is empty too - it holds no
|
|
5
|
+
* entries.
|
|
6
|
+
*
|
|
7
|
+
* Hand-written rather than `lodash/isEmpty`, and NOT a plain `!value`: `!{}` is `false` while an
|
|
8
|
+
* empty object IS empty, so the two disagree on exactly the case a swap would silently flip.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isEmpty: (opts: {
|
|
11
|
+
value: unknown;
|
|
12
|
+
}) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* A shallow copy without `keys`.
|
|
15
|
+
*
|
|
16
|
+
* Hand-written rather than `lodash/omit`: this package is bundled for browsers, where importing
|
|
17
|
+
* lodash for one function costs 24 KB. Matches lodash on the shapes we pass it - a flat key list,
|
|
18
|
+
* never a nested path.
|
|
19
|
+
*/
|
|
20
|
+
export declare const omit: <T extends object, K extends PropertyKey>(opts: {
|
|
21
|
+
source: T;
|
|
22
|
+
keys: readonly K[];
|
|
23
|
+
}) => Omit<T, Extract<K, keyof T>>;
|
|
2
24
|
/** Tells a CONSTRUCTOR from a RESOLVER via source text - `prototype !== undefined` is true of every non-arrow function. Sound only on ES2020+ output (classes emit as `class`); ES5 bundling breaks it. */
|
|
3
25
|
export declare const isClass: <T>(target: any) => target is TClass<T>;
|
|
4
26
|
/** Reads a value-or-resolver. A class constructor is returned as-is; only a plain function is called. */
|
|
5
|
-
export declare const resolveValue: <T>(
|
|
27
|
+
export declare const resolveValue: <T>(opts: {
|
|
28
|
+
value: TValueOrResolver<T>;
|
|
29
|
+
}) => T;
|
|
6
30
|
/** `resolveValue` for a resolver that may answer a promise. */
|
|
7
|
-
export declare const resolveValueAsync: <T>(
|
|
31
|
+
export declare const resolveValueAsync: <T>(opts: {
|
|
32
|
+
value: TValueOrAsyncResolver<T>;
|
|
33
|
+
}) => Promise<T>;
|
|
8
34
|
/** Reads what `@inject({ target })` named. The function form is called HERE, never at decoration: that is what lets a class reached through an import cycle be named at all. Answers `undefined` when the function hands back something that is not a class. The container resolves synchronously, so there is no async form. */
|
|
9
|
-
export declare const resolveInjectTarget: (
|
|
35
|
+
export declare const resolveInjectTarget: (opts: {
|
|
36
|
+
target: TInjectTarget;
|
|
37
|
+
}) => TClass<AnyType> | undefined;
|
|
10
38
|
//# sourceMappingURL=utilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/common/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,MAAM,EACN,aAAa,EAEb,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,2MAA2M;AAC3M,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,QAAQ,GAAG,KAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAM1D,CAAC;AAMF,yGAAyG;AACzG,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/common/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,MAAM,EACN,aAAa,EAEb,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,KAAG,OAwBlD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,WAAW,EAAE,MAAM;IAClE,MAAM,EAAE,CAAC,CAAC;IACV,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;CACpB,KAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAe9B,CAAC;AAEF,2MAA2M;AAC3M,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,QAAQ,GAAG,KAAG,MAAM,IAAI,MAAM,CAAC,CAAC,CAM1D,CAAC;AAMF,yGAAyG;AACzG,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,MAAM;IAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;CAAE,KAAG,CAGtE,CAAC;AAOF,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,GAAU,CAAC,EAAE,MAAM;IAC/C,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;CACjC,KAAG,OAAO,CAAC,CAAC,CAGZ,CAAC;AAEF,iUAAiU;AACjU,eAAO,MAAM,mBAAmB,GAAI,MAAM;IACxC,MAAM,EAAE,aAAa,CAAC;CACvB,KAAG,MAAM,CAAC,OAAO,CAAC,GAAG,SAGrB,CAAC"}
|
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True for a value carrying nothing: `null`/`undefined`, an empty string, array, `Map`, `Set`, or an
|
|
3
|
+
* object with no own enumerable keys. A number, boolean or function is empty too - it holds no
|
|
4
|
+
* entries.
|
|
5
|
+
*
|
|
6
|
+
* Hand-written rather than `lodash/isEmpty`, and NOT a plain `!value`: `!{}` is `false` while an
|
|
7
|
+
* empty object IS empty, so the two disagree on exactly the case a swap would silently flip.
|
|
8
|
+
*/
|
|
9
|
+
export const isEmpty = (opts) => {
|
|
10
|
+
const { value } = opts;
|
|
11
|
+
if (value === null || value === undefined) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
// The types that carry a MEANINGFUL length. Duck-typing on `.length` instead would call
|
|
15
|
+
// `{ length: 0 }` empty, which it is not - it has an own key.
|
|
16
|
+
if (typeof value === 'string' || Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
17
|
+
return value.length === 0;
|
|
18
|
+
}
|
|
19
|
+
if (value instanceof Map || value instanceof Set) {
|
|
20
|
+
return value.size === 0;
|
|
21
|
+
}
|
|
22
|
+
if (typeof value !== 'object') {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
// Own keys only: `for...in` would walk the prototype chain and call an object with an inherited
|
|
26
|
+
// property non-empty.
|
|
27
|
+
return Object.keys(value).length === 0;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A shallow copy without `keys`.
|
|
31
|
+
*
|
|
32
|
+
* Hand-written rather than `lodash/omit`: this package is bundled for browsers, where importing
|
|
33
|
+
* lodash for one function costs 24 KB. Matches lodash on the shapes we pass it - a flat key list,
|
|
34
|
+
* never a nested path.
|
|
35
|
+
*/
|
|
36
|
+
export const omit = (opts) => {
|
|
37
|
+
const { source, keys } = opts;
|
|
38
|
+
const dropped = new Set(keys);
|
|
39
|
+
const kept = {};
|
|
40
|
+
const entries = Object.entries(source);
|
|
41
|
+
for (const [key, value] of entries) {
|
|
42
|
+
if (dropped.has(key)) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
kept[key] = value;
|
|
46
|
+
}
|
|
47
|
+
return kept;
|
|
48
|
+
};
|
|
1
49
|
/** Tells a CONSTRUCTOR from a RESOLVER via source text - `prototype !== undefined` is true of every non-arrow function. Sound only on ES2020+ output (classes emit as `class`); ES5 bundling breaks it. */
|
|
2
50
|
export const isClass = (target) => {
|
|
3
51
|
if (typeof target !== 'function' || target.prototype === undefined) {
|
|
@@ -8,13 +56,19 @@ export const isClass = (target) => {
|
|
|
8
56
|
/** A resolver is anything callable that is not a class - a class is a value here, never a factory. */
|
|
9
57
|
const isResolver = (valueOrResolver) => typeof valueOrResolver === 'function' && !isClass(valueOrResolver);
|
|
10
58
|
/** Reads a value-or-resolver. A class constructor is returned as-is; only a plain function is called. */
|
|
11
|
-
export const resolveValue = (
|
|
59
|
+
export const resolveValue = (opts) => {
|
|
60
|
+
const { value } = opts;
|
|
61
|
+
return isResolver(value) ? value() : value;
|
|
62
|
+
};
|
|
12
63
|
const isAsyncResolver = (valueOrResolver) => typeof valueOrResolver === 'function' && !isClass(valueOrResolver);
|
|
13
64
|
/** `resolveValue` for a resolver that may answer a promise. */
|
|
14
|
-
export const resolveValueAsync = async (
|
|
65
|
+
export const resolveValueAsync = async (opts) => {
|
|
66
|
+
const { value } = opts;
|
|
67
|
+
return isAsyncResolver(value) ? value() : value;
|
|
68
|
+
};
|
|
15
69
|
/** Reads what `@inject({ target })` named. The function form is called HERE, never at decoration: that is what lets a class reached through an import cycle be named at all. Answers `undefined` when the function hands back something that is not a class. The container resolves synchronously, so there is no async form. */
|
|
16
|
-
export const resolveInjectTarget = (
|
|
17
|
-
const resolved = resolveValue(target);
|
|
70
|
+
export const resolveInjectTarget = (opts) => {
|
|
71
|
+
const resolved = resolveValue({ value: opts.target });
|
|
18
72
|
return isClass(resolved) ? resolved : undefined;
|
|
19
73
|
};
|
|
20
74
|
//# sourceMappingURL=utilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/common/utilities.ts"],"names":[],"mappings":"AAUA,2MAA2M;AAC3M,MAAM,CAAC,MAAM,OAAO,GAAG,CAAI,MAAW,EAAuB,EAAE;IAC7D,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACnE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC;AAEF,sGAAsG;AACtG,MAAM,UAAU,GAAG,CAAI,eAAoC,EAAmC,EAAE,CAC9F,OAAO,eAAe,KAAK,UAAU,IAAI,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E,GAAG,IAAI,CAAC;IACvB,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAClD,CAAC,CAAC;AAEF,iUAAiU;AACjU,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAEnC,EAA+B,EAAE;IAChC,MAAM,QAAQ,GAAG,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import { getError } from './modules/error/app-error';
|
|
3
|
-
import { MessageCode } from './modules/error/message-code';
|
|
4
|
-
export * from './common';
|
|
5
|
-
export * from './modules';
|
|
2
|
+
import { getError } from './modules/error/app-error.js';
|
|
3
|
+
import { MessageCode } from './modules/error/message-code.js';
|
|
4
|
+
export * from './common/index.js';
|
|
5
|
+
export * from './modules/index.js';
|
|
6
6
|
// Lives in the package entry, the one module every consumer evaluates and the only one
|
|
7
7
|
// declared in `sideEffects`: a bundler keeps it, so MessageCode throws ApplicationError in a
|
|
8
8
|
// bundle too.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BaseHelper } from '../../common/base-helper';
|
|
2
|
-
import { TClass, TConstValue } from '../../common/types';
|
|
3
|
-
import type { IContainer } from '../container/common/types';
|
|
4
|
-
import { BindingValueTypes, TBindingScope } from './common/constants';
|
|
5
|
-
import { IBinding, TBindingProvider, TBindingResolverValue } from './common/types';
|
|
1
|
+
import { BaseHelper } from '../../common/base-helper.js';
|
|
2
|
+
import { TClass, TConstValue } from '../../common/types.js';
|
|
3
|
+
import type { IContainer } from '../container/common/types.js';
|
|
4
|
+
import { BindingValueTypes, TBindingScope } from './common/constants.js';
|
|
5
|
+
import { IBinding, TBindingProvider, TBindingResolverValue } from './common/types.js';
|
|
6
6
|
export declare class Binding<T = any> extends BaseHelper implements IBinding<T> {
|
|
7
7
|
key: string;
|
|
8
8
|
private bindScope;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getError } from '../error';
|
|
2
|
-
import { BaseHelper } from '../../common/base-helper';
|
|
3
|
-
import { BindingScopes, BindingValueTypes } from './common/constants';
|
|
4
|
-
import { isClassProvider } from './common/types';
|
|
1
|
+
import { getError } from '../error/index.js';
|
|
2
|
+
import { BaseHelper } from '../../common/base-helper.js';
|
|
3
|
+
import { BindingScopes, BindingValueTypes } from './common/constants.js';
|
|
4
|
+
import { isClassProvider } from './common/types.js';
|
|
5
5
|
export class Binding extends BaseHelper {
|
|
6
6
|
constructor(opts) {
|
|
7
7
|
super({ scope: opts.key });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/modules/binding/common/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/modules/binding/common/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,SAAS,eAAe;IACxC,MAAM,CAAC,QAAQ,CAAC,SAAS,eAAe;CACzC;AACD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC;AAE9D,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,QAAQ,cAAc;CACvC;AACD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEtE,qBAAa,WAAW;IACtB,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;CAgBtD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getError } from '../../error';
|
|
1
|
+
import { getError } from '../../error/index.js';
|
|
3
2
|
export class BindingScopes {
|
|
4
3
|
static { this.SINGLETON = 'singleton'; }
|
|
5
4
|
static { this.TRANSIENT = 'transient'; }
|
|
@@ -13,10 +12,10 @@ export class BindingKeys {
|
|
|
13
12
|
static build(opts) {
|
|
14
13
|
const { namespace, key } = opts;
|
|
15
14
|
const keyParts = [];
|
|
16
|
-
if (
|
|
15
|
+
if (namespace) {
|
|
17
16
|
keyParts.push(namespace);
|
|
18
17
|
}
|
|
19
|
-
if (
|
|
18
|
+
if (!key) {
|
|
20
19
|
throw getError({
|
|
21
20
|
message: `[BindingKeys][build] Invalid key to build | key: ${key}`,
|
|
22
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/modules/binding/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/modules/binding/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,OAAO,aAAa;aACR,cAAS,GAAG,WAAW,CAAC;aACxB,cAAS,GAAG,WAAW,CAAC;;AAI1C,MAAM,OAAO,iBAAiB;aACZ,UAAK,GAAG,OAAO,CAAC;aAChB,UAAK,GAAG,OAAO,CAAC;aAChB,aAAQ,GAAG,UAAU,CAAC;;AAIxC,MAAM,OAAO,WAAW;IACtB,MAAM,CAAC,KAAK,CAAC,IAAwC;QACnD,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAChC,MAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,IAAI,SAAS,EAAE,CAAC;YACd,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,oDAAoD,GAAG,EAAE;aACnE,CAAC,CAAC;QACL,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './constants';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './constants.js';
|
|
2
|
+
export * from './types.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './constants';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './constants.js';
|
|
2
|
+
export * from './types.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IContainer } from '../../container/common/types';
|
|
2
|
-
import { TClass, TConstValue } from '../../../common/types';
|
|
3
|
-
import type { BindingValueTypes, TBindingScope } from './constants';
|
|
1
|
+
import type { IContainer } from '../../container/common/types.js';
|
|
2
|
+
import { TClass, TConstValue } from '../../../common/types.js';
|
|
3
|
+
import type { BindingValueTypes, TBindingScope } from './constants.js';
|
|
4
4
|
export interface IProvider<T> {
|
|
5
5
|
value(container: IContainer): T;
|
|
6
6
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './binding';
|
|
2
|
-
export * from './common';
|
|
1
|
+
export * from './binding.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './binding';
|
|
2
|
-
export * from './common';
|
|
1
|
+
export * from './binding.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BaseHelper } from '../../common/base-helper';
|
|
2
|
-
import type { TBindingKey, TClass, TNullable } from '../../common/types';
|
|
3
|
-
import type { IBinding } from '../binding/common/types';
|
|
4
|
-
import type { MetadataRegistry } from '../registry/registry';
|
|
5
|
-
import type { IContainer } from './common/types';
|
|
1
|
+
import { BaseHelper } from '../../common/base-helper.js';
|
|
2
|
+
import type { TBindingKey, TClass, TNullable } from '../../common/types.js';
|
|
3
|
+
import type { IBinding } from '../binding/common/types.js';
|
|
4
|
+
import type { MetadataRegistry } from '../registry/registry.js';
|
|
5
|
+
import type { IContainer } from './common/types.js';
|
|
6
6
|
/** Container CONTRACT as a class, typed against `IBinding` - implementations sharing no storage start here; ones that only vary resolution start at `BaseContainer`. */
|
|
7
7
|
export declare abstract class AbstractContainer extends BaseHelper implements IContainer {
|
|
8
8
|
constructor(opts?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseHelper } from '../../common/base-helper';
|
|
1
|
+
import { BaseHelper } from '../../common/base-helper.js';
|
|
2
2
|
/** Container CONTRACT as a class, typed against `IBinding` - implementations sharing no storage start here; ones that only vary resolution start at `BaseContainer`. */
|
|
3
3
|
export class AbstractContainer extends BaseHelper {
|
|
4
4
|
constructor(opts) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TBindingKey, TClass, TNullable } from '../../common/types';
|
|
2
|
-
import { Binding } from '../binding/binding';
|
|
3
|
-
import { AbstractContainer } from './abstract';
|
|
1
|
+
import { TBindingKey, TClass, TNullable } from '../../common/types.js';
|
|
2
|
+
import { Binding } from '../binding/binding.js';
|
|
3
|
+
import { AbstractContainer } from './abstract.js';
|
|
4
4
|
/** Storage half of the container, keyed by normalized binding-key strings - resolution (`instantiate`) stays abstract, it is the part an implementation swaps. */
|
|
5
5
|
export declare abstract class BaseContainer extends AbstractContainer {
|
|
6
6
|
protected bindings: Map<string, Binding<any>>;
|
|
@@ -13,7 +13,7 @@ export declare abstract class BaseContainer extends AbstractContainer {
|
|
|
13
13
|
constructor(opts?: {
|
|
14
14
|
scope: string;
|
|
15
15
|
});
|
|
16
|
-
getMetadataRegistry(): import("
|
|
16
|
+
getMetadataRegistry(): import("../index.js").MetadataRegistry;
|
|
17
17
|
bind<T>(opts: {
|
|
18
18
|
key: TBindingKey;
|
|
19
19
|
}): Binding<T>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Binding } from '../binding/binding';
|
|
2
|
-
import { BindingKeys } from '../binding/common/constants';
|
|
3
|
-
import { getError } from '../error';
|
|
4
|
-
import { metadataRegistry } from '../registry/registry';
|
|
5
|
-
import { AbstractContainer } from './abstract';
|
|
1
|
+
import { Binding } from '../binding/binding.js';
|
|
2
|
+
import { BindingKeys } from '../binding/common/constants.js';
|
|
3
|
+
import { getError } from '../error/index.js';
|
|
4
|
+
import { metadataRegistry } from '../registry/registry.js';
|
|
5
|
+
import { AbstractContainer } from './abstract.js';
|
|
6
6
|
/** Storage half of the container, keyed by normalized binding-key strings - resolution (`instantiate`) stays abstract, it is the part an implementation swaps. */
|
|
7
7
|
export class BaseContainer extends AbstractContainer {
|
|
8
8
|
constructor(opts) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IBinding } from '../../binding/common/types';
|
|
2
|
-
import type { TBindingKey, TClass, TNullable } from '../../../common/types';
|
|
3
|
-
import type { MetadataRegistry } from '../../registry/registry';
|
|
1
|
+
import type { IBinding } from '../../binding/common/types.js';
|
|
2
|
+
import type { TBindingKey, TClass, TNullable } from '../../../common/types.js';
|
|
3
|
+
import type { MetadataRegistry } from '../../registry/registry.js';
|
|
4
4
|
export interface IContainer {
|
|
5
5
|
getMetadataRegistry(): MetadataRegistry;
|
|
6
6
|
bind<T>(opts: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyType, TBindingKey, TClass, TInjectTarget } from '../../common/types';
|
|
2
|
-
import { BaseContainer } from './base';
|
|
1
|
+
import { AnyType, TBindingKey, TClass, TInjectTarget } from '../../common/types.js';
|
|
2
|
+
import { BaseContainer } from './base.js';
|
|
3
3
|
/** Default container: constructor + property injection driven by the decorator metadata registry. */
|
|
4
4
|
export declare class Container extends BaseContainer {
|
|
5
5
|
constructor(opts?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getError } from '../error';
|
|
2
|
-
import { resolveInjectTarget } from '../../common/utilities';
|
|
3
|
-
import { BaseContainer } from './base';
|
|
1
|
+
import { getError } from '../error/index.js';
|
|
2
|
+
import { resolveInjectTarget } from '../../common/utilities.js';
|
|
3
|
+
import { BaseContainer } from './base.js';
|
|
4
4
|
/** Default container: constructor + property injection driven by the decorator metadata registry. */
|
|
5
5
|
export class Container extends BaseContainer {
|
|
6
6
|
constructor(opts) {
|
|
@@ -17,7 +17,7 @@ export class Container extends BaseContainer {
|
|
|
17
17
|
message: `[${cls.name}] ${at} has neither an @inject key nor a class`,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
const target = resolveInjectTarget(declared);
|
|
20
|
+
const target = resolveInjectTarget({ target: declared });
|
|
21
21
|
if (target === undefined) {
|
|
22
22
|
throw getError({
|
|
23
23
|
message: `[${cls.name}] ${at} names a function that did not return a class`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/modules/container/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EA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WAAW,CAAC,GAAG,GAAG,CAAC;QACvC,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './abstract';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './common';
|
|
4
|
-
export * from './container';
|
|
1
|
+
export * from './abstract.js';
|
|
2
|
+
export * from './base.js';
|
|
3
|
+
export * from './common/index.js';
|
|
4
|
+
export * from './container.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './abstract';
|
|
2
|
-
export * from './base';
|
|
3
|
-
export * from './common';
|
|
4
|
-
export * from './container';
|
|
1
|
+
export * from './abstract.js';
|
|
2
|
+
export * from './base.js';
|
|
3
|
+
export * from './common/index.js';
|
|
4
|
+
export * from './container.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TError, TErrorLogLevel, TErrorNormalized, TResponsedError } from './common';
|
|
1
|
+
import type { TError, TErrorLogLevel, TErrorNormalized, TResponsedError } from './common/index.js';
|
|
2
2
|
export declare class ApplicationError extends Error {
|
|
3
3
|
statusCode: number;
|
|
4
4
|
normalized: TErrorNormalized;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import omit from '
|
|
2
|
-
import { MessageCode } from './message-code';
|
|
1
|
+
import { omit } from '../../common/utilities.js';
|
|
2
|
+
import { MessageCode } from './message-code.js';
|
|
3
3
|
/** Consumed keys. Everything else rides into `extra`. */
|
|
4
4
|
const KNOWN_KEYS = [
|
|
5
5
|
'error',
|
|
@@ -29,7 +29,7 @@ export class ApplicationError extends Error {
|
|
|
29
29
|
this.logLevel = logLevel;
|
|
30
30
|
// Explicit `extra` wins over swept keys.
|
|
31
31
|
const merged = {
|
|
32
|
-
...omit(opts, KNOWN_KEYS),
|
|
32
|
+
...omit({ source: opts, keys: KNOWN_KEYS }),
|
|
33
33
|
...extra,
|
|
34
34
|
};
|
|
35
35
|
this.extra = Object.keys(merged).length > 0 ? merged : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-error.js","sourceRoot":"","sources":["../../../../src/modules/error/app-error.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"app-error.js","sourceRoot":"","sources":["../../../../src/modules/error/app-error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,yDAAyD;AACzD,MAAM,UAAU,GAAG;IACjB,OAAO;IACP,SAAS;IACT,aAAa;IACb,YAAY;IACZ,aAAa;IACb,OAAO;IACP,OAAO;IACP,WAAW;IACX,UAAU;IACV,MAAM;CACE,CAAC;AAEX,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAMzC,YAAY,IAAY;QACtB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAE5E,2EAA2E;QAC3E,MAAM,UAAU,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAE5D,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAErE,uKAAuK;QACvK,MAAM,OAAO,GAAG,QAAQ,EAAE,IAAI,IAAI,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;QAClE,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CACrC,QAAQ,EAAE,IAAI,IAAI,UAAU,EAAE,OAAO,EAAE,IAAI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Q,CAAC;YACnB,OAAO,EAAE;gBACP,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI,IAAI,KAAK,CAAC,OAAO,IAAI,EAAE;gBACnD,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI;gBAC5B,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE,IAAI;aAC7B;YACD,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;SACzE,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAoB,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAE5F,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAgC,EAAoB,EAAE,CAC9E,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAA6B,EAAE;IAC9E,OAAO,KAAK,YAAY,KAAK,IAAI,OAAQ,KAAiB,CAAC,UAAU,KAAK,QAAQ,CAAC;AACrF,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TErrorScope } from '../definition';
|
|
1
|
+
import type { TErrorScope } from '../definition.js';
|
|
2
2
|
/** Declared here, not imported from helpers' `TLogLevel` (browser-safe); a helpers guard pins them equal. */
|
|
3
3
|
export type TErrorLogLevel = 'error' | 'emerg' | 'warn' | 'info' | 'debug';
|
|
4
4
|
/** Resolved message a client renders. All fields always present - no null-checks downstream. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './app-error';
|
|
2
|
-
export * from './common';
|
|
3
|
-
export * from './definition';
|
|
4
|
-
export * from './message-code';
|
|
1
|
+
export * from './app-error.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
|
+
export * from './definition.js';
|
|
4
|
+
export * from './message-code.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './app-error';
|
|
2
|
-
export * from './common';
|
|
3
|
-
export * from './definition';
|
|
4
|
-
export * from './message-code';
|
|
1
|
+
export * from './app-error.js';
|
|
2
|
+
export * from './common/index.js';
|
|
3
|
+
export * from './definition.js';
|
|
4
|
+
export * from './message-code.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TNullable } from '../../common/types';
|
|
2
|
-
import type { TError } from './common';
|
|
1
|
+
import type { TNullable } from '../../common/types.js';
|
|
2
|
+
import type { TError } from './common/index.js';
|
|
3
3
|
type TErrorFactory = (opts: TError) => Error;
|
|
4
4
|
export declare class MessageCode {
|
|
5
5
|
static readonly SEPARATOR = ".";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './binding';
|
|
2
|
-
export * from './container';
|
|
3
|
-
export * from './error';
|
|
4
|
-
export * from './metadata';
|
|
5
|
-
export * from './registry';
|
|
1
|
+
export * from './binding/index.js';
|
|
2
|
+
export * from './container/index.js';
|
|
3
|
+
export * from './error/index.js';
|
|
4
|
+
export * from './metadata/index.js';
|
|
5
|
+
export * from './registry/index.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './binding';
|
|
2
|
-
export * from './container';
|
|
3
|
-
export * from './error';
|
|
4
|
-
export * from './metadata';
|
|
5
|
-
export * from './registry';
|
|
1
|
+
export * from './binding/index.js';
|
|
2
|
+
export * from './container/index.js';
|
|
3
|
+
export * from './error/index.js';
|
|
4
|
+
export * from './metadata/index.js';
|
|
5
|
+
export * from './registry/index.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './constants';
|
|
1
|
+
export * from './constants.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './constants';
|
|
1
|
+
export * from './constants.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './common';
|
|
2
|
-
export * from './injectors';
|
|
1
|
+
export * from './common/index.js';
|
|
2
|
+
export * from './injectors.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './common';
|
|
2
|
-
export * from './injectors';
|
|
1
|
+
export * from './common/index.js';
|
|
2
|
+
export * from './injectors.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TBindingKey, TInjectTarget } from '../../common/types';
|
|
2
|
-
import { MetadataRegistry } from '../registry';
|
|
1
|
+
import { TBindingKey, TInjectTarget } from '../../common/types.js';
|
|
2
|
+
import { MetadataRegistry } from '../registry/index.js';
|
|
3
3
|
/** Either a key, or the class bound under it - never both. The class may be named directly or through a function, which defers the reference past an import cycle. */
|
|
4
4
|
export type TInjectOptions = {
|
|
5
5
|
isOptional?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getError } from '../error';
|
|
2
|
-
import { metadataRegistry } from '../registry';
|
|
1
|
+
import { getError } from '../error/index.js';
|
|
2
|
+
import { metadataRegistry } from '../registry/index.js';
|
|
3
3
|
/** Marks a property or constructor parameter for dependency injection. */
|
|
4
4
|
export const inject = (opts) => {
|
|
5
5
|
const { key, target: injected } = opts;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TBindingKey, TInjectTarget } from '../../../common/types';
|
|
1
|
+
import type { TBindingKey, TInjectTarget } from '../../../common/types.js';
|
|
2
2
|
export interface IPropertyMetadata {
|
|
3
3
|
bindingKey?: TBindingKey;
|
|
4
4
|
/** Named by class, or by a function returning it; the key is read off the class at resolve time. */
|