@nexus-ioc/core 0.4.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 +21 -0
- package/README.md +134 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +6 -0
- package/dist/browser.js.map +1 -0
- package/dist/core/graph/analyze-module.d.ts +36 -0
- package/dist/core/graph/analyze-module.js +82 -0
- package/dist/core/graph/analyze-module.js.map +1 -0
- package/dist/core/graph/analyze-provider.d.ts +24 -0
- package/dist/core/graph/analyze-provider.js +57 -0
- package/dist/core/graph/analyze-provider.js.map +1 -0
- package/dist/core/graph/helpers/index.d.ts +9 -0
- package/dist/core/graph/helpers/index.js +23 -0
- package/dist/core/graph/helpers/index.js.map +1 -0
- package/dist/core/graph/module-graph.d.ts +34 -0
- package/dist/core/graph/module-graph.js +399 -0
- package/dist/core/graph/module-graph.js.map +1 -0
- package/dist/core/graph/providers/analyze-class-provider.d.ts +7 -0
- package/dist/core/graph/providers/analyze-class-provider.js +17 -0
- package/dist/core/graph/providers/analyze-class-provider.js.map +1 -0
- package/dist/core/graph/providers/analyze-factory-provider.d.ts +7 -0
- package/dist/core/graph/providers/analyze-factory-provider.js +17 -0
- package/dist/core/graph/providers/analyze-factory-provider.js.map +1 -0
- package/dist/core/graph/providers/analyze-function-provider.d.ts +5 -0
- package/dist/core/graph/providers/analyze-function-provider.js +11 -0
- package/dist/core/graph/providers/analyze-function-provider.js.map +1 -0
- package/dist/core/graph/providers/analyze-value-provider.d.ts +7 -0
- package/dist/core/graph/providers/analyze-value-provider.js +17 -0
- package/dist/core/graph/providers/analyze-value-provider.js.map +1 -0
- package/dist/core/graph/providers/provider-factory.d.ts +6 -0
- package/dist/core/graph/providers/provider-factory.js +24 -0
- package/dist/core/graph/providers/provider-factory.js.map +1 -0
- package/dist/core/modules/container.d.ts +15 -0
- package/dist/core/modules/container.js +40 -0
- package/dist/core/modules/container.js.map +1 -0
- package/dist/core/modules/module-container-factory.d.ts +9 -0
- package/dist/core/modules/module-container-factory.js +25 -0
- package/dist/core/modules/module-container-factory.js.map +1 -0
- package/dist/core/modules/module-container.d.ts +16 -0
- package/dist/core/modules/module-container.js +63 -0
- package/dist/core/modules/module-container.js.map +1 -0
- package/dist/core/modules/module-token-factory.d.ts +12 -0
- package/dist/core/modules/module-token-factory.js +48 -0
- package/dist/core/modules/module-token-factory.js.map +1 -0
- package/dist/core/modules/modules-container.d.ts +16 -0
- package/dist/core/modules/modules-container.js +43 -0
- package/dist/core/modules/modules-container.js.map +1 -0
- package/dist/core/nexus-applications.browser.d.ts +13 -0
- package/dist/core/nexus-applications.browser.js +36 -0
- package/dist/core/nexus-applications.browser.js.map +1 -0
- package/dist/core/nexus-applications.server.d.ts +13 -0
- package/dist/core/nexus-applications.server.js +36 -0
- package/dist/core/nexus-applications.server.js.map +1 -0
- package/dist/core/resolver/providers-container.d.ts +3 -0
- package/dist/core/resolver/providers-container.js +8 -0
- package/dist/core/resolver/providers-container.js.map +1 -0
- package/dist/core/resolver/resolver.d.ts +10 -0
- package/dist/core/resolver/resolver.js +126 -0
- package/dist/core/resolver/resolver.js.map +1 -0
- package/dist/decorators/global.d.ts +2 -0
- package/dist/decorators/global.js +12 -0
- package/dist/decorators/global.js.map +1 -0
- package/dist/decorators/inject.d.ts +3 -0
- package/dist/decorators/inject.js +27 -0
- package/dist/decorators/inject.js.map +1 -0
- package/dist/decorators/injectable.d.ts +3 -0
- package/dist/decorators/injectable.js +12 -0
- package/dist/decorators/injectable.js.map +1 -0
- package/dist/decorators/nsModule.d.ts +3 -0
- package/dist/decorators/nsModule.js +16 -0
- package/dist/decorators/nsModule.js.map +1 -0
- package/dist/decorators/optional.d.ts +2 -0
- package/dist/decorators/optional.js +20 -0
- package/dist/decorators/optional.js.map +1 -0
- package/dist/errors/container-not-compiled.error.d.ts +3 -0
- package/dist/errors/container-not-compiled.error.js +12 -0
- package/dist/errors/container-not-compiled.error.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/abstract.interface.d.ts +3 -0
- package/dist/interfaces/abstract.interface.js +3 -0
- package/dist/interfaces/abstract.interface.js.map +1 -0
- package/dist/interfaces/constants.d.ts +12 -0
- package/dist/interfaces/constants.js +16 -0
- package/dist/interfaces/constants.js.map +1 -0
- package/dist/interfaces/dynamic-module.interface.d.ts +13 -0
- package/dist/interfaces/dynamic-module.interface.js +3 -0
- package/dist/interfaces/dynamic-module.interface.js.map +1 -0
- package/dist/interfaces/index.d.ts +15 -0
- package/dist/interfaces/index.js +19 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/injectable.interface.d.ts +4 -0
- package/dist/interfaces/injectable.interface.js +3 -0
- package/dist/interfaces/injectable.interface.js.map +1 -0
- package/dist/interfaces/injection-token.interface.d.ts +3 -0
- package/dist/interfaces/injection-token.interface.js +3 -0
- package/dist/interfaces/injection-token.interface.js.map +1 -0
- package/dist/interfaces/module-metadata.interface.d.ts +8 -0
- package/dist/interfaces/module-metadata.interface.js +3 -0
- package/dist/interfaces/module-metadata.interface.js.map +1 -0
- package/dist/interfaces/module-types.interface.d.ts +20 -0
- package/dist/interfaces/module-types.interface.js +3 -0
- package/dist/interfaces/module-types.interface.js.map +1 -0
- package/dist/interfaces/modules/container.interface.d.ts +16 -0
- package/dist/interfaces/modules/container.interface.js +3 -0
- package/dist/interfaces/modules/container.interface.js.map +1 -0
- package/dist/interfaces/modules/index.d.ts +7 -0
- package/dist/interfaces/modules/index.js +11 -0
- package/dist/interfaces/modules/index.js.map +1 -0
- package/dist/interfaces/modules/module-container-factory.interface.d.ts +7 -0
- package/dist/interfaces/modules/module-container-factory.interface.js +3 -0
- package/dist/interfaces/modules/module-container-factory.interface.js.map +1 -0
- package/dist/interfaces/modules/module-container.interface.d.ts +13 -0
- package/dist/interfaces/modules/module-container.interface.js +3 -0
- package/dist/interfaces/modules/module-container.interface.js.map +1 -0
- package/dist/interfaces/modules/module-graph.interface.d.ts +59 -0
- package/dist/interfaces/modules/module-graph.interface.js +16 -0
- package/dist/interfaces/modules/module-graph.interface.js.map +1 -0
- package/dist/interfaces/modules/module-token-factory.interface.d.ts +5 -0
- package/dist/interfaces/modules/module-token-factory.interface.js +3 -0
- package/dist/interfaces/modules/module-token-factory.interface.js.map +1 -0
- package/dist/interfaces/modules/modules-container.interface.d.ts +8 -0
- package/dist/interfaces/modules/modules-container.interface.js +3 -0
- package/dist/interfaces/modules/modules-container.interface.js.map +1 -0
- package/dist/interfaces/modules/provider-token-factory.interface.d.ts +4 -0
- package/dist/interfaces/modules/provider-token-factory.interface.js +3 -0
- package/dist/interfaces/modules/provider-token-factory.interface.js.map +1 -0
- package/dist/interfaces/nexus-application.interface.d.ts +8 -0
- package/dist/interfaces/nexus-application.interface.js +3 -0
- package/dist/interfaces/nexus-application.interface.js.map +1 -0
- package/dist/interfaces/on-module-init.interface.d.ts +3 -0
- package/dist/interfaces/on-module-init.interface.js +3 -0
- package/dist/interfaces/on-module-init.interface.js.map +1 -0
- package/dist/interfaces/plugins/index.d.ts +2 -0
- package/dist/interfaces/plugins/index.js +6 -0
- package/dist/interfaces/plugins/index.js.map +1 -0
- package/dist/interfaces/plugins/module-plugin.interface.d.ts +4 -0
- package/dist/interfaces/plugins/module-plugin.interface.js +3 -0
- package/dist/interfaces/plugins/module-plugin.interface.js.map +1 -0
- package/dist/interfaces/plugins/scanner-plugin.interface.d.ts +6 -0
- package/dist/interfaces/plugins/scanner-plugin.interface.js +3 -0
- package/dist/interfaces/plugins/scanner-plugin.interface.js.map +1 -0
- package/dist/interfaces/scope.interface.d.ts +4 -0
- package/dist/interfaces/scope.interface.js +9 -0
- package/dist/interfaces/scope.interface.js.map +1 -0
- package/dist/interfaces/type.interface.d.ts +3 -0
- package/dist/interfaces/type.interface.js +3 -0
- package/dist/interfaces/type.interface.js.map +1 -0
- package/dist/interfaces/utils/hash-utils.interface.d.ts +5 -0
- package/dist/interfaces/utils/hash-utils.interface.js +3 -0
- package/dist/interfaces/utils/hash-utils.interface.js.map +1 -0
- package/dist/interfaces/utils/index.d.ts +1 -0
- package/dist/interfaces/utils/index.js +5 -0
- package/dist/interfaces/utils/index.js.map +1 -0
- package/dist/interfaces/validate-module-keys.d.ts +7 -0
- package/dist/interfaces/validate-module-keys.js +26 -0
- package/dist/interfaces/validate-module-keys.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +6 -0
- package/dist/server.js.map +1 -0
- package/dist/utils/hash-utils.browser.d.ts +6 -0
- package/dist/utils/hash-utils.browser.js +22 -0
- package/dist/utils/hash-utils.browser.js.map +1 -0
- package/dist/utils/hash-utils.server.d.ts +6 -0
- package/dist/utils/hash-utils.server.js +19 -0
- package/dist/utils/hash-utils.server.js.map +1 -0
- package/dist/utils/helpers.d.ts +16 -0
- package/dist/utils/helpers.js +83 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/random-string-generator.util.d.ts +1 -0
- package/dist/utils/random-string-generator.util.js +7 -0
- package/dist/utils/random-string-generator.util.js.map +1 -0
- package/dist/utils/shared.utils.d.ts +13 -0
- package/dist/utils/shared.utils.js +66 -0
- package/dist/utils/shared.utils.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.interface.js","sourceRoot":"","sources":["../../src/interfaces/scope.interface.ts"],"names":[],"mappings":";;;AAAA,IAAY,KAGX;AAHD,WAAY,KAAK;IAChB,2CAAa,CAAA;IACb,uCAAW,CAAA;AACZ,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.interface.js","sourceRoot":"","sources":["../../src/interfaces/type.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-utils.interface.js","sourceRoot":"","sources":["../../../src/interfaces/utils/hash-utils.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hash-utils.interface";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/utils/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MODULE_METADATA: {
|
|
2
|
+
IMPORTS: string;
|
|
3
|
+
PROVIDERS: string;
|
|
4
|
+
EXPORTS: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const INVALID_MODULE_CONFIG_MESSAGE: (text: TemplateStringsArray, property: string) => string;
|
|
7
|
+
export declare function validateModuleKeys(keys: string[]): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVALID_MODULE_CONFIG_MESSAGE = exports.MODULE_METADATA = void 0;
|
|
4
|
+
exports.validateModuleKeys = validateModuleKeys;
|
|
5
|
+
exports.MODULE_METADATA = {
|
|
6
|
+
IMPORTS: "imports",
|
|
7
|
+
PROVIDERS: "providers",
|
|
8
|
+
EXPORTS: "exports",
|
|
9
|
+
};
|
|
10
|
+
const INVALID_MODULE_CONFIG_MESSAGE = (text, property) => `Invalid property '${property}' passed into the @Module() decorator.`;
|
|
11
|
+
exports.INVALID_MODULE_CONFIG_MESSAGE = INVALID_MODULE_CONFIG_MESSAGE;
|
|
12
|
+
const metadataKeys = [
|
|
13
|
+
exports.MODULE_METADATA.IMPORTS,
|
|
14
|
+
exports.MODULE_METADATA.EXPORTS,
|
|
15
|
+
exports.MODULE_METADATA.PROVIDERS,
|
|
16
|
+
];
|
|
17
|
+
function validateModuleKeys(keys) {
|
|
18
|
+
const validateKey = (key) => {
|
|
19
|
+
if (metadataKeys.includes(key)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
throw new Error((0, exports.INVALID_MODULE_CONFIG_MESSAGE) `${key}`);
|
|
23
|
+
};
|
|
24
|
+
keys.forEach(validateKey);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=validate-module-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-module-keys.js","sourceRoot":"","sources":["../../src/interfaces/validate-module-keys.ts"],"names":[],"mappings":";;;AAiBA,gDAQC;AAzBY,QAAA,eAAe,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CAClB,CAAC;AAEK,MAAM,6BAA6B,GAAG,CAC5C,IAA0B,EAC1B,QAAgB,EACf,EAAE,CAAC,qBAAqB,QAAQ,wCAAwC,CAAC;AAH9D,QAAA,6BAA6B,iCAGiC;AAE3E,MAAM,YAAY,GAAG;IACpB,uBAAe,CAAC,OAAO;IACvB,uBAAe,CAAC,OAAO;IACvB,uBAAe,CAAC,SAAS;CACzB,CAAC;AAEF,SAAgB,kBAAkB,CAAC,IAAc;IAChD,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QACnC,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO;QACR,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,IAAA,qCAA6B,EAAA,GAAG,GAAG,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NexusApplicationsServer } from "./core/nexus-applications.server";
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NexusApplicationsServer = void 0;
|
|
4
|
+
var nexus_applications_server_1 = require("./core/nexus-applications.server");
|
|
5
|
+
Object.defineProperty(exports, "NexusApplicationsServer", { enumerable: true, get: function () { return nexus_applications_server_1.NexusApplicationsServer; } });
|
|
6
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;AAAA,8EAA2E;AAAlE,oIAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HashUtilBrowser = void 0;
|
|
4
|
+
const random_string_generator_util_1 = require("./random-string-generator.util");
|
|
5
|
+
class HashUtilBrowser {
|
|
6
|
+
async hashString(value) {
|
|
7
|
+
const encoder = new TextEncoder();
|
|
8
|
+
const data = encoder.encode(value);
|
|
9
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
|
10
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
11
|
+
return hashArray.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
12
|
+
}
|
|
13
|
+
async hashObject(value) {
|
|
14
|
+
const json = JSON.stringify(value);
|
|
15
|
+
return this.hashString(json);
|
|
16
|
+
}
|
|
17
|
+
randomStringGenerator() {
|
|
18
|
+
return (0, random_string_generator_util_1.randomStringGenerator)();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.HashUtilBrowser = HashUtilBrowser;
|
|
22
|
+
//# sourceMappingURL=hash-utils.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-utils.browser.js","sourceRoot":"","sources":["../../src/utils/hash-utils.browser.ts"],"names":[],"mappings":";;;AACA,iFAAuE;AAEvE,MAAa,eAAe;IAC3B,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC/D,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;QACzD,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAEnC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAA,oDAAqB,GAAE,CAAC;IAChC,CAAC;CACD;AAlBD,0CAkBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HashUtilsServer = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const random_string_generator_util_1 = require("./random-string-generator.util");
|
|
6
|
+
class HashUtilsServer {
|
|
7
|
+
async hashString(value) {
|
|
8
|
+
return (0, node_crypto_1.createHash)("sha256").update(value).digest("hex");
|
|
9
|
+
}
|
|
10
|
+
async hashObject(value) {
|
|
11
|
+
const json = JSON.stringify(value);
|
|
12
|
+
return this.hashString(json);
|
|
13
|
+
}
|
|
14
|
+
randomStringGenerator() {
|
|
15
|
+
return (0, random_string_generator_util_1.randomStringGenerator)();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.HashUtilsServer = HashUtilsServer;
|
|
19
|
+
//# sourceMappingURL=hash-utils.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-utils.server.js","sourceRoot":"","sources":["../../src/utils/hash-utils.server.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAEzC,iFAAuE;AAEvE,MAAa,eAAe;IAC3B,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAA,oDAAqB,GAAE,CAAC;IAChC,CAAC;CACD;AAbD,0CAaC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { type ClassProvider, type DynamicModule, type FactoryProvider, type InjectionToken, type Module, type Provider, Scope, type Type, type ValueProvider } from "../interfaces";
|
|
3
|
+
export declare function isFunctionProvider(target: Provider): target is Type;
|
|
4
|
+
export declare function isModule(target: Module | InjectionToken): target is Module;
|
|
5
|
+
export declare function isFunctionToken(target: InjectionToken): target is Type;
|
|
6
|
+
export declare function isClassProvider(target: Provider): target is ClassProvider;
|
|
7
|
+
export declare function isValueProvider(target: Provider): target is ValueProvider;
|
|
8
|
+
export declare function isFactoryProvider(target: Provider): target is FactoryProvider;
|
|
9
|
+
export declare function getProviderToken(target: Provider): InjectionToken;
|
|
10
|
+
export declare function isProvider(provider: Provider): provider is Provider;
|
|
11
|
+
export declare function getDependencyToken(target: Provider): InjectionToken;
|
|
12
|
+
export declare function isDynamicModule(module: Module | DynamicModule): module is DynamicModule;
|
|
13
|
+
export declare function isGlobalModule(target: Module): boolean;
|
|
14
|
+
export declare function getModuleLabel(module: Module | DynamicModule): string;
|
|
15
|
+
export declare function getProviderScope(target: Provider): Scope;
|
|
16
|
+
export declare function getProviderName(target: Provider): string;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFunctionProvider = isFunctionProvider;
|
|
4
|
+
exports.isModule = isModule;
|
|
5
|
+
exports.isFunctionToken = isFunctionToken;
|
|
6
|
+
exports.isClassProvider = isClassProvider;
|
|
7
|
+
exports.isValueProvider = isValueProvider;
|
|
8
|
+
exports.isFactoryProvider = isFactoryProvider;
|
|
9
|
+
exports.getProviderToken = getProviderToken;
|
|
10
|
+
exports.isProvider = isProvider;
|
|
11
|
+
exports.getDependencyToken = getDependencyToken;
|
|
12
|
+
exports.isDynamicModule = isDynamicModule;
|
|
13
|
+
exports.isGlobalModule = isGlobalModule;
|
|
14
|
+
exports.getModuleLabel = getModuleLabel;
|
|
15
|
+
exports.getProviderScope = getProviderScope;
|
|
16
|
+
exports.getProviderName = getProviderName;
|
|
17
|
+
require("reflect-metadata");
|
|
18
|
+
const interfaces_1 = require("../interfaces");
|
|
19
|
+
function isFunctionProvider(target) {
|
|
20
|
+
return typeof target === "function";
|
|
21
|
+
}
|
|
22
|
+
function isModule(target) {
|
|
23
|
+
return typeof target === "function";
|
|
24
|
+
}
|
|
25
|
+
function isFunctionToken(target) {
|
|
26
|
+
return typeof target === "function";
|
|
27
|
+
}
|
|
28
|
+
function isClassProvider(target) {
|
|
29
|
+
return !!target.useClass;
|
|
30
|
+
}
|
|
31
|
+
function isValueProvider(target) {
|
|
32
|
+
return !!target.useValue;
|
|
33
|
+
}
|
|
34
|
+
function isFactoryProvider(target) {
|
|
35
|
+
return !!target.useFactory;
|
|
36
|
+
}
|
|
37
|
+
function getProviderToken(target) {
|
|
38
|
+
if (isFunctionProvider(target)) {
|
|
39
|
+
return target;
|
|
40
|
+
}
|
|
41
|
+
return target.provide;
|
|
42
|
+
}
|
|
43
|
+
function isProvider(provider) {
|
|
44
|
+
return Reflect.getMetadata(interfaces_1.INJECTABLE_WATERMARK, provider) || false;
|
|
45
|
+
}
|
|
46
|
+
function getDependencyToken(target) {
|
|
47
|
+
if (isFunctionProvider(target)) {
|
|
48
|
+
return target;
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
52
|
+
function isDynamicModule(module) {
|
|
53
|
+
return "module" in module;
|
|
54
|
+
}
|
|
55
|
+
function isGlobalModule(target) {
|
|
56
|
+
return Reflect.getMetadata(interfaces_1.MODULE_GLOBAL_WATERMARK, target) === true;
|
|
57
|
+
}
|
|
58
|
+
function getModuleLabel(module) {
|
|
59
|
+
if (isDynamicModule(module)) {
|
|
60
|
+
return module.module.name;
|
|
61
|
+
}
|
|
62
|
+
return module.name;
|
|
63
|
+
}
|
|
64
|
+
function getProviderScope(target) {
|
|
65
|
+
if (isFactoryProvider(target)) {
|
|
66
|
+
return target.scope || interfaces_1.Scope.Singleton;
|
|
67
|
+
}
|
|
68
|
+
if (isClassProvider(target)) {
|
|
69
|
+
return (Reflect.getMetadata(interfaces_1.INJECTABLE_OPTIONS, target.useClass)?.scope ||
|
|
70
|
+
target.scope ||
|
|
71
|
+
interfaces_1.Scope.Singleton);
|
|
72
|
+
}
|
|
73
|
+
if (isValueProvider(target)) {
|
|
74
|
+
return interfaces_1.Scope.Singleton;
|
|
75
|
+
}
|
|
76
|
+
return (Reflect.getMetadata(interfaces_1.INJECTABLE_OPTIONS, target)?.scope || interfaces_1.Scope.Singleton);
|
|
77
|
+
}
|
|
78
|
+
function getProviderName(target) {
|
|
79
|
+
const token = getProviderToken(target);
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
return token.name || token;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";;AAgBA,gDAEC;AAED,4BAEC;AAED,0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{ value: true });
|
|
3
|
+
exports.randomStringGenerator = void 0;
|
|
4
|
+
const uid_1 = require("uid");
|
|
5
|
+
const randomStringGenerator = () => (0, uid_1.uid)(21);
|
|
6
|
+
exports.randomStringGenerator = randomStringGenerator;
|
|
7
|
+
//# sourceMappingURL=random-string-generator.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random-string-generator.util.js","sourceRoot":"","sources":["../../src/utils/random-string-generator.util.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAEnB,MAAM,qBAAqB,GAAG,GAAW,EAAE,CAAC,IAAA,SAAG,EAAC,EAAE,CAAC,CAAC;AAA9C,QAAA,qBAAqB,yBAAyB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const isUndefined: (obj: any) => obj is undefined;
|
|
2
|
+
export declare const isObject: (fn: any) => fn is object;
|
|
3
|
+
export declare const isPlainObject: (fn: any) => fn is object;
|
|
4
|
+
export declare const addLeadingSlash: (path?: string) => string;
|
|
5
|
+
export declare const normalizePath: (path?: string) => string;
|
|
6
|
+
export declare const stripEndSlash: (path: string) => string;
|
|
7
|
+
export declare const isFunction: (val: any) => val is Function;
|
|
8
|
+
export declare const isString: (val: any) => val is string;
|
|
9
|
+
export declare const isNumber: (val: any) => val is number;
|
|
10
|
+
export declare const isConstructor: (val: any) => boolean;
|
|
11
|
+
export declare const isNil: (val: any) => val is null | undefined;
|
|
12
|
+
export declare const isEmpty: (array: any) => boolean;
|
|
13
|
+
export declare const isSymbol: (val: any) => val is symbol;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSymbol = exports.isEmpty = exports.isNil = exports.isConstructor = exports.isNumber = exports.isString = exports.isFunction = exports.stripEndSlash = exports.normalizePath = exports.addLeadingSlash = exports.isPlainObject = exports.isObject = exports.isUndefined = void 0;
|
|
4
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
5
|
+
const isUndefined = (obj) => typeof obj === "undefined";
|
|
6
|
+
exports.isUndefined = isUndefined;
|
|
7
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
8
|
+
const isObject = (fn) => !(0, exports.isNil)(fn) && typeof fn === "object";
|
|
9
|
+
exports.isObject = isObject;
|
|
10
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
11
|
+
const isPlainObject = (fn) => {
|
|
12
|
+
if (!(0, exports.isObject)(fn)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const proto = Object.getPrototypeOf(fn);
|
|
16
|
+
if (proto === null) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
const ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") &&
|
|
20
|
+
proto.constructor;
|
|
21
|
+
return (typeof ctor === "function" &&
|
|
22
|
+
ctor instanceof ctor &&
|
|
23
|
+
Function.prototype.toString.call(ctor) ===
|
|
24
|
+
Function.prototype.toString.call(Object));
|
|
25
|
+
};
|
|
26
|
+
exports.isPlainObject = isPlainObject;
|
|
27
|
+
const addLeadingSlash = (path) => path && typeof path === "string"
|
|
28
|
+
? path.charAt(0) !== "/"
|
|
29
|
+
? // biome-ignore lint/style/useTemplate: <explanation>
|
|
30
|
+
"/" + path
|
|
31
|
+
: path
|
|
32
|
+
: "";
|
|
33
|
+
exports.addLeadingSlash = addLeadingSlash;
|
|
34
|
+
const normalizePath = (path) => path
|
|
35
|
+
? path.startsWith("/")
|
|
36
|
+
? // biome-ignore lint/style/useTemplate: <explanation>
|
|
37
|
+
("/" + path.replace(/\/+$/, "")).replace(/\/+/g, "/")
|
|
38
|
+
: // biome-ignore lint/style/useTemplate: <explanation>
|
|
39
|
+
"/" + path.replace(/\/+$/, "")
|
|
40
|
+
: "/";
|
|
41
|
+
exports.normalizePath = normalizePath;
|
|
42
|
+
const stripEndSlash = (path) => path[path.length - 1] === "/" ? path.slice(0, path.length - 1) : path;
|
|
43
|
+
exports.stripEndSlash = stripEndSlash;
|
|
44
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
45
|
+
// biome-ignore lint/complexity/noBannedTypes: <explanation>
|
|
46
|
+
const isFunction = (val) => typeof val === "function";
|
|
47
|
+
exports.isFunction = isFunction;
|
|
48
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
49
|
+
const isString = (val) => typeof val === "string";
|
|
50
|
+
exports.isString = isString;
|
|
51
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
52
|
+
const isNumber = (val) => typeof val === "number";
|
|
53
|
+
exports.isNumber = isNumber;
|
|
54
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
55
|
+
const isConstructor = (val) => val === "constructor";
|
|
56
|
+
exports.isConstructor = isConstructor;
|
|
57
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
58
|
+
const isNil = (val) => (0, exports.isUndefined)(val) || val === null;
|
|
59
|
+
exports.isNil = isNil;
|
|
60
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
61
|
+
const isEmpty = (array) => !(array && array.length > 0);
|
|
62
|
+
exports.isEmpty = isEmpty;
|
|
63
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
64
|
+
const isSymbol = (val) => typeof val === "symbol";
|
|
65
|
+
exports.isSymbol = isSymbol;
|
|
66
|
+
//# sourceMappingURL=shared.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.utils.js","sourceRoot":"","sources":["../../src/utils/shared.utils.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AACrD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAoB,EAAE,CACzD,OAAO,GAAG,KAAK,WAAW,CAAC;AADf,QAAA,WAAW,eACI;AAE5B,4DAA4D;AACrD,MAAM,QAAQ,GAAG,CAAC,EAAO,EAAgB,EAAE,CACjD,CAAC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G,CAAC,KAAU,EAAW,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAAhE,QAAA,OAAO,WAAyD;AAE7E,4DAA4D;AACrD,MAAM,QAAQ,GAAG,CAAC,GAAQ,EAAiB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC;AAAhE,QAAA,QAAQ,YAAwD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nexus-ioc/core",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "A powerful IoC container for TypeScript applications",
|
|
5
|
+
"author": "Isqanderm <aleksandr.melnik.personal@gmail.com> (https://www.linkedin.com/in/isqander-melnik)",
|
|
6
|
+
"homepage": "https://github.com/Isqanderm/ioc#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Isqanderm/ioc.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Isqanderm/ioc/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"IoC",
|
|
16
|
+
"dependency injection",
|
|
17
|
+
"inversion control",
|
|
18
|
+
"typescript",
|
|
19
|
+
"DI",
|
|
20
|
+
"framework",
|
|
21
|
+
"container"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"package.json",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"reflect-metadata": "^0.1.12 || ^0.2.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/jest": "^29.5.12",
|
|
38
|
+
"jest": "^29.7.0",
|
|
39
|
+
"@nexus-ioc/testing": "^0.4.0",
|
|
40
|
+
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
41
|
+
"sinon": "^18.0.0",
|
|
42
|
+
"typescript": "^5.5.3",
|
|
43
|
+
"ts-jest": "^29.1.4",
|
|
44
|
+
"ts-node": "^10.9.2",
|
|
45
|
+
"@types/node": "^22.5.4"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"tslib": "^2.6.3",
|
|
49
|
+
"uid": "^2.0.2"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc",
|
|
53
|
+
"test": "jest",
|
|
54
|
+
"clean": "rm -rf ./dist && rm tsconfig.tsbuildinfo",
|
|
55
|
+
"test:watch": "jest --watch",
|
|
56
|
+
"code:format": "npx @biomejs/biome format --write",
|
|
57
|
+
"code:lint": "npx @biomejs/biome lint --write",
|
|
58
|
+
"code:check": "npx @biomejs/biome check",
|
|
59
|
+
"code:check:ci": "npx @biomejs/biome ci",
|
|
60
|
+
"code:check:apply": "npx @biomejs/biome check --write",
|
|
61
|
+
"test:ready": "echo 0"
|
|
62
|
+
}
|
|
63
|
+
}
|