Primeiro commit do projeto Angular
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
import * as jobs from './jobs/job-registry';
|
||||
export * from './node-modules-architect-host';
|
||||
export { jobs };
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.jobs = void 0;
|
||||
const jobs = __importStar(require("./jobs/job-registry"));
|
||||
exports.jobs = jobs;
|
||||
__exportStar(require("./node-modules-architect-host"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAA4C;AAInC,oBAAI;AAFb,gEAA8C"}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
import { JsonValue } from '@angular-devkit/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { jobs } from '../../src';
|
||||
export declare class NodeModuleJobRegistry<MinimumArgumentValueT extends JsonValue = JsonValue, MinimumInputValueT extends JsonValue = JsonValue, MinimumOutputValueT extends JsonValue = JsonValue> implements jobs.Registry<MinimumArgumentValueT, MinimumInputValueT, MinimumOutputValueT> {
|
||||
protected _resolve(name: string): string | null;
|
||||
/**
|
||||
* Get a job description for a named job.
|
||||
*
|
||||
* @param name The name of the job.
|
||||
* @returns A description, or null if the job is not registered.
|
||||
*/
|
||||
get<A extends MinimumArgumentValueT, I extends MinimumInputValueT, O extends MinimumOutputValueT>(name: jobs.JobName): Observable<jobs.JobHandler<A, I, O> | null>;
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NodeModuleJobRegistry = void 0;
|
||||
const core_1 = require("@angular-devkit/core");
|
||||
const rxjs_1 = require("rxjs");
|
||||
class NodeModuleJobRegistry {
|
||||
_resolve(name) {
|
||||
try {
|
||||
return require.resolve(name);
|
||||
}
|
||||
catch (e) {
|
||||
if (e.code === 'MODULE_NOT_FOUND') {
|
||||
return null;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get a job description for a named job.
|
||||
*
|
||||
* @param name The name of the job.
|
||||
* @returns A description, or null if the job is not registered.
|
||||
*/
|
||||
get(name) {
|
||||
const [moduleName, exportName] = name.split(/#/, 2);
|
||||
const resolvedPath = this._resolve(moduleName);
|
||||
if (!resolvedPath) {
|
||||
return (0, rxjs_1.of)(null);
|
||||
}
|
||||
const pkg = require(resolvedPath);
|
||||
const handler = pkg[exportName || 'default'];
|
||||
if (!handler) {
|
||||
return (0, rxjs_1.of)(null);
|
||||
}
|
||||
function _getValue(...fields) {
|
||||
return fields.find((x) => core_1.schema.isJsonSchema(x)) || true;
|
||||
}
|
||||
const argument = _getValue(pkg.argument, handler.argument);
|
||||
const input = _getValue(pkg.input, handler.input);
|
||||
const output = _getValue(pkg.output, handler.output);
|
||||
const channels = _getValue(pkg.channels, handler.channels);
|
||||
return (0, rxjs_1.of)(Object.assign(handler.bind(undefined), {
|
||||
jobDescription: {
|
||||
argument,
|
||||
input,
|
||||
output,
|
||||
channels,
|
||||
},
|
||||
}));
|
||||
}
|
||||
}
|
||||
exports.NodeModuleJobRegistry = NodeModuleJobRegistry;
|
||||
//# sourceMappingURL=job-registry.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"job-registry.js","sourceRoot":"","sources":["job-registry.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAyD;AACzD,+BAAsC;AAGtC,MAAa,qBAAqB;IAMtB,QAAQ,CAAC,IAAY;QAC7B,IAAI,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAK,CAA2B,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,IAAkB;QAElB,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAEpD,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,CAAC;QAClB,CAAC;QAED,SAAS,SAAS,CAAC,GAAG,MAAiB;YACrC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;QAC5D,CAAC;QAED,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE3D,OAAO,IAAA,SAAE,EACP,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACrC,cAAc,EAAE;gBACd,QAAQ;gBACR,KAAK;gBACL,MAAM;gBACN,QAAQ;aACT;SACF,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA3DD,sDA2DC"}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
import { json, workspaces } from '@angular-devkit/core';
|
||||
import { BuilderInfo } from '../src';
|
||||
import { Target } from '../src/input-schema';
|
||||
import { ArchitectHost, Builder } from '../src/internal';
|
||||
export type NodeModulesBuilderInfo = BuilderInfo & {
|
||||
import: string;
|
||||
};
|
||||
export interface WorkspaceHost {
|
||||
getBuilderName(project: string, target: string): Promise<string>;
|
||||
getMetadata(project: string): Promise<json.JsonObject>;
|
||||
getOptions(project: string, target: string, configuration?: string): Promise<json.JsonObject>;
|
||||
hasTarget(project: string, target: string): Promise<boolean>;
|
||||
getDefaultConfigurationName(project: string, target: string): Promise<string | undefined>;
|
||||
}
|
||||
export declare class WorkspaceNodeModulesArchitectHost implements ArchitectHost<NodeModulesBuilderInfo> {
|
||||
protected _root: string;
|
||||
private workspaceHost;
|
||||
constructor(workspaceHost: WorkspaceHost, _root: string);
|
||||
constructor(workspace: workspaces.WorkspaceDefinition, _root: string);
|
||||
getBuilderNameForTarget(target: Target): Promise<string>;
|
||||
/**
|
||||
* Resolve a builder. This needs to be a string which will be used in a dynamic `import()`
|
||||
* clause. This should throw if no builder can be found. The dynamic import will throw if
|
||||
* it is unsupported.
|
||||
* @param builderStr The name of the builder to be used.
|
||||
* @returns All the info needed for the builder itself.
|
||||
*/
|
||||
resolveBuilder(builderStr: string, basePath?: string, seenBuilders?: Set<string>): Promise<NodeModulesBuilderInfo>;
|
||||
getCurrentDirectory(): Promise<string>;
|
||||
getWorkspaceRoot(): Promise<string>;
|
||||
getOptionsForTarget(target: Target): Promise<json.JsonObject | null>;
|
||||
getProjectMetadata(target: Target | string): Promise<json.JsonObject | null>;
|
||||
loadBuilder(info: NodeModulesBuilderInfo): Promise<Builder>;
|
||||
}
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || (function () {
|
||||
var ownKeys = function(o) {
|
||||
ownKeys = Object.getOwnPropertyNames || function (o) {
|
||||
var ar = [];
|
||||
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
||||
return ar;
|
||||
};
|
||||
return ownKeys(o);
|
||||
};
|
||||
return function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WorkspaceNodeModulesArchitectHost = void 0;
|
||||
const node_fs_1 = require("node:fs");
|
||||
const node_module_1 = require("node:module");
|
||||
const path = __importStar(require("node:path"));
|
||||
const node_v8_1 = require("node:v8");
|
||||
const internal_1 = require("../src/internal");
|
||||
// TODO_ESM: Update to use import.meta.url
|
||||
const localRequire = (0, node_module_1.createRequire)(__filename);
|
||||
function clone(obj) {
|
||||
try {
|
||||
return (0, node_v8_1.deserialize)((0, node_v8_1.serialize)(obj));
|
||||
}
|
||||
catch {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
}
|
||||
function findProjectTarget(workspace, project, target) {
|
||||
const projectDefinition = workspace.projects.get(project);
|
||||
if (!projectDefinition) {
|
||||
throw new Error(`Project "${project}" does not exist.`);
|
||||
}
|
||||
const targetDefinition = projectDefinition.targets.get(target);
|
||||
if (!targetDefinition) {
|
||||
throw new Error('Project target does not exist.');
|
||||
}
|
||||
if (!targetDefinition.builder) {
|
||||
throw new Error(`A builder is not set for target '${target}' in project '${project}'.`);
|
||||
}
|
||||
return targetDefinition;
|
||||
}
|
||||
class WorkspaceNodeModulesArchitectHost {
|
||||
_root;
|
||||
workspaceHost;
|
||||
constructor(workspaceOrHost, _root) {
|
||||
this._root = _root;
|
||||
if ('getBuilderName' in workspaceOrHost) {
|
||||
this.workspaceHost = workspaceOrHost;
|
||||
}
|
||||
else {
|
||||
this.workspaceHost = {
|
||||
async getBuilderName(project, target) {
|
||||
const { builder } = findProjectTarget(workspaceOrHost, project, target);
|
||||
return builder;
|
||||
},
|
||||
async getOptions(project, target, configuration) {
|
||||
const targetDefinition = findProjectTarget(workspaceOrHost, project, target);
|
||||
if (configuration === undefined) {
|
||||
return (targetDefinition.options ?? {});
|
||||
}
|
||||
if (!targetDefinition.configurations?.[configuration]) {
|
||||
throw new Error(`Configuration '${configuration}' for target '${target}' in project '${project}' is not set in the workspace.`);
|
||||
}
|
||||
return (targetDefinition.configurations?.[configuration] ?? {});
|
||||
},
|
||||
async getMetadata(project) {
|
||||
const projectDefinition = workspaceOrHost.projects.get(project);
|
||||
if (!projectDefinition) {
|
||||
throw new Error(`Project "${project}" does not exist.`);
|
||||
}
|
||||
return {
|
||||
root: projectDefinition.root,
|
||||
sourceRoot: projectDefinition.sourceRoot,
|
||||
prefix: projectDefinition.prefix,
|
||||
...clone(workspaceOrHost.extensions),
|
||||
...clone(projectDefinition.extensions),
|
||||
};
|
||||
},
|
||||
async hasTarget(project, target) {
|
||||
return !!workspaceOrHost.projects.get(project)?.targets.has(target);
|
||||
},
|
||||
async getDefaultConfigurationName(project, target) {
|
||||
return workspaceOrHost.projects.get(project)?.targets.get(target)?.defaultConfiguration;
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
async getBuilderNameForTarget(target) {
|
||||
return this.workspaceHost.getBuilderName(target.project, target.target);
|
||||
}
|
||||
/**
|
||||
* Resolve a builder. This needs to be a string which will be used in a dynamic `import()`
|
||||
* clause. This should throw if no builder can be found. The dynamic import will throw if
|
||||
* it is unsupported.
|
||||
* @param builderStr The name of the builder to be used.
|
||||
* @returns All the info needed for the builder itself.
|
||||
*/
|
||||
resolveBuilder(builderStr, basePath = this._root, seenBuilders) {
|
||||
if (seenBuilders?.has(builderStr)) {
|
||||
throw new Error('Circular builder alias references detected: ' + [...seenBuilders, builderStr]);
|
||||
}
|
||||
const [packageName, builderName] = builderStr.split(':', 2);
|
||||
if (!builderName) {
|
||||
throw new Error('No builder name specified.');
|
||||
}
|
||||
// Resolve and load the builders manifest from the package's `builders` field, if present
|
||||
const packageJsonPath = localRequire.resolve(packageName + '/package.json', {
|
||||
paths: [basePath],
|
||||
});
|
||||
const packageJson = JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, 'utf-8'));
|
||||
const buildersManifestRawPath = packageJson['builders'];
|
||||
if (!buildersManifestRawPath) {
|
||||
throw new Error(`Package ${JSON.stringify(packageName)} has no builders defined.`);
|
||||
}
|
||||
let buildersManifestPath = path.normalize(buildersManifestRawPath);
|
||||
if (path.isAbsolute(buildersManifestRawPath) || buildersManifestRawPath.startsWith('..')) {
|
||||
throw new Error(`Package "${packageName}" has an invalid builders manifest path: "${buildersManifestRawPath}"`);
|
||||
}
|
||||
buildersManifestPath = path.join(path.dirname(packageJsonPath), buildersManifestPath);
|
||||
const buildersManifest = JSON.parse((0, node_fs_1.readFileSync)(buildersManifestPath, 'utf-8'));
|
||||
const buildersManifestDirectory = path.dirname(buildersManifestPath);
|
||||
// Attempt to locate an entry for the specified builder by name
|
||||
const builder = buildersManifest.builders?.[builderName];
|
||||
if (!builder) {
|
||||
throw new Error(`Cannot find builder ${JSON.stringify(builderStr)}.`);
|
||||
}
|
||||
// Resolve alias reference if entry is a string
|
||||
if (typeof builder === 'string') {
|
||||
return this.resolveBuilder(builder, path.dirname(packageJsonPath), (seenBuilders ?? new Set()).add(builderStr));
|
||||
}
|
||||
// Determine builder implementation path (relative within package only)
|
||||
const implementationPath = builder.implementation && path.normalize(builder.implementation);
|
||||
if (!implementationPath) {
|
||||
throw new Error('Could not find the implementation for builder ' + builderStr);
|
||||
}
|
||||
if (path.isAbsolute(implementationPath) || implementationPath.startsWith('..')) {
|
||||
throw new Error(`Package "${packageName}" has an invalid builder implementation path: "${builderName}" --> "${builder.implementation}"`);
|
||||
}
|
||||
// Determine builder option schema path (relative within package only)
|
||||
let schemaPath = builder.schema;
|
||||
if (!schemaPath) {
|
||||
throw new Error('Could not find the schema for builder ' + builderStr);
|
||||
}
|
||||
if (path.isAbsolute(schemaPath) || path.normalize(schemaPath).startsWith('..')) {
|
||||
throw new Error(`Package "${packageName}" has an invalid builder schema path: "${builderName}" --> "${builder.schema}"`);
|
||||
}
|
||||
// The file could be either a package reference or in the local manifest directory.
|
||||
if (schemaPath.startsWith('.')) {
|
||||
schemaPath = path.join(buildersManifestDirectory, schemaPath);
|
||||
}
|
||||
else {
|
||||
const manifestRequire = (0, node_module_1.createRequire)(buildersManifestDirectory + '/');
|
||||
schemaPath = manifestRequire.resolve(schemaPath);
|
||||
}
|
||||
const schemaText = (0, node_fs_1.readFileSync)(schemaPath, 'utf-8');
|
||||
return Promise.resolve({
|
||||
name: builderStr,
|
||||
builderName,
|
||||
description: builder['description'],
|
||||
optionSchema: JSON.parse(schemaText),
|
||||
import: path.join(buildersManifestDirectory, implementationPath),
|
||||
});
|
||||
}
|
||||
async getCurrentDirectory() {
|
||||
return process.cwd();
|
||||
}
|
||||
async getWorkspaceRoot() {
|
||||
return this._root;
|
||||
}
|
||||
async getOptionsForTarget(target) {
|
||||
if (!(await this.workspaceHost.hasTarget(target.project, target.target))) {
|
||||
return null;
|
||||
}
|
||||
let options = await this.workspaceHost.getOptions(target.project, target.target);
|
||||
const targetConfiguration = target.configuration ||
|
||||
(await this.workspaceHost.getDefaultConfigurationName(target.project, target.target));
|
||||
if (targetConfiguration) {
|
||||
const configurations = targetConfiguration.split(',').map((c) => c.trim());
|
||||
for (const configuration of configurations) {
|
||||
options = {
|
||||
...options,
|
||||
...(await this.workspaceHost.getOptions(target.project, target.target, configuration)),
|
||||
};
|
||||
}
|
||||
}
|
||||
return clone(options);
|
||||
}
|
||||
async getProjectMetadata(target) {
|
||||
const projectName = typeof target === 'string' ? target : target.project;
|
||||
const metadata = this.workspaceHost.getMetadata(projectName);
|
||||
return metadata;
|
||||
}
|
||||
async loadBuilder(info) {
|
||||
const builder = await getBuilder(info.import);
|
||||
if (builder[internal_1.BuilderSymbol]) {
|
||||
return builder;
|
||||
}
|
||||
// Default handling code is for old builders that incorrectly export `default` with non-ESM module
|
||||
if (builder?.default[internal_1.BuilderSymbol]) {
|
||||
return builder.default;
|
||||
}
|
||||
throw new Error('Builder is not a builder');
|
||||
}
|
||||
}
|
||||
exports.WorkspaceNodeModulesArchitectHost = WorkspaceNodeModulesArchitectHost;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function getBuilder(builderPath) {
|
||||
const builder = await Promise.resolve(`${builderPath}`).then(s => __importStar(require(s)));
|
||||
return 'default' in builder ? builder.default : builder;
|
||||
}
|
||||
//# sourceMappingURL=node-modules-architect-host.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user