@trackunit/iris-app-build-utilities 0.0.141 → 0.0.142

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.142](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.141...iris-app-build-utilities/0.0.142) (2023-05-25)
6
+
5
7
  ## [0.0.141](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.140...iris-app-build-utilities/0.0.141) (2023-05-24)
6
8
 
7
9
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-build-utilities",
3
- "version": "0.0.141",
3
+ "version": "0.0.142",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "dependencies": {
@@ -13,7 +13,7 @@
13
13
  "node-fetch": "2.6.8",
14
14
  "react": "18.2.0",
15
15
  "react-dom": "18.2.0",
16
- "react-i18next": "12.1.1",
16
+ "react-i18next": "12.3.1",
17
17
  "react-virtualized-auto-sizer": "1.0.7",
18
18
  "tsconfig-paths": "3.14.1",
19
19
  "@apollo/client": "3.7.10",
@@ -107,7 +107,6 @@
107
107
  "memoize-one": "5.2.1",
108
108
  "moment": "2.29.4",
109
109
  "murmurhash": "2.0.1",
110
- "node-cache": "5.1.2",
111
110
  "node-vault": "0.9.22",
112
111
  "node-xlsx": "0.21.0",
113
112
  "open": "8.4.0",
@@ -5,7 +5,7 @@ interface IAliasesFromTsConfigOptions {
5
5
  /**
6
6
  * Generates a list of aliases from the options.tsConfigFilePath defaults to tsconfig.base.json.
7
7
  *
8
- * @returns aliases Exposes object for module federation.
8
+ * @returns { Promise<Record<string, string>> } aliases Exposes object for module federation.
9
9
  */
10
10
  export declare const getAliasesFromTsConfig: (options: IAliasesFromTsConfigOptions) => Promise<Record<string, string>>;
11
11
  export {};
@@ -4,6 +4,12 @@ exports.getAliasesFromTsConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path = tslib_1.__importStar(require("path"));
6
6
  const ts = tslib_1.__importStar(require("typescript"));
7
+ /**
8
+ * Removes the /* from the end of the alias if it exists.
9
+ *
10
+ * @param tsAlias the alias from the tsconfig.json
11
+ * @returns { string } substring of the alias if it ends with /*
12
+ */
7
13
  const fromTsAlias = (tsAlias) => {
8
14
  return tsAlias.indexOf("/*") === tsAlias.length - 2 ? tsAlias.substring(0, tsAlias.length - 2) : `${tsAlias}$`;
9
15
  };
@@ -13,7 +19,7 @@ const fromTsPath = (tsPath) => {
13
19
  /**
14
20
  * Generates a list of aliases from the options.tsConfigFilePath defaults to tsconfig.base.json.
15
21
  *
16
- * @returns aliases Exposes object for module federation.
22
+ * @returns { Promise<Record<string, string>> } aliases Exposes object for module federation.
17
23
  */
18
24
  const getAliasesFromTsConfig = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
19
25
  var _a, _b;
@@ -1 +1 @@
1
- {"version":3,"file":"getAliasesFromTsConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getAliasesFromTsConfig.ts"],"names":[],"mappings":";;;;AAAA,mDAA6B;AAC7B,uDAAiC;AAMjC,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,EAAE;IACtC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC;AACjH,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE;IACpC,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,MA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\"typescript\";\ninterface IAliasesFromTsConfigOptions {\n nxRootDir: string;\n tsConfigFilePath?: string;\n}\n\nconst fromTsAlias = (tsAlias: string) => {\n return tsAlias.indexOf(\"/*\") === tsAlias.length - 2 ? tsAlias.substring(0, tsAlias.length - 2) : `${tsAlias}$`;\n};\n\nconst fromTsPath = (tsPath: string) => {\n return tsPath.indexOf(\"/*\") === tsPath.length - 2 ? tsPath.substring(0, tsPath.length - 2) : tsPath;\n};\n\n/**\n * Generates a list of aliases from the options.tsConfigFilePath defaults to tsconfig.base.json.\n *\n * @returns aliases Exposes object for module federation.\n */\nexport const getAliasesFromTsConfig = async (options: IAliasesFromTsConfigOptions) => {\n const tsConfig = ts.readConfigFile(\n path.join(options.nxRootDir, options.tsConfigFilePath || \"tsconfig.base.json\"),\n ts.sys.readFile\n );\n\n if (!tsConfig?.config.compilerOptions?.paths) {\n throw Error(`option tsconfigFilePath missing paths property in (tsConfig.compilerOptions.paths)`);\n }\n return Object.entries(tsConfig?.config.compilerOptions?.paths as Record<string, string[]>).reduce<\n Record<string, string>\n >((acc, [key, value]) => {\n if (value.length !== 1) {\n throw new TypeError(`Unsupported TS alias ${key} has length ${value.length}`);\n }\n acc[fromTsAlias(key)] = path.join(options.nxRootDir, fromTsPath(value[0]));\n return acc;\n }, {});\n};\n"]}
1
+ {"version":3,"file":"getAliasesFromTsConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/getAliasesFromTsConfig.ts"],"names":[],"mappings":";;;;AAAA,mDAA6B;AAC7B,uDAAiC;AAMjC;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,EAAE;IACtC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OA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AAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAA,CAAC;AAlBW,QAAA,sBAAsB,0BAkBjC","sourcesContent":["import * as path from \"path\";\nimport * as ts from \"typescript\";\ninterface IAliasesFromTsConfigOptions {\n nxRootDir: string;\n tsConfigFilePath?: string;\n}\n\n/**\n * Removes the /* from the end of the alias if it exists.\n *\n * @param tsAlias the alias from the tsconfig.json\n * @returns { string } substring of the alias if it ends with /*\n */\nconst fromTsAlias = (tsAlias: string) => {\n return tsAlias.indexOf(\"/*\") === tsAlias.length - 2 ? tsAlias.substring(0, tsAlias.length - 2) : `${tsAlias}$`;\n};\n\nconst fromTsPath = (tsPath: string) => {\n return tsPath.indexOf(\"/*\") === tsPath.length - 2 ? tsPath.substring(0, tsPath.length - 2) : tsPath;\n};\n\n/**\n * Generates a list of aliases from the options.tsConfigFilePath defaults to tsconfig.base.json.\n *\n * @returns { Promise<Record<string, string>> } aliases Exposes object for module federation.\n */\nexport const getAliasesFromTsConfig = async (options: IAliasesFromTsConfigOptions) => {\n const tsConfig = ts.readConfigFile(\n path.join(options.nxRootDir, options.tsConfigFilePath || \"tsconfig.base.json\"),\n ts.sys.readFile\n );\n\n if (!tsConfig?.config.compilerOptions?.paths) {\n throw Error(`option tsconfigFilePath missing paths property in (tsConfig.compilerOptions.paths)`);\n }\n return Object.entries(tsConfig?.config.compilerOptions?.paths as Record<string, string[]>).reduce<\n Record<string, string>\n >((acc, [key, value]) => {\n if (value.length !== 1) {\n throw new TypeError(`Unsupported TS alias ${key} has length ${value.length}`);\n }\n acc[fromTsAlias(key)] = path.join(options.nxRootDir, fromTsPath(value[0]));\n return acc;\n }, {});\n};\n"]}