@tsed/components-scan 6.102.3 → 6.102.7

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/lib/cjs/index.js CHANGED
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  (0, tslib_1.__exportStar)(require("./importFiles"), exports);
5
5
  (0, tslib_1.__exportStar)(require("./importComponents"), exports);
6
- (0, tslib_1.__exportStar)(require("./importProviders"), exports);
7
6
  (0, tslib_1.__exportStar)(require("./cleanGlobPatterns"), exports);
8
7
  (0, tslib_1.__exportStar)(require("./normalizePath"), exports);
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAC9B,kEAAmC;AACnC,iEAAkC;AAClC,mEAAoC;AACpC,+DAAgC","sourcesContent":["export * from \"./importFiles\";\nexport * from \"./importComponents\";\nexport * from \"./importProviders\";\nexport * from \"./cleanGlobPatterns\";\nexport * from \"./normalizePath\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAA8B;AAC9B,kEAAmC;AACnC,mEAAoC;AACpC,+DAAgC","sourcesContent":["export * from \"./importFiles\";\nexport * from \"./importComponents\";\nexport * from \"./cleanGlobPatterns\";\nexport * from \"./normalizePath\";\n"]}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizePath = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const core_1 = require("@tsed/core");
5
6
  const path_1 = require("path");
6
- const fixPath = require("normalize-path");
7
+ const normalize_path_1 = (0, tslib_1.__importDefault)(require("normalize-path"));
7
8
  function normalizePath(item, ...paths) {
8
9
  if ((0, core_1.isString)(item)) {
9
10
  const path = (0, path_1.join)(item, ...paths);
10
- return fixPath(path);
11
+ return (0, normalize_path_1.default)(path);
11
12
  }
12
13
  if ((0, core_1.isArray)(item)) {
13
14
  return item.map((item) => normalizePath(item));
@@ -1 +1 @@
1
- {"version":3,"file":"normalizePath.js","sourceRoot":"","sources":["../../src/normalizePath.ts"],"names":[],"mappings":";;;AAAA,qCAA6C;AAC7C,+BAA0B;AAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAI1C,SAAgB,aAAa,CAAC,IAAS,EAAE,GAAG,KAAe;IACzD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,MAAM,IAAI,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;KACrD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,sCAWC","sourcesContent":["import {isArray, isString} from \"@tsed/core\";\nimport {join} from \"path\";\n\nconst fixPath = require(\"normalize-path\");\n\nexport function normalizePath(item: string, ...paths: string[]): string;\nexport function normalizePath(item: (string | any)[]): (string | any)[];\nexport function normalizePath(item: any, ...paths: string[]) {\n if (isString(item)) {\n const path = join(item, ...paths);\n return fixPath(path);\n }\n\n if (isArray(item)) {\n return item.map((item: any) => normalizePath(item));\n }\n\n return item;\n}\n"]}
1
+ {"version":3,"file":"normalizePath.js","sourceRoot":"","sources":["../../src/normalizePath.ts"],"names":[],"mappings":";;;;AAAA,qCAA6C;AAC7C,+BAA0B;AAC1B,iFAAqC;AAIrC,SAAgB,aAAa,CAAC,IAAS,EAAE,GAAG,KAAe;IACzD,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,MAAM,IAAI,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;QAClC,OAAO,IAAA,wBAAO,EAAC,IAAI,CAAC,CAAC;KACtB;IAED,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;KACrD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,sCAWC","sourcesContent":["import {isArray, isString} from \"@tsed/core\";\nimport {join} from \"path\";\nimport fixPath from \"normalize-path\";\n\nexport function normalizePath(item: string, ...paths: string[]): string;\nexport function normalizePath(item: (string | any)[]): (string | any)[];\nexport function normalizePath(item: any, ...paths: string[]) {\n if (isString(item)) {\n const path = join(item, ...paths);\n return fixPath(path);\n }\n\n if (isArray(item)) {\n return item.map((item: any) => normalizePath(item));\n }\n\n return item;\n}\n"]}
package/lib/esm/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from "./importFiles";
2
2
  export * from "./importComponents";
3
- export * from "./importProviders";
4
3
  export * from "./cleanGlobPatterns";
5
4
  export * from "./normalizePath";
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./importFiles\";\nexport * from \"./importComponents\";\nexport * from \"./importProviders\";\nexport * from \"./cleanGlobPatterns\";\nexport * from \"./normalizePath\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from \"./importFiles\";\nexport * from \"./importComponents\";\nexport * from \"./cleanGlobPatterns\";\nexport * from \"./normalizePath\";\n"]}
@@ -1,6 +1,6 @@
1
1
  import { isArray, isString } from "@tsed/core";
