@angular-builders/custom-webpack 18.0.0-beta.1 → 18.0.0-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/README.md CHANGED
@@ -33,6 +33,7 @@ Allow customizing build configuration without ejecting webpack configuration (`n
33
33
  <details>
34
34
  <summary>Click to expand</summary>
35
35
 
36
+ - [Version 17](https://github.com/just-jeb/angular-builders/blob/17.x.x/packages/custom-webpack/README.md)
36
37
  - [Version 16](https://github.com/just-jeb/angular-builders/blob/16.x.x/packages/custom-webpack/README.md)
37
38
  - [Version 15](https://github.com/just-jeb/angular-builders/blob/15.x.x/packages/custom-webpack/README.md)
38
39
  - [Version 14](https://github.com/just-jeb/angular-builders/blob/14.x.x/packages/custom-webpack/README.md)
@@ -50,7 +51,7 @@ Allow customizing build configuration without ejecting webpack configuration (`n
50
51
 
51
52
  ## Prerequisites:
52
53
 
53
- - [Angular CLI 17](https://www.npmjs.com/package/@angular/cli)
54
+ - [Angular CLI 18](https://www.npmjs.com/package/@angular/cli)
54
55
 
55
56
  # Usage
56
57
 
@@ -279,8 +279,7 @@
279
279
  },
280
280
  "deployUrl": {
281
281
  "type": "string",
282
- "description": "URL where files will be deployed.",
283
- "x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
282
+ "description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
284
283
  },
285
284
  "verbose": {
286
285
  "type": "boolean",
@@ -445,7 +444,7 @@
445
444
  ]
446
445
  },
447
446
  "allowedCommonJsDependencies": {
448
- "description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
447
+ "description": "A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use `'*'` to allow all.",
449
448
  "type": "array",
450
449
  "items": {
451
450
  "type": "string"
@@ -535,14 +534,14 @@
535
534
  },
536
535
  "output": {
537
536
  "type": "string",
537
+ "default": "",
538
538
  "description": "Absolute path within the output."
539
539
  }
540
540
  },
541
541
  "additionalProperties": false,
542
542
  "required": [
543
543
  "glob",
544
- "input",
545
- "output"
544
+ "input"
546
545
  ]
547
546
  },
