@trackunit/iris-app-build-utilities 0.0.430 → 0.0.431
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.431](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.430...iris-app-build-utilities/0.0.431) (2024-08-19)
|
|
6
|
+
|
|
5
7
|
## [0.0.430](https://github.com/Trackunit/manager/compare/iris-app-build-utilities/0.0.429...iris-app-build-utilities/0.0.430) (2024-08-13)
|
|
6
8
|
|
|
7
9
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import tsModule from "typescript";
|
|
1
2
|
interface TSConfigOptions {
|
|
2
3
|
projectRootDir: string;
|
|
3
4
|
}
|
|
@@ -7,5 +8,5 @@ interface TSConfigOptions {
|
|
|
7
8
|
* @param options - The options to enable tsconfig path
|
|
8
9
|
* @returns {import("typescript").ParsedCommandLine} - Returns the parsed command line
|
|
9
10
|
*/
|
|
10
|
-
export declare const enableTsConfigPath: (options: TSConfigOptions) =>
|
|
11
|
+
export declare const enableTsConfigPath: (options: TSConfigOptions) => tsModule.ParsedCommandLine;
|
|
11
12
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.enableTsConfigPath = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const fs_1 = require("fs");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const tsconfig_paths_1 = require("tsconfig-paths");
|
|
7
|
-
|
|
8
|
+
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
8
9
|
/**
|
|
9
10
|
* This enables webpack typescript file to load projects from the path section in tsconfig file.
|
|
10
11
|
*
|
|
@@ -12,13 +13,12 @@ let tsModule;
|
|
|
12
13
|
* @returns {import("typescript").ParsedCommandLine} - Returns the parsed command line
|
|
13
14
|
*/
|
|
14
15
|
const enableTsConfigPath = (options) => {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const result = tsModule.parseJsonConfigFileContent(readResult.config, tsModule.sys, options.projectRootDir);
|
|
16
|
+
const readResult = typescript_1.default.readConfigFile((0, path_1.join)(options.projectRootDir, "tsconfig.app.json"), typescript_1.default.sys.readFile);
|
|
17
|
+
const result = typescript_1.default.parseJsonConfigFileContent(readResult.config, typescript_1.default.sys, options.projectRootDir);
|
|
18
18
|
require.extensions[".ts"] = function (m, filename) {
|
|
19
19
|
const input = (0, fs_1.readFileSync)(filename, "utf-8");
|
|
20
|
-
const { outputText } =
|
|
21
|
-
compilerOptions:
|
|
20
|
+
const { outputText } = typescript_1.default.transpileModule(input, {
|
|
21
|
+
compilerOptions: result.options,
|
|
22
22
|
});
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
24
|
m._compile(outputText, filename);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enableTsConfigPath.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/enableTsConfigPath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enableTsConfigPath.js","sourceRoot":"","sources":["../../../../../libs/iris-app-sdk/iris-app-build-utilities/src/enableTsConfigPath.ts"],"names":[],"mappings":";;;;AAAA,2BAAkC;AAClC,+BAA4B;AAC5B,mDAAiF;AACjF,oEAAkC;AAMlC;;;;;GAKG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAwB,EAAE,EAAE;IAC7D,MAAM,UAAU,GAAG,oBAAQ,CAAC,cAAc,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,cAAc,EAAE,mBAAmB,CAAC,EAAE,oBAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrH,MAAM,MAAM,GAAG,oBAAQ,CAAC,0BAA0B,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAE5G,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,EAAE,QAAQ;QAC/C,MAAM,KAAK,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAE9C,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAQ,CAAC,eAAe,CAAC,KAAK,EAAE;YACrD,eAAe,EAAE,MAAM,CAAC,OAAO;SAChC,CAAC,CAAC;QAEH,8DAA8D;QAC7D,CAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC;IACF,MAAM,UAAU,GAAG,IAAA,2BAAU,EAAC,OAAO,CAAC,cAAc,CAA8B,CAAC;IACnF,IAAA,yBAAQ,EAAC;QACP,OAAO,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,OAAO,IAAI,EAAE,CAAC;QAC/D,KAAK,EAAE,UAAU,CAAC,KAAK;KACxB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AApBW,QAAA,kBAAkB,sBAoB7B","sourcesContent":["import { readFileSync } from \"fs\";\nimport { join } from \"path\";\nimport { ConfigLoaderSuccessResult, loadConfig, register } from \"tsconfig-paths\";\nimport tsModule from \"typescript\";\n\ninterface TSConfigOptions {\n projectRootDir: string;\n}\n\n/**\n * This enables webpack typescript file to load projects from the path section in tsconfig file.\n *\n * @param options - The options to enable tsconfig path\n * @returns {import(\"typescript\").ParsedCommandLine} - Returns the parsed command line\n */\nexport const enableTsConfigPath = (options: TSConfigOptions) => {\n const readResult = tsModule.readConfigFile(join(options.projectRootDir, \"tsconfig.app.json\"), tsModule.sys.readFile);\n const result = tsModule.parseJsonConfigFileContent(readResult.config, tsModule.sys, options.projectRootDir);\n\n require.extensions[\".ts\"] = function (m, filename) {\n const input = readFileSync(filename, \"utf-8\");\n\n const { outputText } = tsModule.transpileModule(input, {\n compilerOptions: result.options,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (m as any)._compile(outputText, filename);\n };\n const loadedConf = loadConfig(options.projectRootDir) as ConfigLoaderSuccessResult;\n register({\n baseUrl: join(options.projectRootDir, loadedConf.baseUrl || \"\"),\n paths: loadedConf.paths,\n });\n return result;\n};\n"]}
|