2
2
  import { join } from "path";
3
- const fixPath = require("normalize-path");
3
+ import fixPath from "normalize-path";
4
4
  export function normalizePath(item, ...paths) {
5
5
  if (isString(item)) {
6
6
  const path = join(item, ...paths);
@@ -1 +1 @@
1
- {"version":3,"file":"normalizePath.js","sourceRoot":"","sources":["../../src/normalizePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAI1C,MAAM,UAAU,aAAa,CAAC,IAAS,EAAE,GAAG,KAAe;IACzD,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;KACrD;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {isArray, isString} from \"@tsed/core\";\nimport {join} from \"path\";\n\nconst fixPath = require(\"normalize-path\");\n\nexport function normalizePath(item: string, ...paths: string[]): string;\nexport function normalizePath(item: (string | any)[]): (string | any)[];\nexport function normalizePath(item: any, ...paths: string[]) {\n if (isString(item)) {\n const path = join(item, ...paths);\n return fixPath(path);\n }\n\n if (isArray(item)) {\n return item.map((item: any) => normalizePath(item));\n }\n\n return item;\n}\n"]}
1
+ {"version":3,"file":"normalizePath.js","sourceRoot":"","sources":["../../src/normalizePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,MAAM,UAAU,aAAa,CAAC,IAAS,EAAE,GAAG,KAAe;IACzD,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;KACrD;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import {isArray, isString} from \"@tsed/core\";\nimport {join} from \"path\";\nimport fixPath from \"normalize-path\";\n\nexport function normalizePath(item: string, ...paths: string[]): string;\nexport function normalizePath(item: (string | any)[]): (string | any)[];\nexport function normalizePath(item: any, ...paths: string[]) {\n if (isString(item)) {\n const path = join(item, ...paths);\n return fixPath(path);\n }\n\n if (isArray(item)) {\n return item.map((item: any) => normalizePath(item));\n }\n\n return item;\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  export * from "./importFiles";
2
2
  export * from "./importComponents";
3
- export * from "./importProviders";
4
3
  export * from "./cleanGlobPatterns";
5
4
  export * from "./normalizePath";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/components-scan",
3
- "version": "6.102.3",
3
+ "version": "6.102.7",
4
4
  "description": "Components scan utilities for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -24,12 +24,11 @@
24
24
  "tslib": "2.2.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@tsed/core": "6.102.3",
28
- "@tsed/di": "6.102.3"
27
+ "@tsed/core": "6.102.7",
28
+ "@types/normalize-path": "^3.0.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@tsed/core": ">=6.102.1",
32
- "@tsed/di": ">=6.102.1"
31
+ "@tsed/core": "^6.102.7"
33
32
  },
34
33
  "repository": "https://github.com/tsedio/tsed",
35
34
  "bugs": {
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.importProviders = void 0;
4
- const di_1 = require("@tsed/di");
5
- const importComponents_1 = require("./importComponents");
6
- async function recursiveImports(providers, settings, properties) {
7
- const { exclude = [] } = settings;
8
- const promises = providers
9
- .map(({ token }) => di_1.GlobalProviders.get(token))
10
- .filter((provider) => (provider === null || provider === void 0 ? void 0 : provider.type) === di_1.ProviderType.MODULE && provider.configuration)
11
- .map((provider) => importProviders({ exclude, ...provider.configuration }, properties));
12
- return (await Promise.all(promises)).flat();
13
- }
14
- /**
15
- * Import providers from given patterns.
16
- *
17
- * @param settings
18
- * @param properties
19
- */
20
- async function importProviders(settings, properties = ["imports"]) {
21
- const { exclude = [] } = settings;
22
- const disableComponentsScan = settings.disableComponentsScan || !!process.env.WEBPACK;
23
- const promises = properties.map((key) => (0, importComponents_1.importComponents)(settings[key], exclude, disableComponentsScan));
24
- const providers = (await Promise.all(promises)).flat();
25
- const children = await recursiveImports(providers, settings, properties);
26
- return [...children, ...providers];
27
- }
28
- exports.importProviders = importProviders;
29
- //# sourceMappingURL=importProviders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"importProviders.js","sourceRoot":"","sources":["../../src/importProviders.ts"],"names":[],"mappings":";;;AAAA,iCAAiE;AACjE,yDAAoD;AAEpD,KAAK,UAAU,gBAAgB,CAAC,SAA4C,EAAE,QAAqC,EAAE,UAAoB;IACvI,MAAM,EAAC,OAAO,GAAG,EAAE,EAAC,GAAG,QAAQ,CAAC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D,0CAYC","sourcesContent":["import {GlobalProviders, Provider, ProviderType} from \"@tsed/di\";\nimport {importComponents} from \"./importComponents\";\n\nasync function recursiveImports(providers: {token: string; route?: string}[], settings: Partial<TsED.Configuration>, properties: string[]) {\n const {exclude = []} = settings;\n\n const promises = providers\n .map(({token}) => GlobalProviders.get(token))\n .filter((provider) => provider?.type === ProviderType.MODULE && provider.configuration)\n .map((provider: Provider) => importProviders({exclude, ...provider.configuration}, properties));\n\n return (await Promise.all(promises)).flat();\n}\n\n/**\n * Import providers from given patterns.\n *\n * @param settings\n * @param properties\n */\nexport async function importProviders(\n settings: Partial<TsED.Configuration>,\n properties: string[] = [\"imports\"]\n): Promise<{token: string; route?: string}[]> {\n const {exclude = []} = settings;\n const disableComponentsScan = settings.disableComponentsScan || !!process.env.WEBPACK;\n\n const promises = properties.map((key) => importComponents(settings[key], exclude, disableComponentsScan));\n const providers = (await Promise.all(promises)).flat();\n const children = await recursiveImports(providers, settings, properties);\n\n return [...children, ...providers];\n}\n"]}
@@ -1,25 +0,0 @@
1
- import { GlobalProviders, ProviderType } from "@tsed/di";
2
- import { importComponents } from "./importComponents";
3
- async function recursiveImports(providers, settings, properties) {
4
- const { exclude = [] } = settings;
5
- const promises = providers
6
- .map(({ token }) => GlobalProviders.get(token))
7
- .filter((provider) => (provider === null || provider === void 0 ? void 0 : provider.type) === ProviderType.MODULE && provider.configuration)
8
- .map((provider) => importProviders({ exclude, ...provider.configuration }, properties));
9
- return (await Promise.all(promises)).flat();
10
- }
11
- /**
12
- * Import providers from given patterns.
13
- *
14
- * @param settings
15
- * @param properties
16
- */
17
- export async function importProviders(settings, properties = ["imports"]) {
18
- const { exclude = [] } = settings;
19
- const disableComponentsScan = settings.disableComponentsScan || !!process.env.WEBPACK;
20
- const promises = properties.map((key) => importComponents(settings[key], exclude, disableComponentsScan));
21
- const providers = (await Promise.all(promises)).flat();
22
- const children = await recursiveImports(providers, settings, properties);
23
- return [...children, ...providers];
24
- }
25
- //# sourceMappingUR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,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAC1G,MAAM,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEzE,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,SAAS,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import {GlobalProviders, Provider, ProviderType} from \"@tsed/di\";\nimport {importComponents} from \"./importComponents\";\n\nasync function recursiveImports(providers: {token: string; route?: string}[], settings: Partial<TsED.Configuration>, properties: string[]) {\n const {exclude = []} = settings;\n\n const promises = providers\n .map(({token}) => GlobalProviders.get(token))\n .filter((provider) => provider?.type === ProviderType.MODULE && provider.configuration)\n .map((provider: Provider) => importProviders({exclude, ...provider.configuration}, properties));\n\n return (await Promise.all(promises)).flat();\n}\n\n/**\n * Import providers from given patterns.\n *\n * @param settings\n * @param properties\n */\nexport async function importProviders(\n settings: Partial<TsED.Configuration>,\n properties: string[] = [\"imports\"]\n): Promise<{token: string; route?: string}[]> {\n const {exclude = []} = settings;\n const disableComponentsScan = settings.disableComponentsScan || !!process.env.WEBPACK;\n\n const promises = properties.map((key) => importComponents(settings[key], exclude, disableComponentsScan));\n const providers = (await Promise.all(promises)).flat();\n const children = await recursiveImports(providers, settings, properties);\n\n return [...children, ...providers];\n}\n"]}
@@ -1,10 +0,0 @@
1
- /**
2
- * Import providers from given patterns.
3
- *
4
- * @param settings
5
- * @param properties
6
- */
7
- export declare function importProviders(settings: Partial<TsED.Configuration>, properties?: string[]): Promise<{
8
- token: string;
9
- route?: string;
10
- }[]>;