@angular-devkit/architect
Advanced tools
Comparing version 0.1402.11 to 0.1602.10
@@ -11,3 +11,2 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const src_1 = require("../src"); | ||
@@ -36,3 +35,3 @@ exports.default = (0, src_1.createBuilder)((options, context) => { | ||
context.reportProgress(n++, allRuns.length); | ||
return (0, rxjs_1.from)(allRuns).pipe((0, operators_1.mergeMap)((runPromise) => (0, rxjs_1.from)(runPromise)), (0, operators_1.mergeMap)(([i, run]) => run.output.pipe((0, operators_1.map)((output) => [i, output]))), (0, operators_1.mergeMap)(([i, output]) => { | ||
return (0, rxjs_1.from)(allRuns).pipe((0, rxjs_1.mergeMap)((runPromise) => (0, rxjs_1.from)(runPromise)), (0, rxjs_1.mergeMap)(([i, run]) => run.output.pipe((0, rxjs_1.map)((output) => [i, output]))), (0, rxjs_1.mergeMap)(([i, output]) => { | ||
allResults[i] = output; | ||
@@ -51,1 +50,2 @@ context.reportProgress(n++, allRuns.length); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLW9mLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L2J1aWxkZXJzL2FsbC1vZi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOztBQUdILCtCQUFzRDtBQUN0RCxnQ0FBa0U7QUFHbEUsa0JBQWUsSUFBQSxtQkFBYSxFQUFtQyxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsRUFBRTtJQUNsRixNQUFNLE9BQU8sR0FBb0MsRUFBRSxDQUFDO0lBRXBELE9BQU8sQ0FBQyxjQUFjLENBQ3BCLENBQUMsRUFDRCxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQ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0+ICh4ID8geC5zdWNjZXNzIDogZmFsc2UpKSxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSksXG4gICk7XG59KTtcbiJdfQ== |
@@ -11,3 +11,2 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const src_1 = require("../src"); | ||
@@ -32,5 +31,5 @@ exports.default = (0, src_1.createBuilder)((options, context) => { | ||
context.reportProgress(i++, allRuns.length); | ||
return (0, rxjs_1.from)(allRuns).pipe((0, operators_1.concatMap)((fn) => stop | ||
return (0, rxjs_1.from)(allRuns).pipe((0, rxjs_1.concatMap)((fn) => stop | ||
? (0, rxjs_1.of)(null) | ||
: (0, rxjs_1.from)(fn()).pipe((0, operators_1.switchMap)((run) => (run === null ? (0, rxjs_1.of)(null) : run.output.pipe((0, operators_1.first)()))))), (0, operators_1.map)((output) => { | ||
: (0, rxjs_1.from)(fn()).pipe((0, rxjs_1.switchMap)((run) => (run === null ? (0, rxjs_1.of)(null) : run.output.pipe((0, rxjs_1.first)()))))), (0, rxjs_1.map)((output) => { | ||
context.reportProgress(i++, allRuns.length); | ||
@@ -46,3 +45,4 @@ if (output === null || stop !== null) { | ||
} | ||
}), (0, operators_1.last)()); | ||
}), (0, rxjs_1.last)()); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uY2F0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L2J1aWxkZXJzL2NvbmNhdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOztBQUdILCtCQUF3RTtBQUN4RSxnQ0FBa0U7QUFHbEUsa0JBQWUsSUFBQSxtQkFBYSxFQUFtQyxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsRU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m9ncmVzcyhpKyssIGFsbFJ1bnMubGVuZ3RoKTtcblxuICByZXR1cm4gZnJvbShhbGxSdW5zKS5waXBlKFxuICAgIGNvbmNhdE1hcCgoZm4pID0+XG4gICAgICBzdG9wXG4gICAgICAgID8gb2YobnVsbClcbiAgICAgICAgOiBmcm9tKGZuKCkpLnBpcGUoc3dpdGNoTWFwKChydW4pID0+IChydW4gPT09IG51bGwgPyBvZihudWxsKSA6IHJ1bi5vdXRwdXQucGlwZShmaXJzdCgpKSkpKSxcbiAgICApLFxuICAgIG1hcCgob3V0cHV0KSA9PiB7XG4gICAgICBjb250ZXh0LnJlcG9ydFByb2dyZXNzKGkrKywgYWxsUnVucy5sZW5ndGgpO1xuICAgICAgaWYgKG91dHB1dCA9PT0gbnVsbCB8fCBzdG9wICE9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiBzdG9wIHx8IHsgc3VjY2VzczogZmFsc2UgfTtcbiAgICAgIH0gZWxzZSBpZiAob3V0cHV0LnN1Y2Nlc3MgPT09IGZhbHNlKSB7XG4gICAgICAgIHJldHVybiAoc3RvcCA9IG91dHB1dCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gb3V0cHV0O1xuICAgICAgfVxuICAgIH0pLFxuICAgIGxhc3QoKSxcbiAgKTtcbn0pO1xuIl19 |
@@ -15,1 +15,2 @@ "use strict"; | ||
})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFsc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3QvYnVpbGRlcnMvZmFsc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7QUFFSCxnQ0FBdUM7QUFFdkMsa0JBQWUsSUFBQSxtQkFBYSxFQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFDbEMsT0FBTyxFQUFFLEtBQUs7SUFDZCxLQUFLLEVBQUUsOEJBQThCO0NBQ3RDLENBQUMsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbmltcG9ydCB7IGNyZWF0ZUJ1aWxkZXIgfSBmcm9tICcuLi9zcmMnO1xuXG5leHBvcnQgZGVmYXVsdCBjcmVhdGVCdWlsZGVyKCgpID0+ICh7XG4gIHN1Y2Nlc3M6IGZhbHNlLFxuICBlcnJvcjogJ0ZhbHNlIGJ1aWxkZXIgYWx3YXlzIGVycm9ycy4nLFxufSkpO1xuIl19 |
@@ -7,2 +7,3 @@ /** | ||
targets?: Target[]; | ||
[property: string]: any; | ||
} | ||
@@ -14,2 +15,3 @@ export interface Builder { | ||
}; | ||
[property: string]: any; | ||
} | ||
@@ -21,2 +23,3 @@ export interface Target { | ||
target: string; | ||
[property: string]: any; | ||
} |
@@ -5,1 +5,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3BlcmF0b3Itc2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L2J1aWxkZXJzL29wZXJhdG9yLXNjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsbUZBQW1GO0FBQ25GLG9GQUFvRiIsInNvdXJjZXNDb250ZW50IjpbIlxuLy8gVEhJUyBGSUxFIElTIEFVVE9NQVRJQ0FMTFkgR0VORVJBVEVELiBUTyBVUERBVEUgVEhJUyBGSUxFIFlPVSBORUVEIFRPIENIQU5HRSBUSEVcbi8vIENPUlJFU1BPTkRJTkcgSlNPTiBTQ0hFTUEgRklMRSwgVEhFTiBSVU4gZGV2a2l0LWFkbWluIGJ1aWxkIChvciBiYXplbCBidWlsZCAuLi4pLlxuXG4vKipcbiAqIEFsbCBpbnB1dCB0eXBlcyBvZiBidWlsZGVycyB0aGF0IHBlcmZvcm0gb3BlcmF0aW9ucyBvbiBvbmUgb3IgbXVsdGlwbGUgc3ViLWJ1aWxkZXJzLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIFNjaGVtYSB7XG4gICAgYnVpbGRlcnM/OiBCdWlsZGVyW107XG4gICAgdGFyZ2V0cz86ICBUYXJnZXRbXTtcbiAgICBbcHJvcGVydHk6IHN0cmluZ106IGFueTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBCdWlsZGVyIHtcbiAgICBidWlsZGVyOiAgc3RyaW5nO1xuICAgIG9wdGlvbnM/OiB7IFtrZXk6IHN0cmluZ106IGFueSB9O1xuICAgIFtwcm9wZXJ0eTogc3RyaW5nXTogYW55O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFRhcmdldCB7XG4gICAgb3ZlcnJpZGVzPzogeyBba2V5OiBzdHJpbmddOiBhbnkgfTtcbiAgICB0YXJnZXQ6ICAgICBzdHJpbmc7XG4gICAgW3Byb3BlcnR5OiBzdHJpbmddOiBhbnk7XG59XG4iXX0= |
@@ -12,1 +12,2 @@ "use strict"; | ||
exports.default = (0, src_1.createBuilder)(() => ({ success: true })); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2FyY2hpdGVjdC9idWlsZGVycy90cnVlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7O0FBRUgsZ0NBQXVDO0FBRXZDLGtCQUFlLElBQUEsbUJBQWEsRUFBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG5pbXBvcnQgeyBjcmVhdGVCdWlsZGVyIH0gZnJvbSAnLi4vc3JjJztcblxuZXhwb3J0IGRlZmF1bHQgY3JlYXRlQnVpbGRlcigoKSA9PiAoeyBzdWNjZXNzOiB0cnVlIH0pKTtcbiJdfQ== |
@@ -8,2 +8,4 @@ /** | ||
*/ | ||
import * as jobs from './jobs/job-registry'; | ||
export * from './node-modules-architect-host'; | ||
export { jobs }; |
@@ -20,2 +20,14 @@ "use strict"; | ||
})); | ||
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 (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
@@ -25,2 +37,6 @@ 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=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3Qvbm9kZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVILDBEQUE0QztBQUluQyxvQkFBSTtBQUZiLGdFQUE4QyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG5pbXBvcnQgKiBhcyBqb2JzIGZyb20gJy4vam9icy9qb2ItcmVnaXN0cnknO1xuXG5leHBvcnQgKiBmcm9tICcuL25vZGUtbW9kdWxlcy1hcmNoaXRlY3QtaG9zdCc7XG5cbmV4cG9ydCB7IGpvYnMgfTtcbiJdfQ== |
@@ -12,3 +12,3 @@ /** | ||
import { ArchitectHost, Builder } from '../src/internal'; | ||
export declare type NodeModulesBuilderInfo = BuilderInfo & { | ||
export type NodeModulesBuilderInfo = BuilderInfo & { | ||
import: string; | ||
@@ -15,0 +15,0 @@ }; |
@@ -70,11 +70,10 @@ "use strict"; | ||
async getOptions(project, target, configuration) { | ||
var _a, _b, _c, _d; | ||
const targetDefinition = findProjectTarget(workspaceOrHost, project, target); | ||
if (configuration === undefined) { | ||
return ((_a = targetDefinition.options) !== null && _a !== void 0 ? _a : {}); | ||
return (targetDefinition.options ?? {}); | ||
} | ||
if (!((_b = targetDefinition.configurations) === null || _b === void 0 ? void 0 : _b[configuration])) { | ||
if (!targetDefinition.configurations?.[configuration]) { | ||
throw new Error(`Configuration '${configuration}' is not set in the workspace.`); | ||
} | ||
return ((_d = (_c = targetDefinition.configurations) === null || _c === void 0 ? void 0 : _c[configuration]) !== null && _d !== void 0 ? _d : {}); | ||
return (targetDefinition.configurations?.[configuration] ?? {}); | ||
}, | ||
@@ -95,8 +94,6 @@ async getMetadata(project) { | ||
async hasTarget(project, target) { | ||
var _a; | ||
return !!((_a = workspaceOrHost.projects.get(project)) === null || _a === void 0 ? void 0 : _a.targets.has(target)); | ||
return !!workspaceOrHost.projects.get(project)?.targets.has(target); | ||
}, | ||
async getDefaultConfigurationName(project, target) { | ||
var _a, _b; | ||
return (_b = (_a = workspaceOrHost.projects.get(project)) === null || _a === void 0 ? void 0 : _a.targets.get(target)) === null || _b === void 0 ? void 0 : _b.defaultConfiguration; | ||
return workspaceOrHost.projects.get(project)?.targets.get(target)?.defaultConfiguration; | ||
}, | ||
@@ -181,3 +178,3 @@ }; | ||
// Default handling code is for old builders that incorrectly export `default` with non-ESM module | ||
if (builder === null || builder === void 0 ? void 0 : builder.default[internal_1.BuilderSymbol]) { | ||
if (builder?.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pbmRQcm9qZWN0VGFyZ2V0KHdvcmtzcGFjZU9ySG9zdCwgcHJvamVjdCwgdGFyZ2V0KTtcblxuICAgICAgICAgIGlmIChjb25maWd1cmF0aW9uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiAodGFyZ2V0RGVmaW5pdGlvbi5vcHRpb25zID8/IHt9KSBhcyBqc29uLkpzb25PYmplY3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCF0YXJnZXREZWZpbml0aW9uLmNvbmZpZ3VyYXRpb25zPy5bY29uZmlndXJhdGlvbl0pIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29uZmlndXJhdGlvbiAnJHtjb25maWd1cmF0aW9ufScgaXMgbm90IHNldCBpbiB0aGUgd29ya3NwYWNlLmApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiAodGFyZ2V0RGVmaW5pdGlvbi5jb25maWd1cmF0aW9ucz8uW2NvbmZpZ3VyYXRpb25dID8/IHt9KSBhcyBqc29uLkpzb25PYmplY3Q7XG4gICAgICAgIH0sXG4gICAgICAgIGFzeW5jIGdldE1ldGFkYXRhKHByb2plY3QpIHtcbiAgICAgICAgICBjb25zdCBwcm9qZWN0RGVmaW5pdGlvbiA9IHdvcmtzcGFjZU9ySG9zdC5wcm9qZWN0cy5nZXQocHJvamVjdCk7XG4gICAgICAgICAgaWYgKCFwcm9qZWN0RGVmaW5pdGlvbikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBQcm9qZWN0IFwiJHtwcm9qZWN0fVwiIGRvZXMgbm90IGV4aXN0LmApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByb290OiBwcm9qZWN0RGVmaW5pdGlvbi5yb290LFxuICAgICAgICAgICAgc291cmNlUm9vdDogcHJvamVjdERlZmluaXRpb24uc291cmNlUm9vdCxcbiAgICAgICAgICAgIHByZWZpeDogcHJvamVjd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yYXRpb24gZmlsZSB1c2luZyB0aGUgVHlwZVNjcmlwdCBkeW5hbWljIGltcG9ydCB3b3JrYXJvdW5kLlxuICAgICAgICAgIC8vIE9uY2UgVHlwZVNjcmlwdCBwcm92aWRlcyBzdXBwb3J0IGZvciBrZWVwaW5nIHRoZSBkeW5hbWljIGltcG9ydCB0aGlzIHdvcmthcm91bmQgY2FuIGJlXG4gICAgICAgICAgLy8gY2hhbmdlZCB0byBhIGRpcmVjdCBkeW5hbWljIGltcG9ydC5cbiAgICAgICAgICByZXR1cm4gKGF3YWl0IGxvYWRFc21Nb2R1bGU8eyBkZWZhdWx0OiB1bmtub3duIH0+KHBhdGhUb0ZpbGVVUkwoYnVpbGRlclBhdGgpKSkuZGVmYXVsdDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRocm93IGU7XG4gICAgICB9XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "@angular-devkit/architect", | ||
"version": "0.1402.11", | ||
"version": "0.1602.10", | ||
"description": "Angular Build Facade", | ||
@@ -9,12 +9,12 @@ "experimental": true, | ||
"dependencies": { | ||
"@angular-devkit/core": "14.2.11", | ||
"rxjs": "6.6.7" | ||
"@angular-devkit/core": "16.2.10", | ||
"rxjs": "7.8.1" | ||
}, | ||
"builders": "./builders/builders.json", | ||
"keywords": [ | ||
"Angular CLI", | ||
"Angular DevKit", | ||
"angular", | ||
"Angular CLI", | ||
"devkit", | ||
"sdk", | ||
"Angular DevKit" | ||
"sdk" | ||
], | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"engines": { | ||
"node": "^14.15.0 || >=16.10.0", | ||
"node": "^16.14.0 || >=18.10.0", | ||
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0", | ||
@@ -29,0 +29,0 @@ "yarn": ">= 1.13.0" |
@@ -8,10 +8,11 @@ /** | ||
*/ | ||
import { analytics, experimental, json, logging } from '@angular-devkit/core'; | ||
import { Observable, SubscribableOrPromise } from 'rxjs'; | ||
import { json, logging } from '@angular-devkit/core'; | ||
import { Observable, ObservableInput } from 'rxjs'; | ||
import { Schema as RealBuilderInput, Target as RealTarget } from './input-schema'; | ||
import { Registry } from './jobs'; | ||
import { Schema as RealBuilderOutput } from './output-schema'; | ||
import { State as BuilderProgressState, Schema as RealBuilderProgress } from './progress-schema'; | ||
export declare type Target = json.JsonObject & RealTarget; | ||
export type Target = json.JsonObject & RealTarget; | ||
export { BuilderProgressState }; | ||
export declare type BuilderRegistry = experimental.jobs.Registry<json.JsonObject, BuilderInput, BuilderOutput>; | ||
export type BuilderRegistry = Registry<json.JsonObject, BuilderInput, BuilderOutput>; | ||
/** | ||
@@ -22,3 +23,3 @@ * An API typed BuilderProgress. The interface generated from the schema is too permissive, | ||
*/ | ||
export declare type TypedBuilderProgress = { | ||
export type TypedBuilderProgress = { | ||
state: BuilderProgressState.Stopped; | ||
@@ -44,5 +45,5 @@ } | { | ||
*/ | ||
export declare type BuilderInput = json.JsonObject & RealBuilderInput; | ||
export declare type BuilderOutput = json.JsonObject & RealBuilderOutput; | ||
export declare type BuilderProgress = json.JsonObject & RealBuilderProgress & TypedBuilderProgress; | ||
export type BuilderInput = json.JsonObject & RealBuilderInput; | ||
export type BuilderOutput = json.JsonObject & RealBuilderOutput; | ||
export type BuilderProgress = json.JsonObject & RealBuilderProgress & TypedBuilderProgress; | ||
/** | ||
@@ -54,3 +55,3 @@ * A progress report is what the tooling will receive. It contains the builder info and the target. | ||
*/ | ||
export declare type BuilderProgressReport = BuilderProgress & { | ||
export type BuilderProgressReport = BuilderProgress & { | ||
target?: Target; | ||
@@ -81,2 +82,7 @@ builder: BuilderInfo; | ||
/** | ||
* The last output from a builder. This is recommended when scheduling a builder and only being | ||
* interested in the result of that last run. | ||
*/ | ||
lastOutput: Promise<BuilderOutput>; | ||
/** | ||
* The output(s) from the builder. A builder can have multiple outputs. | ||
@@ -213,7 +219,2 @@ * This always replay the last output when subscribed. | ||
/** | ||
* API to report analytics. This might be undefined if the feature is unsupported. This might | ||
* not be undefined, but the backend could also not report anything. | ||
*/ | ||
readonly analytics: analytics.Analytics; | ||
/** | ||
* Add teardown logic to this Context, so that when it's being stopped it will execute teardown. | ||
@@ -226,3 +227,3 @@ */ | ||
*/ | ||
export declare type BuilderOutputLike = AsyncIterable<BuilderOutput> | SubscribableOrPromise<BuilderOutput> | BuilderOutput; | ||
export type BuilderOutputLike = ObservableInput<BuilderOutput> | BuilderOutput; | ||
export declare function isBuilderOutput(obj: any): obj is BuilderOutput; | ||
@@ -248,3 +249,3 @@ export declare function fromAsyncIterable<T>(iterable: AsyncIterable<T>): Observable<T>; | ||
*/ | ||
export declare type BuilderInfo = json.JsonObject & { | ||
export type BuilderInfo = json.JsonObject & { | ||
builderName: string; | ||
@@ -251,0 +252,0 @@ description: string; |
@@ -12,3 +12,2 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const progress_schema_1 = require("./progress-schema"); | ||
@@ -34,3 +33,2 @@ Object.defineProperty(exports, "BuilderProgressState", { enumerable: true, get: function () { return progress_schema_1.State; } }); | ||
async function handleAsyncIterator(subscriber, iterator) { | ||
var _a; | ||
const teardown = new Promise((resolve) => subscriber.add(() => resolve())); | ||
@@ -47,3 +45,3 @@ try { | ||
finally { | ||
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator)); | ||
await iterator.return?.(); | ||
} | ||
@@ -90,3 +88,3 @@ } | ||
context.addTeardown(() => promise); | ||
return (0, rxjs_1.from)(context.scheduleTarget(target, overrides, scheduleOptions)).pipe((0, operators_1.switchMap)((run) => new rxjs_1.Observable((observer) => { | ||
return (0, rxjs_1.from)(context.scheduleTarget(target, overrides, scheduleOptions)).pipe((0, rxjs_1.switchMap)((run) => new rxjs_1.Observable((observer) => { | ||
const subscription = run.output.subscribe(observer); | ||
@@ -103,1 +101,2 @@ return () => { | ||
exports.scheduleTargetAndForget = scheduleTargetAndForget; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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1xuICBjb25zdCBwcm9taXNlID0gbmV3IFByb21pc2U8dm9pZD4oKHIpID0+IChyZXNvbHZlID0gcikpO1xuICBjb250ZXh0LmFkZFRlYXJkb3duKCgpID0+IHByb21pc2UpO1xuXG4gIHJldHVybiBmcm9tKGNvbnRleHQuc2NoZWR1bGVUYXJnZXQodGFyZ2V0LCBvdmVycmlkZXMsIHNjaGVkdWxlT3B0aW9ucykpLnBpcGUoXG4gICAgc3dpdGNoTWFwKFxuICAgICAgKHJ1bikgPT5cbiAgICAgICAgbmV3IE9ic2VydmFibGU8QnVpbGRlck91dHB1dD4oKG9ic2VydmVyKSA9PiB7XG4gICAgICAgICAgY29uc3Qgc3Vic2NyaXB0aW9uID0gcnVuLm91dHB1dC5zdWJzY3JpYmUob2JzZXJ2ZXIpO1xuXG4gICAgICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgICAgIHN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgICAgLy8gV2UgY2FuIHByb3Blcmx5IGlnbm9yZSB0aGUgZmxvYXRpbmcgcHJvbWlzZSBhcyBpdCdzIGEgXCJyZXZlcnNlXCIgcHJvbWlzZTsgdGhlIHRlYXJkb3duXG4gICAgICAgICAgICAvLyBpcyB3YWl0aW5nIGZvciB0aGUgcmVzb2x2ZS5cbiAgICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZmxvYXRpbmctcHJvbWlzZXNcbiAgICAgICAgICAgIHJ1bi5zdG9wKCkudGhlbihyZXNvbHZlKTtcbiAgICAgICAgICB9O1xuICAgICAgICB9KSxcbiAgICApLFxuICApO1xufVxuIl19 |
@@ -8,9 +8,9 @@ /** | ||
*/ | ||
import { analytics, experimental, json, logging } from '@angular-devkit/core'; | ||
import { json, logging } from '@angular-devkit/core'; | ||
import { Observable } from 'rxjs'; | ||
import { BuilderRun, Target } from './api'; | ||
import { ArchitectHost } from './internal'; | ||
import { JobName, Registry } from './jobs'; | ||
export interface ScheduleOptions { | ||
logger?: logging.Logger; | ||
analytics?: analytics.Analytics; | ||
} | ||
@@ -22,6 +22,6 @@ export declare class Architect { | ||
private readonly _infoCache; | ||
constructor(_host: ArchitectHost, registry?: json.schema.SchemaRegistry, additionalJobRegistry?: experimental.jobs.Registry); | ||
has(name: experimental.jobs.JobName): Observable<boolean>; | ||
constructor(_host: ArchitectHost, registry?: json.schema.SchemaRegistry, additionalJobRegistry?: Registry); | ||
has(name: JobName): Observable<boolean>; | ||
scheduleBuilder(name: string, options: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; | ||
scheduleTarget(target: Target, overrides?: json.JsonObject, scheduleOptions?: ScheduleOptions): Promise<BuilderRun>; | ||
} |
@@ -13,4 +13,4 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const api_1 = require("./api"); | ||
const jobs_1 = require("./jobs"); | ||
const schedule_by_name_1 = require("./schedule-by-name"); | ||
@@ -29,4 +29,4 @@ const inputSchema = require('./input-schema.json'); | ||
// Add input validation to the inbound bus. | ||
const inboundBusWithInputValidation = context.inboundBus.pipe((0, operators_1.concatMap)((message) => { | ||
if (message.kind === core_1.experimental.jobs.JobInboundMessageKind.Input) { | ||
const inboundBusWithInputValidation = context.inboundBus.pipe((0, rxjs_1.concatMap)(async (message) => { | ||
if (message.kind === jobs_1.JobInboundMessageKind.Input) { | ||
const v = message.value; | ||
@@ -38,12 +38,12 @@ const options = { | ||
// Validate v against the options schema. | ||
return registry.compile(info.optionSchema).pipe((0, operators_1.concatMap)((validation) => validation(options)), (0, operators_1.map)((validationResult) => { | ||
const { data, success, errors } = validationResult; | ||
if (success) { | ||
return { ...v, options: data }; | ||
} | ||
const validation = await registry.compile(info.optionSchema); | ||
const validationResult = await validation(options); | ||
const { data, success, errors } = validationResult; | ||
if (!success) { | ||
throw new core_1.json.schema.SchemaValidationException(errors); | ||
}), (0, operators_1.map)((value) => ({ ...message, value }))); | ||
} | ||
return { ...message, value: { ...v, options: data } }; | ||
} | ||
else { | ||
return (0, rxjs_1.of)(message); | ||
return message; | ||
} | ||
@@ -53,12 +53,12 @@ }), | ||
// asynchronously listening to it. | ||
(0, operators_1.shareReplay)(1)); | ||
(0, rxjs_1.shareReplay)(1)); | ||
// Make an inboundBus that completes instead of erroring out. | ||
// We'll merge the errors into the output instead. | ||
const inboundBus = (0, rxjs_1.onErrorResumeNext)(inboundBusWithInputValidation); | ||
const output = (0, rxjs_1.from)(host.loadBuilder(info)).pipe((0, operators_1.concatMap)((builder) => { | ||
const output = (0, rxjs_1.from)(host.loadBuilder(info)).pipe((0, rxjs_1.concatMap)((builder) => { | ||
if (builder === null) { | ||
throw new Error(`Cannot load builder for builderInfo ${JSON.stringify(info, null, 2)}`); | ||
} | ||
return builder.handler(argument, { ...context, inboundBus }).pipe((0, operators_1.map)((output) => { | ||
if (output.kind === core_1.experimental.jobs.JobOutboundMessageKind.Output) { | ||
return builder.handler(argument, { ...context, inboundBus }).pipe((0, rxjs_1.map)((output) => { | ||
if (output.kind === jobs_1.JobOutboundMessageKind.Output) { | ||
// Add target to it. | ||
@@ -79,6 +79,6 @@ return { | ||
// Share subscriptions to the output, otherwise the the handler will be re-run. | ||
(0, operators_1.shareReplay)()); | ||
(0, rxjs_1.shareReplay)()); | ||
// Separate the errors from the inbound bus into their own observable that completes when the | ||
// builder output does. | ||
const inboundBusErrors = inboundBusWithInputValidation.pipe((0, operators_1.ignoreElements)(), (0, operators_1.takeUntil)((0, rxjs_1.onErrorResumeNext)(output.pipe((0, operators_1.last)())))); | ||
const inboundBusErrors = inboundBusWithInputValidation.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.takeUntil)((0, rxjs_1.onErrorResumeNext)(output.pipe((0, rxjs_1.last)())))); | ||
// Return the builder output plus any input errors. | ||
@@ -106,3 +106,3 @@ return (0, rxjs_1.merge)(inboundBusErrors, output); | ||
} | ||
const info = (0, rxjs_1.from)(this._host.resolveBuilder(name)).pipe((0, operators_1.shareReplay)(1)); | ||
const info = (0, rxjs_1.from)(this._host.resolveBuilder(name)).pipe((0, rxjs_1.shareReplay)(1)); | ||
cache.set(name, info); | ||
@@ -130,6 +130,6 @@ return info; | ||
if (target) { | ||
cache.set((0, api_1.targetStringFromTarget)(target), result.pipe((0, operators_1.shareReplay)(1))); | ||
cache.set((0, api_1.targetStringFromTarget)(target), result.pipe((0, rxjs_1.shareReplay)(1))); | ||
} | ||
else { | ||
cache.set(info.builderName, result.pipe((0, operators_1.shareReplay)(1))); | ||
cache.set(info.builderName, result.pipe((0, rxjs_1.shareReplay)(1))); | ||
} | ||
@@ -144,3 +144,3 @@ } | ||
} | ||
return (0, rxjs_1.from)(this._resolveBuilder(name)).pipe((0, operators_1.concatMap)((builderInfo) => (builderInfo ? this._createBuilder(builderInfo) : (0, rxjs_1.of)(null))), (0, operators_1.first)(null, null)); | ||
return (0, rxjs_1.from)(this._resolveBuilder(name)).pipe((0, rxjs_1.concatMap)((builderInfo) => (builderInfo ? this._createBuilder(builderInfo) : (0, rxjs_1.of)(null))), (0, rxjs_1.first)(null, null)); | ||
} | ||
@@ -165,7 +165,7 @@ } | ||
this._host.getOptionsForTarget(target), | ||
])).pipe((0, operators_1.concatMap)(([builderStr, options]) => { | ||
])).pipe((0, rxjs_1.concatMap)(([builderStr, options]) => { | ||
if (builderStr === null || options === null) { | ||
return (0, rxjs_1.of)(null); | ||
} | ||
return this._resolveBuilder(builderStr).pipe((0, operators_1.concatMap)((builderInfo) => { | ||
return this._resolveBuilder(builderStr).pipe((0, rxjs_1.concatMap)((builderInfo) => { | ||
if (builderInfo === null) { | ||
@@ -176,7 +176,7 @@ return (0, rxjs_1.of)(null); | ||
})); | ||
}), (0, operators_1.first)(null, null)); | ||
}), (0, rxjs_1.first)(null, null)); | ||
} | ||
} | ||
function _getTargetOptionsFactory(host) { | ||
return core_1.experimental.jobs.createJobHandler((target) => { | ||
return (0, jobs_1.createJobHandler)((target) => { | ||
return host.getOptionsForTarget(target).then((options) => { | ||
@@ -195,3 +195,3 @@ if (options === null) { | ||
function _getProjectMetadataFactory(host) { | ||
return core_1.experimental.jobs.createJobHandler((target) => { | ||
return (0, jobs_1.createJobHandler)((target) => { | ||
return host.getProjectMetadata(target).then((options) => { | ||
@@ -212,3 +212,3 @@ if (options === null) { | ||
function _getBuilderNameForTargetFactory(host) { | ||
return core_1.experimental.jobs.createJobHandler(async (target) => { | ||
return (0, jobs_1.createJobHandler)(async (target) => { | ||
const builderName = await host.getBuilderNameForTarget(target); | ||
@@ -226,3 +226,3 @@ if (!builderName) { | ||
function _validateOptionsFactory(host, registry) { | ||
return core_1.experimental.jobs.createJobHandler(async ([builderName, options]) => { | ||
return (0, jobs_1.createJobHandler)(async ([builderName, options]) => { | ||
// Get option schema from the host. | ||
@@ -233,11 +233,8 @@ const builderInfo = await host.resolveBuilder(builderName); | ||
} | ||
return registry | ||
.compile(builderInfo.optionSchema) | ||
.pipe((0, operators_1.concatMap)((validation) => validation(options)), (0, operators_1.switchMap)(({ data, success, errors }) => { | ||
if (success) { | ||
return (0, rxjs_1.of)(data); | ||
} | ||
const validation = await registry.compile(builderInfo.optionSchema); | ||
const { data, success, errors } = await validation(options); | ||
if (!success) { | ||
throw new core_1.json.schema.SchemaValidationException(errors); | ||
})) | ||
.toPromise(); | ||
} | ||
return data; | ||
}, { | ||
@@ -257,3 +254,3 @@ name: '..validateOptions', | ||
this._infoCache = new Map(); | ||
const privateArchitectJobRegistry = new core_1.experimental.jobs.SimpleJobRegistry(); | ||
const privateArchitectJobRegistry = new jobs_1.SimpleJobRegistry(); | ||
// Create private jobs. | ||
@@ -264,3 +261,3 @@ privateArchitectJobRegistry.register(_getTargetOptionsFactory(_host)); | ||
privateArchitectJobRegistry.register(_getProjectMetadataFactory(_host)); | ||
const jobRegistry = new core_1.experimental.jobs.FallbackRegistry([ | ||
const jobRegistry = new jobs_1.FallbackRegistry([ | ||
new ArchitectTargetJobRegistry(_host, registry, this._jobCache, this._infoCache), | ||
@@ -271,3 +268,3 @@ new ArchitectBuilderJobRegistry(_host, registry, this._jobCache, this._infoCache), | ||
]); | ||
this._scheduler = new core_1.experimental.jobs.SimpleScheduler(jobRegistry, registry); | ||
this._scheduler = new jobs_1.SimpleScheduler(jobRegistry, registry); | ||
} | ||
@@ -287,3 +284,2 @@ has(name) { | ||
workspaceRoot: this._host.getWorkspaceRoot(), | ||
analytics: scheduleOptions.analytics, | ||
}); | ||
@@ -297,3 +293,2 @@ } | ||
workspaceRoot: this._host.getWorkspaceRoot(), | ||
analytics: scheduleOptions.analytics, | ||
}); | ||
@@ -303,1 +298,2 @@ } | ||
exports.Architect = Architect; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJjaGl0ZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L3NyYy9hcmNoaXRlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBRUgsK0NBQXFEO0FBQ3JELCtCQWFjO0FBQ2QsK0JBUWU7QUFFZixpQ0FhZ0I7QUFDaEIseURBQXNFO0FBRXRFLE1BQU0sV0FBVyxHQUFHLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDO0FBQ25ELE1BQU0sWUFBWSxHQUFHLE9BQU8sQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDO0FBRXJELFNBQVMsZ0NBQWdDLENBQ3ZDLElBQWlCLEVBQ2pCLE1BQTBCLEVBQzFCLElBQW1CLEVBQ25CLFFBQW9DLEVBQ3BDLFdBQTRCO0lBRTVCLE1BQU0sY0FBYyxHQUF1QjtRQUN6QyxJQUFJLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQU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5wdXQsIE8gZXh0ZW5kcyBCdWlsZGVyT3V0cHV0PihcbiAgICBuYW1lOiBzdHJpbmcsXG4gICk6IE9ic2VydmFibGU8Sm9iSGFuZGxlcjxBLCBJLCBPPiB8IG51bGw+IHtcbiAgICBjb25zdCBtID0gbmFtZS5tYXRjaCgvXnsoW146XSspOihbXjpdKykoPzo6KFteOl0qKSk/fSQvaSk7XG4gICAgaWYgKCFtKSB7XG4gICAgICByZXR1cm4gb2YobnVsbCk7XG4gICAgfVxuXG4gICAgY29uc3QgdGFyZ2V0ID0ge1xuICAgICAgcHJvamVjdDogbVsxXSxcbiAgICAgIHRhcmdldDogbVsyXSxcbiAgICAgIGNvbmZpZ3VyYXRpb246IG1bM10sXG4gICAgfTtcblxuICAgIHJldHVybiBmcm9tKFxuICAgICAgUHJvbWlzZS5hbGwoW1xuICAgICAgICB0aGlzLl9ob3N0LmdldEJ1aWxkZXJOYW1lRm9yVGFyZ2V0KHRhcmdldCksXG4gICAgICAgIHRoaXMuX2hvc3QuZ2V0T3B0aW9uc0ZvclRhcmdldCh0YXJnZXQpLFxuICAgICAgXSksXG4gICAgKS5waXBlKFxuICAgICAgY29uY2F0TWFwKChbYnVpbGRlclN0ciwgb3B0aW9uc10pID0+IHtcbiAgICAgICAgaWYgKGJ1aWxkZXJTdHIgPT09IG51bGwgfHwgb3B0aW9ucyA9PT0gbnVsbCkge1xuICAgICAgICAgIHJldHVybiBvZihudWxsKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLl9yZXNvbHZlQnVpbGRlcihidWlsZGVyU3RyKS5waXBlKFxuICAgICAgICAgIGNvbmNhdE1hcCgoYnVpbGRlckluZm8pID0+IHtcbiAgICAgICAgICAgIGlmIChidWlsZGVySW5mbyA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm4gb2YobnVsbCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jcmVhdGVCdWlsZGVyKG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XJyaWRlcywge1xuICAgICAgc2NoZWR1bGVyOiB0aGlzLl9zY2hlZHVsZXIsXG4gICAgICBsb2dnZXI6IHNjaGVkdWxlT3B0aW9ucy5sb2dnZXIgfHwgbmV3IGxvZ2dpbmcuTnVsbExvZ2dlcigpLFxuICAgICAgY3VycmVudERpcmVjdG9yeTogdGhpcy5faG9zdC5nZXRDdXJyZW50RGlyZWN0b3J5KCksXG4gICAgICB3b3Jrc3BhY2VSb290OiB0aGlzLl9ob3N0LmdldFdvcmtzcGFjZVJvb3QoKSxcbiAgICB9KTtcbiAgfVxufVxuIl19 |
@@ -9,2 +9,3 @@ export interface Schema { | ||
}; | ||
[property: string]: any; | ||
} | ||
@@ -31,2 +32,3 @@ /** | ||
schema: string; | ||
[property: string]: any; | ||
} |
@@ -5,1 +5,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRlcnMtc2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L3NyYy9idWlsZGVycy1zY2hlbWEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLG1GQUFtRjtBQUNuRixvRkFBb0YiLCJzb3VyY2VzQ29udGVudCI6WyJcbi8vIFRISVMgRklMRSBJUyBBVVRPTUFUSUNBTExZIEdFTkVSQVRFRC4gVE8gVVBEQVRFIFRISVMgRklMRSBZT1UgTkVFRCBUTyBDSEFOR0UgVEhFXG4vLyBDT1JSRVNQT05ESU5HIEpTT04gU0NIRU1BIEZJTEUsIFRIRU4gUlVOIGRldmtpdC1hZG1pbiBidWlsZCAob3IgYmF6ZWwgYnVpbGQgLi4uKS5cblxuZXhwb3J0IGludGVyZmFjZSBTY2hlbWEge1xuICAgIC8qKlxuICAgICAqIExpbmsgdG8gc2NoZW1hLlxuICAgICAqL1xuICAgICRzY2hlbWE/OiBzdHJpbmc7XG4gICAgYnVpbGRlcnM6IHsgW2tleTogc3RyaW5nXTogQnVpbGRlciB9O1xuICAgIFtwcm9wZXJ0eTogc3RyaW5nXTogYW55O1xufVxuXG4vKipcbiAqIFRhcmdldCBvcHRpb25zIGZvciBCdWlsZGVycy5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBCdWlsZGVyIHtcbiAgICAvKipcbiAgICAgKiBUaGUgYnVpbGRlciBjbGFzcyBtb2R1bGUuXG4gICAgICovXG4gICAgY2xhc3M/OiBzdHJpbmc7XG4gICAgLyoqXG4gICAgICogQnVpbGRlciBkZXNjcmlwdGlvbi5cbiAgICAgKi9cbiAgICBkZXNjcmlwdGlvbjogc3RyaW5nO1xuICAgIC8qKlxuICAgICAqIFRoZSBuZXh0IGdlbmVyYXRpb24gYnVpbGRlciBtb2R1bGUuXG4gICAgICovXG4gICAgaW1wbGVtZW50YXRpb24/OiBzdHJpbmc7XG4gICAgLyoqXG4gICAgICogU2NoZW1hIGZvciBidWlsZGVyIG9wdGlvbiB2YWxpZGF0aW9uLlxuICAgICAqL1xuICAgIHNjaGVtYTogc3RyaW5nO1xuICAgIFtwcm9wZXJ0eTogc3RyaW5nXTogYW55O1xufVxuIl19 |
@@ -13,9 +13,9 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const api_1 = require("./api"); | ||
const internal_1 = require("./internal"); | ||
const jobs_1 = require("./jobs"); | ||
const schedule_by_name_1 = require("./schedule-by-name"); | ||
// eslint-disable-next-line max-lines-per-function | ||
function createBuilder(fn) { | ||
const cjh = core_1.experimental.jobs.createJobHandler; | ||
const cjh = jobs_1.createJobHandler; | ||
// eslint-disable-next-line max-lines-per-function | ||
@@ -26,6 +26,4 @@ const handler = cjh((options, context) => { | ||
const logChannel = context.createChannel('log'); | ||
const analyticsChannel = context.createChannel('analytics'); | ||
const addTeardown = context.addTeardown.bind(context); | ||
let currentState = api_1.BuilderProgressState.Stopped; | ||
const teardownLogics = []; | ||
let tearingDown = false; | ||
let current = 0; | ||
@@ -60,12 +58,5 @@ let status = ''; | ||
switch (i.kind) { | ||
case core_1.experimental.jobs.JobInboundMessageKind.Stop: | ||
// Run teardown logic then complete. | ||
tearingDown = true; | ||
Promise.all(teardownLogics.map((fn) => fn() || Promise.resolve())).then(() => observer.complete(), (err) => observer.error(err)); | ||
case jobs_1.JobInboundMessageKind.Input: | ||
onInput(i.value); | ||
break; | ||
case core_1.experimental.jobs.JobInboundMessageKind.Input: | ||
if (!tearingDown) { | ||
onInput(i.value); | ||
} | ||
break; | ||
} | ||
@@ -111,23 +102,12 @@ }); | ||
async getTargetOptions(target) { | ||
return scheduler | ||
.schedule('..getTargetOptions', target) | ||
.output.toPromise(); | ||
return (0, rxjs_1.firstValueFrom)(scheduler.schedule('..getTargetOptions', target).output); | ||
}, | ||
async getProjectMetadata(target) { | ||
return scheduler | ||
.schedule('..getProjectMetadata', target) | ||
.output.toPromise(); | ||
return (0, rxjs_1.firstValueFrom)(scheduler.schedule('..getProjectMetadata', target).output); | ||
}, | ||
async getBuilderNameForTarget(target) { | ||
return scheduler | ||
.schedule('..getBuilderNameForTarget', target) | ||
.output.toPromise(); | ||
return (0, rxjs_1.firstValueFrom)(scheduler.schedule('..getBuilderNameForTarget', target).output); | ||
}, | ||
async validateOptions(options, builderName) { | ||
return scheduler | ||
.schedule('..validateOptions', [ | ||
builderName, | ||
options, | ||
]) | ||
.output.toPromise(); | ||
return (0, rxjs_1.firstValueFrom)(scheduler.schedule('..validateOptions', [builderName, options]).output); | ||
}, | ||
@@ -158,6 +138,3 @@ reportRunning() { | ||
}, | ||
analytics: new core_1.analytics.ForwardingAnalytics((report) => analyticsChannel.next(report)), | ||
addTeardown(teardown) { | ||
teardownLogics.push(teardown); | ||
}, | ||
addTeardown, | ||
}; | ||
@@ -184,6 +161,6 @@ context.reportRunning(); | ||
subscriptions.push(result | ||
.pipe((0, operators_1.defaultIfEmpty)({ success: false }), (0, operators_1.tap)(() => { | ||
.pipe((0, rxjs_1.defaultIfEmpty)({ success: false }), (0, rxjs_1.tap)(() => { | ||
progress({ state: api_1.BuilderProgressState.Running, current: total }, context); | ||
progress({ state: api_1.BuilderProgressState.Stopped }, context); | ||
}), (0, operators_1.mergeMap)(async (value) => { | ||
}), (0, rxjs_1.mergeMap)(async (value) => { | ||
// Allow the log queue to flush | ||
@@ -211,1 +188,2 @@ await new Promise(setImmediate); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWJ1aWxkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3Qvc3JjL2NyZWF0ZS1idWlsZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7OztBQUVILCtDQUFxRDtBQUNyRCwrQkFXYztBQUNkLCtCQWFlO0FBQ2YseUNBQTBFO0FBQzFFLGlDQUFpRTtBQUNqRSx5REFBc0U7QUFFdEUsa0RBQWtEO0FBQ2xELFNBQWdCLGFBQWEsQ0FDM0IsRUFBMEI7SUFFMUIsTUFBTSxHQUFHLEdBQUcsdUJBQWdCLENBQUM7SUFDN0Isa0RBQWtEO0lBQ2xELE1BQU0sT0FBTyxHQUFHLEdBQUcsQ0FBc0MsQ0FBQyxPQUFPLEVBQUUsT0FBTyxFQUFFLEVBQUU7UUFDNUUsTUFBTSxTQUFTLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQztRQUNwQyxNQUFNLGVBQWUsR0FBRyxPQUFPLENBQUMsYUFBYSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQzFELE1BQU0sVUFBVSxHQUFHLE9BQU8sQ0FBQyx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JyksXG4gICAgICAgICAgICAgIHdvcmtzcGFjZVJvb3Q6IGkud29ya3NwYWNlUm9vdCxcbiAgICAgICAgICAgICAgY3VycmVudERpcmVjdG9yeTogaS5jdXJyZW50RGlyZWN0b3J5LFxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIFdlIGRvbid0IHdhbnQgdG8gc3Vic2NyaWJlIGVycm9ycyBhbmQgY29tcGxldGUuXG4gICAgICAgICAgICBzdWJzY3JpcHRpb25zLnB1c2gocnVuLnByb2dyZXNzLnN1YnNjcmliZSgoZXZlbnQpID0+IHByb2dyZXNzQ2hhbm5lbC5uZXh0KGV2ZW50KSkpO1xuXG4gICAgICAgICAgICByZXR1cm4gcnVuO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgYXN5bmMgc2NoZWR1bGVCdWlsZGVyKFxuICAgICAgICAgICAgYnVpbGRlck5hbWU6IHN0cmluZyxcbiAgICAgICAgICAgIG9wdGlvbnM6IGpzb24uSnNvbk9iamVjdCA9IHt9LFxuICAgICAgICAgICAgc2NoZWR1bGVPcHRpb25zOiBTY2hlZHVsZU9wdGlvbnMgPSB7fSxcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGNvbnN0IHJ1biA9IGF3YWl0IHNjaGVkdWxlQnlOYW1lKGJ1aWxkZXJOYW1lLCBvcHRpb25zLCB7XG4gICAgICAgICAgICAgIHNjaGVkdWxlcixcbiAgICAgICAgICAgICAgdGFyZ2V0OiBzY2hlZHVsZU9wdGlvbnMudGFyZ2V0LFxuICAgICAgICAgICAgICBsb2dnZXI6IHNjaGVkdWxlT3B0aW9ucy5sb2dnZXIgfHwgbG9nZ2VyLmNyZWF0ZUNoaWxkKCcnKSxcbiAgICAgICAgICAgICAgd29ya3NwYWNlUm9vdDogaS53b3Jrc3BhY2VSb290LFxuICAgICAgICAgICAgICBjdXJyZW50RGlyZWN0b3J5OiBpLmN1cnJlbnREaXJlY3RvcnksXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgLy8gV2UgZG9uJ3Qgd2FudCB0byBzdWJzY3JpYmUgZXJyb3JzIGFuZCBjb21wbGV0ZS5cbiAgICAgICAgICAgIHN1YnNjcmlwdGlvbnMucHVzaChydW4ucHJvZ3Jlc3Muc3Vic2NyaWJlKChldmVudCkgPT4gcHJvZ3Jlc3NDaGFubmVsLm5leHQoZXZlbnQpKSk7XG5cbiAgICAgICAgICAgIHJldHVybiBydW47XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhc3luYyBnZXRUYXJnZXRPcHRpb25zKHRhcmdldDogVGFyZ2V0KSB7XG4gICAgICAgICAgICByZXR1cm4gZmlyc3RWYWx1ZUZyb20oXG4gICAgICAgICAgICAgIHNjaGVkdWxlci5zY2hlZHVsZTxUYXJnZXQsIGpzb24uSnNvblZhbHVlLCBqc29uLkpzb25PYmplY3Q+KFxuICAgICAgICAgICAgICAgICcuLmdldFRhcmdldE9wdGlvbnMnLFxuICAgICAgICAgICAgICAgIHRhcmdldCxcbiAgICAgICAgICAgICAgKS5vdXRwdXQsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgYXN5bmMgZ2V0UHJvamVjdE1ldGFkYXRhKHRhcmdldDogVGFyZ2V0IHwgc3RyaW5nKSB7XG4gICAgICAgICAgICByZXR1cm4gZmlyc3RWYWx1ZUZyb20oXG4gICAgICAgICAgICAgIHNjaGVkdWxlci5zY2hlZHVsZTxUYXJnZXQgfCBzdHJpbmcsIGpzb24uSnNvblZhbHVlLCBqc29uLkpzb25PYmplY3Q+KFxuICAgICAgICAgICAgICAgICcuLmdldFByb2plY3RNZXRhZGF0YScsXG4gICAgICAgICAgICAgICAgdGFyZ2V0LFxuICAgICAgICAgICAgICApLm91dHB1dCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhc3luYyBnZXRCdWlsZGVyTmFtZUZvclRhcmdldCh0YXJnZXQ6IFRhcmdldCkge1xuICAgICAgICAgICAgcmV0dXJuIGZpcnN0VmFsdWVGcm9tKFxuICAgICAgICAgICAgICBzY2hlZHVsZXIuc2NoZWR1bGU8VGFyZ2V0LCBqc29uLkpzb25WYWx1ZSwgc3RyaW5nPihcbiAgICAgICAgICAgICAgICAnLi5nZXRCdWlsZGVyTmFtZUZvclRhcmdldCcsXG4gICAgICAgICAgICAgICAgdGFyZ2V0LFxuICAgICAgICAgICAgICApLm91dHB1dCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhc3luYyB2YWxpZGF0ZU9wdGlvbnM8VCBleHRlbmRzIGpzb24uSnNvbk9iamVjdCA9IGpzb24uSnNvbk9iamVjdD4oXG4gICAgICAgICAgICBvcHRpb25zOiBqc29uLkpzb25PYmplY3QsXG4gICAgICAgICAgICBidWlsZGVyTmFtZTogc3RyaW5nLFxuICAgICAgICAgICkge1xuICAgICAgICAgICAgcmV0dXJuIGZpcnN0VmFsdWVGcm9tKFxuICAgICAgICAgICAgICBzY2hlZHVsZXIuc2NoZWR1bGU8W3N0cmluZywganNvbi5Kc29uT2JqZWN0XSwganNvbi5Kc29uVmFsdWUsIFQ+KFxuICAgICAgICAgICAgICAgICcuLnZhbGlkYXRlT3B0aW9ucycsXG4gICAgICAgICAgICAgICAgW2J1aWxkZXJOYW1lLCBvcHRpb25zXSxcbiAgICAgICAgICAgICAgKS5vdXRwdXQsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVwb3J0UnVubmluZygpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoY3VycmVudFN0YXRlKSB7XG4gICAgICAgICAgICAgIGNhc2UgQnVpbGRlclByb2dyZXNzU3RhdGUuV2FpdGluZzpcbiAgICAgICAgICAgICAgY2FzZSBCdWlsZGVyUHJvZ3Jlc3NTdGF0ZS5TdG9wcGVkOlxuICAgICAgICAgICAgICAgIHByb2dyZXNzKHsgc3RhdGU6IEJ1aWxkZXJQcm9ncmVzc1N0YXRlLlJ1bm5pbmcsIGN1cnJlbnQ6IDAsIHRvdGFsIH0sIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVwb3J0U3RhdHVzKHN0YXR1czogc3RyaW5nKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGN1cnJlbnRTdGF0ZSkge1xuICAgICAgICAgICAgICBjYXNlIEJ1aWxkZXJQcm9ncmVzc1N0YXRlLlJ1bm5pbmc6XG4gICAgICAgICAgICAgICAgcHJvZ3Jlc3MoeyBzdGF0ZTogY3VycmVudFN0YXRlLCBzdGF0dXMsIGN1cnJlbnQsIHRvdGFsIH0sIGNvbnRleHQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICBjYXNlIEJ1aWxkZXJQcm9ncmVzc1N0YXRlLldhaXRpbmc6XG4gICAgICAgICAgICAgICAgcHJvZ3Jlc3MoeyBzdGF0ZTogY3VycmVudFN0YXRlLCBzdGF0dXMgfSwgY29udGV4dCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSxcbiAgICAgICAgICByZXBvcnRQcm9ncmVzcyhjdXJyZW50OiBudW1iZXIsIHRvdGFsPzogbnVtYmVyLCBzdGF0dXM/OiBzdHJpbmcpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoY3VycmVudFN0YXRlKSB7XG4gICAgICAgICAgICAgIGNhc2UgQnVpbGRlclByb2dyZXNzU3RhdGUuUnVubmluZzpcbiAgICAgICAgICAgICAgICBwcm9ncmVzcyh7IHN0YXRlOiBjdXJyZW50U3RhdGUsIGN1cnJlbnQsIHRvdGFsLCBzdGF0dXMgfSwgY29udGV4dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhZGRUZWFyZG93bixcbiAgICAgICAgfTtcblxuICAgICAgICBjb250ZXh0LnJlcG9ydFJ1bm5pbmcoK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IEFzeW5jSXRlcmFibGU8VD4ge1xuICByZXR1cm4gISFvYmogJiYgdHlwZW9mIChvYmogYXMgQXN5bmNJdGVyYWJsZTxUPilbU3ltYm9sLmFzeW5jSXRlcmF0b3JdID09PSAnZnVuY3Rpb24nO1xufVxuIl19 |
@@ -8,4 +8,6 @@ /** | ||
*/ | ||
import * as jobs from './jobs'; | ||
export * from './api'; | ||
export { Architect, ScheduleOptions } from './architect'; | ||
export { createBuilder } from './create-builder'; | ||
export { jobs }; |
@@ -20,2 +20,14 @@ "use strict"; | ||
})); | ||
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 (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
@@ -25,3 +37,5 @@ 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.createBuilder = exports.Architect = void 0; | ||
exports.jobs = exports.createBuilder = exports.Architect = void 0; | ||
const jobs = __importStar(require("./jobs")); | ||
exports.jobs = jobs; | ||
__exportStar(require("./api"), exports); | ||
@@ -32,1 +46,2 @@ var architect_1 = require("./architect"); | ||
Object.defineProperty(exports, "createBuilder", { enumerable: true, get: function () { return create_builder_1.createBuilder; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3Qvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRUgsNkNBQStCO0FBTXRCLG9CQUFJO0FBSmIsd0NBQXNCO0FBQ3RCLHlDQUF5RDtBQUFoRCxzR0FBQSxTQUFTLE9BQUE7QUFDbEIsbURBQWlEO0FBQXhDLCtHQUFBLGFBQWEsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG5pbXBvcnQgKiBhcyBqb2JzIGZyb20gJy4vam9icyc7XG5cbmV4cG9ydCAqIGZyb20gJy4vYXBpJztcbmV4cG9ydCB7IEFyY2hpdGVjdCwgU2NoZWR1bGVPcHRpb25zIH0gZnJvbSAnLi9hcmNoaXRlY3QnO1xuZXhwb3J0IHsgY3JlYXRlQnVpbGRlciB9IGZyb20gJy4vY3JlYXRlLWJ1aWxkZXInO1xuXG5leHBvcnQgeyBqb2JzIH07XG4iXX0= |
@@ -12,2 +12,3 @@ export interface Schema { | ||
workspaceRoot: string; | ||
[property: string]: any; | ||
} | ||
@@ -18,2 +19,3 @@ export interface Target { | ||
target: string; | ||
[property: string]: any; | ||
} |
@@ -5,1 +5,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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/ | ||
import { experimental, json } from '@angular-devkit/core'; | ||
import { json } from '@angular-devkit/core'; | ||
import { BuilderInfo, BuilderInput, BuilderOutput, Target } from './api'; | ||
import { JobDescription, JobHandler } from './jobs'; | ||
/** | ||
@@ -29,3 +30,3 @@ * BuilderSymbol used for knowing if a function was created using createBuilder(). This is a | ||
*/ | ||
export declare type BuilderJobHandler<A extends json.JsonObject = json.JsonObject, I extends BuilderInput = BuilderInput, O extends BuilderOutput = BuilderOutput> = experimental.jobs.JobHandler<A, I, O> & { | ||
export type BuilderJobHandler<A extends json.JsonObject = json.JsonObject, I extends BuilderInput = BuilderInput, O extends BuilderOutput = BuilderOutput> = JobHandler<A, I, O> & { | ||
jobDescription: BuilderDescription; | ||
@@ -37,3 +38,3 @@ }; | ||
*/ | ||
export interface BuilderDescription extends experimental.jobs.JobDescription { | ||
export interface BuilderDescription extends JobDescription { | ||
info: BuilderInfo; | ||
@@ -45,3 +46,3 @@ } | ||
export interface Builder<OptionT extends json.JsonObject = json.JsonObject> { | ||
handler: experimental.jobs.JobHandler<json.JsonObject, BuilderInput, BuilderOutput>; | ||
handler: JobHandler<json.JsonObject, BuilderInput, BuilderOutput>; | ||
[BuilderSymbol]: true; | ||
@@ -48,0 +49,0 @@ [BuilderVersionSymbol]: string; |
@@ -27,1 +27,2 @@ "use strict"; | ||
exports.BuilderVersionSymbol = Symbol.for('@angular-devkit/architect:version'); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3Qvc3JjL2ludGVybmFsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7OztBQU1ILGdHQUFnRztBQUNoRywrREFBK0Q7QUFFL0Q7Ozs7O0dBS0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ZUJ1aWxkZXIoYnVpbGRlck5hbWU6IHN0cmluZyk6IFByb21pc2U8QnVpbGRlckluZm9UIHwgbnVsbD47XG4gIGxvYWRCdWlsZGVyKGluZm86IEJ1aWxkZXJJbmZvVCk6IFByb21pc2U8QnVpbGRlciB8IG51bGw+O1xuXG4gIGdldEN1cnJlbnREaXJlY3RvcnkoKTogUHJvbWlzZTxzdHJpbmc+O1xuICBnZXRXb3Jrc3BhY2VSb290KCk6IFByb21pc2U8c3RyaW5nPjtcblxuICBnZXRPcHRpb25zRm9yVGFyZ2V0KHRhcmdldDogVGFyZ2V0KTogUHJvbWlzZTxqc29uLkpzb25PYmplY3QgfCBudWxsPjtcblxuICBnZXRQcm9qZWN0TWV0YWRhdGEocHJvamVjdE5hbWU6IHN0cmluZyk6IFByb21pc2U8anNvbi5Kc29uT2JqZWN0IHwgbnVsbD47XG4gIGdldFByb2plY3RNZXRhZGF0YSh0YXJnZXQ6IFRhcmdldCk6IFByb21pc2U8anNvbi5Kc29uT2JqZWN0IHwgbnVsbD47XG59XG4iXX0= |
@@ -8,2 +8,3 @@ export interface Schema { | ||
target?: Target; | ||
[property: string]: any; | ||
} | ||
@@ -14,2 +15,3 @@ export interface Target { | ||
target?: string; | ||
[property: string]: any; | ||
} |
@@ -5,1 +5,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0LXNjaGVtYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2FyY2hpdGVjdC9zcmMvb3V0cHV0LXNjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsbUZBQW1GO0FBQ25GLG9GQUFvRiIsInNvdXJjZXNDb250ZW50IjpbIlxuLy8gVEhJUyBGSUxFIElTIEFVVE9NQVRJQ0FMTFkgR0VORVJBVEVELiBUTyBVUERBVEUgVEhJUyBGSUxFIFlPVSBORUVEIFRPIENIQU5HRSBUSEVcbi8vIENPUlJFU1BPTkRJTkcgSlNPTiBTQ0hFTUEgRklMRSwgVEhFTiBSVU4gZGV2a2l0LWFkbWluIGJ1aWxkIChvciBiYXplbCBidWlsZCAuLi4pLlxuXG5leHBvcnQgaW50ZXJmYWNlIFNjaGVtYSB7XG4gICAgZXJyb3I/OiAgc3RyaW5nO1xuICAgIGluZm8/OiAgIHsgW2tleTogc3RyaW5nXTogYW55IH07XG4gICAgc3VjY2VzczogYm9vbGVhbjtcbiAgICB0YXJnZXQ/OiBUYXJnZXQ7XG4gICAgW3Byb3BlcnR5OiBzdHJpbmddOiBhbnk7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgVGFyZ2V0IHtcbiAgICBjb25maWd1cmF0aW9uPzogc3RyaW5nO1xuICAgIHByb2plY3Q/OiAgICAgICBzdHJpbmc7XG4gICAgdGFyZ2V0PzogICAgICAgIHN0cmluZztcbiAgICBbcHJvcGVydHk6IHN0cmluZ106IGFueTtcbn1cbiJdfQ== |
@@ -14,2 +14,3 @@ export interface Schema { | ||
total?: number; | ||
[property: string]: any; | ||
} | ||
@@ -16,0 +17,0 @@ export declare enum State { |
@@ -12,2 +12,3 @@ "use strict"; | ||
State["Waiting"] = "waiting"; | ||
})(State = exports.State || (exports.State = {})); | ||
})(State || (exports.State = State = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZ3Jlc3Mtc2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYXJjaGl0ZWN0L3NyYy9wcm9ncmVzcy1zY2hlbWEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLG1GQUFtRjtBQUNuRixvRkFBb0Y7OztBQWNwRixJQUFZLEtBS1g7QUFMRCxXQUFZLEtBQUs7SUFDYix3QkFBZSxDQUFBO0lBQ2YsNEJBQW1CLENBQUE7SUFDbkIsNEJBQW1CLENBQUE7SUFDbkIsNEJBQW1CLENBQUE7QUFDdkIsQ0FBQyxFQUxXLEtBQUsscUJBQUwsS0FBSyxRQUtoQiIsInNvdXJjZXNDb250ZW50IjpbIlxuLy8gVEhJUyBGSUxFIElTIEFVVE9NQVRJQ0FMTFkgR0VORVJBVEVELiBUTyBVUERBVEUgVEhJUyBGSUxFIFlPVSBORUVEIFRPIENIQU5HRSBUSEVcbi8vIENPUlJFU1BPTkRJTkcgSlNPTiBTQ0hFTUEgRklMRSwgVEhFTiBSVU4gZGV2a2l0LWFkbWluIGJ1aWxkIChvciBiYXplbCBidWlsZCAuLi4pLlxuXG5leHBvcnQgaW50ZXJmYWNlIFNjaGVtYSB7XG4gICAgYnVpbGRlcjogIHsgW2tleTogc3RyaW5nXTogYW55IH07XG4gICAgY3VycmVudD86IG51bWJlcjtcbiAgICBlcnJvcj86ICAgYW55O1xuICAgIGlkOiAgICAgICBudW1iZXI7XG4gICAgc3RhdGU6ICAgIFN0YXRlO1xuICAgIHN0YXR1cz86ICBzdHJpbmc7XG4gICAgdGFyZ2V0PzogIHsgW2tleTogc3RyaW5nXTogYW55IH07XG4gICAgdG90YWw/OiAgIG51bWJlcjtcbiAgICBbcHJvcGVydHk6IHN0cmluZ106IGFueTtcbn1cblxuZXhwb3J0IGVudW0gU3RhdGUge1xuICAgIEVycm9yID0gXCJlcnJvclwiLFxuICAgIFJ1bm5pbmcgPSBcInJ1bm5pbmdcIixcbiAgICBTdG9wcGVkID0gXCJzdG9wcGVkXCIsXG4gICAgV2FpdGluZyA9IFwid2FpdGluZ1wiLFxufVxuIl19 |
@@ -8,18 +8,17 @@ /** | ||
*/ | ||
import { analytics, experimental, json, logging } from '@angular-devkit/core'; | ||
import { json, logging } from '@angular-devkit/core'; | ||
import { BuilderRun, Target } from './api'; | ||
import { Scheduler } from './jobs'; | ||
export declare function scheduleByName(name: string, buildOptions: json.JsonObject, options: { | ||
target?: Target; | ||
scheduler: experimental.jobs.Scheduler; | ||
scheduler: Scheduler; | ||
logger: logging.LoggerApi; | ||
workspaceRoot: string | Promise<string>; | ||
currentDirectory: string | Promise<string>; | ||
analytics?: analytics.Analytics; | ||
}): Promise<BuilderRun>; | ||
export declare function scheduleByTarget(target: Target, overrides: json.JsonObject, options: { | ||
scheduler: experimental.jobs.Scheduler; | ||
scheduler: Scheduler; | ||
logger: logging.LoggerApi; | ||
workspaceRoot: string | Promise<string>; | ||
currentDirectory: string | Promise<string>; | ||
analytics?: analytics.Analytics; | ||
}): Promise<BuilderRun>; |
@@ -11,6 +11,5 @@ "use strict"; | ||
exports.scheduleByTarget = exports.scheduleByName = void 0; | ||
const core_1 = require("@angular-devkit/core"); | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
const api_1 = require("./api"); | ||
const jobs_1 = require("./jobs"); | ||
const progressSchema = require('./progress-schema.json'); | ||
@@ -25,3 +24,3 @@ let _uniqueId = 0; | ||
const currentDirectory = await options.currentDirectory; | ||
const description = await job.description.toPromise(); | ||
const description = await (0, rxjs_1.firstValueFrom)(job.description); | ||
const info = description.info; | ||
@@ -38,8 +37,11 @@ const id = ++_uniqueId; | ||
// Wait for the job to be ready. | ||
if (job.state !== core_1.experimental.jobs.JobState.Started) { | ||
stateSubscription = job.outboundBus.subscribe((event) => { | ||
if (event.kind === core_1.experimental.jobs.JobOutboundMessageKind.Start) { | ||
job.input.next(message); | ||
} | ||
}, () => { }); | ||
if (job.state !== jobs_1.JobState.Started) { | ||
stateSubscription = job.outboundBus.subscribe({ | ||
next: (event) => { | ||
if (event.kind === jobs_1.JobOutboundMessageKind.Start) { | ||
job.input.next(message); | ||
} | ||
}, | ||
error: () => { }, | ||
}); | ||
} | ||
@@ -49,30 +51,24 @@ else { | ||
} | ||
const logChannelSub = job.getChannel('log').subscribe((entry) => { | ||
logger.next(entry); | ||
}, () => { }); | ||
const s = job.outboundBus.subscribe({ | ||
const logChannelSub = job.getChannel('log').subscribe({ | ||
next: (entry) => { | ||
logger.next(entry); | ||
}, | ||
error: () => { }, | ||
}); | ||
const outboundBusSub = job.outboundBus.subscribe({ | ||
error() { }, | ||
complete() { | ||
s.unsubscribe(); | ||
outboundBusSub.unsubscribe(); | ||
logChannelSub.unsubscribe(); | ||
if (stateSubscription) { | ||
stateSubscription.unsubscribe(); | ||
} | ||
stateSubscription.unsubscribe(); | ||
}, | ||
}); | ||
const output = job.output.pipe((0, operators_1.map)((output) => ({ | ||
const output = job.output.pipe((0, rxjs_1.map)((output) => ({ | ||
...output, | ||
...(options.target ? { target: options.target } : 0), | ||
info, | ||
})), (0, operators_1.shareReplay)()); | ||
// If there's an analytics object, take the job channel and report it to the analytics. | ||
if (options.analytics) { | ||
const reporter = new core_1.analytics.AnalyticsReporter(options.analytics); | ||
job | ||
.getChannel('analytics') | ||
.subscribe((report) => reporter.report(report)); | ||
} | ||
})), (0, rxjs_1.shareReplay)()); | ||
// Start the builder. | ||
output.pipe((0, operators_1.first)()).subscribe({ | ||
error() { }, | ||
output.pipe((0, rxjs_1.first)()).subscribe({ | ||
error: () => { }, | ||
}); | ||
@@ -84,12 +80,15 @@ return { | ||
get result() { | ||
return output.pipe((0, operators_1.first)()).toPromise(); | ||
return (0, rxjs_1.firstValueFrom)(output); | ||
}, | ||
get lastOutput() { | ||
return (0, rxjs_1.lastValueFrom)(output); | ||
}, | ||
output, | ||
progress: job | ||
.getChannel('progress', progressSchema) | ||
.pipe((0, operators_1.shareReplay)(1)), | ||
.pipe((0, rxjs_1.shareReplay)(1)), | ||
stop() { | ||
job.stop(); | ||
return job.outboundBus | ||
.pipe((0, operators_1.ignoreElements)(), (0, operators_1.catchError)(() => rxjs_1.EMPTY)) | ||
.pipe((0, rxjs_1.ignoreElements)(), (0, rxjs_1.catchError)(() => rx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xKSksXG4gICAgc3RvcCgpIHtcbiAgICAgIGpvYi5zdG9wKCk7XG5cbiAgICAgIHJldHVybiBqb2Iub3V0Ym91bmRCdXNcbiAgICAgICAgLnBpcGUoXG4gICAgICAgICAgaWdub3JlRWxlbWVudHMoKSxcbiAgICAgICAgICBjYXRjaEVycm9yKCgpID0+IEVNUFRZKSxcbiAgICAgICAgKVxuICAgICAgICAudG9Qcm9taXNlKCk7XG4gICAgfSxcbiAgfTtcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHNjaGVkdWxlQnlUYXJnZXQoXG4gIHRhcmdldDogVGFyZ2V0LFxuICBvdmVycmlkZXM6IGpzb24uSnNvbk9iamVjdCxcbiAgb3B0aW9uczoge1xuICAgIHNjaGVkdWxlcjogU2NoZWR1bGVyO1xuICAgIGxvZ2dlcjogbG9nZ2luZy5Mb2dnZXJBcGk7XG4gICAgd29ya3NwYWNlUm9vdDogc3RyaW5nIHwgUHJvbWlzZTxzdHJpbmc+O1xuICAgIGN1cnJlbnREaXJlY3Rvcnk6IHN0cmluZyB8IFByb21pc2U8c3RyaW5nPjtcbiAgfSxcbik6IFByb21pc2U8QnVpbGRlclJ1bj4ge1xuICByZXR1cm4gc2NoZWR1bGVCeU5hbWUoYHske3RhcmdldFN0cmluZ0Zyb21UYXJnZXQodGFyZ2V0KX19YCwgb3ZlcnJpZGVzLCB7XG4gICAgLi4ub3B0aW9ucyxcbiAgICB0YXJnZXQsXG4gICAgbG9nZ2VyOiBvcHRpb25zLmxvZ2dlcixcbiAgfSk7XG59XG4iXX0= |
@@ -26,1 +26,2 @@ "use strict"; | ||
__exportStar(require("./test-project-host"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3QvdGVzdGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7Ozs7Ozs7Ozs7Ozs7O0FBRUgsMkRBQXlDO0FBQ3pDLHNEQUFvQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmlvL2xpY2Vuc2VcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3Rlc3RpbmctYXJjaGl0ZWN0LWhvc3QnO1xuZXhwb3J0ICogZnJvbSAnLi90ZXN0LXByb2plY3QtaG9zdCc7XG4iXX0= |
@@ -9,3 +9,2 @@ /** | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Path, PathFragment, virtualFs } from '@angular-devkit/core'; | ||
@@ -12,0 +11,0 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node'; |
@@ -14,3 +14,2 @@ "use strict"; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
/** | ||
@@ -41,11 +40,11 @@ * @deprecated | ||
// Emit each fragment individually. | ||
(0, operators_1.concatMap)((fragments) => (0, rxjs_1.from)(fragments)), | ||
(0, rxjs_1.concatMap)((fragments) => (0, rxjs_1.from)(fragments)), | ||
// Join the path with fragment. | ||
(0, operators_1.map)((fragment) => (0, core_1.join)(path, fragment)), | ||
(0, rxjs_1.map)((fragment) => (0, core_1.join)(path, fragment)), | ||
// Emit directory content paths instead of the directory path. | ||
(0, operators_1.mergeMap)((path) => this.isDirectory(path).pipe((0, operators_1.concatMap)((isDir) => (isDir ? recursiveList(path) : (0, rxjs_1.of)(path)))))); | ||
(0, rxjs_1.mergeMap)((path) => this.isDirectory(path).pipe((0, rxjs_1.concatMap)((isDir) => (isDir ? recursiveList(path) : (0, rxjs_1.of)(path)))))); | ||
// Find a unique folder that we can write to to use as current root. | ||
return this.findUniqueFolderPath().pipe( | ||
// Save the path and create a scoped host for it. | ||
(0, operators_1.tap)((newFolderPath) => { | ||
(0, rxjs_1.tap)((newFolderPath) => { | ||
this._currentRoot = newFolderPath; | ||
@@ -55,8 +54,8 @@ this._scopedSyncHost = new core_1.virtualFs.SyncDelegateHost(new core_1.virtualFs.ScopedHost(this, this.root())); | ||
// List all files in root. | ||
(0, operators_1.concatMap)(() => recursiveList(this._templateRoot)), | ||
(0, rxjs_1.concatMap)(() => recursiveList(this._templateRoot)), | ||
// Copy them over to the current root. | ||
(0, operators_1.concatMap)((from) => { | ||
(0, rxjs_1.concatMap)((from) => { | ||
const to = (0, core_1.join)(this.root(), (0, core_1.relative)(this._templateRoot, from)); | ||
return this.read(from).pipe((0, operators_1.concatMap)((buffer) => this.write(to, buffer))); | ||
}), (0, operators_1.map)(() => { })); | ||
return this.read(from).pipe((0, rxjs_1.concatMap)((buffer) => this.write(to, buffer))); | ||
}), (0, rxjs_1.map)(() => { })); | ||
} | ||
@@ -69,3 +68,3 @@ restore() { | ||
// Wait 50ms and retry up to 10 times, to give time for file locks to clear. | ||
return this.exists(this.root()).pipe((0, operators_1.delay)(50), (0, operators_1.concatMap)((exists) => (exists ? this.delete(this.root()) : rxjs_1.EMPTY)), (0, operators_1.retry)(10), (0, operators_1.finalize)(() => { | ||
return this.exists(this.root()).pipe((0, rxjs_1.delay)(50), (0, rxjs_1.concatMap)((exists) => (exists ? this.delete(this.root()) : rxjs_1.EMPTY)), (0, rxjs_1.retry)(10), (0, rxjs_1.finalize)(() => { | ||
this._currentRoot = null; | ||
@@ -110,5 +109,6 @@ this._scopedSyncHost = null; | ||
const newFolderPath = (0, core_1.join)((0, core_1.dirname)(this._templateRoot), newFolderName); | ||
return this.exists(newFolderPath).pipe((0, operators_1.concatMap)((exists) => (exists ? this.findUniqueFolderPath() : (0, rxjs_1.of)(newFolderPath)))); | ||
return this.exists(newFolderPath).pipe((0, rxjs_1.concatMap)((exists) => (exists ? this.findUniqueFolderPath() : (0, rxjs_1.of)(newFolderPath)))); | ||
} | ||
} | ||
exports.TestProjectHost = TestProjectHost; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC1wcm9qZWN0LWhvc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9hcmNoaXRlY3QvdGVzdGluZy90ZXN0LXByb2plY3QtaG9zdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFFSCwrQ0FTOEI7QUFDOUIsb0RBQTJEO0FBRTNELCtCQVljO0FBRWQ7O0dBRUc7QUFDSCxNQUFhLGVBQWdCLFNBQVEscUJBQWM7SUFJakQsWUFBc0IsYUFBbUI7UUFDdkMsS0FBSyxFQUFFLENBQUM7UUFEWSxrQkFBYSxHQUFiLGFBQWEsQ0FBTTtRQUhqQyxpQkFBWSxHQUFnQixJQUFJLENBQUM7UUFDakMsb0JBQWUsR0FBNkMsSUFBSSxDQUFDO0lBSXpFLENBQUM7SUFFRCxJQUFJO1FBQ0YsSUFBSSxJQUFJLENBQUMsWUFBWSxLQUFLLElBQUksRUFBRTtZQUM5QixNQUFNLElBQUksS0FBSyxDQUFDLHdEQUF3RCxDQUFDLENBQUM7U0FDM0U7UUFFRCxPQUFPLElBQUksQ0FBQyxZQUFZLENBQUM7SUFDM0IsQ0FBQztJQUVELFVBQVU7UUFDUixJQUFJLElBQUksQ0FBQyxZQUFZLEtBQUssSUFBSSxJQUFJLElBQUksQ0FBQyxl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cmljIHN0cmluZy5cbiAgICBjb25zdCByYW5kb21TdHJpbmcgPSBNYXRoLnJhbmRvbSgpLnRvU3RyaW5nKDM2KS5zbGljZSgyKTtcbiAgICBjb25zdCBuZXdGb2xkZXJOYW1lID0gYHRlc3QtcHJvamVjdC1ob3N0LSR7YmFzZW5hbWUodGhpcy5fdGVtcGxhdGVSb290KX0tJHtyYW5kb21TdHJpbmd9YDtcbiAgICBjb25zdCBuZXdGb2xkZXJQYXRoID0gam9pbihkaXJuYW1lKHRoaXMuX3RlbXBsYXRlUm9vdCksIG5ld0ZvbGRlck5hbWUpO1xuXG4gICAgcmV0dXJuIHRoaXMuZXhpc3RzKG5ld0ZvbGRlclBhdGgpLnBpcGUoXG4gICAgICBjb25jYXRNYXAoKGV4aXN0cykgPT4gKGV4aXN0cyA/IHRoaXMuZmluZFVuaXF1ZUZvbGRlclBhdGgoKSA6IG9mKG5ld0ZvbGRlclBhdGgpKSksXG4gICAgKTtcbiAgfVxufVxuIl19 |
@@ -55,3 +55,3 @@ "use strict"; | ||
async addBuilderFromPackage(packageName) { | ||
const packageJson = await Promise.resolve().then(() => __importStar(require(packageName + '/package.json'))); | ||
const packageJson = await Promise.resolve(`${packageName + '/package.json'}`).then(s => __importStar(require(s))); | ||
if (!('builders' in packageJson)) { | ||
@@ -64,3 +64,3 @@ throw new Error('Invalid package.json, builders key not found.'); | ||
const builderJsonPath = packageName + '/' + packageJson['builders']; | ||
const builderJson = await Promise.resolve().then(() => __importStar(require(builderJsonPath))); | ||
const builderJson = await Promise.resolve(`${builderJsonPath}`).then(s => __importStar(require(s))); | ||
const builders = builderJson['builders']; | ||
@@ -76,4 +76,4 @@ if (!builders) { | ||
} | ||
const handler = (await Promise.resolve().then(() => __importStar(require(builderJsonPath + '/../' + b.implementation)))).default; | ||
const optionsSchema = await Promise.resolve().then(() => __importStar(require(builderJsonPath + '/../' + b.schema))); | ||
const handler = (await Promise.resolve(`${builderJsonPath + '/../' + b.implementation}`).then(s => __importStar(require(s)))).default; | ||
const optionsSchema = await Promise.resolve(`${builderJsonPath + '/../' + b.schema}`).then(s => __importStar(require(s))); | ||
this.addBuilder(`${packageJson.name}:${builderName}`, handler, b.description, optionsSchema); | ||
@@ -127,1 +127,2 @@ } | ||
exports.TestingArchitectHost = TestingArchitectHost; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy1hcmNoaXRlY3QtaG9zdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2FyY2hpdGVjdC90ZXN0aW5nL3Rlc3RpbmctYXJjaGl0ZWN0LWhvc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFHSCxnQ0FBcUU7QUFHckUsTUFBYSxvQkFBb0I7SUFLL0I7Ozs7O09BS0c7SUFDSCxZQUNTLGdCQUFnQixFQUFFLEVBQ2xCLG1CQUFtQixhQUFhLEVBQy9CLGVBQXFDLElBQUk7UUFGMUMsa0JBQWEsR0FBYixhQUFhLENBQUs7UUFDbEIscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFnQjtRQUMvQixpQkFBWSxHQUFaLFlBQVksQ0FBNkI7UUFiM0Msc0JBQWlCLEdBQUcsSUFBSSxHQUFHLEVBQW1CLENBQUM7UUFDL0MsZ0JBQVcsR0FBRyxJQUFJLEdBQUcsRUFBdUIsQ0FBQztRQUM3QyxlQUFVLEdBQUcsSUFBSSxHQUFHLEVBQTZELENBQUM7SUFZdkYsQ0FBQztJQUVKLFVBQVUsQ0FDUixXQUFtQixFQUNuQixPQUFnQixFQUNoQixXQUFXLEdBQUcsdUJBQXVCLEVBQ3JDLGVBQXVDLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRTtR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UYXJnZXQpOiBQcm9taXNlPGpzb24uSnNvbk9iamVjdCB8IG51bGw+IHtcbiAgICBjb25zdCBuYW1lID0gdGFyZ2V0U3RyaW5nRnJvbVRhcmdldCh0YXJnZXQpO1xuICAgIGNvbnN0IG1heWJlVGFyZ2V0ID0gdGhpcy5fdGFyZ2V0TWFwLmdldChuYW1lKTtcbiAgICBpZiAoIW1heWJlVGFyZ2V0KSB7XG4gICAgICByZXR1cm4gdGhpcy5fYmFja2VuZEhvc3QgJiYgdGhpcy5fYmFja2VuZEhvc3QuZ2V0T3B0aW9uc0ZvclRhcmdldCh0YXJnZXQpO1xuICAgIH1cblxuICAgIHJldHVybiBtYXliZVRhcmdldC5vcHRpb25zO1xuICB9XG5cbiAgYXN5bmMgZ2V0UHJvamVjdE1ldGFkYXRhKHRhcmdldDogVGFyZ2V0IHwgc3RyaW5nKTogUHJvbWlzZTxqc29uLkpzb25PYmplY3QgfCBudWxsPiB7XG4gICAgcmV0dXJuIHRoaXMuX2JhY2tlbmRIb3N0ICYmIHRoaXMuX2JhY2tlbmRIb3N0LmdldFByb2plY3RNZXRhZGF0YSh0YXJnZXQgYXMgc3RyaW5nKTtcbiAgfVxuXG4gIGFzeW5jIGxvYWRCdWlsZGVyKGluZm86IEJ1aWxkZXJJbmZvKTogUHJvbWlzZTxCdWlsZGVyIHwgbnVsbD4ge1xuICAgIHJldHVybiAoXG4gICAgICB0aGlzLl9idWlsZGVySW1wb3J0TWFwLmdldChpbmZvLmJ1aWxkZXJOYW1lKSB8fFxuICAgICAgKHRoaXMuX2JhY2tlbmRIb3N0ICYmIHRoaXMuX2JhY2tlbmRIb3N0LmxvYWRCdWlsZGVyKGluZm8pKVxuICAgICk7XG4gIH1cbn1cbiJdfQ== |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
430313
73
4019
13
+ Added@angular-devkit/core@16.2.10(transitive)
+ Addedajv@8.12.0(transitive)
+ Addedjsonc-parser@3.2.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedrxjs@7.8.1(transitive)
+ Addedtslib@2.8.0(transitive)
- Removed@angular-devkit/core@14.2.11(transitive)
- Removedajv@8.11.0(transitive)
- Removedjsonc-parser@3.1.0(transitive)
- Removedrxjs@6.6.7(transitive)
- Removedtslib@1.14.1(transitive)
Updated@angular-devkit/core@16.2.10
Updatedrxjs@7.8.1