@trackunit/iris-app-build-utilities 0.0.376 → 0.0.378

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,18 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.378](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.377...iris-app-build-utilities/0.0.378) (2024-02-29)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `css-components` updated to version `0.0.377`
10
+ * `css-components` updated to version `0.0.377`
11
+ ## [0.0.377](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.376...iris-app-build-utilities/0.0.377) (2024-02-28)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `css-components` updated to version `0.0.376`
16
+ * `css-components` updated to version `0.0.376`
5
17
  ## [0.0.376](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.375...iris-app-build-utilities/0.0.376) (2024-02-28)
6
18
 
7
19
  ### Dependency Updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-build-utilities",
3
- "version": "0.0.376",
3
+ "version": "0.0.378",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -31,7 +31,7 @@ const getAliasesFromTsConfig = (options) => tslib_1.__awaiter(void 0, void 0, vo
31
31
  if (value.length !== 1) {
32
32
  throw new TypeError(`Unsupported TS alias ${key} has length ${value.length}`);
33
33
  }
34
- acc[fromTsAlias(key)] = path.join(options.nxRootDir, fromTsPath(value[0]));
34
+ acc[fromTsAlias(key)] = path.join(options.nxRootDir, fromTsPath(value[0] || ""));
35
35
  return acc;
36
36
  }, {});
37
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"getAliasesFromTsConfig.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/i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CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,SAAS,CAAC,wBAAwB,GAAG,eAAe,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;SAC/E;QACD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,OAAO,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"]}
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,OAAO,GAAG,CAAC;AACjH,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE;IACpC,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACtG,CAAC,CAAC;AAEF;;;;GAIG;AACI,MAAM,sBAAsB,GAAG,CAAO,OAAoC,EAAE,EAAE;;IACnF,MAAM,QAAQ,GAAG,EAAE,CAAC,cAAc,CAChC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,IAAI,oBAAoB,CAAC,EAC9E,EAAE,CAAC,GAAG,CAAC,QAAQ,CAChB,CAAC;IAEF,IAAI,CAAC,CAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,eAAe,0CAAE,KAAK,CAAA,EAAE;QAC5C,MAAM,KAAK,CAAC,oFAAoF,CAAC,CAAC;KACnG;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,eAAe,0CAAE,KAAiC,CAAC,CAAC,MAAM,CAE/F,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,SAAS,CAAC,wBAAwB,GAAG,eAAe,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;SAC/E;QACD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACjF,OAAO,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"]}