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
@@ -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 { TaskExecutor } from '../../src';
import { RunSchematicTaskOptions } from './options';
export default function (): TaskExecutor<RunSchematicTaskOptions<{}>>;
@@ -0,0 +1,30 @@
"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.default = default_1;
function default_1() {
return (options, context) => {
if (!options?.name) {
throw new Error('RunSchematicTask requires an options object with a non-empty name property.');
}
const maybeWorkflow = context.engine.workflow;
const collection = options.collection || context.schematic.collection.description.name;
if (!maybeWorkflow) {
throw new Error('Need Workflow to support executing schematics as post tasks.');
}
return maybeWorkflow.execute({
collection: collection,
schematic: options.name,
options: options.options,
// Allow private when calling from the same collection.
allowPrivate: collection == context.schematic.collection.description.name,
});
};
}
//# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
{"version":3,"file":"executor.js","sourceRoot":"","sources":["executor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAKH,4BAuBC;AAvBD;IACE,OAAO,CAAC,OAAgD,EAAE,OAAyB,EAAE,EAAE;QACrF,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,6EAA6E,CAC9E,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC;QAEvF,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;QAClF,CAAC;QAED,OAAO,aAAa,CAAC,OAAO,CAAC;YAC3B,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,OAAO,CAAC,IAAI;YACvB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,uDAAuD;YACvD,YAAY,EAAE,UAAU,IAAI,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI;SAC1E,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
/**
* @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
*/
export declare const RunSchematicName = "run-schematic";
export interface RunSchematicTaskOptions<T> {
collection: string | null;
name: string;
options: T;
}
+12
View File
@@ -0,0 +1,12 @@
"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.RunSchematicName = void 0;
exports.RunSchematicName = 'run-schematic';
//# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
{"version":3,"file":"options.js","sourceRoot":"","sources":["options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEU,QAAA,gBAAgB,GAAG,eAAe,CAAC"}
+17
View File
@@ -0,0 +1,17 @@
/**
* @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 { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { RunSchematicTaskOptions } from './options';
export declare class RunSchematicTask<T> implements TaskConfigurationGenerator<RunSchematicTaskOptions<T>> {
protected _collection: string | null;
protected _schematic: string;
protected _options: T;
constructor(s: string, o: T);
constructor(c: string, s: string, o: T);
toConfiguration(): TaskConfiguration<RunSchematicTaskOptions<T>>;
}
+38
View File
@@ -0,0 +1,38 @@
"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.RunSchematicTask = void 0;
const options_1 = require("./options");
class RunSchematicTask {
_collection;
_schematic;
_options;
constructor(c, s, o) {
if (arguments.length == 2 || typeof s !== 'string') {
o = s;
s = c;
c = null;
}
this._collection = c;
this._schematic = s;
this._options = o;
}
toConfiguration() {
return {
name: options_1.RunSchematicName,
options: {
collection: this._collection,
name: this._schematic,
options: this._options,
},
};
}
}
exports.RunSchematicTask = RunSchematicTask;
//# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
{"version":3,"file":"task.js","sourceRoot":"","sources":["task.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,uCAAsE;AAEtE,MAAa,gBAAgB;IACjB,WAAW,CAAgB;IAC3B,UAAU,CAAS;IACnB,QAAQ,CAAI;IAKtB,YAAY,CAAgB,EAAE,CAAa,EAAE,CAAK;QAChD,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YACnD,CAAC,GAAG,CAAM,CAAC;YACX,CAAC,GAAG,CAAW,CAAC;YAChB,CAAC,GAAG,IAAI,CAAC;QACX,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,CAAM,CAAC;IACzB,CAAC;IAED,eAAe;QACb,OAAO;YACL,IAAI,EAAE,0BAAgB;YACtB,OAAO,EAAE;gBACP,UAAU,EAAE,IAAI,CAAC,WAAW;gBAC5B,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB;SACF,CAAC;IACJ,CAAC;CACF;AA9BD,4CA8BC"}