@nrwl/js 14.7.6-beta.0 → 14.7.6-beta.2

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
@@ -3,6 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [14.7.6-beta.0](https://github.com/nrwl/nx/compare/14.7.5...14.7.6-beta.0) (2022-09-13)
6
+ ## [14.7.6-beta.2](https://github.com/nrwl/nx/compare/14.7.5...14.7.6-beta.2) (2022-09-17)
7
7
 
8
8
  **Note:** Version bump only for package @nrwl/js
package/migrations.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "cli": "nx",
29
29
  "version": "14.1.5-beta.0",
30
30
  "description": "Rename option swcrcPath to swcrc, and resolve relative to workspace root",
31
- "factory": "./src/migrations/update-14.1.5-beta.0/update-swcrc-path"
31
+ "factory": "./src/migrations/update-14-1-5/update-swcrc-path"
32
32
  }
33
33
  },
34
34
  "packageJsonUpdates": {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nrwl/js",
3
- "version": "14.7.6-beta.0",
4
- "description": "The Nx plugin that provides the best experience for developing JavaScript and TypeScript projects.",
3
+ "version": "14.7.6-beta.2",
4
+ "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/nrwl/nx.git",
@@ -31,10 +31,10 @@
31
31
  "executors": "./executors.json",
32
32
  "builders": "./executors.json",
33
33
  "dependencies": {
34
- "@nrwl/devkit": "14.7.6-beta.0",
35
- "@nrwl/jest": "14.7.6-beta.0",
36
- "@nrwl/linter": "14.7.6-beta.0",
37
- "@nrwl/workspace": "14.7.6-beta.0",
34
+ "@nrwl/devkit": "14.7.6-beta.2",
35
+ "@nrwl/jest": "14.7.6-beta.2",
36
+ "@nrwl/linter": "14.7.6-beta.2",
37
+ "@nrwl/workspace": "14.7.6-beta.2",
38
38
  "@parcel/watcher": "2.0.4",
39
39
  "chalk": "4.1.0",
40
40
  "fast-glob": "3.2.7",
@@ -45,5 +45,5 @@
45
45
  "source-map-support": "0.5.19",
46
46
  "tree-kill": "1.2.2"
47
47
  },
48
- "gitHead": "b6426fdb13c2dc5af4f1226de7413b295315c67c"
48
+ "gitHead": "08e7588d153cb8e8711a2998be7b665d2fa3940d"
49
49
  }
@@ -10,6 +10,10 @@
10
10
  "x-completion-type": "file",
11
11
  "x-completion-glob": "main@(.js|.ts|.jsx|.tsx)"
12
12
  },