548
547
  {
@@ -557,11 +556,11 @@
557
556
  "properties": {
558
557
  "src": {
559
558
  "type": "string",
560
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
559
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
561
560
  },
562
561
  "replaceWith": {
563
562
  "type": "string",
564
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
563
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
565
564
  }
566
565
  },
567
566
  "additionalProperties": false,
@@ -575,11 +574,11 @@
575
574
  "properties": {
576
575
  "replace": {
577
576
  "type": "string",
578
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
577
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
579
578
  },
580
579
  "with": {
581
580
  "type": "string",
582
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
581
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
583
582
  }
584
583
  },
585
584
  "additionalProperties": false,
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CustomWebpackBuilder = exports.defaultWebpackConfigPath = void 0;
13
+ const path = require("node:path");
13
14
  const util_1 = require("util");
14
15
  const core_1 = require("@angular-devkit/core");
15
16
  const lodash_1 = require("lodash");
16
- const utils_1 = require("./utils");
17
+ const common_1 = require("@angular-builders/common");
17
18
  const webpack_config_merger_1 = require("./webpack-config-merger");
18
19
  exports.defaultWebpackConfigPath = 'webpack.config.js';
19
20
  class CustomWebpackBuilder {
@@ -22,10 +23,10 @@ class CustomWebpackBuilder {
22
23
  if (!config) {
23
24
  return baseWebpackConfig;
24
25
  }
25
- const webpackConfigPath = config.path || exports.defaultWebpackConfigPath;
26
- const path = `${(0, core_1.getSystemPath)(root)}/${webpackConfigPath}`;
27
- const tsConfig = `${(0, core_1.getSystemPath)(root)}/${buildOptions.tsConfig}`;
28
- const configOrFactoryOrPromise = yield resolveCustomWebpackConfig(path, tsConfig, logger);
26
+ const normalizedRootPath = (0, core_1.getSystemPath)(root);
27
+ const tsConfig = path.join(normalizedRootPath, buildOptions.tsConfig);
28
+ const webpackConfigPath = path.join(normalizedRootPath, config.path || exports.defaultWebpackConfigPath);
29
+ const configOrFactoryOrPromise = yield (0, common_1.loadModule)(webpackConfigPath, tsConfig, logger);
29
30
  if (typeof configOrFactoryOrPromise === 'function') {
30
31
  // The exported function can return a new configuration synchronously
31
32
  // or return a promise that resolves to a new configuration.
@@ -47,12 +48,6 @@ class CustomWebpackBuilder {
47
48
  }
48
49
  }
49
50
  exports.CustomWebpackBuilder = CustomWebpackBuilder;
50
- function resolveCustomWebpackConfig(path, tsConfig, logger) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- (0, utils_1.tsNodeRegister)(path, tsConfig, logger);
53
- return (0, utils_1.loadModule)(path);
54
- });
55
- }
56
51
  function logConfigProperties(config, webpackConfig, logger) {
57
52
  var _a;
58
53
  // There's no reason to log the entire configuration object
@@ -1 +1 @@
1
- {"version":3,"file":"custom-webpack-builder.js","sourceRoot":"","sources":["../src/custom-webpack-builder.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAA+B;AAC/B,+CAAoE;AACpE,mCAA6B;AAK7B,mCAAqD;AACrD,mEAAuD;AAE1C,QAAA,wBAAwB,GAAG,mBAAmB,CAAC;AAgB5D,MAAa,oBAAoB;IAC/B,MAAM,CAAO,kBAAkB,CAC7B,IAAU,EACV,MAAyC,EACzC,iBAAgC,EAChC,YAAiB,EACjB,aAA4B,EAC5B,MAAyB;;YAEzB,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,iBAAiB,CAAC;aAC1B;YAED,MAAM,iBAAiB,GAAG,MAAM,CAA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M,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -13,7 +13,7 @@
13
13
  "buildTarget": {
14
14
  "type": "string",
15
15
  "description": "A build builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
16
- "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
16
+ "pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$"
17
17
  },
18
18
  "port": {
19
19
  "type": "number",
@@ -69,11 +69,11 @@
69
69
  },
70
70
  "publicHost": {
71
71
  "type": "string",
72
- "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
72
+ "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders."
73
73
  },
74
74
  "allowedHosts": {
75
75
  "type": "array",
76
- "description": "List of hosts that are allowed to access the dev server.",
76
+ "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders.",
77
77
  "default": [],
78
78
  "items": {
79
79
  "type": "string"
@@ -85,7 +85,7 @@
85
85
  },
86
86
  "disableHostCheck": {
87
87
  "type": "boolean",
88
- "description": "Don't verify connected clients are part of allowed hosts.",
88
+ "description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders.",
89
89
  "default": false
90
90
  },
91
91
  "hmr": {
@@ -106,6 +106,30 @@
106
106
  "type": "boolean",
107
107
  "description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.",
108
108
  "default": false
109
+ },
110
+ "prebundle": {
111
+ "description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders.",
112
+ "oneOf": [
113
+ {
114
+ "type": "boolean"
115
+ },
116
+ {
117
+ "type": "object",
118
+ "properties": {
119
+ "exclude": {
120
+ "description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.",
121
+ "type": "array",
122
+ "items": {
123
+ "type": "string"
124
+ }
125
+ }
126
+ },
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "exclude"
130
+ ]
131
+ }
132
+ ]
109
133
  }
110
134
  },
111
135
  "additionalProperties": false,
@@ -13,7 +13,7 @@
13
13
  "buildTarget": {
14
14
  "type": "string",
15
15
  "description": "A builder target to extract i18n messages in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
16
- "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
16
+ "pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$"
17
17
  },
18
18
  "format": {
19
19
  "type": "string",
@@ -46,17 +46,5 @@
46
46
  }
47
47
  },
48
48
  "additionalProperties": false,
49
- "anyOf": [
50
- {
51
- "required": [
52
- "buildTarget"
53
- ]
54
- },
55
- {
56
- "required": [
57
- "browserTarget"
58
- ]
59
- }
60
- ],
61
49
  "$id": "BuildCustomWebpackExtractI18nSchema"
62
50
  }
@@ -1,6 +1,6 @@
1
1
  import { BuilderContext, BuilderHandlerFn } from '@angular-devkit/architect';
2
2
  import { ExecutionTransformer } from '@angular-devkit/build-angular';
3
- import { IndexHtmlTransform } from '@angular-devkit/build-angular/src/utils/index-file/index-html-generator';
3
+ import type { IndexHtmlTransform } from '@angular/build/src/utils/index-file/index-html-generator';
4
4
  import { Configuration } from 'webpack';
