Primeiro commit do projeto Angular

This commit is contained in:
2026-03-14 20:41:55 +00:00
parent 9bebe1de72
commit 94f4f46395
22413 changed files with 3221690 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
/**
* @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 { Builder } from '../src';
import { Schema as OperatorSchema } from './operator-schema';
declare const builder: Builder<OperatorSchema>;
export default builder;
+49
View File
@@ -0,0 +1,49 @@
"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 });
const rxjs_1 = require("rxjs");
const src_1 = require("../src");
const builder = (0, src_1.createBuilder)((options, context) => {
const allRuns = [];
context.reportProgress(0, (options.targets ? options.targets.length : 0) +
(options.builders ? options.builders.length : 0));
if (options.targets) {
allRuns.push(...options.targets.map(({ target: targetStr, overrides }, i) => {
const [project, target, configuration] = targetStr.split(/:/g, 3);
return context
.scheduleTarget({ project, target, configuration }, overrides || {})
.then((run) => [i, run]);
}));
}
if (options.builders) {
allRuns.push(...options.builders.map(({ builder, options }, i) => {
return context
.scheduleBuilder(builder, options || {})
.then((run) => [i, run]);
}));
}
const allResults = allRuns.map(() => null);
let n = 0;
context.reportProgress(n++, allRuns.length);
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;
context.reportProgress(n++, allRuns.length);
if (allResults.some((x) => x === null)) {
// Some builders aren't done running yet.
return rxjs_1.EMPTY;
}
else {
return (0, rxjs_1.of)({
success: allResults.every((x) => (x ? x.success : false)),
});
}
}));
});
exports.default = builder;
//# sourceMappingURL=all-of.js.map
+1
View File
@@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C,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC1D,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,OAAO,CAAC"}
+25
View File
@@ -0,0 +1,25 @@
{
"$schema": "../src/builders-schema.json",
"builders": {
"true": {
"implementation": "./true",
"schema": "./noop-schema.json",
"description": "Always succeed."
},
"false": {
"implementation": "./false",
"schema": "./noop-schema.json",
"description": "Always fails."
},
"allOf": {
"implementation": "./all-of",
"schema": "./operator-schema.json",
"description": "A builder that executes many builders in parallel, and succeed if both succeeds."
},
"concat": {
"implementation": "./concat",
"schema": "./operator-schema.json",
"description": "A builder that executes many builders one after the other, and stops when one fail. It will succeed if all builders succeeds (and return the last output)"
}
}
}
+11
View File
@@ -0,0 +1,11 @@
/**
* @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 { Builder } from '../src';
import { Schema as OperatorSchema } from './operator-schema';
declare const builder: Builder<OperatorSchema>;
export default builder;
+46
View File
@@ -0,0 +1,46 @@
"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 });
const rxjs_1 = require("rxjs");
const src_1 = require("../src");
const builder = (0, src_1.createBuilder)((options, context) => {
const allRuns = [];
context.reportProgress(0, (options.targets ? options.targets.length : 0) +
(options.builders ? options.builders.length : 0));
if (options.targets) {
allRuns.push(...options.targets.map(({ target: targetStr, overrides }) => {
const [project, target, configuration] = targetStr.split(/:/g, 3);
return () => context.scheduleTarget({ project, target, configuration }, overrides || {});
}));
}
if (options.builders) {
allRuns.push(...options.builders.map(({ builder, options }) => {
return () => context.scheduleBuilder(builder, options || {});
}));
}
let stop = null;
let i = 0;
context.reportProgress(i++, allRuns.length);
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, 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);
if (output === null || stop !== null) {
return stop || { success: false };
}
else if (output.success === false) {
return (stop = output);
}
else {
return output;
}
}), (0, rxjs_1.last)());
});
exports.default = builder;
//# sourceMappingURL=concat.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"concat.js","sourceRoot":"","sources":["concat.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,+BAAwE;AACxE,gCAA2E;AAG3E,MAAM,OAAO,GAA4B,IAAA,mBAAa,EAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAkC,EAAE,CAAC;IAElD,OAAO,CAAC,cAAc,CACpB,CAAC,EACD,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CACnD,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CACV,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;YAC1D,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAElE,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,MAAM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O,EAAE,KAAK,EAAE,CAAC;QACpC,CAAC;aAAM,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,EACF,IAAA,WAAI,GAAE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,OAAO,CAAC"}
+10
View File
@@ -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 { type Builder } from '../src';
declare const builder: Builder<{}>;
export default builder;
+16
View File
@@ -0,0 +1,16 @@
"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 });
const src_1 = require("../src");
const builder = (0, src_1.createBuilder)(() => ({
success: false,
error: 'False builder always errors.',
}));
exports.default = builder;
//# sourceMappingURL=false.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"false.js","sourceRoot":"","sources":["false.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gCAAqD;AAErD,MAAM,OAAO,GAAgB,IAAA,mBAAa,EAAC,GAAG,EAAE,CAAC,CAAC;IAChD,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,8BAA8B;CACtC,CAAC,CAAC,CAAC;AAEJ,kBAAe,OAAO,CAAC"}
+4
View File
@@ -0,0 +1,4 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object"
}
+22
View File
@@ -0,0 +1,22 @@
/**
* All input types of builders that perform operations on one or multiple sub-builders.
*/
export type Schema = {
builders?: Builder[];
targets?: Target[];
[property: string]: any;
};
export type Builder = {
builder: string;
options?: {
[key: string]: any;
};
[property: string]: any;
};
export type Target = {
overrides?: {
[key: string]: any;
};
target: string;
[property: string]: any;
};
+5
View File
@@ -0,0 +1,5 @@
"use strict";
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=operator-schema.js.map
@@ -0,0 +1 @@
{"version":3,"file":"operator-schema.js","sourceRoot":"","sources":["operator-schema.ts"],"names":[],"mappings":";AACA,mFAAmF;AACnF,oFAAoF"}
+41
View File
@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"description": "All input types of builders that perform operations on one or multiple sub-builders.",
"type": "object",
"properties": {
"builders": {
"type": "array",
"items": {
"type": "object",
"properties": {
"builder": {
"type": "string",
"pattern": ".*:.*"
},
"options": {
"type": "object"
}
},
"required": ["builder"]
},
"minItems": 1
},
"targets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"target": {
"type": "string",
"pattern": ".*:.*"
},
"overrides": {
"type": "object"
}
},
"required": ["target"]
},
"minItems": 1
}
}
}
+10
View File
@@ -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 { type Builder } from '../src';
declare const builder: Builder<{}>;
export default builder;
+13
View File
@@ -0,0 +1,13 @@
"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 });
const src_1 = require("../src");
const builder = (0, src_1.createBuilder)(() => ({ success: true }));
exports.default = builder;
//# sourceMappingURL=true.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"true.js","sourceRoot":"","sources":["true.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gCAAqD;AAErD,MAAM,OAAO,GAAgB,IAAA,mBAAa,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAEtE,kBAAe,OAAO,CAAC"}