@angular-builders/custom-esbuild 21.0.3 → 21.1.0-beta.0
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/package.json +3 -4
- package/dist/application/index.d.ts +0 -9
- package/dist/application/index.js +0 -56
- package/dist/application/index.js.map +0 -1
- package/dist/application/schema.json +0 -815
- package/dist/custom-esbuild-schema.d.ts +0 -15
- package/dist/custom-esbuild-schema.js +0 -3
- package/dist/custom-esbuild-schema.js.map +0 -1
- package/dist/dev-server/index.d.ts +0 -8
- package/dist/dev-server/index.js +0 -70
- package/dist/dev-server/index.js.map +0 -1
- package/dist/dev-server/patch-builder-context.d.ts +0 -2
- package/dist/dev-server/patch-builder-context.js +0 -39
- package/dist/dev-server/patch-builder-context.js.map +0 -1
- package/dist/dev-server/schema.json +0 -158
- package/dist/dev-server/types.d.ts +0 -2
- package/dist/dev-server/types.js +0 -3
- package/dist/dev-server/types.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -20
- package/dist/index.js.map +0 -1
- package/dist/load-index-html-transformer.d.ts +0 -4
- package/dist/load-index-html-transformer.js +0 -9
- package/dist/load-index-html-transformer.js.map +0 -1
- package/dist/load-plugins.d.ts +0 -5
- package/dist/load-plugins.js +0 -57
- package/dist/load-plugins.js.map +0 -1
- package/dist/unit-test/index.d.ts +0 -9
- package/dist/unit-test/index.js +0 -59
- package/dist/unit-test/index.js.map +0 -1
- package/dist/unit-test/schema.json +0 -322
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ApplicationBuilderOptions, DevServerBuilderOptions, UnitTestBuilderOptions } from '@angular/build';
|
|
2
|
-
export type PluginConfig = string | {
|
|
3
|
-
path: string;
|
|
4
|
-
options?: Record<string, unknown>;
|
|
5
|
-
};
|
|
6
|
-
export type CustomEsbuildApplicationSchema = ApplicationBuilderOptions & {
|
|
7
|
-
plugins?: PluginConfig[];
|
|
8
|
-
indexHtmlTransformer?: string;
|
|
9
|
-
};
|
|
10
|
-
export type CustomEsbuildDevServerSchema = DevServerBuilderOptions & {
|
|
11
|
-
middlewares?: string[];
|
|
12
|
-
};
|
|
13
|
-
export type CustomEsbuildUnitTestSchema = Omit<UnitTestBuilderOptions, 'runner'> & {
|
|
14
|
-
plugins?: PluginConfig[];
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-esbuild-schema.js","sourceRoot":"","sources":["../src/custom-esbuild-schema.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BuilderContext } from '@angular-devkit/architect';
|
|
2
|
-
import { DevServerBuilderOptions, DevServerBuilderOutput } from '@angular/build';
|
|
3
|
-
import { json } from '@angular-devkit/core';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { CustomEsbuildDevServerSchema } from '../custom-esbuild-schema';
|
|
6
|
-
export declare function executeCustomDevServerBuilder(options: CustomEsbuildDevServerSchema, context: BuilderContext): Observable<DevServerBuilderOutput>;
|
|
7
|
-
declare const _default: import("@angular-devkit/architect").Builder<DevServerBuilderOptions & json.JsonObject>;
|
|
8
|
-
export default _default;
|
package/dist/dev-server/index.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.executeCustomDevServerBuilder = executeCustomDevServerBuilder;
|
|
37
|
-
const path = __importStar(require("node:path"));
|
|
38
|
-
const architect_1 = require("@angular-devkit/architect");
|
|
39
|
-
const build_1 = require("@angular/build");
|
|
40
|
-
const core_1 = require("@angular-devkit/core");
|
|
41
|
-
const rxjs_1 = require("rxjs");
|
|
42
|
-
const common_1 = require("@angular-builders/common");
|
|
43
|
-
const load_plugins_1 = require("../load-plugins");
|
|
44
|
-
const patch_builder_context_1 = require("./patch-builder-context");
|
|
45
|
-
const load_index_html_transformer_1 = require("../load-index-html-transformer");
|
|
46
|
-
function executeCustomDevServerBuilder(options, context) {
|
|
47
|
-
const buildTarget = (0, architect_1.targetFromTargetString)(options.buildTarget);
|
|
48
|
-
async function getBuildTargetOptions() {
|
|
49
|
-
return (await context.getTargetOptions(buildTarget));
|
|
50
|
-
}
|
|
51
|
-
const workspaceRoot = (0, core_1.getSystemPath)((0, core_1.normalize)(context.workspaceRoot));
|
|
52
|
-
return (0, rxjs_1.from)(getBuildTargetOptions()).pipe((0, rxjs_1.switchMap)(async (buildOptions) => {
|
|
53
|
-
const tsConfig = path.join(workspaceRoot, buildOptions.tsConfig);
|
|
54
|
-
const middleware = [];
|
|
55
|
-
// Not using `Promise.all` preserves the order of middlewares as they
|
|
56
|
-
// are declared in the configuration list.
|
|
57
|
-
for (const middlewarePath of options.middlewares || []) {
|
|
58
|
-
// https://github.com/angular/angular-cli/pull/26212/files#diff-a99020cbdb97d20b2bc686bcb64b31942107d56db06fd880171b0a86f7859e6eR52
|
|
59
|
-
middleware.push(await (0, common_1.loadModule)(path.join(workspaceRoot, middlewarePath), tsConfig, context.logger));
|
|
60
|
-
}
|
|
61
|
-
const buildPlugins = await (0, load_plugins_1.loadPlugins)(buildOptions.plugins, workspaceRoot, tsConfig, context.logger, options, context.target);
|
|
62
|
-
const indexHtmlTransformer = buildOptions.indexHtmlTransformer
|
|
63
|
-
? await (0, load_index_html_transformer_1.loadIndexHtmlTransformer)(path.join(workspaceRoot, buildOptions.indexHtmlTransformer), tsConfig, context.logger, context.target)
|
|
64
|
-
: undefined;
|
|
65
|
-
(0, patch_builder_context_1.patchBuilderContext)(context, buildTarget);
|
|
66
|
-
return { middleware, buildPlugins, indexHtmlTransformer };
|
|
67
|
-
}), (0, rxjs_1.switchMap)((extensions) => (0, build_1.executeDevServerBuilder)(options, context, extensions)));
|
|
68
|
-
}
|
|
69
|
-
exports.default = (0, architect_1.createBuilder)(executeCustomDevServerBuilder);
|
|
70
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dev-server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,sEA2DC;AA/ED,gDAAkC;AAClC,yDAAkG;AAClG,0CAIwB;AACxB,+CAAsE;AACtE,+BAAmD;AACnD,qDAAsD;AAGtD,kDAA8C;AAC9C,mEAA8D;AAK9D,gFAA0E;AAE1E,SAAgB,6BAA6B,CAC3C,OAAqC,EACrC,OAAuB;IAEvB,MAAM,WAAW,GAAG,IAAA,kCAAsB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhE,KAAK,UAAU,qBAAqB;QAClC,OAAO,CAAC,MAAM,OAAO,CAAC,gBAAgB,CACpC,WAAW,CACZ,CAA8C,CAAC;IAClD,CAAC;IAED,MAAM,aAAa,GAAG,IAAA,oBAAa,EAAC,IAAA,gBAAS,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAEtE,OAAO,IAAA,WAAI,EAAC,qBAAqB,EAAE,CAAC,CAAC,IAAI,CACvC,IAAA,gBAAS,EAAC,KAAK,EAAC,YAAY,EAAC,EAAE;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;QAEjE,MAAM,UAAU,GAAiB,EAAE,CAAC;QAEpC,qEAAqE;QACrE,0CAA0C;QAC1C,KAAK,MAAM,cAAc,IAAI,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,CAAC;YACvD,mIAAmI;YACnI,UAAU,CAAC,IAAI,CACb,MAAM,IAAA,mBAAU,EACd,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,EACxC,QAAQ,EACR,OAAO,CAAC,MAAM,CACf,CACF,CAAC;QACJ,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,IAAA,0BAAW,EACpC,YAAY,CAAC,OAAO,EACpB,aAAa,EACb,QAAQ,EACR,OAAO,CAAC,MAAM,EACd,OAAO,EACP,OAAO,CAAC,MAAM,CACf,CAAC;QAEF,MAAM,oBAAoB,GAAG,YAAY,CAAC,oBAAoB;YAC5D,CAAC,CAAC,MAAM,IAAA,sDAAwB,EAC5B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,oBAAoB,CAAC,EAC3D,QAAQ,EACR,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,CACf;YACH,CAAC,CAAC,SAAS,CAAC;QAEd,IAAA,2CAAmB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAE1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC;IAC5D,CAAC,CAAC,EACF,IAAA,gBAAS,EAAC,CAAC,UAAU,EAAE,EAAE,CACvB,IAAA,+BAAuB,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CACtD,CACF,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,yBAAa,EAC1B,6BAA6B,CAC9B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.patchBuilderContext = patchBuilderContext;
|
|
4
|
-
const executorToBuilderMap = new Map([
|
|
5
|
-
['@angular-builders/custom-esbuild', '@angular/build:application'],
|
|
6
|
-
['@angular-builders/custom-esbuild:application', '@angular/build:application'],
|
|
7
|
-
]);
|
|
8
|
-
function cleanBuildTargetOptions(options) {
|
|
9
|
-
delete options.plugins;
|
|
10
|
-
delete options.indexHtmlTransformer;
|
|
11
|
-
return options;
|
|
12
|
-
}
|
|
13
|
-
function patchBuilderContext(context, buildTarget) {
|
|
14
|
-
const originalGetBuilderNameForTarget = context.getBuilderNameForTarget;
|
|
15
|
-
// We have to patch `getBuilderNameForTarget` because Angular CLI checks
|
|
16
|
-
// whether the runnable target is `@angular/build:application`
|
|
17
|
-
// and then defines the server to run. If the `builderName` (returned by
|
|
18
|
-
// `context.getBuilderNameForTarget`) is not an `@angular/build:application`,
|
|
19
|
-
// then it will use the Webpack server for the `dev-server target`. By patching
|
|
20
|
-
// the return value, Angular will use the Vite server for the `dev-server` target.
|
|
21
|
-
context.getBuilderNameForTarget = async (target) => {
|
|
22
|
-
const builderName = await originalGetBuilderNameForTarget(target);
|
|
23
|
-
if (executorToBuilderMap.has(builderName)) {
|
|
24
|
-
return executorToBuilderMap.get(builderName);
|
|
25
|
-
}
|
|
26
|
-
return builderName;
|
|
27
|
-
};
|
|
28
|
-
const originalGetTargetOptions = context.getTargetOptions;
|
|
29
|
-
context.getTargetOptions = async (target) => {
|
|
30
|
-
const options = await originalGetTargetOptions(target);
|
|
31
|
-
if (target.project === buildTarget.project &&
|
|
32
|
-
target.target === buildTarget.target &&
|
|
33
|
-
target.configuration === buildTarget.configuration) {
|
|
34
|
-
cleanBuildTargetOptions(options);
|
|
35
|
-
}
|
|
36
|
-
return options;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=patch-builder-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"patch-builder-context.js","sourceRoot":"","sources":["../../src/dev-server/patch-builder-context.ts"],"names":[],"mappings":";;AAaA,kDAiCC;AA5CD,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAiB;IACnD,CAAC,kCAAkC,EAAE,4BAA4B,CAAC;IAClE,CAAC,8CAA8C,EAAE,4BAA4B,CAAC;CAC/E,CAAC,CAAC;AAEH,SAAS,uBAAuB,CAAC,OAAY;IAC3C,OAAO,OAAO,CAAC,OAAO,CAAC;IACvB,OAAO,OAAO,CAAC,oBAAoB,CAAC;IACpC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAuB,EAAE,WAAmB;IAC9E,MAAM,+BAA+B,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAExE,wEAAwE;IACxE,8DAA8D;IAC9D,wEAAwE;IACxE,6EAA6E;IAC7E,+EAA+E;IAC/E,kFAAkF;IAClF,OAAO,CAAC,uBAAuB,GAAG,KAAK,EAAC,MAAM,EAAC,EAAE;QAC/C,MAAM,WAAW,GAAG,MAAM,+BAA+B,CAAC,MAAM,CAAC,CAAC;QAElE,IAAI,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAC1C,OAAO,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAE,CAAC;QAChD,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,wBAAwB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAC1D,OAAO,CAAC,gBAAgB,GAAG,KAAK,EAAC,MAAM,EAAC,EAAE;QACxC,MAAM,OAAO,GAAG,MAAM,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAEvD,IACE,MAAM,CAAC,OAAO,KAAK,WAAW,CAAC,OAAO;YACtC,MAAM,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM;YACpC,MAAM,CAAC,aAAa,KAAK,WAAW,CAAC,aAAa,EAClD,CAAC;YACD,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"title": "Custom ESBuild dev server schema for Angular build facade",
|
|
4
|
-
"description": "Dev server target options",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"buildTarget": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"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`.",
|
|
10
|
-
"pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$"
|
|
11
|
-
},
|
|
12
|
-
"port": {
|
|
13
|
-
"type": "number",
|
|
14
|
-
"description": "Port to listen on.",
|
|
15
|
-
"default": 4200
|
|
16
|
-
},
|
|
17
|
-
"host": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "Host to listen on.",
|
|
20
|
-
"default": "localhost"
|
|
21
|
-
},
|
|
22
|
-
"proxyConfig": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Proxy configuration file. For more information, see https://angular.dev/tools/cli/serve#proxying-to-a-backend-server."
|
|
25
|
-
},
|
|
26
|
-
"ssl": {
|
|
27
|
-
"type": "boolean",
|
|
28
|
-
"description": "Serve using HTTPS.",
|
|
29
|
-
"default": false
|
|
30
|
-
},
|
|
31
|
-
"sslKey": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "SSL key to use for serving HTTPS."
|
|
34
|
-
},
|
|
35
|
-
"sslCert": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "SSL certificate to use for serving HTTPS."
|
|
38
|
-
},
|
|
39
|
-
"allowedHosts": {
|
|
40
|
-
"description": "The hosts that the development server will respond to. This option sets the Vite option of the same name. For further details: https://vite.dev/config/server-options.html#server-allowedhosts",
|
|
41
|
-
"default": [],
|
|
42
|
-
"oneOf": [
|
|
43
|
-
{
|
|
44
|
-
"type": "array",
|
|
45
|
-
"description": "A list of hosts that the development server will respond to.",
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"description": "Indicates that all hosts are allowed. This is not recommended and a security risk."
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
"define": {
|
|
57
|
-
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.",
|
|
58
|
-
"type": "object",
|
|
59
|
-
"additionalProperties": {
|
|
60
|
-
"type": "string"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"headers": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"description": "Custom HTTP headers to be added to all responses.",
|
|
66
|
-
"propertyNames": {
|
|
67
|
-
"pattern": "^[-_A-Za-z0-9]+$"
|
|
68
|
-
},
|
|
69
|
-
"additionalProperties": {
|
|
70
|
-
"type": "string"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"open": {
|
|
74
|
-
"type": "boolean",
|
|
75
|
-
"description": "Opens the url in default browser.",
|
|
76
|
-
"default": false,
|
|
77
|
-
"alias": "o"
|
|
78
|
-
},
|
|
79
|
-
"verbose": {
|
|
80
|
-
"type": "boolean",
|
|
81
|
-
"description": "Adds more details to output logging."
|
|
82
|
-
},
|
|
83
|
-
"liveReload": {
|
|
84
|
-
"type": "boolean",
|
|
85
|
-
"description": "Whether to reload the page on change, using live-reload.",
|
|
86
|
-
"default": true
|
|
87
|
-
},
|
|
88
|
-
"servePath": {
|
|
89
|
-
"type": "string",
|
|
90
|
-
"description": "The pathname where the application will be served."
|
|
91
|
-
},
|
|
92
|
-
"hmr": {
|
|
93
|
-
"type": "boolean",
|
|
94
|
-
"description": "Enable hot module replacement. Defaults to the value of 'liveReload'. Currently, only global and component stylesheets are supported."
|
|
95
|
-
},
|
|
96
|
-
"watch": {
|
|
97
|
-
"type": "boolean",
|
|
98
|
-
"description": "Rebuild on change.",
|
|
99
|
-
"default": true
|
|
100
|
-
},
|
|
101
|
-
"poll": {
|
|
102
|
-
"type": "number",
|
|
103
|
-
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
104
|
-
},
|
|
105
|
-
"inspect": {
|
|
106
|
-
"default": false,
|
|
107
|
-
"description": "Activate debugging inspector. This option only has an effect when 'SSR' or 'SSG' are enabled.",
|
|
108
|
-
"oneOf": [
|
|
109
|
-
{
|
|
110
|
-
"type": "string",
|
|
111
|
-
"description": "Activate the inspector on host and port in the format of `[[host:]port]`. See the security warning in https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure regarding the host parameter usage."
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"type": "boolean"
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
},
|
|
118
|
-
"prebundle": {
|
|
119
|
-
"description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled.",
|
|
120
|
-
"default": true,
|
|
121
|
-
"oneOf": [
|
|
122
|
-
{
|
|
123
|
-
"type": "boolean"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"type": "object",
|
|
127
|
-
"properties": {
|
|
128
|
-
"exclude": {
|
|
129
|
-
"description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself. Note: specifying `@foo/bar` marks all paths within the `@foo/bar` package as excluded, including sub-paths like `@foo/bar/baz`.",
|
|
130
|
-
"type": "array",
|
|
131
|
-
"items": {
|
|
132
|
-
"type": "string"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
"additionalProperties": false,
|
|
137
|
-
"required": [
|
|
138
|
-
"exclude"
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
"middlewares": {
|
|
144
|
-
"type": "array",
|
|
145
|
-
"description": "A list of paths to Vite server middlewares",
|
|
146
|
-
"default": [],
|
|
147
|
-
"items": {
|
|
148
|
-
"type": "string",
|
|
149
|
-
"uniqueItems": true
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"additionalProperties": false,
|
|
154
|
-
"required": [
|
|
155
|
-
"buildTarget"
|
|
156
|
-
],
|
|
157
|
-
"$id": "CustomEsbuildDevServerSchema"
|
|
158
|
-
}
|
package/dist/dev-server/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/dev-server/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./application"), exports);
|
|
18
|
-
__exportStar(require("./dev-server"), exports);
|
|
19
|
-
__exportStar(require("./unit-test"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { logging } from '@angular-devkit/core';
|
|
2
|
-
import { Target } from '@angular-devkit/architect';
|
|
3
|
-
import type { IndexHtmlTransform } from '@angular/build/private';
|
|
4
|
-
export declare function loadIndexHtmlTransformer(indexHtmlTransformerPath: string, tsConfig: string, logger: logging.LoggerApi, target: Target): Promise<IndexHtmlTransform>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadIndexHtmlTransformer = loadIndexHtmlTransformer;
|
|
4
|
-
const common_1 = require("@angular-builders/common");
|
|
5
|
-
async function loadIndexHtmlTransformer(indexHtmlTransformerPath, tsConfig, logger, target) {
|
|
6
|
-
const transformer = await (0, common_1.loadModule)(indexHtmlTransformerPath, tsConfig, logger);
|
|
7
|
-
return (indexHtml) => transformer(indexHtml, target);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=load-index-html-transformer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-index-html-transformer.js","sourceRoot":"","sources":["../src/load-index-html-transformer.ts"],"names":[],"mappings":";;AAKA,4DAYC;AAjBD,qDAAsD;AAK/C,KAAK,UAAU,wBAAwB,CAC5C,wBAAgC,EAChC,QAAgB,EAChB,MAAyB,EACzB,MAAc;IAEd,MAAM,WAAW,GAAG,MAAM,IAAA,mBAAU,EAClC,wBAAwB,EACxB,QAAQ,EACR,MAAM,CACP,CAAC;IACF,OAAO,CAAC,SAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/load-plugins.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from 'esbuild';
|
|
2
|
-
import type { logging } from '@angular-devkit/core';
|
|
3
|
-
import { CustomEsbuildApplicationSchema, CustomEsbuildDevServerSchema, CustomEsbuildUnitTestSchema, PluginConfig } from './custom-esbuild-schema';
|
|
4
|
-
import { Target } from '@angular-devkit/architect';
|
|
5
|
-
export declare function loadPlugins(pluginConfig: PluginConfig[] | undefined, workspaceRoot: string, tsConfig: string, logger: logging.LoggerApi, builderOptions: CustomEsbuildApplicationSchema | CustomEsbuildDevServerSchema | CustomEsbuildUnitTestSchema, target: Target): Promise<Plugin[]>;
|
package/dist/load-plugins.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.loadPlugins = loadPlugins;
|
|
37
|
-
const path = __importStar(require("node:path"));
|
|
38
|
-
const common_1 = require("@angular-builders/common");
|
|
39
|
-
async function loadPlugins(pluginConfig, workspaceRoot, tsConfig, logger, builderOptions, target) {
|
|
40
|
-
const plugins = await Promise.all((pluginConfig || []).map(async (pluginConfig) => {
|
|
41
|
-
if (typeof pluginConfig === 'string') {
|
|
42
|
-
const pluginsOrFactory = await (0, common_1.loadModule)(path.join(workspaceRoot, pluginConfig), tsConfig, logger);
|
|
43
|
-
if (typeof pluginsOrFactory === 'function') {
|
|
44
|
-
return pluginsOrFactory(builderOptions, target);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return pluginsOrFactory;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
const pluginFactory = await (0, common_1.loadModule)(path.join(workspaceRoot, pluginConfig.path), tsConfig, logger);
|
|
52
|
-
return pluginFactory(pluginConfig.options, builderOptions, target);
|
|
53
|
-
}
|
|
54
|
-
}));
|
|
55
|
-
return plugins.flat();
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=load-plugins.js.map
|
package/dist/load-plugins.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-plugins.js","sourceRoot":"","sources":["../src/load-plugins.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,kCAoCC;AAhDD,gDAAkC;AAGlC,qDAAsD;AAS/C,KAAK,UAAU,WAAW,CAC/B,YAAwC,EACxC,aAAqB,EACrB,QAAgB,EAChB,MAAyB,EACzB,cAA2G,EAC3G,MAAc;IAEd,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAC,YAAY,EAAC,EAAE;QAC5C,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;YACrC,MAAM,gBAAgB,GAAG,MAAM,IAAA,mBAAU,EAOvC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE,CAAC;gBAC3C,OAAO,gBAAgB,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACN,OAAO,gBAAgB,CAAC;YAC1B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,aAAa,GAAG,MAAM,IAAA,mBAAU,EACpC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,IAAI,CAAC,EAC3C,QAAQ,EACR,MAAM,CACP,CAAC;YACF,OAAO,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BuilderContext } from '@angular-devkit/architect';
|
|
2
|
-
import { UnitTestBuilderOptions } from '@angular/build';
|
|
3
|
-
import { json } from '@angular-devkit/core';
|
|
4
|
-
import { CustomEsbuildUnitTestSchema } from '../custom-esbuild-schema';
|
|
5
|
-
export declare function executeCustomEsbuildUnitTestBuilder(options: CustomEsbuildUnitTestSchema, context: BuilderContext): import("rxjs").Observable<import("@angular-devkit/architect").BuilderOutput>;
|
|
6
|
-
declare const _default: import("@angular-devkit/architect").Builder<json.JsonObject & Omit<UnitTestBuilderOptions, "runner"> & {
|
|
7
|
-
plugins?: import("../custom-esbuild-schema").PluginConfig[];
|
|
8
|
-
}>;
|
|
9
|
-
export default _default;
|
package/dist/unit-test/index.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.executeCustomEsbuildUnitTestBuilder = executeCustomEsbuildUnitTestBuilder;
|
|
37
|
-
const path = __importStar(require("node:path"));
|
|
38
|
-
const architect_1 = require("@angular-devkit/architect");
|
|
39
|
-
const build_1 = require("@angular/build");
|
|
40
|
-
const core_1 = require("@angular-devkit/core");
|
|
41
|
-
const rxjs_1 = require("rxjs");
|
|
42
|
-
const load_plugins_1 = require("../load-plugins");
|
|
43
|
-
function executeCustomEsbuildUnitTestBuilder(options, context) {
|
|
44
|
-
if (Array.isArray(options.browsers) && !options.browsers.length) {
|
|
45
|
-
delete options.browsers;
|
|
46
|
-
}
|
|
47
|
-
const buildTarget = (0, architect_1.targetFromTargetString)(options.buildTarget);
|
|
48
|
-
async function getBuildTargetOptions() {
|
|
49
|
-
return (await context.getTargetOptions(buildTarget));
|
|
50
|
-
}
|
|
51
|
-
const workspaceRoot = (0, core_1.getSystemPath)((0, core_1.normalize)(context.workspaceRoot));
|
|
52
|
-
const tsConfig = path.join(workspaceRoot, options.tsConfig);
|
|
53
|
-
return (0, rxjs_1.from)(getBuildTargetOptions()).pipe((0, rxjs_1.switchMap)(async (buildOptions) => {
|
|
54
|
-
const codePlugins = await (0, load_plugins_1.loadPlugins)(buildOptions.plugins, workspaceRoot, tsConfig, context.logger, options, context.target);
|
|
55
|
-
return { codePlugins };
|
|
56
|
-
}), (0, rxjs_1.switchMap)(extensions => (0, build_1.executeUnitTestBuilder)({ ...options, runner: 'vitest' }, context, extensions)));
|
|
57
|
-
}
|
|
58
|
-
exports.default = (0, architect_1.createBuilder)(executeCustomEsbuildUnitTestBuilder);
|
|
59
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unit-test/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,kFAwCC;AApDD,gDAAkC;AAClC,yDAAkG;AAClG,0CAAgF;AAChF,+CAAsE;AACtE,+BAAuC;AAEvC,kDAA8C;AAM9C,SAAgB,mCAAmC,CACjD,OAAoC,EACpC,OAAuB;IAEvB,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAChE,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,kCAAsB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAEhE,KAAK,UAAU,qBAAqB;QAClC,OAAO,CAAC,MAAM,OAAO,CAAC,gBAAgB,CACpC,WAAW,CACZ,CAA8C,CAAC;IAClD,CAAC;IAED,MAAM,aAAa,GAAG,IAAA,oBAAa,EAAC,IAAA,gBAAS,EAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE5D,OAAO,IAAA,WAAI,EAAC,qBAAqB,EAAE,CAAC,CAAC,IAAI,CACvC,IAAA,gBAAS,EAAC,KAAK,EAAC,YAAY,EAAC,EAAE;QAC7B,MAAM,WAAW,GAAG,MAAM,IAAA,0BAAW,EACnC,YAAY,CAAC,OAAO,EACpB,aAAa,EACb,QAAQ,EACR,OAAO,CAAC,MAAM,EACd,OAAO,EACP,OAAO,CAAC,MAAM,CACf,CAAC;QAEF,OAAO,EAAE,WAAW,EAAE,CAAC;IACzB,CAAC,CAAC,EACF,IAAA,gBAAS,EAAC,UAAU,CAAC,EAAE,CACrB,IAAA,8BAAsB,EACpB,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,QAA4C,EAAE,EACpE,OAAO,EACP,UAAU,CACX,CACF,CACF,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,yBAAa,EAC1B,mCAAmC,CACpC,CAAC"}
|