5
5
  import { json } from '@angular-devkit/core';
6
6
  export interface BrowserTargetOptions {
@@ -16,8 +16,8 @@ const operators_1 = require("rxjs/operators");
16
16
  const transform_factories_1 = require("./transform-factories");
17
17
  const executeBrowserBasedBuilder = (executebBuilder) => (options, context) => {
18
18
  function setup() {
19
- var _a;
20
19
  return __awaiter(this, void 0, void 0, function* () {
20
+ var _a;
21
21
  const browserTarget = (0, architect_1.targetFromTargetString)(
22
22
  // `browserTarget` has been deprecated.
23
23
  (_a = options.buildTarget) !== null && _a !== void 0 ? _a : options.browserTarget);
@@ -1 +1 @@
1
- {"version":3,"file":"generic-browser-builder.js","sourceRoot":"","sources":["../src/generic-browser-builder.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAImC;AAGnC,+BAA4B;AAC5B,8CAA2C;AAG3C,+DAAsD;AAiB/C,MAAM,0BAA0B,GACrC,CACE,eAAmC,EACd,EAAE,CACzB,CAAC,OAAU,EAAE,OAAuB,EAAsC,EAAE;IAC1E,SAAe,KAAK;;;YAClB,MAAM,aAAa,GAAG,IAAA,kCAAsB;YAC1C,uCAAuC;YACvC,MAAA,OAAO,CAAC,WAAW,mCAAI,OAAO,CAAC,aAAc,CAC9C,CAAC;YACF,OAAO,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAmC,CAAC;;KAClF;IAED,OAAO,IAAA,WAAI,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CACvB,IAAA,qBAAS,EAAC,oBAAoB,CAAC,EAAE,CAC/B,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAA,mCAAa,EAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAChF,CACF,CAAC;AACJ,CAAC,CAAC;AAlBS,QAAA,0BAA0B,8BAkBnC"}
1
+ {"version":3,"file":"generic-browser-builder.js","sourceRoot":"","sources":["../src/generic-browser-builder.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAImC;AAGnC,+BAA4B;AAC5B,8CAA2C;AAG3C,+DAAsD;AAiB/C,MAAM,0BAA0B,GACrC,CACE,eAAmC,EACd,EAAE,CACzB,CAAC,OAAU,EAAE,OAAuB,EAAsC,EAAE;IAC1E,SAAe,KAAK;;;YAClB,MAAM,aAAa,GAAG,IAAA,kCAAsB;YAC1C,uCAAuC;YACvC,MAAA,OAAO,CAAC,WAAW,mCAAI,OAAO,CAAC,aAAc,CAC9C,CAAC;YACF,OAAO,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAmC,CAAC;QACnF,CAAC;KAAA;IAED,OAAO,IAAA,WAAI,EAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CACvB,IAAA,qBAAS,EAAC,oBAAoB,CAAC,EAAE,CAC/B,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAA,mCAAa,EAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAChF,CACF,CAAC;AACJ,CAAC,CAAC;AAlBS,QAAA,0BAA0B,8BAkBnC"}
@@ -210,8 +210,18 @@
210
210
  "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
211
211
  },
212
212
  "browsers": {
213
- "type": "string",
214
- "description": "Override which browsers tests are run against."
213
+ "description": "Override which browsers tests are run against. Set to `false` to not use any browser.",
214
+ "oneOf": [
215
+ {
216
+ "type": "string",
217
+ "description": "A comma seperate list of browsers to run tests against."
218
+ },
219
+ {
220
+ "const": false,
221
+ "type": "boolean",
222
+ "description": "Does use run tests against a browser."
223
+ }
224
+ ]
215
225
  },
216
226
  "codeCoverage": {
217
227
  "type": "boolean",
@@ -346,6 +356,7 @@
346
356
  },
347
357
  "output": {
348
358
  "type": "string",
359
+ "default": "",
349
360
  "description": "Absolute path within the output."
350
361
  },
351
362
  "ignore": {
@@ -359,8 +370,7 @@
359
370
  "additionalProperties": false,
360
371
  "required": [
361
372
  "glob",
362
- "input",
363
- "output"
373
+ "input"
364
374
  ]
365
375
  },
366
376
  {
@@ -126,8 +126,7 @@
126
126
  },
127
127
  "deployUrl": {
128
128
  "type": "string",
129
- "description": "URL where files will be deployed.",
130
- "x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
129
+ "description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
131
130
  },
132
131
  "vendorChunk": {
133
132
  "type": "boolean",
@@ -321,14 +320,14 @@
321
320
  },
322
321
  "output": {
323
322
  "type": "string",
323
+ "default": "",
324
324
  "description": "Absolute path within the output."
325
325
  }
326
326
  },
327
327
  "additionalProperties": false,
328
328
  "required": [
329
329
  "glob",
330
- "input",
331
- "output"
330
+ "input"
332
331
  ]
333
332
  },
334
333
  {
@@ -343,11 +342,11 @@
343
342
  "properties": {
344
343
  "src": {
345
344
  "type": "string",
346
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
345
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
347
346
  },
348
347
  "replaceWith": {
349
348
  "type": "string",
350
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
349
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
351
350
  }
352
351
  },
353
352
  "additionalProperties": false,
@@ -361,11 +360,11 @@
361
360
  "properties": {
362
361
  "replace": {
363
362
  "type": "string",
364
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
363
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
365
364
  },
366
365
  "with": {
367
366
  "type": "string",
368
- "pattern": "\\.(([cm]?j|t)sx?|json)$"
367
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
369
368
  }
370
369
  },
371
370
  "additionalProperties": false,
@@ -1,6 +1,6 @@
1
1
  import { BuilderContext } from '@angular-devkit/architect';
2
2
  import { ExecutionTransformer } from '@angular-devkit/build-angular';
3
- import { IndexHtmlTransform } from '@angular-devkit/build-angular/src/utils/index-file/index-html-generator';
3
+ import type { IndexHtmlTransform } from '@angular/build/src/utils/index-file/index-html-generator';
4
4
  import { Configuration } from 'webpack';
5
5
  import { CustomWebpackSchema } from './custom-webpack-schema';
6
6
  export declare const customWebpackConfigTransformFactory: (options: CustomWebpackSchema, context: BuilderContext) => ExecutionTransformer<Configuration>;
@@ -10,19 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getTransforms = exports.indexHtmlTransformFactory = exports.customWebpackConfigTransformFactory = void 0;
13
+ const path = require("node:path");
13
14
  const core_1 = require("@angular-devkit/core");
15
+ const common_1 = require("@angular-builders/common");
14
16
  const custom_webpack_builder_1 = require("./custom-webpack-builder");
15
- const utils_1 = require("./utils");
16
17
  const customWebpackConfigTransformFactory = (options, { workspaceRoot, target, logger }) => browserWebpackConfig => {
17
18
  return custom_webpack_builder_1.CustomWebpackBuilder.buildWebpackConfig((0, core_1.normalize)(workspaceRoot), options.customWebpackConfig, browserWebpackConfig, options, target, logger);
18
19
  };
19
20
  exports.customWebpackConfigTransformFactory = customWebpackConfigTransformFactory;
20
- const indexHtmlTransformFactory = ({ indexTransform, tsConfig }, { workspaceRoot, target, logger }) => {
21
- if (!indexTransform)
21
+ const indexHtmlTransformFactory = (options, { workspaceRoot, target, logger }) => {
22
+ if (!options.indexTransform)
22
23
  return null;
23
- (0, utils_1.tsNodeRegister)(indexTransform, `${(0, core_1.getSystemPath)((0, core_1.normalize)(workspaceRoot))}/${tsConfig}`, logger);
24
+ const transformPath = path.join((0, core_1.getSystemPath)((0, core_1.normalize)(workspaceRoot)), options.indexTransform);
25
+ const tsConfig = path.join((0, core_1.getSystemPath)((0, core_1.normalize)(workspaceRoot)), options.tsConfig);
24
26
  return (indexHtml) => __awaiter(void 0, void 0, void 0, function* () {
25
- const transform = yield (0, utils_1.loadModule)(`${(0, core_1.getSystemPath)((0, core_1.normalize)(workspaceRoot))}/${indexTransform}`);
27
+ const transform = yield (0, common_1.loadModule)(transformPath, tsConfig, logger);
26
28
  return transform(target, indexHtml);
27
29
  });
28
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"transform-factories.js","sourceRoot":"","sources":["../src/transform-factories.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,+CAAgE;AAEhE,qEAAgE;AAEhE,mCAAqD;AAM9C,MAAM,mCAAmC,GAI9C,CAAC,OAAO,EAAE,EAAE,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CAAC,CAAC,CAAC,EAAE,CACtD,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,cAAK,EAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAChF,CAAC;QACJ,CAAC;QACD,YAAY,CAAC,OAAO,GAAG,CAAC,GAAG,gBAAgB,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAvBD,oCAuBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-builders/custom-webpack",
3
- "version": "18.0.0-beta.1",
3
+ "version": "18.0.0-beta.2",
4
4
  "description": "Custom webpack builders for Angular build facade. Allow to modify Angular build configuration without ejecting it",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -40,21 +40,21 @@
40
40
  },
41
41
  "builders": "builders.json",
42
42
  "dependencies": {
43
- "@angular-devkit/architect": ">=0.1700.0 < 0.1800.0",
44
- "@angular-devkit/build-angular": "^17.0.0",
45
- "@angular-devkit/core": "^17.0.0",
43
+ "@angular-builders/common": "workspace:*",
44
+ "@angular-devkit/architect": ">=0.1800.0 < 0.1900.0",
45
+ "@angular-devkit/build-angular": "^18.0.0",
46
+ "@angular-devkit/core": "^18.0.0",
46
47
  "lodash": "^4.17.15",
47
- "ts-node": "^10.0.0",
48
- "tsconfig-paths": "^4.1.0",
49
48
  "webpack-merge": "^5.7.3"
50
49
  },
51
50
  "peerDependencies": {
52
- "@angular/compiler-cli": "^17.0.0"
51
+ "@angular/compiler-cli": "^18.0.0"
53
52
  },
54
53
  "devDependencies": {
54
+ "@angular/build": "^18.0.0",
55
55
  "jest": "29.7.0",
56
56
  "rimraf": "^5.0.0",
57
- "typescript": "5.2.2"
58
- },
59
- "gitHead": "d6e889ad444c29581521fc54295a3268d1e422ab"
57
+ "ts-node": "^10.0.0",
58
+ "typescript": "5.4.5"
59
+ }
60
60
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Evgeny Barabanov
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/utils.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { logging } from '@angular-devkit/core';
2
- /**
3
- * check for TS node registration
4
- * @param file: file name or file directory are allowed
5
- * @todo tsNodeRegistration: require ts-node if file extension is TypeScript
6
- */
7
- export declare function tsNodeRegister(file: string, tsConfig: string, logger: logging.LoggerApi): void;
8
- /**
9
- * Loads CJS and ESM modules based on extension
10
- * @param path path to the module
11
- * @returns
12
- */
13
- export declare function loadModule<T>(path: string): Promise<T>;
package/dist/utils.js DELETED
@@ -1,141 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.loadModule = exports.tsNodeRegister = void 0;
13
- const path_1 = require("path");
14
- const url_1 = require("url");
15
- const _tsNodeRegister = (() => {
16
- let lastTsConfig;
17
- return (tsConfig, logger) => {
18
- // Check if the function was previously called with the same tsconfig
19
- if (lastTsConfig && lastTsConfig !== tsConfig) {
20
- logger.warn(`Trying to register ts-node again with a different tsconfig - skipping the registration.
21
- tsconfig 1: ${lastTsConfig}
22
- tsconfig 2: ${tsConfig}`);
23
- }
24
- if (lastTsConfig) {
25
- return;
26
- }
27
- lastTsConfig = tsConfig;
28
- loadTsNode().register({
29
- project: tsConfig,
30
- compilerOptions: {
31
- module: 'CommonJS',
32
- types: [
33
- 'node', // NOTE: `node` is added because users scripts can also use pure node's packages as webpack or others
34
- ],
35
- },
36
- });
37
- const tsConfigPaths = loadTsConfigPaths();
38
- const result = tsConfigPaths.loadConfig(tsConfig);
39
- // The `loadConfig` returns a `ConfigLoaderResult` which must be guarded with
40
- // the `resultType` check.
41
- if (result.resultType === 'success') {
42
- const { absoluteBaseUrl: baseUrl, paths } = result;
43
- if (baseUrl && paths) {
44
- tsConfigPaths.register({ baseUrl, paths });
45
- }
46
- }
47
- };
48
- })();
49
- /**
50
- * check for TS node registration
51
- * @param file: file name or file directory are allowed
52
- * @todo tsNodeRegistration: require ts-node if file extension is TypeScript
53
- */
54
- function tsNodeRegister(file = '', tsConfig, logger) {
55
- if (file === null || file === void 0 ? void 0 : file.endsWith('.ts')) {
56
- // Register TS compiler lazily
57
- _tsNodeRegister(tsConfig, logger);
58
- }
59
- }
60
- exports.tsNodeRegister = tsNodeRegister;
61
- /**
62
- * This uses a dynamic import to load a module which may be ESM.
63
- * CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript
64
- * will currently, unconditionally downlevel dynamic import into a require call.
65
- * require calls cannot load ESM code and will result in a runtime error. To workaround
66
- * this, a Function constructor is used to prevent TypeScript from changing the dynamic import.
67
- * Once TypeScript provides support for keeping the dynamic import this workaround can
68
- * be dropped.
69
- *
70
- * @param modulePath The path of the module to load.
71
- * @returns A Promise that resolves to the dynamically imported module.
72
- */
73
- function loadEsmModule(modulePath) {
74
- return new Function('modulePath', `return import(modulePath);`)(modulePath);
75
- }
76
- /**
77
- * Loads CJS and ESM modules based on extension
78
- * @param path path to the module
79
- * @returns
80
- */
81
- function loadModule(path) {
82
- return __awaiter(this, void 0, void 0, function* () {
83
- switch ((0, path_1.extname)(path)) {
84
- case '.mjs':
85
- // Load the ESM configuration file using the TypeScript dynamic import workaround.
86
- // Once TypeScript provides support for keeping the dynamic import this workaround can be
87
- // changed to a direct dynamic import.
88
- return (yield loadEsmModule((0, url_1.pathToFileURL)(path))).default;
89
- case '.cjs':
90
- return require(path);
91
- case '.ts':
92
- try {
93
- // If it's a TS file then there are 2 cases for exporing an object.
94
- // The first one is `export blah`, transpiled into `module.exports = { blah} `.
95
- // The second is `export default blah`, transpiled into `{ default: { ... } }`.
96
- return require(path).default || require(path);
97
- }
98
- catch (e) {
99
- if (e.code === 'ERR_REQUIRE_ESM') {
100
- // Load the ESM configuration file using the TypeScript dynamic import workaround.
101
- // Once TypeScript provides support for keeping the dynamic import this workaround can be
102
- // changed to a direct dynamic import.
103
- return (yield loadEsmModule((0, url_1.pathToFileURL)(path))).default;
104
- }
105
- throw e;
106
- }
107
- //.js
108
- default:
109
- // The file could be either CommonJS or ESM.
110
- // CommonJS is tried first then ESM if loading fails.
111
- try {
112
- return require(path);
113
- }
114
- catch (e) {
115
- if (e.code === 'ERR_REQUIRE_ESM') {
116
- // Load the ESM configuration file using the TypeScript dynamic import workaround.
117
- // Once TypeScript provides support for keeping the dynamic import this workaround can be
118
- // changed to a direct dynamic import.
119
- return (yield loadEsmModule((0, url_1.pathToFileURL)(path))).default;
120
- }
121
- throw e;
122
- }
123
- }
124
- });
125
- }
126
- exports.loadModule = loadModule;
127
- /**
128
- * Loads `ts-node` lazily. Moved to a separate function to declare
129
- * a return type, more readable than an inline variant.
130
- */
131
- function loadTsNode() {
132
- return require('ts-node');
133
- }
134
- /**
135
- * Loads `tsconfig-paths` lazily. Moved to a separate function to declare
136
- * a return type, more readable than an inline variant.
137
- */
138
- function loadTsConfigPaths() {
139
- return require('tsconfig-paths');
140
- }
141
- //# sourceMappingURL=utils.js.map
package/dist/utils.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+BAA+B;AAC/B,6BAAoC;AAEpC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;IAC5B,IAAI,YAAgC,CAAC;IACrC,OAAO,CAAC,QAAgB,EAAE,MAAyB,EAAE,EAAE;QACrD,qEAAqE;QACrE,IAAI,YAAY,IAAI,YAAY,KAAK,QAAQ,EAAE;YAC7C,MAAM,CAAC,IAAI,CAAC;iCACe,YAAY;iCACZ,QAAQ,EAAE,CAAC,CAAC;SACxC;QAED,IAAI,YAAY,EAAE;YAChB,OAAO;SACR;QAED,YAAY,GAAG,QAAQ,CAAC;QAExB,UAAU,EAAE,CAAC,QAAQ,CAAC;YACpB,OAAO,EAAE,QAAQ;YACjB,eAAe,EAAE;gBACf,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE;oBACL,MAAM,EAAE,qGAAqG;iBAC9G;aACF;SACF,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,iBAAiB,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClD,6EAA6E;QAC7E,0BAA0B;QAC1B,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