@rolster/invertly 1.0.8 → 1.1.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/dist/cjs/index.js +69 -81
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +69 -81
- package/dist/es/index.js.map +1 -1
- package/dist/esm/decorators/inject.decorator.d.ts +3 -3
- package/dist/esm/decorators/inject.decorator.js +10 -11
- package/dist/esm/decorators/inject.decorator.js.map +1 -1
- package/dist/esm/decorators/injectable.decorator.d.ts +5 -5
- package/dist/esm/decorators/injectable.decorator.js +7 -9
- package/dist/esm/decorators/injectable.decorator.js.map +1 -1
- package/dist/esm/factories/container.factory.d.ts +4 -4
- package/dist/esm/factories/container.factory.js +13 -13
- package/dist/esm/factories/container.factory.js.map +1 -1
- package/dist/esm/factories/index.d.ts +8 -23
- package/dist/esm/factories/index.js +25 -34
- package/dist/esm/factories/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stores/context.store.d.ts +2 -2
- package/dist/esm/stores/context.store.js +2 -2
- package/dist/esm/stores/context.store.js.map +1 -1
- package/dist/esm/stores/inject.store.d.ts +3 -3
- package/dist/esm/stores/inject.store.js +5 -5
- package/dist/esm/stores/inject.store.js.map +1 -1
- package/dist/esm/stores/injectable.store.d.ts +4 -4
- package/dist/esm/stores/injectable.store.js +3 -3
- package/dist/esm/stores/injectable.store.js.map +1 -1
- package/dist/esm/stores/locator.store.d.ts +5 -5
- package/dist/esm/stores/locator.store.js +3 -3
- package/dist/esm/stores/locator.store.js.map +1 -1
- package/dist/esm/stores/scope.store.d.ts +2 -2
- package/dist/esm/stores/scope.store.js +1 -1
- package/dist/esm/stores/scope.store.js.map +1 -1
- package/dist/esm/types/context.type.d.ts +2 -2
- package/dist/esm/types/inject.type.d.ts +2 -2
- package/dist/esm/types/injectable.type.d.ts +3 -3
- package/dist/esm/types/locator.type.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.store.js","sourceRoot":"","sources":["../../../src/stores/scope.store.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,UAAU;IAGrB;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;IAC9B,CAAC;IAEM,IAAI,CAAC,KAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"scope.store.js","sourceRoot":"","sources":["../../../src/stores/scope.store.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,UAAU;IAGrB;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;IAC9B,CAAC;IAEM,IAAI,CAAC,KAAsB,EAAE,KAAU;QAC5C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAEM,OAAO,CAAU,KAAsB;QAC5C,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAM,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export interface AbstractContext {
|
|
2
|
-
|
|
1
|
+
export interface AbstractContext<K = string> {
|
|
2
|
+
request<T = any>(key: K): Undefined<T>;
|
|
3
3
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectableToken } from './injectable.type';
|
|
2
|
-
export type InjectToken<T =
|
|
3
|
-
export type
|
|
2
|
+
export type InjectToken<T = any> = InjectableToken<T> | string | symbol;
|
|
3
|
+
export type InjectOptions<T = any> = {
|
|
4
4
|
index: number;
|
|
5
5
|
parent: InjectableToken;
|
|
6
6
|
scopeable: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Constructable } from './constructable.type';
|
|
2
2
|
import { AbstractContext } from './context.type';
|
|
3
|
-
export type InjectableToken<T =
|
|
4
|
-
export interface
|
|
3
|
+
export type InjectableToken<T = any> = Object | Function | CallableFunction | Constructable<T>;
|
|
4
|
+
export interface InjectableOptions<T = any> {
|
|
5
5
|
scopeable: boolean;
|
|
6
6
|
singleton: boolean;
|
|
7
7
|
token: InjectableToken<T>;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface InjectionOptions<T> {
|
|
10
10
|
token: InjectableToken<T>;
|
|
11
11
|
context?: AbstractContext;
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolster/invertly",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Invertly is a package that allows you to implement class mapping to identify and inject their dependencies.",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
33
33
|
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
34
34
|
"@rollup/plugin-typescript": "^11.1.3",
|
|
35
|
-
"@rolster/types": "^1.0.
|
|
35
|
+
"@rolster/types": "^1.0.9",
|
|
36
36
|
"@types/jest": "^29.5.1",
|
|
37
37
|
"jest": "^29.5.0",
|
|
38
38
|
"prettier": "^3.0.3",
|