13
+ "rootDir": {
14
+ "type": "string",
15
+ "description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project."
16
+ },
13
17
  "outputPath": {
14
18
  "type": "string",
15
19
  "description": "The output path of the generated files.",
@@ -1,6 +1,8 @@
1
1
  import { ExecutorContext } from '@nrwl/devkit';
2
+ import { TypeScriptCompilationOptions } from '@nrwl/workspace/src/utilities/typescript/compilation';
2
3
  import { ExecutorOptions, NormalizedExecutorOptions } from '../../utils/schema';
3
- export declare function normalizeOptions(options: ExecutorOptions, contextRoot: string, sourceRoot?: string, projectRoot?: string): NormalizedExecutorOptions;
4
+ export declare function normalizeOptions(options: ExecutorOptions, contextRoot: string, sourceRoot: string, projectRoot: string): NormalizedExecutorOptions;
5
+ export declare function createTypeScriptCompilationOptions(normalizedOptions: NormalizedExecutorOptions, context: ExecutorContext): TypeScriptCompilationOptions;
4
6
  export declare function tscExecutor(_options: ExecutorOptions, context: ExecutorContext): AsyncGenerator<{
5
7
  success: boolean;
6
8
  outfile: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tscExecutor = exports.normalizeOptions = void 0;
3
+ exports.tscExecutor = exports.createTypeScriptCompilationOptions = exports.normalizeOptions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const assets_1 = require("@nrwl/workspace/src/utilities/assets");
6
6
  const path_1 = require("path");
@@ -8,10 +8,14 @@ const check_dependencies_1 = require("../../utils/check-dependencies");
8
8
  const compiler_helper_dependency_1 = require("../../utils/compiler-helper-dependency");
9
9
  const copy_assets_handler_1 = require("../../utils/copy-assets-handler");
10
10
  const compile_typescript_files_1 = require("../../utils/typescript/compile-typescript-files");
11
+ const load_ts_transformers_1 = require("../../utils/typescript/load-ts-transformers");
11
12
  const update_package_json_1 = require("../../utils/update-package-json");
12
13
  const watch_for_single_file_changes_1 = require("../../utils/watch-for-single-file-changes");
13
14
  function normalizeOptions(options, contextRoot, sourceRoot, projectRoot) {
14
15
  const outputPath = (0, path_1.join)(contextRoot, options.outputPath);
16
+ const rootDir = options.rootDir
17
+ ? (0, path_1.join)(contextRoot, options.rootDir)
18
+ : projectRoot;
15
19
  if (options.watch == null) {
16
20
  options.watch = false;
17
21
  }
@@ -19,9 +23,28 @@ function normalizeOptions(options, contextRoot, sourceRoot, projectRoot) {
19
23
  return Object.assign(Object.assign({}, options), { root: contextRoot, sourceRoot,
20
24
  projectRoot,
21
25
  files,
22
- outputPath, tsConfig: (0, path_1.join)(contextRoot, options.tsConfig), mainOutputPath: (0, path_1.resolve)(outputPath, options.main.replace(`${projectRoot}/`, '').replace('.ts', '.js')) });
26
+ outputPath, tsConfig: (0, path_1.join)(contextRoot, options.tsConfig), rootDir, mainOutputPath: (0, path_1.resolve)(outputPath, options.main.replace(`${projectRoot}/`, '').replace('.ts', '.js')) });
23
27
  }
24
28
  exports.normalizeOptions = normalizeOptions;
29
+ function createTypeScriptCompilationOptions(normalizedOptions, context) {
30
+ const { compilerPluginHooks } = (0, load_ts_transformers_1.loadTsTransformers)(normalizedOptions.transformers);
31
+ const getCustomTransformers = (program) => ({
32
+ before: compilerPluginHooks.beforeHooks.map((hook) => hook(program)),
33
+ after: compilerPluginHooks.afterHooks.map((hook) => hook(program)),
34
+ afterDeclarations: compilerPluginHooks.afterDeclarationsHooks.map((hook) => hook(program)),
35
+ });
36
+ return {
37
+ outputPath: normalizedOptions.outputPath,
38
+ projectName: context.projectName,
39
+ projectRoot: normalizedOptions.projectRoot,
40
+ rootDir: normalizedOptions.rootDir,
41
+ tsConfig: normalizedOptions.tsConfig,
42
+ watch: normalizedOptions.watch,
43
+ deleteOutputPath: normalizedOptions.clean,
44
+ getCustomTransformers,
45
+ };
46
+ }
47
+ exports.createTypeScriptCompilationOptions = createTypeScriptCompilationOptions;
25
48
  function tscExecutor(_options, context) {
26
49
  return tslib_1.__asyncGenerator(this, arguments, function* tscExecutor_1() {
27
50
  const { sourceRoot, root } = context.workspace.projects[context.projectName];
@@ -50,7 +73,7 @@ function tscExecutor(_options, context) {
50
73
  process.on('SIGINT', () => handleTermination());
51
74
  process.on('SIGTERM', () => handleTermination());
52
75
  }
53
- return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, compile_typescript_files_1.compileTypeScriptFiles)(options, context, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
76
+ return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, compile_typescript_files_1.compileTypeScriptFiles)(options, createTypeScriptCompilationOptions(options, context), () => tslib_1.__awaiter(this, void 0, void 0, function* () {
54
77
  yield assetHandler.processAllAssetsOnce();
55
78
  (0, update_package_json_1.updatePackageJson)(options, context, target, dependencies);
56
79
  }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"tsc.impl.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/tsc/tsc.impl.ts"],"names":[],"mappings":";;;;AACA,iEAG8C;AAC9C,+BAAqC;AACrC,uEAAmE;AACnE,uFAGgD;AAChD,yEAAoE;AAEpE,8FAAyF;AACzF,yEAAoE;AACpE,6FAAsF;AAEtF,SAAgB,gBAAgB,CAC9B,OAAwB,EACxB,WAAmB,EACnB,UAAmB,EACnB,WAAoB;IAEpB,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,WAA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W,CAAC"}
1
+ {"version":3,"file":"tsc.impl.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/tsc/tsc.impl.ts"],"names":[],"mappings":";;;;AACA,iEAG8C;AAE9C,+BAAqC;AAOrC,uEAAmE;AACnE,uFAGgD;AAChD,yEAAoE;AAEpE,8FAAyF;AACzF,sFAAiF;AACjF,yEAAoE;AACpE,6FAAsF;AAEtF,SAAgB,gBAAgB,CAC9B,OAAwB,EACxB,WAAmB,EACnB,UAAkB,EAClB,WAAmB;IAEnB,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO;QAC7B,CAAC,CAAC,IAAA,WAAI,EAAC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC;QACpC,CAAC,CAAC,WAAW,CAAC;IAEhB,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE;QACzB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;KACvB;IAED,MAAM,KAAK,GAAsB,IAAA,0BAAiB,EAChD,OAAO,CAAC,MAAM,EACd,WAAW,EACX,UAAU,CACX,CAAC;IAEF,uCACK,OAAO,KACV,IAAI,EAAE,WAAW,EACjB,UAAU;QACV,WAAW;QACX,KAAK;QACL,UAAU,EACV,QAAQ,EAAE,IAAA,WAAI,EAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,EAC7C,OAAO,EACP,cAAc,EAAE,IAAA,cAAO,EACrB,UAAU,EACV,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAClE,IACD;AACJ,CAAC;AAnCD,4CAmCC;AAED,SAAgB,kCAAkC,CAChD,iBAA4C,EAC5C,OAAwB;IAExB,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,yCAAkB,EAChD,iBAAiB,CAA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,EACpD,GAAS,EAAE;YACT,MAAM,YAAY,CAAC,oBAAoB,EAAE,CAAC;YAC1C,IAAA,uCAAiB,EAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;QAC5D,CAAC,CAAA,CACF,CAAA,CAAA,CAAA,EAAC;IACJ,CAAC;CAAA;AA1DD,kCA0DC;AAED,kBAAe,WAAW,CAAC"}
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './utils/typescript/load-ts-transformers';
1
2
  export * from './utils/typescript/print-diagnostics';
2
3
  export * from './utils/typescript/run-type-check';
3
4
  export { libraryGenerator } from './generators/library/library';
package/src/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./utils/typescript/load-ts-transformers"), exports);
5
6
  tslib_1.__exportStar(require("./utils/typescript/print-diagnostics"), exports);
6
7
  tslib_1.__exportStar(require("./utils/typescript/run-type-check"), exports);
7
8
  var library_1 = require("./generators/library/library");
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/js/src/index.ts"],"names":[],"mappings":";;;;AAAA,+EAAqD;AACrD,4EAAkD;AAClD,wDAAgE;AAAvD,2GAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/js/src/index.ts"],"names":[],"mappings":";;;;AAAA,kFAAwD;AACxD,+EAAqD;AACrD,4EAAkD;AAClD,wDAAgE;AAAvD,2GAAA,gBAAgB,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-swcrc-path.js","sourceRoot":"","sources":["../../../../../../packages/js/src/migrations/update-14-1-5/update-swcrc-path.ts"],"names":[],"mappings":";;;;AAAA,yCAMsB;AACtB,iGAA8F;AAK9F,SAAsB,eAAe,CAAC,IAAU;;QAC9C,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,IAAA,+CAAsB,EACpB,IAAI,EACJ,cAAc,EACd,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE;YAChD,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAClE,MAAM,eAAe,GAA0B,iBAAiB;gBAC9D,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,iBAAiB,CAAC;gBACrE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;YAE9C,IAAI,CAAC,eAAe,CAAC,SAAS;gBAAE,OAAO;YAEvC,MAAM,YAAY,GAAG,IAAA,0BAAiB,EACpC,aAAa,CAAC,IAAI,EAClB,eAAe,CAAC,SAAS,CAC1B,CAAC;YAEF,OAAO,eAAe,CAAC,SAAS,CAAC;YACjC,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC;YAErC,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;YAE7D,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC,CACF,CAAC;QAEF,IAAI,WAAW,EAAE;YACf,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AA/BD,0CA+BC;AAED,kBAAe,eAAe,CAAC"}
@@ -34,6 +34,7 @@ export interface LibraryGeneratorSchema {
34
34
  export interface ExecutorOptions {
35
35
  assets: Array<AssetGlob | string>;
36
36
  main: string;
37
+ rootDir?: string;
37
38
  outputPath: string;
38
39
  tsConfig: string;
39
40
  swcrc?: string;
@@ -1,6 +1,6 @@
1
- import { ExecutorContext } from '@nrwl/devkit';
1
+ import { TypeScriptCompilationOptions } from '@nrwl/workspace/src/utilities/typescript/compilation';
2
2
  import { NormalizedExecutorOptions } from '../schema';
3
- export declare function compileTypeScriptFiles(normalizedOptions: NormalizedExecutorOptions, context: ExecutorContext, postCompilationCallback: () => void | Promise<void>): AsyncGenerator<{
3
+ export declare function compileTypeScriptFiles(normalizedOptions: NormalizedExecutorOptions, tscOptions: TypeScriptCompilationOptions, postCompilationCallback: () => void | Promise<void>): AsyncGenerator<{
4
4
  success: boolean;
5
5
  outfile: string;
6
6
  }, any, undefined>;
@@ -4,7 +4,6 @@ exports.compileTypeScriptFiles = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const compilation_1 = require("@nrwl/workspace/src/utilities/typescript/compilation");
6
6
  const create_async_iteratable_1 = require("../create-async-iterable/create-async-iteratable");
7
- const load_ts_transformers_1 = require("./load-ts-transformers");
8
7
  const TYPESCRIPT_FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES = 6194;
9
8
  // Typescript diagnostic message for 6194: Found {0} errors. Watching for file changes.
10
9
  // https://github.com/microsoft/TypeScript/blob/d45012c5e2ab122919ee4777a7887307c5f4a1e0/src/compiler/diagnosticMessages.json#L4763-L4766
@@ -12,27 +11,12 @@ const ERROR_COUNT_REGEX = /Found (\d+) errors/;
12
11
  function getErrorCountFromMessage(messageText) {
13
12
  return Number.parseInt(ERROR_COUNT_REGEX.exec(messageText)[1]);
14
13
  }
15
- function compileTypeScriptFiles(normalizedOptions, context, postCompilationCallback) {
14
+ function compileTypeScriptFiles(normalizedOptions, tscOptions, postCompilationCallback) {
16
15
  return tslib_1.__asyncGenerator(this, arguments, function* compileTypeScriptFiles_1() {
17
16
  const getResult = (success) => ({
18
17
  success,
19
18
  outfile: normalizedOptions.mainOutputPath,
20
19
  });
21
- const { compilerPluginHooks } = (0, load_ts_transformers_1.loadTsTransformers)(normalizedOptions.transformers);
22
- const getCustomTransformers = (program) => ({
23
- before: compilerPluginHooks.beforeHooks.map((hook) => hook(program)),
24
- after: compilerPluginHooks.afterHooks.map((hook) => hook(program)),
25
- afterDeclarations: compilerPluginHooks.afterDeclarationsHooks.map((hook) => hook(program)),
26
- });
27
- const tscOptions = {
28
- outputPath: normalizedOptions.outputPath,
29
- projectName: context.projectName,
30
- projectRoot: normalizedOptions.projectRoot,
31
- tsConfig: normalizedOptions.tsConfig,
32
- watch: normalizedOptions.watch,
33
- deleteOutputPath: normalizedOptions.clean,
34
- getCustomTransformers,
35
- };
36
20
  return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, create_async_iteratable_1.createAsyncIterable)(({ next, done }) => tslib_1.__awaiter(this, void 0, void 0, function* () {
37
21
  if (normalizedOptions.watch) {
38
22
  (0, compilation_1.compileTypeScriptWatcher)(tscOptions, (d) => tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"compile-typescript-files.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/typescript/compile-typescript-files.ts"],"names":[],"mappings":";;;;AACA,sFAI8D;AAQ9D,8FAAuF;AAEvF,iEAA4D;AAE5D,MAAM,mDAAmD,GAAG,IAAI,CAAC;AACjE,uFAAuF;AACvF,yIAAyI;AACzI,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAE/C,SAAS,wBAAwB,CAAC,WAAmB;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,SAAuB,sBAAsB,CAC3C,iBAA4C,EAC5C,OAAwB,EACxB,uBAAmD;;QAEnD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO;YACP,OAAO,EAAE,iBAAiB,CAAC,cAAc;SAC1C,CAAC,CAAC;QAEH,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,yCAAkB,EAChD,iBAAiB,CAAC,YAAY,CAC/B,CAAC;QAEF,MAAM,qBAAqB,GAAG,CAAC,OAAgB,EAAsB,EAAE,CAAC,CAAC;YACvE,MAAM,EAAE,mBAAmB,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AS,CAAC,OAAO,CAAC,CAAC,CAAC;gBACzB,IAAI,EAAE,CAAC;aACR;QACH,CAAC,CAAA,CACF,CAAA,CAAA,CAAA,EAAC;IACJ,CAAC;CAAA;AAvDD,wDAuDC"}
1
+ {"version":3,"file":"compile-typescript-files.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/typescript/compile-typescript-files.ts"],"names":[],"mappings":";;;;AAAA,sFAI8D;AAE9D,8FAAuF;AAGvF,MAAM,mDAAmD,GAAG,IAAI,CAAC;AACjE,uFAAuF;AACvF,yIAAyI;AACzI,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAE/C,SAAS,wBAAwB,CAAC,WAAmB;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,SAAuB,sBAAsB,CAC3C,iBAA4C,EAC5C,UAAwC,EACxC,uBAAmD;;QAEnD,MAAM,SAAS,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO;YACP,OAAO,EAAE,iBAAiB,CAAC,cAAc;SAC1C,CAAC,CAAC;QAEH,6BAAO,sBAAA,KAAK,CAAC,CAAC,yBAAA,sBAAA,IAAA,6CAAmB,EAC/B,CAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;YACvB,IAAI,iBAAiB,CAAC,KAAK,EAAE;gBAC3B,IAAA,sCAAwB,EAAC,UAAU,EAAE,CAAO,CAAa,EAAE,EAAE;oBAC3D,IAAI,CAAC,CAAC,IAAI,KAAK,mDAAmD,EAAE;wBAClE,MAAM,uBAAuB,EAAE,CAAC;wBAChC,IAAI,CACF,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC,WAAqB,CAAC,KAAK,CAAC,CAAC,CACnE,CAAC;qBACH;gBACH,CAAC,CAAA,CAAC,CAAC;aACJ;iBAAM;gBACL,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,+BAAiB,EAAC,UAAU,CAAC,CAAC;gBAClD,MAAM,uBAAuB,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;gBACzB,IAAI,EAAE,CAAC;aACR;QACH,CAAC,CAAA,CACF,CAAA,CAAA,CAAA,EAAC;IACJ,CAAC;CAAA;AA7BD,wDA6BC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-swcrc-path.js","sourceRoot":"","sources":["../../../../../../packages/js/src/migrations/update-14.1.5-beta.0/update-swcrc-path.ts"],"names":[],"mappings":";;;;AAAA,yCAMsB;AACtB,iGAA8F;AAK9F,SAAsB,eAAe,CAAC,IAAU;;QAC9C,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,IAAA,+CAAsB,EACpB,IAAI,EACJ,cAAc,EACd,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE;YAChD,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YAClE,MAAM,eAAe,GAA0B,iBAAiB;gBAC9D,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,iBAAiB,CAAC;gBACrE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;YAE9C,IAAI,CAAC,eAAe,CAAC,SAAS;gBAAE,OAAO;YAEvC,MAAM,YAAY,GAAG,IAAA,0BAAiB,EACpC,aAAa,CAAC,IAAI,EAClB,eAAe,CAAC,SAAS,CAC1B,CAAC;YAEF,OAAO,eAAe,CAAC,SAAS,CAAC;YACjC,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC;YAErC,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;YAE7D,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC,CACF,CAAC;QAEF,IAAI,WAAW,EAAE;YACf,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AA/BD,0CA+BC;AAED,kBAAe,eAAe,CAAC"}