Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

21
node_modules/@angular/animations/LICENSE generated vendored Executable file
View file

@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

8
node_modules/@angular/animations/README.md generated vendored Executable file
View file

@ -0,0 +1,8 @@
Angular
=======
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in [Angular documentation](https://angular.dev/overview).
License: MIT

312
node_modules/@angular/animations/browser/index.d.ts generated vendored Executable file
View file

@ -0,0 +1,312 @@
/**
* @license Angular v18.2.10
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
import { AnimationMetadata } from '@angular/animations';
import { AnimationOptions } from '@angular/animations';
import { AnimationPlayer } from '@angular/animations';
import { AnimationTriggerMetadata } from '@angular/animations';
import * as i0 from '@angular/core';
import type { NgZone } from '@angular/core';
import { Renderer2 } from '@angular/core';
import { RendererFactory2 } from '@angular/core';
import { RendererStyleFlags2 } from '@angular/core';
import type { RendererType2 } from '@angular/core';
import { ɵAnimationRendererType } from '@angular/core';
import { ɵStyleData } from '@angular/animations';
import { ɵStyleDataMap } from '@angular/animations';
/**
* @publicApi
*/
export declare abstract class AnimationDriver {
/**
* @deprecated Use the NoopAnimationDriver class.
*/
static NOOP: AnimationDriver;
abstract validateStyleProperty(prop: string): boolean;
abstract validateAnimatableStyleProperty?: (prop: string) => boolean;
abstract containsElement(elm1: any, elm2: any): boolean;
/**
* Obtains the parent element, if any. `null` is returned if the element does not have a parent.
*/
abstract getParentElement(element: unknown): unknown;
abstract query(element: any, selector: string, multi: boolean): any[];
abstract computeStyle(element: any, prop: string, defaultValue?: string): string;
abstract animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any;
}
declare interface AnimationEngineInstruction {
type: AnimationTransitionInstructionType;
}
declare type AnimationFactoryWithListenerCallback = RendererFactory2 & {
scheduleListenerCallback: (count: number, fn: (e: any) => any, data: any) => void;
};
declare interface AnimationTimelineInstruction extends AnimationEngineInstruction {
element: any;
keyframes: Array<ɵStyleDataMap>;
preStyleProps: string[];
postStyleProps: string[];
duration: number;
delay: number;
totalTime: number;
easing: string | null;
stretchStartingKeyframe?: boolean;
subTimeline: boolean;
}
declare const enum AnimationTransitionInstructionType {
TransitionAnimation = 0,
TimelineAnimation = 1
}
declare class ElementInstructionMap {
private _map;
get(element: any): AnimationTimelineInstruction[];
append(element: any, instructions: AnimationTimelineInstruction[]): void;
has(element: any): boolean;
clear(): void;
}
/**
* @publicApi
*
* `AnimationDriver` implentation for Noop animations
*/
export declare class NoopAnimationDriver implements AnimationDriver {
/**
* @returns Whether `prop` is a valid CSS property
*/
validateStyleProperty(prop: string): boolean;
/**
*
* @returns Whether elm1 contains elm2.
*/
containsElement(elm1: any, elm2: any): boolean;
/**
* @returns Rhe parent of the given element or `null` if the element is the `document`
*/
getParentElement(element: unknown): unknown;
/**
* @returns The result of the query selector on the element. The array will contain up to 1 item
* if `multi` is `false`.
*/
query(element: any, selector: string, multi: boolean): any[];
/**
* @returns The `defaultValue` or empty string
*/
computeStyle(element: any, prop: string, defaultValue?: string): string;
/**
* @returns An `NoopAnimationPlayer`
*/
animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: any[], scrubberAccessRequested?: boolean): AnimationPlayer;
static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationDriver, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NoopAnimationDriver>;
}
/**
* Designed to be executed during a keyframe-based animation to apply any special-cased styles.
*
* When started (when the `start()` method is run) then the provided `startStyles`
* will be applied. When finished (when the `finish()` method is called) the
* `endStyles` will be applied as well any any starting styles. Finally when
* `destroy()` is called then all styles will be removed.
*/
declare class SpecialCasedStyles {
private _element;
private _startStyles;
private _endStyles;
static initialStylesByElement: WeakMap<any, ɵStyleDataMap>;
private _state;
private _initialStyles;
constructor(_element: any, _startStyles: ɵStyleDataMap | null, _endStyles: ɵStyleDataMap | null);
start(): void;
finish(): void;
destroy(): void;
}
export declare function ɵallowPreviousPlayerStylesMerge(duration: number, delay: number): boolean;
export declare class ɵAnimation {
private _driver;
private _animationAst;
constructor(_driver: AnimationDriver, input: AnimationMetadata | AnimationMetadata[]);
buildTimelines(element: any, startingStyles: ɵStyleDataMap | Array<ɵStyleDataMap>, destinationStyles: ɵStyleDataMap | Array<ɵStyleDataMap>, options: AnimationOptions, subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[];
}
export declare class ɵAnimationEngine {
private _driver;
private _normalizer;
private _transitionEngine;
private _timelineEngine;
private _triggerCache;
onRemovalComplete: (element: any, context: any) => void;
constructor(doc: Document, _driver: AnimationDriver, _normalizer: ɵAnimationStyleNormalizer);
registerTrigger(componentId: string, namespaceId: string, hostElement: any, name: string, metadata: AnimationTriggerMetadata): void;
register(namespaceId: string, hostElement: any): void;
destroy(namespaceId: string, context: any): void;
onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void;
onRemove(namespaceId: string, element: any, context: any): void;
disableAnimations(element: any, disable: boolean): void;
process(namespaceId: string, element: any, property: string, value: any): void;
listen(namespaceId: string, element: any, eventName: string, eventPhase: string, callback: (event: any) => any): () => any;
flush(microtaskId?: number): void;
get players(): AnimationPlayer[];
whenRenderingDone(): Promise<any>;
afterFlushAnimationsDone(cb: VoidFunction): void;
}
export declare class ɵAnimationRenderer extends ɵBaseAnimationRenderer implements Renderer2 {
factory: AnimationFactoryWithListenerCallback;
constructor(factory: AnimationFactoryWithListenerCallback, namespaceId: string, delegate: Renderer2, engine: ɵAnimationEngine, onDestroy?: () => void);
setProperty(el: any, name: string, value: any): void;
listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => any): () => void;
}
export declare class ɵAnimationRendererFactory implements RendererFactory2 {
private delegate;
private engine;
private _zone;
private _currentId;
private _microtaskId;
private _animationCallbacksBuffer;
private _rendererCache;
private _cdRecurDepth;
constructor(delegate: RendererFactory2, engine: ɵAnimationEngine, _zone: NgZone);
createRenderer(hostElement: any, type: RendererType2): ɵBaseAnimationRenderer;
begin(): void;
private _scheduleCountTask;
end(): void;
whenRenderingDone(): Promise<any>;
}
export declare abstract class ɵAnimationStyleNormalizer {
abstract normalizePropertyName(propertyName: string, errors: Error[]): string;
abstract normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string;
}
export declare class ɵBaseAnimationRenderer implements Renderer2 {
protected namespaceId: string;
delegate: Renderer2;
engine: ɵAnimationEngine;
private _onDestroy?;
readonly ɵtype: ɵAnimationRendererType.Regular;
constructor(namespaceId: string, delegate: Renderer2, engine: ɵAnimationEngine, _onDestroy?: (() => void) | undefined);
get data(): {
[key: string]: any;
};
destroyNode(node: any): void;
destroy(): void;
createElement(name: string, namespace?: string | null | undefined): any;
createComment(value: string): any;
createText(value: string): any;
appendChild(parent: any, newChild: any): void;
insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
selectRootElement(selectorOrNode: any, preserveContent?: boolean): any;
parentNode(node: any): any;
nextSibling(node: any): any;
setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void;
removeAttribute(el: any, name: string, namespace?: string | null | undefined): void;
addClass(el: any, name: string): void;
removeClass(el: any, name: string): void;
setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void;
removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void;
setProperty(el: any, name: string, value: any): void;
setValue(node: any, value: string): void;
listen(target: any, eventName: string, callback: (event: any) => boolean | void): () => void;
protected disableAnimations(element: any, value: boolean): void;
}
export declare function ɵcamelCaseToDashCase(input: string): string;
export declare function ɵcontainsElement(elm1: any, elm2: any): boolean;
export declare function ɵcreateEngine(type: 'animations' | 'noop', doc: Document): ɵAnimationEngine;
export declare function ɵgetParentElement(element: any): unknown | null;
export declare function ɵinvokeQuery(element: any, selector: string, multi: boolean): any[];
export declare class ɵNoopAnimationStyleNormalizer {
normalizePropertyName(propertyName: string, errors: Error[]): string;
normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string;
}
export declare function ɵnormalizeKeyframes(keyframes: Array<ɵStyleData> | Array<ɵStyleDataMap>): Array<ɵStyleDataMap>;
export declare function ɵvalidateStyleProperty(prop: string): boolean;
export declare function ɵvalidateWebAnimatableStyleProperty(prop: string): boolean;
export declare class ɵWebAnimationsDriver implements AnimationDriver {
validateStyleProperty(prop: string): boolean;
validateAnimatableStyleProperty(prop: string): boolean;
containsElement(elm1: any, elm2: any): boolean;
getParentElement(element: unknown): unknown;
query(element: any, selector: string, multi: boolean): any[];
computeStyle(element: any, prop: string, defaultValue?: string): string;
animate(element: any, keyframes: Array<Map<string, string | number>>, duration: number, delay: number, easing: string, previousPlayers?: AnimationPlayer[]): AnimationPlayer;
}
export declare class ɵWebAnimationsPlayer implements AnimationPlayer {
element: any;
keyframes: Array<ɵStyleDataMap>;
options: {
[key: string]: string | number;
};
private _specialStyles?;
private _onDoneFns;
private _onStartFns;
private _onDestroyFns;
private _duration;
private _delay;
private _initialized;
private _finished;
private _started;
private _destroyed;
private _finalKeyframe?;
private _originalOnDoneFns;
private _originalOnStartFns;
readonly domPlayer: Animation;
time: number;
parentPlayer: AnimationPlayer | null;
currentSnapshot: ɵStyleDataMap;
constructor(element: any, keyframes: Array<ɵStyleDataMap>, options: {
[key: string]: string | number;
}, _specialStyles?: (SpecialCasedStyles | null) | undefined);
private _onFinish;
init(): void;
private _buildPlayer;
private _preparePlayerBeforeStart;
private _convertKeyframesToObject;
onStart(fn: () => void): void;
onDone(fn: () => void): void;
onDestroy(fn: () => void): void;
play(): void;
pause(): void;
finish(): void;
reset(): void;
private _resetDomPlayerState;
restart(): void;
hasStarted(): boolean;
destroy(): void;
setPosition(p: number): void;
getPosition(): number;
get totalTime(): number;
beforeDestroy(): void;
}
export declare class ɵWebAnimationsStyleNormalizer extends ɵAnimationStyleNormalizer {
normalizePropertyName(propertyName: string, errors: Error[]): string;
normalizeStyleValue(userProvidedProperty: string, normalizedProperty: string, value: string | number, errors: Error[]): string;
}
export { }

52
node_modules/@angular/animations/browser/testing/index.d.ts generated vendored Executable file
View file

@ -0,0 +1,52 @@
/**
* @license Angular v18.2.10
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
import { AnimationDriver } from '@angular/animations/browser';
import { AnimationPlayer } from '@angular/animations';
import { NoopAnimationPlayer } from '@angular/animations';
import { ɵStyleDataMap } from '@angular/animations';
/**
* @publicApi
*/
export declare class MockAnimationDriver implements AnimationDriver {
static log: AnimationPlayer[];
validateStyleProperty(prop: string): boolean;
validateAnimatableStyleProperty(prop: string): boolean;
containsElement(elm1: any, elm2: any): boolean;
getParentElement(element: unknown): unknown;
query(element: any, selector: string, multi: boolean): any[];
computeStyle(element: any, prop: string, defaultValue?: string): string;
animate(element: any, keyframes: Array<ɵStyleDataMap>, duration: number, delay: number, easing: string, previousPlayers?: any[]): MockAnimationPlayer;
}
/**
* @publicApi
*/
export declare class MockAnimationPlayer extends NoopAnimationPlayer {
element: any;
keyframes: Array<ɵStyleDataMap>;
duration: number;
delay: number;
easing: string;
previousPlayers: any[];
private __finished;
private __started;
previousStyles: ɵStyleDataMap;
private _onInitFns;
currentSnapshot: ɵStyleDataMap;
private _keyframes;
constructor(element: any, keyframes: Array<ɵStyleDataMap>, duration: number, delay: number, easing: string, previousPlayers: any[]);
reset(): void;
finish(): void;
destroy(): void;
play(): void;
hasStarted(): boolean;
beforeDestroy(): void;
}
export { }

5
node_modules/@angular/animations/esm2022/animations.mjs generated vendored Executable file
View file

@ -0,0 +1,5 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYW5pbWF0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==

View file

@ -0,0 +1,5 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvd3Nlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9icm93c2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19

13
node_modules/@angular/animations/esm2022/browser/index.mjs generated vendored Executable file
View file

@ -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
*/
// This file is not used to build this module. It is only used during editing
// by the TypeScript language service and during build for verification. `ngc`
// replaces this file with production index.ts when it rewrites private symbol
// names.
export * from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsNkVBQTZFO0FBQzdFLDhFQUE4RTtBQUM5RSw4RUFBOEU7QUFDOUUsU0FBUztBQUVULGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuZGV2L2xpY2Vuc2VcbiAqL1xuXG4vLyBUaGlzIGZpbGUgaXMgbm90IHVzZWQgdG8gYnVpbGQgdGhpcyBtb2R1bGUuIEl0IGlzIG9ubHkgdXNlZCBkdXJpbmcgZWRpdGluZ1xuLy8gYnkgdGhlIFR5cGVTY3JpcHQgbGFuZ3VhZ2Ugc2VydmljZSBhbmQgZHVyaW5nIGJ1aWxkIGZvciB2ZXJpZmljYXRpb24uIGBuZ2NgXG4vLyByZXBsYWNlcyB0aGlzIGZpbGUgd2l0aCBwcm9kdWN0aW9uIGluZGV4LnRzIHdoZW4gaXQgcmV3cml0ZXMgcHJpdmF0ZSBzeW1ib2xcbi8vIG5hbWVzLlxuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19

View file

@ -0,0 +1,14 @@
/**
* @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
*/
/**
* @module
* @description
* Entry point for all public APIs of this package.
*/
export * from './src/browser';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVIOzs7O0dBSUc7QUFDSCxjQUFjLGVBQWUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmRldi9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIEVudHJ5IHBvaW50IGZvciBhbGwgcHVibGljIEFQSXMgb2YgdGhpcyBwYWNrYWdlLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NyYy9icm93c2VyJztcbiJdfQ==

View file

@ -0,0 +1,15 @@
/**
* @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
*/
/**
* @module
* @description
* Entry point for all animation APIs of the animation browser package.
*/
export { AnimationDriver, NoopAnimationDriver } from './render/animation_driver';
export * from './private_export';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJvd3Nlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvYnJvd3Nlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSDs7OztHQUlHO0FBQ0gsT0FBTyxFQUFDLGVBQWUsRUFBRSxtQkFBbUIsRUFBQyxNQUFNLDJCQUEyQixDQUFDO0FBQy9FLGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5kZXYvbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIGFuaW1hdGlvbiBBUElzIG9mIHRoZSBhbmltYXRpb24gYnJvd3NlciBwYWNrYWdlLlxuICovXG5leHBvcnQge0FuaW1hdGlvbkRyaXZlciwgTm9vcEFuaW1hdGlvbkRyaXZlcn0gZnJvbSAnLi9yZW5kZXIvYW5pbWF0aW9uX2RyaXZlcic7XG5leHBvcnQgKiBmcm9tICcuL3ByaXZhdGVfZXhwb3J0JztcbiJdfQ==

View file

@ -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 { NoopAnimationStyleNormalizer } from './dsl/style_normalization/animation_style_normalizer';
import { WebAnimationsStyleNormalizer } from './dsl/style_normalization/web_animations_style_normalizer';
import { NoopAnimationDriver } from './render/animation_driver';
import { AnimationEngine } from './render/animation_engine_next';
import { WebAnimationsDriver } from './render/web_animations/web_animations_driver';
export function createEngine(type, doc) {
// TODO: find a way to make this tree shakable.
if (type === 'noop') {
return new AnimationEngine(doc, new NoopAnimationDriver(), new NoopAnimationStyleNormalizer());
}
return new AnimationEngine(doc, new WebAnimationsDriver(), new WebAnimationsStyleNormalizer());
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX2VuZ2luZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvY3JlYXRlX2VuZ2luZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0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2wvc3R5bGVfbm9ybWFsaXphdGlvbi9hbmltYXRpb25fc3R5bGVfbm9ybWFsaXplcic7XG5pbXBvcnQge1dlYkFuaW1hdGlvbnNTdHlsZU5vcm1hbGl6ZXJ9IGZyb20gJy4vZHNsL3N0eWxlX25vcm1hbGl6YXRpb24vd2ViX2FuaW1hdGlvbnNfc3R5bGVfbm9ybWFsaXplcic7XG5pbXBvcnQge05vb3BBbmltYXRpb25Ecml2ZXJ9IGZyb20gJy4vcmVuZGVyL2FuaW1hdGlvbl9kcml2ZXInO1xuaW1wb3J0IHtBbmltYXRpb25FbmdpbmV9IGZyb20gJy4vcmVuZGVyL2FuaW1hdGlvbl9lbmdpbmVfbmV4dCc7XG5pbXBvcnQge1dlYkFuaW1hdGlvbnNEcml2ZXJ9IGZyb20gJy4vcmVuZGVyL3dlYl9hbmltYXRpb25zL3dlYl9hbmltYXRpb25zX2RyaXZlcic7XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVFbmdpbmUodHlwZTogJ2FuaW1hdGlvbnMnIHwgJ25vb3AnLCBkb2M6IERvY3VtZW50KTogQW5pbWF0aW9uRW5naW5lIHtcbiAgLy8gVE9ETzogZmluZCBhIHdheSB0byBtYWtlIHRoaXMgdHJlZSBzaGFrYWJsZS5cbiAgaWYgKHR5cGUgPT09ICdub29wJykge1xuICAgIHJldHVybiBuZXcgQW5pbWF0aW9uRW5naW5lKGRvYywgbmV3IE5vb3BBbmltYXRpb25Ecml2ZXIoKSwgbmV3IE5vb3BBbmltYXRpb25TdHlsZU5vcm1hbGl6ZXIoKSk7XG4gIH1cblxuICByZXR1cm4gbmV3IEFuaW1hdGlvbkVuZ2luZShkb2MsIG5ldyBXZWJBbmltYXRpb25zRHJpdmVyKCksIG5ldyBXZWJBbmltYXRpb25zU3R5bGVOb3JtYWxpemVyKCkpO1xufVxuIl19

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
export {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TtcbiAgdmlzaXRBbmltYXRlUmVmKG5vZGU6IEFuaW1hdGlvbkFuaW1hdGVSZWZNZXRhZGF0YSwgY29udGV4dDogYW55KTogYW55O1xuICB2aXNpdFF1ZXJ5KG5vZGU6IEFuaW1hdGlvblF1ZXJ5TWV0YWRhdGEsIGNvbnRleHQ6IGFueSk6IGFueTtcbiAgdmlzaXRTdGFnZ2VyKG5vZGU6IEFuaW1hdGlvblN0YWdnZXJNZXRhZGF0YSwgY29udGV4dDogYW55KTogYW55O1xufVxuIl19

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,15 @@
export function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {
return {
type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,
element,
keyframes,
preStyleProps,
postStyleProps,
duration,
delay,
totalTime: duration + delay,
easing,
subTimeline,
};
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uX3RpbWVsaW5lX2luc3RydWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5pbWF0aW9ucy9icm93c2VyL3NyYy9kc2wvYW5pbWF0aW9uX3RpbWVsaW5lX2luc3RydWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJCQSxNQUFNLFVBQVUseUJBQXlCLENBQ3ZDLE9BQVksRUFDWixTQUErQixFQUMvQixhQUF1QixFQUN2QixjQUF3QixFQUN4QixRQUFnQixFQUNoQixLQUFhLEVBQ2IsU0FBd0IsSUFBSSxFQUM1QixjQUF1QixLQUFLO0lBRTVCLE9BQU87UUFDTCxJQUFJLDhEQUFzRDtRQUMxRCxPQUFPO1FBQ1AsU0FBUztRQUNULGFBQWE7UUFDYixjQUFjO1FBQ2QsUUFBUTtRQUNSLEtBQUs7UUFDTCxTQUFTLEVB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iAgc3ViVGltZWxpbmU6IGJvb2xlYW47XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVUaW1lbGluZUluc3RydWN0aW9uKFxuICBlbGVtZW50OiBhbnksXG4gIGtleWZyYW1lczogQXJyYXk8ybVTdHlsZURhdGFNYXA+LFxuICBwcmVTdHlsZVByb3BzOiBzdHJpbmdbXSxcbiAgcG9zdFN0eWxlUHJvcHM6IHN0cmluZ1tdLFxuICBkdXJhdGlvbjogbnVtYmVyLFxuICBkZWxheTogbnVtYmVyLFxuICBlYXNpbmc6IHN0cmluZyB8IG51bGwgPSBudWxsLFxuICBzdWJUaW1lbGluZTogYm9vbGVhbiA9IGZhbHNlLFxuKTogQW5pbWF0aW9uVGltZWxpbmVJbnN0cnVjdGlvbiB7XG4gIHJldHVybiB7XG4gICAgdHlwZTogQW5pbWF0aW9uVHJhbnNpdGlvbkluc3RydWN0aW9uVHlwZS5UaW1lbGluZUFuaW1hdGlvbixcbiAgICBlbGVtZW50LFxuICAgIGtleWZyYW1lcyxcbiAgICBwcmVTdHlsZVByb3BzLFxuICAgIHBvc3RTdHlsZVByb3BzLFxuICAgIGR1cmF0aW9uLFxuICAgIGRlbGF5LFxuICAgIHRvdGFsVGltZTogZHVyYXRpb24gKyBkZWxheSxcbiAgICBlYXNpbmcsXG4gICAgc3ViVGltZWxpbmUsXG4gIH07XG59XG4iXX0=

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,26 @@
/**
* @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 function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {
return {
type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,
element,
triggerName,
isRemovalTransition,
fromState,
fromStyles,
toState,
toStyles,
timelines,
queriedElements,
preStyleProps,
postStyleProps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vbkluc3RydWN0aW9uKFxuICBlbGVtZW50OiBhbnksXG4gIHRyaWdnZXJOYW1lOiBzdHJpbmcsXG4gIGZyb21TdGF0ZTogc3RyaW5nLFxuICB0b1N0YXRlOiBzdHJpbmcsXG4gIGlzUmVtb3ZhbFRyYW5zaXRpb246IGJvb2xlYW4sXG4gIGZyb21TdHlsZXM6IMm1U3R5bGVEYXRhTWFwLFxuICB0b1N0eWxlczogybVTdHlsZURhdGFNYXAsXG4gIHRpbWVsaW5lczogQW5pbWF0aW9uVGltZWxpbmVJbnN0cnVjdGlvbltdLFxuICBxdWVyaWVkRWxlbWVudHM6IGFueVtdLFxuICBwcmVTdHlsZVByb3BzOiBNYXA8YW55LCBTZXQ8c3RyaW5nPj4sXG4gIHBvc3RTdHlsZVByb3BzOiBNYXA8YW55LCBTZXQ8c3RyaW5nPj4sXG4gIHRvdGFsVGltZTogbnVtYmVyLFxuICBlcnJvcnM/OiBFcnJvcltdLFxuKTogQW5pbWF0aW9uVHJhbnNpdGlvbkluc3RydWN0aW9uIHtcbiAgcmV0dXJuIHtcbiAgICB0eXBlOiBBbmltYXRpb25UcmFuc2l0aW9uSW5zdHJ1Y3Rpb25UeXBlLlRyYW5zaXRpb25BbmltYXRpb24sXG4gICAgZWxlbWVudCxcbiAgICB0cmlnZ2VyTmFtZSxcbiAgICBpc1JlbW92YWxUcmFuc2l0aW9uLFxuICAgIGZyb21TdGF0ZSxcbiAgICBmcm9tU3R5bGVzLFxuICAgIHRvU3RhdGUsXG4gICAgdG9TdHlsZXMsXG4gICAgdGltZWxpbmVzLFxuICAgIHF1ZXJpZWRFbGVtZW50cyxcbiAgICBwcmVTdHlsZVByb3BzLFxuICAgIHBvc3RTdHlsZVByb3BzLFxuICAgIHRvdGFsVGltZSxcbiAgICBlcnJvcnMsXG4gIH07XG59XG4iXX0=

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,22 @@
export class ElementInstructionMap {
constructor() {
this._map = new Map();
}
get(element) {
return this._map.get(element) || [];
}
append(element, instructions) {
let existingInstructions = this._map.get(element);
if (!existingInstructions) {
this._map.set(element, (existingInstructions = []));
}
existingInstructions.push(...instructions);
}
has(element) {
return this._map.has(element);
}
clear() {
this._map.clear();
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudF9pbnN0cnVjdGlvbl9tYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL2RzbC9lbGVtZW50X2luc3RydWN0aW9uX21hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTQSxNQUFNLE9BQU8scUJBQXFCO0lBQWxDO1FBQ1UsU0FBSSxHQUFHLElBQUksR0FBRyxFQUF1QyxDQUFDO0lBcUJoRSxDQUFDO0lBbkJDLEdBQUcsQ0FBQyxPQUFZO1FBQ2QsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDdEMsQ0FBQztJQUVELE1BQU0sQ0FBQyxPQUFZLEVBQUUsWUFBNEM7UUFDL0QsSUFBSSxvQkFBb0IsR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUNsRCxJQUFJLENBQUMsb0JBQW9CLEVBQUUsQ0FBQztZQUMxQixJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxvQkFBb0IsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO1FBQ3RELENBQUM7UUFDRCxvQkFBb0IsQ0FBQyxJQUFJLENBQUMsR0FBRyxZQUFZLENBQUMsQ0FBQztJQUM3QyxDQUFDO0lBRUQsR0FBRyxDQUFDLE9BQVk7UUFDZCxPQUFPLElBQUks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gICAgdGhpcy5fbWFwLnNldChlbGVtZW50LCAoZXhpc3RpbmdJbnN0cnVjdGlvbnMgPSBbXSkpO1xuICAgIH1cbiAgICBleGlzdGluZ0luc3RydWN0aW9ucy5wdXNoKC4uLmluc3RydWN0aW9ucyk7XG4gIH1cblxuICBoYXMoZWxlbWVudDogYW55KTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHRoaXMuX21hcC5oYXMoZWxlbWVudCk7XG4gIH1cblxuICBjbGVhcigpIHtcbiAgICB0aGlzLl9tYXAuY2xlYXIoKTtcbiAgfVxufVxuIl19

View file

@ -0,0 +1,18 @@
/**
* @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 class AnimationStyleNormalizer {
}
export class NoopAnimationStyleNormalizer {
normalizePropertyName(propertyName, errors) {
return propertyName;
}
normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {
return value;
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uX3N0eWxlX25vcm1hbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL2RzbC9zdHlsZV9ub3JtYWxpemF0aW9uL2FuaW1hdGlvbl9zdHlsZV9ub3JtYWxpemVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE1BQU0sT0FBZ0Isd0JBQXdCO0NBUTdDO0FBRUQsTUFBTSxPQUFPLDRCQUE0QjtJQUN2QyxxQkFBcUIsQ0FBQyxZQUFvQixFQUFFLE1BQWU7UUFDekQsT0FBTyxZQUFZLENBQUM7SUFDdEIsQ0FBQztJQUVELG1CQUFtQixDQUNqQixvQkFBNEIsRUFDNUIsa0JBQTBCLE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gICAgbm9ybWFsaXplZFByb3BlcnR5OiBzdHJpbmcsXG4gICAgdmFsdWU6IHN0cmluZyB8IG51bWJlcixcbiAgICBlcnJvcnM6IEVycm9yW10sXG4gICk6IHN0cmluZyB7XG4gICAgcmV0dXJuIDxhbnk+dmFsdWU7XG4gIH1cbn1cbiJdfQ==

View file

@ -0,0 +1,63 @@
/**
* @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 { invalidCssUnitValue } from '../../error_helpers';
import { dashCaseToCamelCase } from '../../util';
import { AnimationStyleNormalizer } from './animation_style_normalizer';
const DIMENSIONAL_PROP_SET = new Set([
'width',
'height',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'left',
'top',
'bottom',
'right',
'fontSize',
'outlineWidth',
'outlineOffset',
'paddingTop',
'paddingLeft',
'paddingBottom',
'paddingRight',
'marginTop',
'marginLeft',
'marginBottom',
'marginRight',
'borderRadius',
'borderWidth',
'borderTopWidth',
'borderLeftWidth',
'borderRightWidth',
'borderBottomWidth',
'textIndent',
'perspective',
]);
export class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {
normalizePropertyName(propertyName, errors) {
return dashCaseToCamelCase(propertyName);
}
normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {
let unit = '';
const strVal = value.toString().trim();
if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {
if (typeof value === 'number') {
unit = 'px';
}
else {
const valAndSuffixMatch = value.match(/^[+-]?[\d\.]+([a-z]*)$/);
if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {
errors.push(invalidCssUnitValue(userProvidedProperty, value));
}
}
}
return strVal + unit;
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViX2FuaW1hdGlvbnNfc3R5bGVfbm9ybWFsaXplci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIj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cmV0dXJuIHN0clZhbCArIHVuaXQ7XG4gIH1cbn1cbiJdfQ==

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,19 @@
/**
* @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 { createEngine as ɵcreateEngine } from './create_engine';
export { Animation as ɵAnimation } from './dsl/animation';
export { AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, } from './dsl/style_normalization/animation_style_normalizer';
export { WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer } from './dsl/style_normalization/web_animations_style_normalizer';
export { AnimationEngine as ɵAnimationEngine } from './render/animation_engine_next';
export { AnimationRendererFactory as ɵAnimationRendererFactory } from './render/animation_renderer';
export { AnimationRenderer as ɵAnimationRenderer, BaseAnimationRenderer as ɵBaseAnimationRenderer, } from './render/renderer';
export { containsElement as ɵcontainsElement, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, validateStyleProperty as ɵvalidateStyleProperty, validateWebAnimatableStyleProperty as ɵvalidateWebAnimatableStyleProperty, } from './render/shared';
export { WebAnimationsDriver as ɵWebAnimationsDriver } from './render/web_animations/web_animations_driver';
export { WebAnimationsPlayer as ɵWebAnimationsPlayer } from './render/web_animations/web_animations_player';
export { allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, camelCaseToDashCase as ɵcamelCaseToDashCase, normalizeKeyframes as ɵnormalizeKeyframes, } from './util';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9leHBvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvc3JjL3ByaXZhdGVfZXhwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3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FsbG93UHJldmlvdXNQbGF5ZXJTdHlsZXNNZXJnZSxcbiAgY2FtZWxDYXNlVG9EYXNoQ2FzZSBhcyDJtWNhbWVsQ2FzZVRvRGFzaENhc2UsXG4gIG5vcm1hbGl6ZUtleWZyYW1lcyBhcyDJtW5vcm1hbGl6ZUtleWZyYW1lcyxcbn0gZnJvbSAnLi91dGlsJztcbiJdfQ==

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uX2VuZ2luZV9pbnN0cnVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci9zcmMvcmVuZGVyL2FuaW1hdGlvbl9lbmdpbmVfaW5zdHJ1Y3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmRldi9saWNlbnNlXG4gKi9cbmV4cG9ydCBjb25zdCBlbnVtIEFuaW1hdGlvblRyYW5zaXRpb25JbnN0cnVjdGlvblR5cGUge1xuICBUcmFuc2l0aW9uQW5pbWF0aW9uLFxuICBUaW1lbGluZUFuaW1hdGlvbixcbn1cblxuZXhwb3J0IGludGVyZmFjZSBBbmltYXRpb25FbmdpbmVJbnN0cnVjdGlvbiB7XG4gIHR5cGU6IEFuaW1hdGlvblRyYW5zaXRpb25JbnN0cnVjdGlvblR5cGU7XG59XG4iXX0=

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

217
node_modules/@angular/animations/esm2022/browser/src/util.mjs generated vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,36 @@
/**
* @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
*/
function createListOfWarnings(warnings) {
const LINE_START = '\n - ';
return `${LINE_START}${warnings
.filter(Boolean)
.map((warning) => warning)
.join(LINE_START)}`;
}
export function warnValidation(warnings) {
(typeof ngDevMode === 'undefined' || ngDevMode) &&
console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);
}
export function warnTriggerBuild(name, warnings) {
(typeof ngDevMode === 'undefined' || ngDevMode) &&
console.warn(`The animation trigger "${name}" has built with the following warnings:${createListOfWarnings(warnings)}`);
}
export function warnRegister(warnings) {
(typeof ngDevMode === 'undefined' || ngDevMode) &&
console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);
}
export function triggerParsingWarnings(name, warnings) {
(typeof ngDevMode === 'undefined' || ngDevMode) &&
console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);
}
export function pushUnrecognizedPropertiesWarning(warnings, props) {
if (props.length) {
warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FybmluZ19oZWxwZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5p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ogdm9pZCB7XG4gICh0eXBlb2YgbmdEZXZNb2RlID09PSAndW5kZWZpbmVkJyB8fCBuZ0Rldk1vZGUpICYmXG4gICAgY29uc29sZS53YXJuKFxuICAgICAgYEFuaW1hdGlvbiBwYXJzaW5nIGZvciB0aGUgJHtuYW1lfSB0cmlnZ2VyIHByZXNlbnRzIHRoZSBmb2xsb3dpbmcgd2FybmluZ3M6JHtjcmVhdGVMaXN0T2ZXYXJuaW5ncyhcbiAgICAgICAgd2FybmluZ3MsXG4gICAgICApfWAsXG4gICAgKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHB1c2hVbnJlY29nbml6ZWRQcm9wZXJ0aWVzV2FybmluZyh3YXJuaW5nczogc3RyaW5nW10sIHByb3BzOiBzdHJpbmdbXSk6IHZvaWQge1xuICBpZiAocHJvcHMubGVuZ3RoKSB7XG4gICAgd2FybmluZ3MucHVzaChgVGhlIGZvbGxvd2luZyBwcm92aWRlZCBwcm9wZXJ0aWVzIGFyZSBub3QgcmVjb2duaXplZDogJHtwcm9wcy5qb2luKCcsICcpfWApO1xuICB9XG59XG4iXX0=

View file

@ -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
*/
// This file is not used to build this module. It is only used during editing
// by the TypeScript language service and during build for verifcation. `ngc`
// replaces this file with production index.ts when it rewrites private symbol
// names.
export * from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2Jyb3dzZXIvdGVzdGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCw2RUFBNkU7QUFDN0UsNkVBQTZFO0FBQzdFLDhFQUE4RTtBQUM5RSxTQUFTO0FBRVQsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5kZXYvbGljZW5zZVxuICovXG5cbi8vIFRoaXMgZmlsZSBpcyBub3QgdXNlZCB0byBidWlsZCB0aGlzIG1vZHVsZS4gSXQgaXMgb25seSB1c2VkIGR1cmluZyBlZGl0aW5nXG4vLyBieSB0aGUgVHlwZVNjcmlwdCBsYW5ndWFnZSBzZXJ2aWNlIGFuZCBkdXJpbmcgYnVpbGQgZm9yIHZlcmlmY2F0aW9uLiBgbmdjYFxuLy8gcmVwbGFjZXMgdGhpcyBmaWxlIHdpdGggcHJvZHVjdGlvbiBpbmRleC50cyB3aGVuIGl0IHJld3JpdGVzIHByaXZhdGUgc3ltYm9sXG4vLyBuYW1lcy5cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==

View file

@ -0,0 +1,14 @@
/**
* @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
*/
/**
* @module
* @description
* Entry point for all public APIs of this package.
*/
export * from './src/testing';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci90ZXN0aW5nL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILGNBQWMsZUFBZSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuZGV2L2xpY2Vuc2VcbiAqL1xuXG4vKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogRW50cnkgcG9pbnQgZm9yIGFsbCBwdWJsaWMgQVBJcyBvZiB0aGlzIHBhY2thZ2UuXG4gKi9cbmV4cG9ydCAqIGZyb20gJy4vc3JjL3Rlc3RpbmcnO1xuIl19

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
/**
* @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 { MockAnimationDriver, MockAnimationPlayer } from './mock_animation_driver';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci90ZXN0aW5nL3NyYy90ZXN0aW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUNILE9BQU8sRUFBQyxtQkFBbUIsRUFBRSxtQkFBbUIsRUFBQyxNQUFNLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuZGV2L2xpY2Vuc2VcbiAqL1xuZXhwb3J0IHtNb2NrQW5pbWF0aW9uRHJpdmVyLCBNb2NrQW5pbWF0aW9uUGxheWVyfSBmcm9tICcuL21vY2tfYW5pbWF0aW9uX2RyaXZlcic7XG4iXX0=

View file

@ -0,0 +1,5 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvYnJvd3Nlci90ZXN0aW5nL3Rlc3RpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=

13
node_modules/@angular/animations/esm2022/index.mjs generated vendored Executable file
View file

@ -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
*/
// This file is not used to build this module. It is only used during editing
// by the TypeScript language service and during build for verification. `ngc`
// replaces this file with production index.ts when it rewrites private symbol
// names.
export * from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILDZFQUE2RTtBQUM3RSw4RUFBOEU7QUFDOUUsOEVBQThFO0FBQzlFLFNBQVM7QUFFVCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmRldi9saWNlbnNlXG4gKi9cblxuLy8gVGhpcyBmaWxlIGlzIG5vdCB1c2VkIHRvIGJ1aWxkIHRoaXMgbW9kdWxlLiBJdCBpcyBvbmx5IHVzZWQgZHVyaW5nIGVkaXRpbmdcbi8vIGJ5IHRoZSBUeXBlU2NyaXB0IGxhbmd1YWdlIHNlcnZpY2UgYW5kIGR1cmluZyBidWlsZCBmb3IgdmVyaWZpY2F0aW9uLiBgbmdjYFxuLy8gcmVwbGFjZXMgdGhpcyBmaWxlIHdpdGggcHJvZHVjdGlvbiBpbmRleC50cyB3aGVuIGl0IHJld3JpdGVzIHByaXZhdGUgc3ltYm9sXG4vLyBuYW1lcy5cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcbiJdfQ==

14
node_modules/@angular/animations/esm2022/public_api.mjs generated vendored Executable file
View file

@ -0,0 +1,14 @@
/**
* @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
*/
/**
* @module
* @description
* Entry point for all public APIs of this package.
*/
export * from './src/animations';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSDs7OztHQUlHO0FBQ0gsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmRldi9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIEVudHJ5IHBvaW50IGZvciBhbGwgcHVibGljIEFQSXMgb2YgdGhpcyBwYWNrYWdlLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbmltYXRpb25zJztcbiJdfQ==

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
/**
* @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 {};
//# sourceMappingURL=data:application/json;base64,eyJ2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xsaXNlY29uZHMuXG4gICAqL1xuICB0b3RhbFRpbWU6IG51bWJlcjtcbiAgLyoqXG4gICAqIFRoZSBhbmltYXRpb24gcGhhc2UgaW4gd2hpY2ggdGhlIGNhbGxiYWNrIHdhcyBpbnZva2VkLCBvbmUgb2ZcbiAgICogXCJzdGFydFwiIG9yIFwiZG9uZVwiLlxuICAgKi9cbiAgcGhhc2VOYW1lOiBzdHJpbmc7XG4gIC8qKlxuICAgKiBUaGUgZWxlbWVudCB0byB3aGljaCB0aGUgYW5pbWF0aW9uIGlzIGF0dGFjaGVkLlxuICAgKi9cbiAgZWxlbWVudDogYW55O1xuICAvKipcbiAgICogSW50ZXJuYWwuXG4gICAqL1xuICB0cmlnZ2VyTmFtZTogc3RyaW5nO1xuICAvKipcbiAgICogSW50ZXJuYWwuXG4gICAqL1xuICBkaXNhYmxlZDogYm9vbGVhbjtcbn1cbiJdfQ==

File diff suppressed because one or more lines are too long

17
node_modules/@angular/animations/esm2022/src/animations.mjs generated vendored Executable file
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
*/
/**
* @module
* @description
* Entry point for all animation APIs of the animation package.
*/
export { AnimationBuilder, AnimationFactory } from './animation_builder';
export { animate, animateChild, animation, AnimationMetadataType, AUTO_STYLE, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, } from './animation_metadata';
export { NoopAnimationPlayer } from './players/animation_player';
export * from './private_export';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvc3JjL2FuaW1hdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7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BsYXllciwgTm9vcEFuaW1hdGlvblBsYXllcn0gZnJvbSAnLi9wbGF5ZXJzL2FuaW1hdGlvbl9wbGF5ZXInO1xuXG5leHBvcnQgKiBmcm9tICcuL3ByaXZhdGVfZXhwb3J0JztcbiJdfQ==

9
node_modules/@angular/animations/esm2022/src/errors.mjs generated vendored Executable file
View file

@ -0,0 +1,9 @@
/**
* @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 {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5pbWF0aW9ucy9zcmMvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgTExDIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9hbmd1bGFyLmRldi9saWNlbnNlXG4gKi9cblxuLyoqXG4gKiBUaGUgbGlzdCBvZiBlcnJvciBjb2RlcyB1c2VkIGluIHJ1bnRpbWUgY29kZSBvZiB0aGUgYGFuaW1hdGlvbnNgIHBhY2thZ2UuXG4gKiBSZXNlcnZlZCBlcnJvciBjb2RlIHJhbmdlOiAzMDAwLTM5OTkuXG4gKi9cbmV4cG9ydCBjb25zdCBlbnVtIFJ1bnRpbWVFcnJvckNvZGUge1xuICAvLyBJbnZhbGlkIHZhb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dHRVIgPSAzMzAyLFxuICBNSVNTSU5HX0VWRU5UID0gMzMwMyxcbiAgLy8gVHJpZ2dlcnNcbiAgVU5TVVBQT1JURURfVFJJR0dFUl9FVkVOVCA9IDM0MDAsXG4gIFVOUkVHSVNURVJFRF9UUklHR0VSID0gMzQwMSxcbiAgVFJJR0dFUl9UUkFOU0lUSU9OU19GQUlMRUQgPSAzNDAyLFxuICBUUklHR0VSX1BBUlNJTkdfRkFJTEVEID0gMzQwMyxcbiAgVFJJR0dFUl9CVUlMRF9GQUlMRUQgPSAzNDA0LFxuICAvLyBGYWlsZWQgcHJvY2Vzc2VzXG4gIFZBTElEQVRJT05fRkFJTEVEID0gMzUwMCxcbiAgQlVJTERJTkdfRkFJTEVEID0gMzUwMSxcbiAgQU5JTUFUSU9OX0ZBSUxFRCA9IDM1MDIsXG4gIFJFR0lTVFJBVElPTl9GQUlMRUQgPSAzNTAzLFxuICBDUkVBVEVfQU5JTUFUSU9OX0ZBSUxFRCA9IDM1MDQsXG4gIFRSQU5TSVRJT05fRkFJTEVEID0gMzUwNSxcblxuICAvLyBBbmltYXRpb25zXG4gIEJST1dTRVJfQU5JTUFUSU9OX0JVSUxERVJfSU5KRUNURURfV0lUSE9VVF9BTklNQVRJT05TID0gMzYwMCxcbn1cbiJdfQ==

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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
*/
export { BrowserAnimationBuilder as ɵBrowserAnimationBuilder } from './animation_builder';
export { AnimationGroupPlayer as ɵAnimationGroupPlayer } from './players/animation_group_player';
export const ɵPRE_STYLE = '!';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9leHBvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hbmltYXRpb25zL3NyYy9wcml2YXRlX2V4cG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxPQUFPLEVBQUMsdUJBQXVCLElBQUksd0JBQXdCLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUV4RixPQUFPLEVBQUMsb0JBQW9CLElBQUkscUJBQXFCLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQztBQUUvRixNQUFNLENBQUMsTUFBTSxVQUFVLEdBQUcsR0FBRyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuZGV2L2xpY2Vuc2VcbiAqL1xuZXhwb3J0IHtCcm93c2VyQW5pbWF0aW9uQnVpbGRlciBhcyDJtUJyb3dzZXJBbmltYXRpb25CdWlsZGVyfSBmcm9tICcuL2FuaW1hdGlvbl9idWlsZGVyJztcbmV4cG9ydCB7UnVudGltZUVycm9yQ29kZSBhcyDJtVJ1bnRpbWVFcnJvckNvZGV9IGZyb20gJy4vZXJyb3JzJztcbmV4cG9ydCB7QW5pbWF0aW9uR3JvdXBQbGF5ZXIgYXMgybVBbmltYXRpb25Hcm91cFBsYXllcn0gZnJvbSAnLi9wbGF5ZXJzL2FuaW1hdGlvbl9ncm91cF9wbGF5ZXInO1xuXG5leHBvcnQgY29uc3QgybVQUkVfU1RZTEUgPSAnISc7XG4iXX0=

15
node_modules/@angular/animations/esm2022/src/version.mjs generated vendored Executable file
View file

@ -0,0 +1,15 @@
/**
* @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
*/
/**
* @module
* @description
* Entry point for all public APIs of the animation package.
*/
import { Version } from '@angular/core';
export const VERSION = new Version('18.2.10');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2FuaW1hdGlvbnMvc3JjL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUg7Ozs7R0FJRztBQUNILE9BQU8sRUFBQyxPQUFPLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFdEMsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLElBQUksT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIExMQyBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5kZXYvbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBhbmltYXRpb24gcGFja2FnZS5cbiAqL1xuaW1wb3J0IHtWZXJzaW9ufSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==

1385
node_modules/@angular/animations/fesm2022/animations.mjs generated vendored Executable file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

4812
node_modules/@angular/animations/fesm2022/browser.mjs generated vendored Executable file

File diff suppressed because it is too large Load diff

1
node_modules/@angular/animations/fesm2022/browser.mjs.map generated vendored Executable file

File diff suppressed because one or more lines are too long

131
node_modules/@angular/animations/fesm2022/browser/testing.mjs generated vendored Executable file
View file

@ -0,0 +1,131 @@
/**
* @license Angular v18.2.10
* (c) 2010-2024 Google LLC. https://angular.io/
* License: MIT
*/
import { NoopAnimationPlayer, AUTO_STYLE } from '@angular/animations';
import { ɵvalidateStyleProperty, ɵcamelCaseToDashCase, ɵvalidateWebAnimatableStyleProperty, ɵcontainsElement, ɵgetParentElement, ɵinvokeQuery, ɵnormalizeKeyframes, ɵallowPreviousPlayerStylesMerge } from '@angular/animations/browser';
/**
* @publicApi
*/
class MockAnimationDriver {
static { this.log = []; }
validateStyleProperty(prop) {
return ɵvalidateStyleProperty(prop);
}
validateAnimatableStyleProperty(prop) {
const cssProp = ɵcamelCaseToDashCase(prop);
return ɵvalidateWebAnimatableStyleProperty(cssProp);
}
containsElement(elm1, elm2) {
return ɵcontainsElement(elm1, elm2);
}
getParentElement(element) {
return ɵgetParentElement(element);
}
query(element, selector, multi) {
return ɵinvokeQuery(element, selector, multi);
}
computeStyle(element, prop, defaultValue) {
return defaultValue || '';
}
animate(element, keyframes, duration, delay, easing, previousPlayers = []) {
const player = new MockAnimationPlayer(element, keyframes, duration, delay, easing, previousPlayers);
MockAnimationDriver.log.push(player);
return player;
}
}
/**
* @publicApi
*/
class MockAnimationPlayer extends NoopAnimationPlayer {
constructor(element, keyframes, duration, delay, easing, previousPlayers) {
super(duration, delay);
this.element = element;
this.keyframes = keyframes;
this.duration = duration;
this.delay = delay;
this.easing = easing;
this.previousPlayers = previousPlayers;
this.__finished = false;
this.__started = false;
this.previousStyles = new Map();
this._onInitFns = [];
this.currentSnapshot = new Map();
this._keyframes = [];
this._keyframes = ɵnormalizeKeyframes(keyframes);
if (ɵallowPreviousPlayerStylesMerge(duration, delay)) {
previousPlayers.forEach((player) => {
if (player instanceof MockAnimationPlayer) {
const styles = player.currentSnapshot;
styles.forEach((val, prop) => this.previousStyles.set(prop, val));
}
});
}
}
/** @internal */
onInit(fn) {
this._onInitFns.push(fn);
}
/** @internal */
init() {
super.init();
this._onInitFns.forEach((fn) => fn());
this._onInitFns = [];
}
reset() {
super.reset();
this.__started = false;
}
finish() {
super.finish();
this.__finished = true;
}
destroy() {
super.destroy();
this.__finished = true;
}
/** @internal */
triggerMicrotask() { }
play() {
super.play();
this.__started = true;
}
hasStarted() {
return this.__started;
}
beforeDestroy() {
const captures = new Map();
this.previousStyles.forEach((val, prop) => captures.set(prop, val));
if (this.hasStarted()) {
// when assembling the captured styles, it's important that
// we build the keyframe styles in the following order:
// {other styles within keyframes, ... previousStyles }
this._keyframes.forEach((kf) => {
for (let [prop, val] of kf) {
if (prop !== 'offset') {
captures.set(prop, this.__finished ? val : AUTO_STYLE);
}
}
});
}
this.currentSnapshot = captures;
}
}
/**
* @module
* @description
* Entry point for all public APIs of this package.
*/
// This file is not used to build this module. It is only used during editing
/**
* Generated bundle index. Do not edit.
*/
export { MockAnimationDriver, MockAnimationPlayer };
//# sourceMappingURL=testing.mjs.map

File diff suppressed because one or more lines are too long

1685
node_modules/@angular/animations/index.d.ts generated vendored Executable file

File diff suppressed because it is too large Load diff

68
node_modules/@angular/animations/package.json generated vendored Executable file
View file

@ -0,0 +1,68 @@
{
"name": "@angular/animations",
"version": "18.2.10",
"description": "Angular - animations integration with web-animations",
"author": "angular",
"license": "MIT",
"engines": {
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/core": "18.2.10"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git",
"directory": "packages/animations"
},
"ng-update": {
"packageGroup": [
"@angular/core",
"@angular/bazel",
"@angular/common",
"@angular/compiler",
"@angular/compiler-cli",
"@angular/animations",
"@angular/elements",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/forms",
"@angular/platform-server",
"@angular/upgrade",
"@angular/router",
"@angular/language-service",
"@angular/localize",
"@angular/service-worker"
]
},
"sideEffects": false,
"module": "./fesm2022/animations.mjs",
"typings": "./index.d.ts",
"type": "module",
"exports": {
"./package.json": {
"default": "./package.json"
},
".": {
"types": "./index.d.ts",
"esm2022": "./esm2022/animations.mjs",
"esm": "./esm2022/animations.mjs",
"default": "./fesm2022/animations.mjs"
},
"./browser": {
"types": "./browser/index.d.ts",
"esm2022": "./esm2022/browser/browser.mjs",
"esm": "./esm2022/browser/browser.mjs",
"default": "./fesm2022/browser.mjs"
},
"./browser/testing": {
"types": "./browser/testing/index.d.ts",
"esm2022": "./esm2022/browser/testing/testing.mjs",
"esm": "./esm2022/browser/testing/testing.mjs",
"default": "./fesm2022/browser/testing.mjs"
}
}
}

21
node_modules/@angular/cli/LICENSE generated vendored Executable file
View file

@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

5
node_modules/@angular/cli/README.md generated vendored Executable file
View file

@ -0,0 +1,5 @@
# Angular CLI - The CLI tool for Angular.
The sources for this package are in the [Angular CLI](https://github.com/angular/angular-cli) repository. Please file issues and pull requests against that repository.
Usage information and reference details can be found in repository [README](../../../README.md) file.

21
node_modules/@angular/cli/bin/bootstrap.js generated vendored Executable file
View file

@ -0,0 +1,21 @@
/**
* @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
*/
/**
* @fileoverview
*
* This file is used to bootstrap the CLI process by dynamically importing the main initialization code.
* This is done to allow the main bin file (`ng`) to remain CommonJS so that older versions of Node.js
* can be checked and validated prior to the execution of the CLI. This separate bootstrap file is
* needed to allow the use of a dynamic import expression without crashing older versions of Node.js that
* do not support dynamic import expressions and would otherwise throw a syntax error. This bootstrap file
* is required from the main bin file only after the Node.js version is determined to be in the supported
* range.
*/
import('../lib/init.js');

71
node_modules/@angular/cli/bin/ng.js generated vendored Executable file
View file

@ -0,0 +1,71 @@
#!/usr/bin/env node
/**
* @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
*/
/* eslint-disable no-console */
/* eslint-disable import/no-unassigned-import */
'use strict';
const path = require('path');
// Error if the external CLI appears to be used inside a google3 context.
if (process.cwd().split(path.sep).includes('google3')) {
console.error(
'This is the external Angular CLI, but you appear to be running in google3. There is a separate, internal version of the CLI which should be used instead. See http://go/angular/cli.',
);
process.exit();
}
// Provide a title to the process in `ps`.
// Due to an obscure Mac bug, do not start this title with any symbol.
try {
process.title = 'ng ' + Array.from(process.argv).slice(2).join(' ');
} catch (_) {
// If an error happened above, use the most basic title.
process.title = 'ng';
}
const rawCommandName = process.argv[2];
if (rawCommandName === '--get-yargs-completions' || rawCommandName === 'completion') {
// Skip Node.js supported checks when running ng completion.
// A warning at this stage could cause a broken source action (`source <(ng completion script)`) when in the shell init script.
require('./bootstrap');
return;
}
// This node version check ensures that extremely old versions of node are not used.
// These may not support ES2015 features such as const/let/async/await/etc.
// These would then crash with a hard to diagnose error message.
var version = process.versions.node.split('.').map((part) => Number(part));
if (version[0] % 2 === 1) {
// Allow new odd numbered releases with a warning (currently v17+)
console.warn(
'Node.js version ' +
process.version +
' detected.\n' +
'Odd numbered Node.js versions will not enter LTS status and should not be used for production.' +
' For more information, please see https://nodejs.org/en/about/previous-releases/.',
);
require('./bootstrap');
} else if (version[0] < 18 || (version[0] === 18 && version[1] < 19)) {
// Error and exit if less than 18.19
console.error(
'Node.js version ' +
process.version +
' detected.\n' +
'The Angular CLI requires a minimum Node.js version of v18.19.\n\n' +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
);
process.exitCode = 3;
} else {
require('./bootstrap');
}

3
node_modules/@angular/cli/bin/package.json generated vendored Executable file
View file

@ -0,0 +1,3 @@
{
"type": "commonjs"
}

11
node_modules/@angular/cli/lib/cli/index.d.ts generated vendored Executable file
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
*/
export { VERSION } from '../../src/utilities/version';
export default function (options: {
cliArgs: string[];
}): Promise<number>;

108
node_modules/@angular/cli/lib/cli/index.js generated vendored Executable file
View file

@ -0,0 +1,108 @@
"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.VERSION = void 0;
exports.default = default_1;
const core_1 = require("@angular-devkit/core");
const node_util_1 = require("node:util");
const command_module_1 = require("../../src/command-builder/command-module");
const command_runner_1 = require("../../src/command-builder/command-runner");
const color_1 = require("../../src/utilities/color");
const environment_options_1 = require("../../src/utilities/environment-options");
const log_file_1 = require("../../src/utilities/log-file");
var version_1 = require("../../src/utilities/version");
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
const MIN_NODEJS_VERSION = [18, 13];
/* eslint-disable no-console */
async function default_1(options) {
// This node version check ensures that the requirements of the project instance of the CLI are met
const [major, minor] = process.versions.node.split('.').map((part) => Number(part));
if (major < MIN_NODEJS_VERSION[0] ||
(major === MIN_NODEJS_VERSION[0] && minor < MIN_NODEJS_VERSION[1])) {
process.stderr.write(`Node.js version ${process.version} detected.\n` +
`The Angular CLI requires a minimum of v${MIN_NODEJS_VERSION[0]}.${MIN_NODEJS_VERSION[1]}.\n\n` +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n');
return 3;
}
const colorLevels = {
info: (s) => s,
debug: (s) => s,
warn: (s) => color_1.colors.bold(color_1.colors.yellow(s)),
error: (s) => color_1.colors.bold(color_1.colors.red(s)),
fatal: (s) => color_1.colors.bold(color_1.colors.red(s)),
};
const logger = new core_1.logging.IndentLogger('cli-main-logger');
const logInfo = console.log;
const logError = console.error;
const useColor = (0, color_1.supportColor)();
const loggerFinished = logger.forEach((entry) => {
if (!environment_options_1.ngDebug && entry.level === 'debug') {
return;
}
const color = useColor ? colorLevels[entry.level] : node_util_1.stripVTControlCharacters;
const message = color(entry.message);
switch (entry.level) {
case 'warn':
case 'fatal':
case 'error':
logError(message);
break;
default:
logInfo(message);
break;
}
});
// Redirect console to logger
console.info = console.log = function (...args) {
logger.info((0, node_util_1.format)(...args));
};
console.warn = function (...args) {
logger.warn((0, node_util_1.format)(...args));
};
console.error = function (...args) {
logger.error((0, node_util_1.format)(...args));
};
try {
return await (0, command_runner_1.runCommand)(options.cliArgs, logger);
}
catch (err) {
if (err instanceof command_module_1.CommandModuleError) {
logger.fatal(`Error: ${err.message}`);
}
else if (err instanceof Error) {
try {
const logPath = (0, log_file_1.writeErrorToLogFile)(err);
logger.fatal(`An unhandled exception occurred: ${err.message}\n` +
`See "${logPath}" for further details.`);
}
catch (e) {
logger.fatal(`An unhandled exception occurred: ${err.message}\n` +
`Fatal error writing debug log file: ${e}`);
if (err.stack) {
logger.fatal(err.stack);
}
}
return 127;
}
else if (typeof err === 'string') {
logger.fatal(err);
}
else if (typeof err === 'number') {
// Log nothing.
}
else {
logger.fatal(`An unexpected error occurred: ${err}`);
}
return 1;
}
finally {
logger.complete();
await loggerFinished;
}
}

5114
node_modules/@angular/cli/lib/config/schema.json generated vendored Executable file

File diff suppressed because it is too large Load diff

744
node_modules/@angular/cli/lib/config/workspace-schema.d.ts generated vendored Executable file
View file

@ -0,0 +1,744 @@
export interface Schema {
$schema?: string;
cli?: CliOptions;
/**
* Path where new projects will be created.
*/
newProjectRoot?: string;
projects?: Projects;
schematics?: SchematicOptions;
version: number;
}
export interface CliOptions {
/**
* Share pseudonymous usage data with the Angular Team at Google.
*/
analytics?: Analytics;
/**
* Control disk cache.
*/
cache?: Cache;
/**
* Specify which package manager tool to use.
*/
packageManager?: PackageManager;
/**
* The list of schematic collections to use.
*/
schematicCollections?: string[];
/**
* Control CLI specific console warnings
*/
warnings?: Warnings;
}
/**
* Share pseudonymous usage data with the Angular Team at Google.
*/
export type Analytics = boolean | string;
/**
* Control disk cache.
*/
export interface Cache {
/**
* Configure whether disk caching is enabled.
*/
enabled?: boolean;
/**
* Configure in which environment disk cache is enabled.
*/
environment?: Environment;
/**
* Cache base path.
*/
path?: string;
}
/**
* Configure in which environment disk cache is enabled.
*/
export declare enum Environment {
All = "all",
Ci = "ci",
Local = "local"
}
/**
* Specify which package manager tool to use.
*
* The package manager used to install dependencies.
*/
export declare enum PackageManager {
Bun = "bun",
Cnpm = "cnpm",
Npm = "npm",
Pnpm = "pnpm",
Yarn = "yarn"
}
/**
* Control CLI specific console warnings
*/
export interface Warnings {
/**
* Show a warning when the global version is newer than the local one.
*/
versionMismatch?: boolean;
}
export interface Projects {
}
export interface SchematicOptions {
"@schematics/angular:application"?: AngularApplicationOptionsSchema;
"@schematics/angular:class"?: AngularClassOptionsSchema;
"@schematics/angular:component"?: AngularComponentOptionsSchema;
"@schematics/angular:directive"?: AngularDirectiveOptionsSchema;
"@schematics/angular:enum"?: AngularEnumOptionsSchema;
"@schematics/angular:guard"?: AngularGuardOptionsSchema;
"@schematics/angular:interceptor"?: AngularInterceptorOptionsSchema;
"@schematics/angular:interface"?: AngularInterfaceOptionsSchema;
"@schematics/angular:library"?: LibraryOptionsSchema;
"@schematics/angular:ng-new"?: AngularNgNewOptionsSchema;
"@schematics/angular:pipe"?: AngularPipeOptionsSchema;
"@schematics/angular:resolver"?: AngularResolverOptionsSchema;
"@schematics/angular:service"?: AngularServiceOptionsSchema;
"@schematics/angular:web-worker"?: AngularWebWorkerOptionsSchema;
[property: string]: any;
}
/**
* Generates a new basic application definition in the "projects" subfolder of the workspace.
*/
export interface AngularApplicationOptionsSchema {
/**
* Include styles inline in the root component.ts file. Only CSS styles can be included
* inline. Default is false, meaning that an external styles file is created and referenced
* in the root component.ts file.
*/
inlineStyle?: boolean;
/**
* Include template inline in the root component.ts file. Default is false, meaning that an
* external template file is created and referenced in the root component.ts file.
*/
inlineTemplate?: boolean;
/**
* Create a bare-bones project without any testing frameworks. (Use for learning purposes
* only.)
*/
minimal?: boolean;
/**
* The name of the new application.
*/
name: string;
/**
* A prefix to apply to generated selectors.
*/
prefix?: string;
/**
* The root directory of the new application.
*/
projectRoot?: string;
/**
* Creates an application with routing enabled.
*/
routing?: boolean;
/**
* Skip installing dependency packages.
*/
skipInstall?: boolean;
/**
* Do not add dependencies to the "package.json" file.
*/
skipPackageJson?: boolean;
/**
* Do not create "spec.ts" test files for the application.
*/
skipTests?: boolean;
/**
* Creates an application with Server-Side Rendering (SSR) and Static Site Generation
* (SSG/Prerendering) enabled.
*/
ssr?: boolean;
/**
* Creates an application based upon the standalone API, without NgModules.
*/
standalone?: boolean;
/**
* Creates an application with stricter bundle budgets settings.
*/
strict?: boolean;
/**
* The file extension or preprocessor to use for style files.
*/
style?: SchematicsAngularApplicationStyle;
/**
* The view encapsulation strategy to use in the new application.
*/
viewEncapsulation?: ViewEncapsulation;
}
/**
* The file extension or preprocessor to use for style files.
*/
export declare enum SchematicsAngularApplicationStyle {
Css = "css",
Less = "less",
Sass = "sass",
Scss = "scss"
}
/**
* The view encapsulation strategy to use in the new application.
*
* The view encapsulation strategy to use in the new component.
*
* The view encapsulation strategy to use in the initial project.
*/
export declare enum ViewEncapsulation {
Emulated = "Emulated",
None = "None",
ShadowDom = "ShadowDom"
}
/**
* Creates a new, generic class definition in the given project.
*/
export interface AngularClassOptionsSchema {
/**
* The name of the new class.
*/
name: string;
/**
* The path at which to create the class, relative to the workspace root.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not create "spec.ts" test files for the new class.
*/
skipTests?: boolean;
/**
* Adds a developer-defined type to the filename, in the format "name.type.ts".
*/
type?: string;
}
/**
* Creates a new, generic component definition in the given project.
*/
export interface AngularComponentOptionsSchema {
/**
* The change detection strategy to use in the new component.
*/
changeDetection?: ChangeDetection;
/**
* Specifies if the style will contain `:host { display: block; }`.
*/
displayBlock?: boolean;
/**
* The declaring NgModule exports this component.
*/
export?: boolean;
/**
* Create the new files at the top level of the current project.
*/
flat?: boolean;
/**
* Include styles inline in the component.ts file. Only CSS styles can be included inline.
* By default, an external styles file is created and referenced in the component.ts file.
*/
inlineStyle?: boolean;
/**
* Include template inline in the component.ts file. By default, an external template file
* is created and referenced in the component.ts file.
*/
inlineTemplate?: boolean;
/**
* The declaring NgModule.
*/
module?: string;
/**
* The name of the component.
*/
name: string;
/**
* The path at which to create the component file, relative to the current workspace.
* Default is a folder with the same name as the component in the project root.
*/
path?: string;
/**
* The prefix to apply to the generated component selector.
*/
prefix?: string;
/**
* The name of the project.
*/
project: string;
/**
* The HTML selector to use for this component.
*/
selector?: string;
/**
* Do not import this component into the owning NgModule.
*/
skipImport?: boolean;
/**
* Specifies if the component should have a selector or not.
*/
skipSelector?: boolean;
/**
* Do not create "spec.ts" test files for the new component.
*/
skipTests?: boolean;
/**
* Whether the generated component is standalone.
*/
standalone?: boolean;
/**
* The file extension or preprocessor to use for style files, or 'none' to skip generating
* the style file.
*/
style?: SchematicsAngularComponentStyle;
/**
* Adds a developer-defined type to the filename, in the format "name.type.ts".
*/
type?: string;
/**
* The view encapsulation strategy to use in the new component.
*/
viewEncapsulation?: ViewEncapsulation;
}
/**
* The change detection strategy to use in the new component.
*/
export declare enum ChangeDetection {
Default = "Default",
OnPush = "OnPush"
}
/**
* The file extension or preprocessor to use for style files, or 'none' to skip generating
* the style file.
*/
export declare enum SchematicsAngularComponentStyle {
Css = "css",
Less = "less",
None = "none",
Sass = "sass",
Scss = "scss"
}
/**
* Creates a new, generic directive definition in the given project.
*/
export interface AngularDirectiveOptionsSchema {
/**
* The declaring NgModule exports this directive.
*/
export?: boolean;
/**
* When true (the default), creates the new files at the top level of the current project.
*/
flat?: boolean;
/**
* The declaring NgModule.
*/
module?: string;
/**
* The name of the new directive.
*/
name: string;
/**
* The path at which to create the interface that defines the directive, relative to the
* workspace root.
*/
path?: string;
/**
* A prefix to apply to generated selectors.
*/
prefix?: string;
/**
* The name of the project.
*/
project: string;
/**
* The HTML selector to use for this directive.
*/
selector?: string;
/**
* Do not import this directive into the owning NgModule.
*/
skipImport?: boolean;
/**
* Do not create "spec.ts" test files for the new class.
*/
skipTests?: boolean;
/**
* Whether the generated directive is standalone.
*/
standalone?: boolean;
}
/**
* Generates a new, generic enum definition in the given project.
*/
export interface AngularEnumOptionsSchema {
/**
* The name of the enum.
*/
name: string;
/**
* The path at which to create the enum definition, relative to the current workspace.
*/
path?: string;
/**
* The name of the project in which to create the enum. Default is the configured default
* project for the workspace.
*/
project: string;
/**
* Adds a developer-defined type to the filename, in the format "name.type.ts".
*/
type?: string;
}
/**
* Generates a new, generic route guard definition in the given project.
*/
export interface AngularGuardOptionsSchema {
/**
* When true (the default), creates the new files at the top level of the current project.
*/
flat?: boolean;
/**
* Specifies whether to generate a guard as a function.
*/
functional?: boolean;
/**
* Specifies which type of guard to create.
*/
implements?: Implement[];
/**
* The name of the new route guard.
*/
name: string;
/**
* The path at which to create the interface that defines the guard, relative to the current
* workspace.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not create "spec.ts" test files for the new guard.
*/
skipTests?: boolean;
}
export declare enum Implement {
CanActivate = "CanActivate",
CanActivateChild = "CanActivateChild",
CanDeactivate = "CanDeactivate",
CanMatch = "CanMatch"
}
/**
* Creates a new, generic interceptor definition in the given project.
*/
export interface AngularInterceptorOptionsSchema {
/**
* When true (the default), creates files at the top level of the project.
*/
flat?: boolean;
/**
* Creates the interceptor as a `HttpInterceptorFn`.
*/
functional?: boolean;
/**
* The name of the interceptor.
*/
name: string;
/**
* The path at which to create the interceptor, relative to the workspace root.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not create "spec.ts" test files for the new interceptor.
*/
skipTests?: boolean;
}
/**
* Creates a new, generic interface definition in the given project.
*/
export interface AngularInterfaceOptionsSchema {
/**
* The name of the interface.
*/
name: string;
/**
* The path at which to create the interface, relative to the workspace root.
*/
path?: string;
/**
* A prefix to apply to generated selectors.
*/
prefix?: string;
/**
* The name of the project.
*/
project: string;
/**
* Adds a developer-defined type to the filename, in the format "name.type.ts".
*/
type?: string;
}
/**
* Creates a new, generic library project in the current workspace.
*/
export interface LibraryOptionsSchema {
/**
* The path at which to create the library's public API file, relative to the workspace root.
*/
entryFile?: string;
/**
* The name of the library.
*/
name: string;
/**
* A prefix to apply to generated selectors.
*/
prefix?: string;
/**
* The root directory of the new library.
*/
projectRoot?: string;
/**
* Do not install dependency packages.
*/
skipInstall?: boolean;
/**
* Do not add dependencies to the "package.json" file.
*/
skipPackageJson?: boolean;
/**
* Do not update "tsconfig.json" to add a path mapping for the new library. The path mapping
* is needed to use the library in an app, but can be disabled here to simplify development.
*/
skipTsConfig?: boolean;
/**
* Creates a library based upon the standalone API, without NgModules.
*/
standalone?: boolean;
}
/**
* Creates a new project by combining the workspace and application schematics.
*/
export interface AngularNgNewOptionsSchema {
/**
* Initial git repository commit information.
*/
commit?: CommitUnion;
/**
* Create a new initial application project in the 'src' folder of the new workspace. When
* false, creates an empty workspace with no initial application. You can then use the
* generate application command so that all applications are created in the projects folder.
*/
createApplication?: boolean;
/**
* The directory name to create the workspace in.
*/
directory?: string;
/**
* Include styles inline in the component TS file. By default, an external styles file is
* created and referenced in the component TypeScript file.
*/
inlineStyle?: boolean;
/**
* Include template inline in the component TS file. By default, an external template file
* is created and referenced in the component TypeScript file.
*/
inlineTemplate?: boolean;
/**
* Create a workspace without any testing frameworks. (Use for learning purposes only.)
*/
minimal?: boolean;
/**
* The name of the new workspace and initial project.
*/
name: string;
/**
* The path where new projects will be created, relative to the new workspace root.
*/
newProjectRoot?: string;
/**
* The package manager used to install dependencies.
*/
packageManager?: PackageManager;
/**
* The prefix to apply to generated selectors for the initial project.
*/
prefix?: string;
/**
* Enable routing in the initial project.
*/
routing?: boolean;
/**
* Do not initialize a git repository.
*/
skipGit?: boolean;
/**
* Do not install dependency packages.
*/
skipInstall?: boolean;
/**
* Do not generate "spec.ts" test files for the new project.
*/
skipTests?: boolean;
/**
* Creates an application with Server-Side Rendering (SSR) and Static Site Generation
* (SSG/Prerendering) enabled.
*/
ssr?: boolean;
/**
* Creates an application based upon the standalone API, without NgModules.
*/
standalone?: boolean;
/**
* Creates a workspace with stricter type checking and stricter bundle budgets settings.
* This setting helps improve maintainability and catch bugs ahead of time. For more
* information, see https://angular.dev/tools/cli/template-typecheck#strict-mode
*/
strict?: boolean;
/**
* The file extension or preprocessor to use for style files.
*/
style?: SchematicsAngularApplicationStyle;
/**
* The version of the Angular CLI to use.
*/
version: string;
/**
* The view encapsulation strategy to use in the initial project.
*/
viewEncapsulation?: ViewEncapsulation;
}
/**
* Initial git repository commit information.
*/
export type CommitUnion = boolean | CommitObject;
export interface CommitObject {
email: string;
message?: string;
name: string;
[property: string]: any;
}
/**
* Creates a new, generic pipe definition in the given project.
*/
export interface AngularPipeOptionsSchema {
/**
* The declaring NgModule exports this pipe.
*/
export?: boolean;
/**
* When true (the default) creates files at the top level of the project.
*/
flat?: boolean;
/**
* The declaring NgModule.
*/
module?: string;
/**
* The name of the pipe.
*/
name: string;
/**
* The path at which to create the pipe, relative to the workspace root.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not import this pipe into the owning NgModule.
*/
skipImport?: boolean;
/**
* Do not create "spec.ts" test files for the new pipe.
*/
skipTests?: boolean;
/**
* Whether the generated pipe is standalone.
*/
standalone?: boolean;
}
/**
* Generates a new, generic resolver definition in the given project.
*/
export interface AngularResolverOptionsSchema {
/**
* When true (the default), creates the new files at the top level of the current project.
*/
flat?: boolean;
/**
* Creates the resolver as a `ResolveFn`.
*/
functional?: boolean;
/**
* The name of the new resolver.
*/
name: string;
/**
* The path at which to create the interface that defines the resolver, relative to the
* current workspace.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not create "spec.ts" test files for the new resolver.
*/
skipTests?: boolean;
}
/**
* Creates a new, generic service definition in the given project.
*/
export interface AngularServiceOptionsSchema {
/**
* When true (the default), creates files at the top level of the project.
*/
flat?: boolean;
/**
* The name of the service.
*/
name: string;
/**
* The path at which to create the service, relative to the workspace root.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Do not create "spec.ts" test files for the new service.
*/
skipTests?: boolean;
}
/**
* Creates a new, generic web worker definition in the given project.
*/
export interface AngularWebWorkerOptionsSchema {
/**
* The name of the worker.
*/
name: string;
/**
* The path at which to create the worker file, relative to the current workspace.
*/
path?: string;
/**
* The name of the project.
*/
project: string;
/**
* Add a worker creation snippet in a sibling file of the same name.
*/
snippet?: boolean;
}

77
node_modules/@angular/cli/lib/config/workspace-schema.js generated vendored Executable file
View file

@ -0,0 +1,77 @@
"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 });
exports.Implement = exports.SchematicsAngularComponentStyle = exports.ChangeDetection = exports.ViewEncapsulation = exports.SchematicsAngularApplicationStyle = exports.PackageManager = exports.Environment = void 0;
/**
* Configure in which environment disk cache is enabled.
*/
var Environment;
(function (Environment) {
Environment["All"] = "all";
Environment["Ci"] = "ci";
Environment["Local"] = "local";
})(Environment || (exports.Environment = Environment = {}));
/**
* Specify which package manager tool to use.
*
* The package manager used to install dependencies.
*/
var PackageManager;
(function (PackageManager) {
PackageManager["Bun"] = "bun";
PackageManager["Cnpm"] = "cnpm";
PackageManager["Npm"] = "npm";
PackageManager["Pnpm"] = "pnpm";
PackageManager["Yarn"] = "yarn";
})(PackageManager || (exports.PackageManager = PackageManager = {}));
/**
* The file extension or preprocessor to use for style files.
*/
var SchematicsAngularApplicationStyle;
(function (SchematicsAngularApplicationStyle) {
SchematicsAngularApplicationStyle["Css"] = "css";
SchematicsAngularApplicationStyle["Less"] = "less";
SchematicsAngularApplicationStyle["Sass"] = "sass";
SchematicsAngularApplicationStyle["Scss"] = "scss";
})(SchematicsAngularApplicationStyle || (exports.SchematicsAngularApplicationStyle = SchematicsAngularApplicationStyle = {}));
/**
* The view encapsulation strategy to use in the new application.
*
* The view encapsulation strategy to use in the new component.
*
* The view encapsulation strategy to use in the initial project.
*/
var ViewEncapsulation;
(function (ViewEncapsulation) {
ViewEncapsulation["Emulated"] = "Emulated";
ViewEncapsulation["None"] = "None";
ViewEncapsulation["ShadowDom"] = "ShadowDom";
})(ViewEncapsulation || (exports.ViewEncapsulation = ViewEncapsulation = {}));
/**
* The change detection strategy to use in the new component.
*/
var ChangeDetection;
(function (ChangeDetection) {
ChangeDetection["Default"] = "Default";
ChangeDetection["OnPush"] = "OnPush";
})(ChangeDetection || (exports.ChangeDetection = ChangeDetection = {}));
/**
* The file extension or preprocessor to use for style files, or 'none' to skip generating
* the style file.
*/
var SchematicsAngularComponentStyle;
(function (SchematicsAngularComponentStyle) {
SchematicsAngularComponentStyle["Css"] = "css";
SchematicsAngularComponentStyle["Less"] = "less";
SchematicsAngularComponentStyle["None"] = "none";
SchematicsAngularComponentStyle["Sass"] = "sass";
SchematicsAngularComponentStyle["Scss"] = "scss";
})(SchematicsAngularComponentStyle || (exports.SchematicsAngularComponentStyle = SchematicsAngularComponentStyle = {}));
var Implement;
(function (Implement) {
Implement["CanActivate"] = "CanActivate";
Implement["CanActivateChild"] = "CanActivateChild";
Implement["CanDeactivate"] = "CanDeactivate";
Implement["CanMatch"] = "CanMatch";
})(Implement || (exports.Implement = Implement = {}));

8
node_modules/@angular/cli/lib/init.d.ts generated vendored Executable file
View file

@ -0,0 +1,8 @@
/**
* @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 'symbol-observable';

153
node_modules/@angular/cli/lib/init.js generated vendored Executable file
View file

@ -0,0 +1,153 @@
"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 (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
require("symbol-observable");
// symbol polyfill must go first
const fs_1 = require("fs");
const module_1 = require("module");
const path = __importStar(require("path"));
const semver_1 = require("semver");
const color_1 = require("../src/utilities/color");
const config_1 = require("../src/utilities/config");
const environment_options_1 = require("../src/utilities/environment-options");
const version_1 = require("../src/utilities/version");
/**
* Angular CLI versions prior to v14 may not exit correctly if not forcibly exited
* via `process.exit()`. When bootstrapping, `forceExit` will be set to `true`
* if the local CLI version is less than v14 to prevent the CLI from hanging on
* exit in those cases.
*/
let forceExit = false;
(async () => {
/**
* Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
* which is cumbersome considering we pin versions and the warning is not user actionable.
* `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
*/
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
const rawCommandName = process.argv[2];
/**
* Disable CLI version mismatch checks and forces usage of the invoked CLI
* instead of invoking the local installed version.
*
* When running `ng new` always favor the global version. As in some
* cases orphan `node_modules` would cause the non global CLI to be used.
* @see: https://github.com/angular/angular-cli/issues/14603
*/
if (environment_options_1.disableVersionCheck || rawCommandName === 'new') {
return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
}
let cli;
try {
// No error implies a projectLocalCli, which will load whatever
// version of ng-cli you have installed in a local package.json
const cwdRequire = (0, module_1.createRequire)(process.cwd() + '/');
const projectLocalCli = cwdRequire.resolve('@angular/cli');
cli = await Promise.resolve(`${projectLocalCli}`).then(s => __importStar(require(s)));
const globalVersion = new semver_1.SemVer(version_1.VERSION.full);
// Older versions might not have the VERSION export
let localVersion = cli.VERSION?.full;
if (!localVersion) {
try {
const localPackageJson = await fs_1.promises.readFile(path.join(path.dirname(projectLocalCli), '../../package.json'), 'utf-8');
localVersion = JSON.parse(localPackageJson).version;
}
catch (error) {
// eslint-disable-next-line no-console
console.error('Version mismatch check skipped. Unable to retrieve local version: ' + error);
}
}
// Ensure older versions of the CLI fully exit
const localMajorVersion = (0, semver_1.major)(localVersion);
if (localMajorVersion > 0 && localMajorVersion < 14) {
forceExit = true;
// Versions prior to 14 didn't implement completion command.
if (rawCommandName === 'completion') {
return null;
}
}
let isGlobalGreater = false;
try {
isGlobalGreater = localVersion > 0 && globalVersion.compare(localVersion) > 0;
}
catch (error) {
// eslint-disable-next-line no-console
console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
}
// When using the completion command, don't show the warning as otherwise this will break completion.
if (isGlobalGreater &&
rawCommandName !== '--get-yargs-completions' &&
rawCommandName !== 'completion') {
// If using the update command and the global version is greater, use the newer update command
// This allows improvements in update to be used in older versions that do not have bootstrapping
if (rawCommandName === 'update' &&
cli.VERSION &&
cli.VERSION.major - globalVersion.major <= 1) {
cli = await Promise.resolve().then(() => __importStar(require('./cli')));
}
else if (await (0, config_1.isWarningEnabled)('versionMismatch')) {
// Otherwise, use local version and warn if global is newer than local
const warning = `Your global Angular CLI version (${globalVersion}) is greater than your local ` +
`version (${localVersion}). The local Angular CLI version is used.\n\n` +
'To disable this warning use "ng config -g cli.warnings.versionMismatch false".';
// eslint-disable-next-line no-console
console.error(color_1.colors.yellow(warning));
}
}
}
catch {
// If there is an error, resolve could not find the ng-cli
// library from a package.json. Instead, include it from a relative
// path to this script file (which is likely a globally installed
// npm package). Most common cause for hitting this is `ng new`
cli = await Promise.resolve().then(() => __importStar(require('./cli')));
}
if ('default' in cli) {
cli = cli['default'];
}
return cli;
})()
.then((cli) => cli?.({
cliArgs: process.argv.slice(2),
}))
.then((exitCode = 0) => {
if (forceExit) {
process.exit(exitCode);
}
process.exitCode = exitCode;
})
.catch((err) => {
// eslint-disable-next-line no-console
console.error('Unknown error: ' + err.toString());
process.exit(127);
});

73
node_modules/@angular/cli/package.json generated vendored Executable file
View file

@ -0,0 +1,73 @@
{
"name": "@angular/cli",
"version": "18.2.11",
"description": "CLI tool for Angular",
"main": "lib/cli/index.js",
"bin": {
"ng": "./bin/ng.js"
},
"keywords": [
"Angular CLI",
"Angular DevKit",
"angular",
"angular-cli",
"devkit",
"sdk"
],
"repository": {
"type": "git",
"url": "https://github.com/angular/angular-cli.git"
},
"author": "Angular Authors",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/angular-cli/issues"
},
"homepage": "https://github.com/angular/angular-cli",
"dependencies": {
"@angular-devkit/architect": "0.1802.11",
"@angular-devkit/core": "18.2.11",
"@angular-devkit/schematics": "18.2.11",
"@inquirer/prompts": "5.3.8",
"@listr2/prompt-adapter-inquirer": "2.0.15",
"@schematics/angular": "18.2.11",
"@yarnpkg/lockfile": "1.1.0",
"ini": "4.1.3",
"jsonc-parser": "3.3.1",
"listr2": "8.2.4",
"npm-package-arg": "11.0.3",
"npm-pick-manifest": "9.1.0",
"pacote": "18.0.6",
"resolve": "1.22.8",
"semver": "7.6.3",
"symbol-observable": "4.0.0",
"yargs": "17.7.2"
},
"ng-update": {
"migrations": "@schematics/angular/migrations/migration-collection.json",
"packageGroup": {
"@angular/cli": "18.2.11",
"@angular/build": "18.2.11",
"@angular/ssr": "18.2.11",
"@angular-devkit/architect": "0.1802.11",
"@angular-devkit/build-angular": "18.2.11",
"@angular-devkit/build-webpack": "0.1802.11",
"@angular-devkit/core": "18.2.11",
"@angular-devkit/schematics": "18.2.11"
}
},
"packageManager": "yarn@4.4.0",
"engines": {
"node": "^18.19.1 || ^20.11.1 || >=22.0.0",
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
"yarn": ">= 1.13.0"
},
"dependenciesMeta": {
"esbuild": {
"built": true
},
"puppeteer": {
"built": true
}
}
}

View file

@ -0,0 +1,32 @@
/**
* @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 { CommandContext } from '../command-builder/command-module';
import { EventCustomDimension, EventCustomMetric, PrimitiveTypes } from './analytics-parameters';
export declare class AnalyticsCollector {
private context;
private trackingEventsQueue;
private readonly requestParameterStringified;
private readonly userParameters;
constructor(context: CommandContext, userId: string);
reportWorkspaceInfoEvent(parameters: Partial<Record<EventCustomMetric, string | boolean | number | undefined>>): void;
reportRebuildRunEvent(parameters: Partial<Record<EventCustomMetric & EventCustomDimension, string | boolean | number | undefined>>): void;
reportBuildRunEvent(parameters: Partial<Record<EventCustomMetric & EventCustomDimension, string | boolean | number | undefined>>): void;
reportArchitectRunEvent(parameters: Partial<Record<EventCustomDimension, PrimitiveTypes>>): void;
reportSchematicRunEvent(parameters: Partial<Record<EventCustomDimension, PrimitiveTypes>>): void;
reportCommandRunEvent(command: string): void;
private event;
/**
* Flush on an interval (if the event loop is waiting).
*
* @returns a method that when called will terminate the periodic
* flush and call flush one last time.
*/
periodFlush(): () => Promise<void>;
flush(): Promise<void>;
private send;
}

View file

@ -0,0 +1,184 @@
"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 (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnalyticsCollector = void 0;
const crypto_1 = require("crypto");
const https = __importStar(require("https"));
const os = __importStar(require("os"));
const querystring = __importStar(require("querystring"));
const semver = __importStar(require("semver"));
const environment_options_1 = require("../utilities/environment-options");
const error_1 = require("../utilities/error");
const version_1 = require("../utilities/version");
const analytics_parameters_1 = require("./analytics-parameters");
const TRACKING_ID_PROD = 'G-VETNJBW8L4';
const TRACKING_ID_STAGING = 'G-TBMPRL1BTM';
class AnalyticsCollector {
context;
trackingEventsQueue;
requestParameterStringified;
userParameters;
constructor(context, userId) {
this.context = context;
const requestParameters = {
[analytics_parameters_1.RequestParameter.ProtocolVersion]: 2,
[analytics_parameters_1.RequestParameter.ClientId]: userId,
[analytics_parameters_1.RequestParameter.UserId]: userId,
[analytics_parameters_1.RequestParameter.TrackingId]: /^\d+\.\d+\.\d+$/.test(version_1.VERSION.full) && version_1.VERSION.full !== '0.0.0'
? TRACKING_ID_PROD
: TRACKING_ID_STAGING,
// Built-in user properties
[analytics_parameters_1.RequestParameter.SessionId]: (0, crypto_1.randomUUID)(),
[analytics_parameters_1.RequestParameter.UserAgentArchitecture]: os.arch(),
[analytics_parameters_1.RequestParameter.UserAgentPlatform]: os.platform(),
[analytics_parameters_1.RequestParameter.UserAgentPlatformVersion]: os.release(),
[analytics_parameters_1.RequestParameter.UserAgentMobile]: 0,
[analytics_parameters_1.RequestParameter.SessionEngaged]: 1,
// The below is needed for tech details to be collected.
[analytics_parameters_1.RequestParameter.UserAgentFullVersionList]: 'Google%20Chrome;111.0.5563.64|Not(A%3ABrand;8.0.0.0|Chromium;111.0.5563.64',
};
if (environment_options_1.ngDebug) {
requestParameters[analytics_parameters_1.RequestParameter.DebugView] = 1;
}
this.requestParameterStringified = querystring.stringify(requestParameters);
const parsedVersion = semver.parse(process.version);
const packageManagerVersion = context.packageManager.version;
this.userParameters = {
// While architecture is being collect by GA as UserAgentArchitecture.
// It doesn't look like there is a way to query this. Therefore we collect this as a custom user dimension too.
[analytics_parameters_1.UserCustomDimension.OsArchitecture]: os.arch(),
// While User ID is being collected by GA, this is not visible in reports/for filtering.
[analytics_parameters_1.UserCustomDimension.UserId]: userId,
[analytics_parameters_1.UserCustomDimension.NodeVersion]: parsedVersion
? `${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}`
: 'other',
[analytics_parameters_1.UserCustomDimension.NodeMajorVersion]: parsedVersion?.major,
[analytics_parameters_1.UserCustomDimension.PackageManager]: context.packageManager.name,
[analytics_parameters_1.UserCustomDimension.PackageManagerVersion]: packageManagerVersion,
[analytics_parameters_1.UserCustomDimension.PackageManagerMajorVersion]: packageManagerVersion
? +packageManagerVersion.split('.', 1)[0]
: undefined,
[analytics_parameters_1.UserCustomDimension.AngularCLIVersion]: version_1.VERSION.full,
[analytics_parameters_1.UserCustomDimension.AngularCLIMajorVersion]: version_1.VERSION.major,
};
}
reportWorkspaceInfoEvent(parameters) {
this.event('workspace_info', parameters);
}
reportRebuildRunEvent(parameters) {
this.event('run_rebuild', parameters);
}
reportBuildRunEvent(parameters) {
this.event('run_build', parameters);
}
reportArchitectRunEvent(parameters) {
this.event('run_architect', parameters);
}
reportSchematicRunEvent(parameters) {
this.event('run_schematic', parameters);
}
reportCommandRunEvent(command) {
this.event('run_command', { [analytics_parameters_1.EventCustomDimension.Command]: command });
}
event(eventName, parameters) {
this.trackingEventsQueue ??= [];
this.trackingEventsQueue.push({
...this.userParameters,
...parameters,
'en': eventName,
});
}
/**
* Flush on an interval (if the event loop is waiting).
*
* @returns a method that when called will terminate the periodic
* flush and call flush one last time.
*/
periodFlush() {
let analyticsFlushPromise = Promise.resolve();
const analyticsFlushInterval = setInterval(() => {
if (this.trackingEventsQueue?.length) {
analyticsFlushPromise = analyticsFlushPromise.then(() => this.flush());
}
}, 4000);
return () => {
clearInterval(analyticsFlushInterval);
// Flush one last time.
return analyticsFlushPromise.then(() => this.flush());
};
}
async flush() {
const pendingTrackingEvents = this.trackingEventsQueue;
this.context.logger.debug(`Analytics flush size. ${pendingTrackingEvents?.length}.`);
if (!pendingTrackingEvents?.length) {
return;
}
// The below is needed so that if flush is called multiple times,
// we don't report the same event multiple times.
this.trackingEventsQueue = undefined;
try {
await this.send(pendingTrackingEvents);
}
catch (error) {
// Failure to report analytics shouldn't crash the CLI.
(0, error_1.assertIsError)(error);
this.context.logger.debug(`Send analytics error. ${error.message}.`);
}
}
async send(data) {
return new Promise((resolve, reject) => {
const request = https.request({
host: 'www.google-analytics.com',
method: 'POST',
path: '/g/collect?' + this.requestParameterStringified,
headers: {
// The below is needed for tech details to be collected even though we provide our own information from the OS Node.js module
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
},
}, (response) => {
// The below is needed as otherwise the response will never close which will cause the CLI not to terminate.
response.on('data', () => { });
if (response.statusCode !== 200 && response.statusCode !== 204) {
reject(new Error(`Analytics reporting failed with status code: ${response.statusCode}.`));
}
else {
resolve();
}
});
request.on('error', reject);
const queryParameters = data.map((p) => querystring.stringify(p)).join('\n');
request.write(queryParameters);
request.end();
});
}
}
exports.AnalyticsCollector = AnalyticsCollector;

View file

@ -0,0 +1,101 @@
/**
* @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
*/
/** Any changes in this file needs to be done in the mts version. */
export type PrimitiveTypes = string | number | boolean;
/**
* GA built-in request parameters
* @see https://www.thyngster.com/ga4-measurement-protocol-cheatsheet
* @see http://go/depot/google3/analytics/container_tag/templates/common/gold/mpv2_schema.js
*/
export declare enum RequestParameter {
ClientId = "cid",
DebugView = "_dbg",
GtmVersion = "gtm",
Language = "ul",
NewToSite = "_nsi",
NonInteraction = "ni",
PageLocation = "dl",
PageTitle = "dt",
ProtocolVersion = "v",
SessionEngaged = "seg",
SessionId = "sid",
SessionNumber = "sct",
SessionStart = "_ss",
TrackingId = "tid",
TrafficType = "tt",
UserAgentArchitecture = "uaa",
UserAgentBitness = "uab",
UserAgentFullVersionList = "uafvl",
UserAgentMobile = "uamb",
UserAgentModel = "uam",
UserAgentPlatform = "uap",
UserAgentPlatformVersion = "uapv",
UserId = "uid"
}
/**
* User scoped custom dimensions.
* @notes
* - User custom dimensions limit is 25.
* - `up.*` string type.
* - `upn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
export declare enum UserCustomDimension {
UserId = "up.ng_user_id",
OsArchitecture = "up.ng_os_architecture",
NodeVersion = "up.ng_node_version",
NodeMajorVersion = "upn.ng_node_major_version",
AngularCLIVersion = "up.ng_cli_version",
AngularCLIMajorVersion = "upn.ng_cli_major_version",
PackageManager = "up.ng_package_manager",
PackageManagerVersion = "up.ng_pkg_manager_version",
PackageManagerMajorVersion = "upn.ng_pkg_manager_major_v"
}
/**
* Event scoped custom dimensions.
* @notes
* - Event custom dimensions limit is 50.
* - `ep.*` string type.
* - `epn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
export declare enum EventCustomDimension {
Command = "ep.ng_command",
SchematicCollectionName = "ep.ng_schematic_collection_name",
SchematicName = "ep.ng_schematic_name",
Standalone = "ep.ng_standalone",
SSR = "ep.ng_ssr",
Style = "ep.ng_style",
Routing = "ep.ng_routing",
InlineTemplate = "ep.ng_inline_template",
InlineStyle = "ep.ng_inline_style",
BuilderTarget = "ep.ng_builder_target",
Aot = "ep.ng_aot",
Optimization = "ep.ng_optimization"
}
/**
* Event scoped custom mertics.
* @notes
* - Event scoped custom mertics limit is 50.
* - `ep.*` string type.
* - `epn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
export declare enum EventCustomMetric {
AllChunksCount = "epn.ng_all_chunks_count",
LazyChunksCount = "epn.ng_lazy_chunks_count",
InitialChunksCount = "epn.ng_initial_chunks_count",
ChangedChunksCount = "epn.ng_changed_chunks_count",
DurationInMs = "epn.ng_duration_ms",
CssSizeInBytes = "epn.ng_css_size_bytes",
JsSizeInBytes = "epn.ng_js_size_bytes",
NgComponentCount = "epn.ng_component_count",
AllProjectsCount = "epn.all_projects_count",
LibraryProjectsCount = "epn.libs_projects_count",
ApplicationProjectsCount = "epn.apps_projects_count"
}

View file

@ -0,0 +1,106 @@
"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.EventCustomMetric = exports.EventCustomDimension = exports.UserCustomDimension = exports.RequestParameter = void 0;
/**
* GA built-in request parameters
* @see https://www.thyngster.com/ga4-measurement-protocol-cheatsheet
* @see http://go/depot/google3/analytics/container_tag/templates/common/gold/mpv2_schema.js
*/
var RequestParameter;
(function (RequestParameter) {
RequestParameter["ClientId"] = "cid";
RequestParameter["DebugView"] = "_dbg";
RequestParameter["GtmVersion"] = "gtm";
RequestParameter["Language"] = "ul";
RequestParameter["NewToSite"] = "_nsi";
RequestParameter["NonInteraction"] = "ni";
RequestParameter["PageLocation"] = "dl";
RequestParameter["PageTitle"] = "dt";
RequestParameter["ProtocolVersion"] = "v";
RequestParameter["SessionEngaged"] = "seg";
RequestParameter["SessionId"] = "sid";
RequestParameter["SessionNumber"] = "sct";
RequestParameter["SessionStart"] = "_ss";
RequestParameter["TrackingId"] = "tid";
RequestParameter["TrafficType"] = "tt";
RequestParameter["UserAgentArchitecture"] = "uaa";
RequestParameter["UserAgentBitness"] = "uab";
RequestParameter["UserAgentFullVersionList"] = "uafvl";
RequestParameter["UserAgentMobile"] = "uamb";
RequestParameter["UserAgentModel"] = "uam";
RequestParameter["UserAgentPlatform"] = "uap";
RequestParameter["UserAgentPlatformVersion"] = "uapv";
RequestParameter["UserId"] = "uid";
})(RequestParameter || (exports.RequestParameter = RequestParameter = {}));
/**
* User scoped custom dimensions.
* @notes
* - User custom dimensions limit is 25.
* - `up.*` string type.
* - `upn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
var UserCustomDimension;
(function (UserCustomDimension) {
UserCustomDimension["UserId"] = "up.ng_user_id";
UserCustomDimension["OsArchitecture"] = "up.ng_os_architecture";
UserCustomDimension["NodeVersion"] = "up.ng_node_version";
UserCustomDimension["NodeMajorVersion"] = "upn.ng_node_major_version";
UserCustomDimension["AngularCLIVersion"] = "up.ng_cli_version";
UserCustomDimension["AngularCLIMajorVersion"] = "upn.ng_cli_major_version";
UserCustomDimension["PackageManager"] = "up.ng_package_manager";
UserCustomDimension["PackageManagerVersion"] = "up.ng_pkg_manager_version";
UserCustomDimension["PackageManagerMajorVersion"] = "upn.ng_pkg_manager_major_v";
})(UserCustomDimension || (exports.UserCustomDimension = UserCustomDimension = {}));
/**
* Event scoped custom dimensions.
* @notes
* - Event custom dimensions limit is 50.
* - `ep.*` string type.
* - `epn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
var EventCustomDimension;
(function (EventCustomDimension) {
EventCustomDimension["Command"] = "ep.ng_command";
EventCustomDimension["SchematicCollectionName"] = "ep.ng_schematic_collection_name";
EventCustomDimension["SchematicName"] = "ep.ng_schematic_name";
EventCustomDimension["Standalone"] = "ep.ng_standalone";
EventCustomDimension["SSR"] = "ep.ng_ssr";
EventCustomDimension["Style"] = "ep.ng_style";
EventCustomDimension["Routing"] = "ep.ng_routing";
EventCustomDimension["InlineTemplate"] = "ep.ng_inline_template";
EventCustomDimension["InlineStyle"] = "ep.ng_inline_style";
EventCustomDimension["BuilderTarget"] = "ep.ng_builder_target";
EventCustomDimension["Aot"] = "ep.ng_aot";
EventCustomDimension["Optimization"] = "ep.ng_optimization";
})(EventCustomDimension || (exports.EventCustomDimension = EventCustomDimension = {}));
/**
* Event scoped custom mertics.
* @notes
* - Event scoped custom mertics limit is 50.
* - `ep.*` string type.
* - `epn.*` number type.
* @see https://support.google.com/analytics/answer/10075209?hl=en
*/
var EventCustomMetric;
(function (EventCustomMetric) {
EventCustomMetric["AllChunksCount"] = "epn.ng_all_chunks_count";
EventCustomMetric["LazyChunksCount"] = "epn.ng_lazy_chunks_count";
EventCustomMetric["InitialChunksCount"] = "epn.ng_initial_chunks_count";
EventCustomMetric["ChangedChunksCount"] = "epn.ng_changed_chunks_count";
EventCustomMetric["DurationInMs"] = "epn.ng_duration_ms";
EventCustomMetric["CssSizeInBytes"] = "epn.ng_css_size_bytes";
EventCustomMetric["JsSizeInBytes"] = "epn.ng_js_size_bytes";
EventCustomMetric["NgComponentCount"] = "epn.ng_component_count";
EventCustomMetric["AllProjectsCount"] = "epn.all_projects_count";
EventCustomMetric["LibraryProjectsCount"] = "epn.libs_projects_count";
EventCustomMetric["ApplicationProjectsCount"] = "epn.apps_projects_count";
})(EventCustomMetric || (exports.EventCustomMetric = EventCustomMetric = {}));

27
node_modules/@angular/cli/src/analytics/analytics.d.ts generated vendored Executable file
View file

@ -0,0 +1,27 @@
/**
* @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 { CommandContext } from '../command-builder/command-module';
/**
* This is the ultimate safelist for checking if a package name is safe to report to analytics.
*/
export declare const analyticsPackageSafelist: (string | RegExp)[];
export declare function isPackageNameSafeForAnalytics(name: string): boolean;
/**
* Set analytics settings. This does not work if the user is not inside a project.
* @param global Which config to use. "global" for user-level, and "local" for project-level.
* @param value Either a user ID, true to generate a new User ID, or false to disable analytics.
*/
export declare function setAnalyticsConfig(global: boolean, value: string | boolean): Promise<void>;
/**
* Prompt the user for usage gathering permission.
* @param force Whether to ask regardless of whether or not the user is using an interactive shell.
* @return Whether or not the user was shown a prompt.
*/
export declare function promptAnalytics(context: CommandContext, global: boolean, force?: boolean): Promise<boolean>;
export declare function getAnalyticsUserId(context: CommandContext, skipPrompt?: boolean): Promise<string | undefined>;
export declare function getAnalyticsInfoString(context: CommandContext): Promise<string>;

182
node_modules/@angular/cli/src/analytics/analytics.js generated vendored Executable file
View file

@ -0,0 +1,182 @@
"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.analyticsPackageSafelist = void 0;
exports.isPackageNameSafeForAnalytics = isPackageNameSafeForAnalytics;
exports.setAnalyticsConfig = setAnalyticsConfig;
exports.promptAnalytics = promptAnalytics;
exports.getAnalyticsUserId = getAnalyticsUserId;
exports.getAnalyticsInfoString = getAnalyticsInfoString;
const core_1 = require("@angular-devkit/core");
const crypto_1 = require("crypto");
const color_1 = require("../utilities/color");
const config_1 = require("../utilities/config");
const environment_options_1 = require("../utilities/environment-options");
const prompt_1 = require("../utilities/prompt");
const tty_1 = require("../utilities/tty");
/* eslint-disable no-console */
/**
* This is the ultimate safelist for checking if a package name is safe to report to analytics.
*/
exports.analyticsPackageSafelist = [
/^@angular\//,
/^@angular-devkit\//,
/^@nguniversal\//,
'@schematics/angular',
];
function isPackageNameSafeForAnalytics(name) {
return exports.analyticsPackageSafelist.some((pattern) => {
if (typeof pattern == 'string') {
return pattern === name;
}
else {
return pattern.test(name);
}
});
}
/**
* Set analytics settings. This does not work if the user is not inside a project.
* @param global Which config to use. "global" for user-level, and "local" for project-level.
* @param value Either a user ID, true to generate a new User ID, or false to disable analytics.
*/
async function setAnalyticsConfig(global, value) {
const level = global ? 'global' : 'local';
const workspace = await (0, config_1.getWorkspace)(level);
if (!workspace) {
throw new Error(`Could not find ${level} workspace.`);
}
const cli = (workspace.extensions['cli'] ??= {});
if (!workspace || !core_1.json.isJsonObject(cli)) {
throw new Error(`Invalid config found at ${workspace.filePath}. CLI should be an object.`);
}
cli.analytics = value === true ? (0, crypto_1.randomUUID)() : value;
await workspace.save();
}
/**
* Prompt the user for usage gathering permission.
* @param force Whether to ask regardless of whether or not the user is using an interactive shell.
* @return Whether or not the user was shown a prompt.
*/
async function promptAnalytics(context, global, force = false) {
const level = global ? 'global' : 'local';
const workspace = await (0, config_1.getWorkspace)(level);
if (!workspace) {
throw new Error(`Could not find a ${level} workspace. Are you in a project?`);
}
if (force || (0, tty_1.isTTY)()) {
const answer = await (0, prompt_1.askConfirmation)(`
Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.dev/cli/analytics.
`, false);
await setAnalyticsConfig(global, answer);
if (answer) {
console.log('');
console.log(core_1.tags.stripIndent `
Thank you for sharing pseudonymous usage data. Should you change your mind, the following
command will disable this feature entirely:
${color_1.colors.yellow(`ng analytics disable${global ? ' --global' : ''}`)}
`);
console.log('');
}
process.stderr.write(await getAnalyticsInfoString(context));
return true;
}
return false;
}
/**
* Get the analytics user id.
*
* @returns
* - `string` user id.
* - `false` when disabled.
* - `undefined` when not configured.
*/
async function getAnalyticsUserIdForLevel(level) {
if (environment_options_1.analyticsDisabled) {
return false;
}
const workspace = await (0, config_1.getWorkspace)(level);
const analyticsConfig = workspace?.getCli()?.['analytics'];
if (analyticsConfig === false) {
return false;
}
else if (analyticsConfig === undefined || analyticsConfig === null) {
return undefined;
}
else {
if (typeof analyticsConfig == 'string') {
return analyticsConfig;
}
else if (typeof analyticsConfig == 'object' && typeof analyticsConfig['uid'] == 'string') {
return analyticsConfig['uid'];
}
return undefined;
}
}
async function getAnalyticsUserId(context, skipPrompt = false) {
const { workspace } = context;
// Global config takes precedence over local config only for the disabled check.
// IE:
// global: disabled & local: enabled = disabled
// global: id: 123 & local: id: 456 = 456
// check global
const globalConfig = await getAnalyticsUserIdForLevel('global');
if (globalConfig === false) {
return undefined;
}
// Not disabled globally, check locally or not set globally and command is run outside of workspace example: `ng new`
if (workspace || globalConfig === undefined) {
const level = workspace ? 'local' : 'global';
let localOrGlobalConfig = await getAnalyticsUserIdForLevel(level);
if (localOrGlobalConfig === undefined) {
if (!skipPrompt) {
// config is unset, prompt user.
// TODO: This should honor the `no-interactive` option.
// It is currently not an `ng` option but rather only an option for specific commands.
// The concept of `ng`-wide options are needed to cleanly handle this.
await promptAnalytics(context, !workspace /** global */);
localOrGlobalConfig = await getAnalyticsUserIdForLevel(level);
}
}
if (localOrGlobalConfig === false) {
return undefined;
}
else if (typeof localOrGlobalConfig === 'string') {
return localOrGlobalConfig;
}
}
return globalConfig;
}
function analyticsConfigValueToHumanFormat(value) {
if (value === false) {
return 'disabled';
}
else if (typeof value === 'string' || value === true) {
return 'enabled';
}
else {
return 'not set';
}
}
async function getAnalyticsInfoString(context) {
const analyticsInstance = await getAnalyticsUserId(context, true /** skipPrompt */);
const { globalConfiguration, workspace: localWorkspace } = context;
const globalSetting = globalConfiguration?.getCli()?.['analytics'];
const localSetting = localWorkspace?.getCli()?.['analytics'];
return (core_1.tags.stripIndents `
Global setting: ${analyticsConfigValueToHumanFormat(globalSetting)}
Local setting: ${localWorkspace
? analyticsConfigValueToHumanFormat(localSetting)
: 'No local workspace configuration file.'}
Effective status: ${analyticsInstance ? 'enabled' : 'disabled'}
` + '\n');
}

View file

@ -0,0 +1,30 @@
/**
* @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 { Architect, Target } from '@angular-devkit/architect';
import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node';
import { CommandModule, CommandModuleImplementation, CommandScope, OtherOptions } from './command-module';
import { Option } from './utilities/json-schema';
export interface MissingTargetChoice {
name: string;
value: string;
}
export declare abstract class ArchitectBaseCommandModule<T extends object> extends CommandModule<T> implements CommandModuleImplementation<T> {
scope: CommandScope;
protected readonly missingTargetChoices: MissingTargetChoice[] | undefined;
protected runSingleTarget(target: Target, options: OtherOptions): Promise<number>;
private builderStatsToAnalyticsParameters;
private _architectHost;
protected getArchitectHost(): WorkspaceNodeModulesArchitectHost;
private _architect;
protected getArchitect(): Architect;
protected getArchitectTargetOptions(target: Target): Promise<Option[]>;
private warnOnMissingNodeModules;
protected getArchitectTarget(): string;
protected onMissingTarget(defaultMessage: string): Promise<1>;
private getMissingTargetPackageToInstall;
}

View file

@ -0,0 +1,230 @@
"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 (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArchitectBaseCommandModule = void 0;
const architect_1 = require("@angular-devkit/architect");
const node_1 = require("@angular-devkit/architect/node");
const core_1 = require("@angular-devkit/core");
const node_fs_1 = require("node:fs");
const node_path_1 = require("node:path");
const analytics_1 = require("../analytics/analytics");
const analytics_parameters_1 = require("../analytics/analytics-parameters");
const error_1 = require("../utilities/error");
const prompt_1 = require("../utilities/prompt");
const tty_1 = require("../utilities/tty");
const command_module_1 = require("./command-module");
const json_schema_1 = require("./utilities/json-schema");
class ArchitectBaseCommandModule extends command_module_1.CommandModule {
scope = command_module_1.CommandScope.In;
missingTargetChoices;
async runSingleTarget(target, options) {
const architectHost = this.getArchitectHost();
let builderName;
try {
builderName = await architectHost.getBuilderNameForTarget(target);
}
catch (e) {
(0, error_1.assertIsError)(e);
return this.onMissingTarget(e.message);
}
const { logger } = this.context;
const run = await this.getArchitect().scheduleTarget(target, options, {
logger,
});
const analytics = (0, analytics_1.isPackageNameSafeForAnalytics)(builderName)
? await this.getAnalytics()
: undefined;
let outputSubscription;
if (analytics) {
analytics.reportArchitectRunEvent({
[analytics_parameters_1.EventCustomDimension.BuilderTarget]: builderName,
});
let firstRun = true;
outputSubscription = run.output.subscribe(({ stats }) => {
const parameters = this.builderStatsToAnalyticsParameters(stats, builderName);
if (!parameters) {
return;
}
if (firstRun) {
firstRun = false;
analytics.reportBuildRunEvent(parameters);
}
else {
analytics.reportRebuildRunEvent(parameters);
}
});
}
try {
const { error, success } = await run.lastOutput;
if (error) {
logger.error(error);
}
return success ? 0 : 1;
}
finally {
await run.stop();
outputSubscription?.unsubscribe();
}
}
builderStatsToAnalyticsParameters(stats, builderName) {
if (!stats || typeof stats !== 'object' || !('durationInMs' in stats)) {
return undefined;
}
const { optimization, allChunksCount, aot, lazyChunksCount, initialChunksCount, durationInMs, changedChunksCount, cssSizeInBytes, jsSizeInBytes, ngComponentCount, } = stats;
return {
[analytics_parameters_1.EventCustomDimension.BuilderTarget]: builderName,
[analytics_parameters_1.EventCustomDimension.Aot]: aot,
[analytics_parameters_1.EventCustomDimension.Optimization]: optimization,
[analytics_parameters_1.EventCustomMetric.AllChunksCount]: allChunksCount,
[analytics_parameters_1.EventCustomMetric.LazyChunksCount]: lazyChunksCount,
[analytics_parameters_1.EventCustomMetric.InitialChunksCount]: initialChunksCount,
[analytics_parameters_1.EventCustomMetric.ChangedChunksCount]: changedChunksCount,
[analytics_parameters_1.EventCustomMetric.DurationInMs]: durationInMs,
[analytics_parameters_1.EventCustomMetric.JsSizeInBytes]: jsSizeInBytes,
[analytics_parameters_1.EventCustomMetric.CssSizeInBytes]: cssSizeInBytes,
[analytics_parameters_1.EventCustomMetric.NgComponentCount]: ngComponentCount,
};
}
_architectHost;
getArchitectHost() {
if (this._architectHost) {
return this._architectHost;
}
const workspace = this.getWorkspaceOrThrow();
return (this._architectHost = new node_1.WorkspaceNodeModulesArchitectHost(workspace, workspace.basePath));
}
_architect;
getArchitect() {
if (this._architect) {
return this._architect;
}
const registry = new core_1.json.schema.CoreSchemaRegistry();
registry.addPostTransform(core_1.json.schema.transforms.addUndefinedDefaults);
registry.useXDeprecatedProvider((msg) => this.context.logger.warn(msg));
const architectHost = this.getArchitectHost();
return (this._architect = new architect_1.Architect(architectHost, registry));
}
async getArchitectTargetOptions(target) {
const architectHost = this.getArchitectHost();
let builderConf;
try {
builderConf = await architectHost.getBuilderNameForTarget(target);
}
catch {
return [];
}
let builderDesc;
try {
builderDesc = await architectHost.resolveBuilder(builderConf);
}
catch (e) {
(0, error_1.assertIsError)(e);
if (e.code === 'MODULE_NOT_FOUND') {
this.warnOnMissingNodeModules();
throw new command_module_1.CommandModuleError(`Could not find the '${builderConf}' builder's node package.`);
}
throw e;
}
return (0, json_schema_1.parseJsonSchemaToOptions)(new core_1.json.schema.CoreSchemaRegistry(), builderDesc.optionSchema, true);
}
warnOnMissingNodeModules() {
const basePath = this.context.workspace?.basePath;
if (!basePath) {
return;
}
// Check if yarn PnP is used. https://yarnpkg.com/advanced/pnpapi#processversionspnp
if (process.versions.pnp) {
return;
}
// Check for a `node_modules` directory (npm, yarn non-PnP, etc.)
if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, 'node_modules'))) {
return;
}
this.context.logger.warn(`Node packages may not be installed. Try installing with '${this.context.packageManager.name} install'.`);
}
getArchitectTarget() {
return this.commandName;
}
async onMissingTarget(defaultMessage) {
const { logger } = this.context;
const choices = this.missingTargetChoices;
if (!choices?.length) {
logger.error(defaultMessage);
return 1;
}
const missingTargetMessage = `Cannot find "${this.getArchitectTarget()}" target for the specified project.\n` +
`You can add a package that implements these capabilities.\n\n` +
`For example:\n` +
choices.map(({ name, value }) => ` ${name}: ng add ${value}`).join('\n') +
'\n';
if ((0, tty_1.isTTY)()) {
// Use prompts to ask the user if they'd like to install a package.
logger.warn(missingTargetMessage);
const packageToInstall = await this.getMissingTargetPackageToInstall(choices);
if (packageToInstall) {
// Example run: `ng add @angular-eslint/schematics`.
const AddCommandModule = (await Promise.resolve().then(() => __importStar(require('../commands/add/cli')))).default;
await new AddCommandModule(this.context).run({
interactive: true,
force: false,
dryRun: false,
defaults: false,
collection: packageToInstall,
});
}
}
else {
// Non TTY display error message.
logger.error(missingTargetMessage);
}
return 1;
}
async getMissingTargetPackageToInstall(choices) {
if (choices.length === 1) {
// Single choice
const { name, value } = choices[0];
if (await (0, prompt_1.askConfirmation)(`Would you like to add ${name} now?`, true, false)) {
return value;
}
return null;
}
// Multiple choice
return (0, prompt_1.askQuestion)(`Would you like to add a package with "${this.getArchitectTarget()}" capabilities now?`, [
{
name: 'No',
value: null,
},
...choices,
], 0, null);
}
}
exports.ArchitectBaseCommandModule = ArchitectBaseCommandModule;

View file

@ -0,0 +1,28 @@
/**
* @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 { Target } from '@angular-devkit/architect';
import { workspaces } from '@angular-devkit/core';
import { Argv } from 'yargs';
import { ArchitectBaseCommandModule } from './architect-base-command-module';
import { CommandModuleImplementation, Options, OtherOptions } from './command-module';
export interface ArchitectCommandArgs {
configuration?: string;
project?: string;
}
export declare abstract class ArchitectCommandModule extends ArchitectBaseCommandModule<ArchitectCommandArgs> implements CommandModuleImplementation<ArchitectCommandArgs> {
abstract readonly multiTarget: boolean;
findDefaultBuilderName?(project: workspaces.ProjectDefinition, target: Target): Promise<string | undefined>;
builder(argv: Argv): Promise<Argv<ArchitectCommandArgs>>;
run(options: Options<ArchitectCommandArgs> & OtherOptions): Promise<number | void>;
private getArchitectProject;
private getProjectNamesByTarget;
/** @returns a sorted list of project names to be used for auto completion. */
private getProjectChoices;
/** @returns a sorted list of configuration names to be used for auto completion. */
private getConfigurationChoices;
}

View file

@ -0,0 +1,204 @@
"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 __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArchitectCommandModule = void 0;
const config_1 = require("../utilities/config");
const memoize_1 = require("../utilities/memoize");
const architect_base_command_module_1 = require("./architect-base-command-module");
const command_module_1 = require("./command-module");
let ArchitectCommandModule = (() => {
let _classSuper = architect_base_command_module_1.ArchitectBaseCommandModule;
let _instanceExtraInitializers = [];
let _getProjectNamesByTarget_decorators;
return class ArchitectCommandModule extends _classSuper {
static {
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
_getProjectNamesByTarget_decorators = [memoize_1.memoize];
__esDecorate(this, null, _getProjectNamesByTarget_decorators, { kind: "method", name: "getProjectNamesByTarget", static: false, private: false, access: { has: obj => "getProjectNamesByTarget" in obj, get: obj => obj.getProjectNamesByTarget }, metadata: _metadata }, null, _instanceExtraInitializers);
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
}
async builder(argv) {
const target = this.getArchitectTarget();
// Add default builder if target is not in project and a command default is provided
if (this.findDefaultBuilderName && this.context.workspace) {
for (const [project, projectDefinition] of this.context.workspace.projects) {
if (projectDefinition.targets.has(target)) {
continue;
}
const defaultBuilder = await this.findDefaultBuilderName(projectDefinition, {
project,
target,
});
if (defaultBuilder) {
projectDefinition.targets.set(target, {
builder: defaultBuilder,
});
}
}
}
const project = this.getArchitectProject();
const { jsonHelp, getYargsCompletions, help } = this.context.args.options;
const localYargs = argv
.positional('project', {
describe: 'The name of the project to build. Can be an application or a library.',
type: 'string',
// Hide choices from JSON help so that we don't display them in AIO.
choices: jsonHelp ? undefined : this.getProjectChoices(),
})
.option('configuration', {
describe: `One or more named builder configurations as a comma-separated ` +
`list as specified in the "configurations" section in angular.json.\n` +
`The builder uses the named configurations to run the given target.\n` +
`For more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations.`,
alias: 'c',
type: 'string',
// Show only in when using --help and auto completion because otherwise comma seperated configuration values will be invalid.
// Also, hide choices from JSON help so that we don't display them in AIO.
choices: (getYargsCompletions || help) && !jsonHelp && project
? this.getConfigurationChoices(project)
: undefined,
})
.strict();
if (!project) {
return localYargs;
}
const schemaOptions = await this.getArchitectTargetOptions({
project,
target,
});
return this.addSchemaOptionsToCommand(localYargs, schemaOptions);
}
async run(options) {
const target = this.getArchitectTarget();
const { configuration = '', project, ...architectOptions } = options;
if (!project) {
// This runs each target sequentially.
// Running them in parallel would jumble the log messages.
let result = 0;
const projectNames = this.getProjectNamesByTarget(target);
if (!projectNames) {
return this.onMissingTarget('Cannot determine project or target for command.');
}
for (const project of projectNames) {
result |= await this.runSingleTarget({ configuration, target, project }, architectOptions);
}
return result;
}
else {
return await this.runSingleTarget({ configuration, target, project }, architectOptions);
}
}
getArchitectProject() {
const { options, positional } = this.context.args;
const [, projectName] = positional;
if (projectName) {
return projectName;
}
// Yargs allows positional args to be used as flags.
if (typeof options['project'] === 'string') {
return options['project'];
}
const target = this.getArchitectTarget();
const projectFromTarget = this.getProjectNamesByTarget(target);
return projectFromTarget?.length ? projectFromTarget[0] : undefined;
}
getProjectNamesByTarget(target) {
const workspace = this.getWorkspaceOrThrow();
const allProjectsForTargetName = [];
for (const [name, project] of workspace.projects) {
if (project.targets.has(target)) {
allProjectsForTargetName.push(name);
}
}
if (allProjectsForTargetName.length === 0) {
return undefined;
}
if (this.multiTarget) {
// For multi target commands, we always list all projects that have the target.
return allProjectsForTargetName;
}
else {
if (allProjectsForTargetName.length === 1) {
return allProjectsForTargetName;
}
const maybeProject = (0, config_1.getProjectByCwd)(workspace);
if (maybeProject) {
return allProjectsForTargetName.includes(maybeProject) ? [maybeProject] : undefined;
}
const { getYargsCompletions, help } = this.context.args.options;
if (!getYargsCompletions && !help) {
// Only issue the below error when not in help / completion mode.
throw new command_module_1.CommandModuleError('Cannot determine project for command.\n' +
'This is a multi-project workspace and more than one project supports this command. ' +
`Run "ng ${this.command}" to execute the command for a specific project or change the current ` +
'working directory to a project directory.\n\n' +
`Available projects are:\n${allProjectsForTargetName
.sort()
.map((p) => `- ${p}`)
.join('\n')}`);
}
}
return undefined;
}
/** @returns a sorted list of project names to be used for auto completion. */
getProjectChoices() {
const { workspace } = this.context;
return workspace ? [...workspace.projects.keys()].sort() : undefined;
}
/** @returns a sorted list of configuration names to be used for auto completion. */
getConfigurationChoices(project) {
const projectDefinition = this.context.workspace?.projects.get(project);
if (!projectDefinition) {
return undefined;
}
const target = this.getArchitectTarget();
const configurations = projectDefinition.targets.get(target)?.configurations;
return configurations ? Object.keys(configurations).sort() : undefined;
}
constructor() {
super(...arguments);
__runInitializers(this, _instanceExtraInitializers);
}
};
})();
exports.ArchitectCommandModule = ArchitectCommandModule;

View file

@ -0,0 +1,101 @@
/**
* @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 { logging } from '@angular-devkit/core';
import { ArgumentsCamelCase, Argv, CamelCaseKey, CommandModule as YargsCommandModule } from 'yargs';
import { AnalyticsCollector } from '../analytics/analytics-collector';
import { EventCustomDimension, EventCustomMetric } from '../analytics/analytics-parameters';
import { AngularWorkspace } from '../utilities/config';
import { PackageManagerUtils } from '../utilities/package-manager';
import { Option } from './utilities/json-schema';
export type Options<T> = {
[key in keyof T as CamelCaseKey<key>]: T[key];
};
export declare enum CommandScope {
/** Command can only run inside an Angular workspace. */
In = 0,
/** Command can only run outside an Angular workspace. */
Out = 1,
/** Command can run inside and outside an Angular workspace. */
Both = 2
}
export interface CommandContext {
currentDirectory: string;
root: string;
workspace?: AngularWorkspace;
globalConfiguration: AngularWorkspace;
logger: logging.Logger;
packageManager: PackageManagerUtils;
/** Arguments parsed in free-from without parser configuration. */
args: {
positional: string[];
options: {
help: boolean;
jsonHelp: boolean;
getYargsCompletions: boolean;
} & Record<string, unknown>;
};
}
export type OtherOptions = Record<string, unknown>;
export interface CommandModuleImplementation<T extends {} = {}> extends Omit<YargsCommandModule<{}, T>, 'builder' | 'handler'> {
/** Scope in which the command can be executed in. */
scope: CommandScope;
/** Path used to load the long description for the command in JSON help text. */
longDescriptionPath?: string;
/** Object declaring the options the command accepts, or a function accepting and returning a yargs instance. */
builder(argv: Argv): Promise<Argv<T>> | Argv<T>;
/** A function which will be passed the parsed argv. */
run(options: Options<T> & OtherOptions): Promise<number | void> | number | void;
}
export interface FullDescribe {
describe?: string;
longDescription?: string;
longDescriptionRelativePath?: string;
}
export declare abstract class CommandModule<T extends {} = {}> implements CommandModuleImplementation<T> {
protected readonly context: CommandContext;
abstract readonly command: string;
abstract readonly describe: string | false;
abstract readonly longDescriptionPath?: string;
protected readonly shouldReportAnalytics: boolean;
readonly scope: CommandScope;
private readonly optionsWithAnalytics;
constructor(context: CommandContext);
/**
* Description object which contains the long command descroption.
* This is used to generate JSON help wich is used in AIO.
*
* `false` will result in a hidden command.
*/
get fullDescribe(): FullDescribe | false;
protected get commandName(): string;
abstract builder(argv: Argv): Promise<Argv<T>> | Argv<T>;
abstract run(options: Options<T> & OtherOptions): Promise<number | void> | number | void;
handler(args: ArgumentsCamelCase<T> & OtherOptions): Promise<void>;
protected getAnalytics(): Promise<AnalyticsCollector | undefined>;
/**
* Adds schema options to a command also this keeps track of options that are required for analytics.
* **Note:** This method should be called from the command bundler method.
*/
protected addSchemaOptionsToCommand<T>(localYargs: Argv<T>, options: Option[]): Argv<T>;
protected getWorkspaceOrThrow(): AngularWorkspace;
/**
* Flush on an interval (if the event loop is waiting).
*
* @returns a method that when called will terminate the periodic
* flush and call flush one last time.
*/
protected getAnalyticsParameters(options: (Options<T> & OtherOptions) | OtherOptions): Partial<Record<EventCustomDimension | EventCustomMetric, string | boolean | number>>;
private reportCommandRunAnalytics;
private reportWorkspaceInfoAnalytics;
}
/**
* Creates an known command module error.
* This is used so during executation we can filter between known validation error and real non handled errors.
*/
export declare class CommandModuleError extends Error {
}

View file

@ -0,0 +1,307 @@
"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 __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
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 __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommandModuleError = exports.CommandModule = exports.CommandScope = void 0;
const core_1 = require("@angular-devkit/core");
const fs_1 = require("fs");
const path = __importStar(require("path"));
const yargs_1 = __importDefault(require("yargs"));
const helpers_1 = require("yargs/helpers");
const analytics_1 = require("../analytics/analytics");
const analytics_collector_1 = require("../analytics/analytics-collector");
const analytics_parameters_1 = require("../analytics/analytics-parameters");
const completion_1 = require("../utilities/completion");
const memoize_1 = require("../utilities/memoize");
var CommandScope;
(function (CommandScope) {
/** Command can only run inside an Angular workspace. */
CommandScope[CommandScope["In"] = 0] = "In";
/** Command can only run outside an Angular workspace. */
CommandScope[CommandScope["Out"] = 1] = "Out";
/** Command can run inside and outside an Angular workspace. */
CommandScope[CommandScope["Both"] = 2] = "Both";
})(CommandScope || (exports.CommandScope = CommandScope = {}));
let CommandModule = (() => {
let _instanceExtraInitializers = [];
let _getAnalytics_decorators;
return class CommandModule {
static {
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
_getAnalytics_decorators = [memoize_1.memoize];
__esDecorate(this, null, _getAnalytics_decorators, { kind: "method", name: "getAnalytics", static: false, private: false, access: { has: obj => "getAnalytics" in obj, get: obj => obj.getAnalytics }, metadata: _metadata }, null, _instanceExtraInitializers);
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
}
context = __runInitializers(this, _instanceExtraInitializers);
shouldReportAnalytics = true;
scope = CommandScope.Both;
optionsWithAnalytics = new Map();
constructor(context) {
this.context = context;
}
/**
* Description object which contains the long command descroption.
* This is used to generate JSON help wich is used in AIO.
*
* `false` will result in a hidden command.
*/
get fullDescribe() {
return this.describe === false
? false
: {
describe: this.describe,
...(this.longDescriptionPath
? {
longDescriptionRelativePath: path
.relative(path.join(__dirname, '../../../../'), this.longDescriptionPath)
.replace(/\\/g, path.posix.sep),
longDescription: (0, fs_1.readFileSync)(this.longDescriptionPath, 'utf8').replace(/\r\n/g, '\n'),
}
: {}),
};
}
get commandName() {
return this.command.split(' ', 1)[0];
}
async handler(args) {
const { _, $0, ...options } = args;
// Camelize options as yargs will return the object in kebab-case when camel casing is disabled.
const camelCasedOptions = {};
for (const [key, value] of Object.entries(options)) {
camelCasedOptions[helpers_1.Parser.camelCase(key)] = value;
}
// Set up autocompletion if appropriate.
const autocompletionExitCode = await (0, completion_1.considerSettingUpAutocompletion)(this.commandName, this.context.logger);
if (autocompletionExitCode !== undefined) {
process.exitCode = autocompletionExitCode;
return;
}
// Gather and report analytics.
const analytics = await this.getAnalytics();
const stopPeriodicFlushes = analytics && analytics.periodFlush();
let exitCode;
try {
if (analytics) {
this.reportCommandRunAnalytics(analytics);
this.reportWorkspaceInfoAnalytics(analytics);
}
exitCode = await this.run(camelCasedOptions);
}
catch (e) {
if (e instanceof core_1.schema.SchemaValidationException) {
this.context.logger.fatal(`Error: ${e.message}`);
exitCode = 1;
}
else {
throw e;
}
}
finally {
await stopPeriodicFlushes?.();
if (typeof exitCode === 'number' && exitCode > 0) {
process.exitCode = exitCode;
}
}
}
async getAnalytics() {
if (!this.shouldReportAnalytics) {
return undefined;
}
const userId = await (0, analytics_1.getAnalyticsUserId)(this.context,
// Don't prompt on `ng update`, 'ng version' or `ng analytics`.
['version', 'update', 'analytics'].includes(this.commandName));
return userId ? new analytics_collector_1.AnalyticsCollector(this.context, userId) : undefined;
}
/**
* Adds schema options to a command also this keeps track of options that are required for analytics.
* **Note:** This method should be called from the command bundler method.
*/
addSchemaOptionsToCommand(localYargs, options) {
const booleanOptionsWithNoPrefix = new Set();
for (const option of options) {
const { default: defaultVal, positional, deprecated, description, alias, userAnalytics, type, hidden, name, choices, } = option;
const sharedOptions = {
alias,
hidden,
description,
deprecated,
choices,
// This should only be done when `--help` is used otherwise default will override options set in angular.json.
...(this.context.args.options.help ? { default: defaultVal } : {}),
};
let dashedName = core_1.strings.dasherize(name);
// Handle options which have been defined in the schema with `no` prefix.
if (type === 'boolean' && dashedName.startsWith('no-')) {
dashedName = dashedName.slice(3);
booleanOptionsWithNoPrefix.add(dashedName);
}
if (positional === undefined) {
localYargs = localYargs.option(dashedName, {
type,
...sharedOptions,
});
}
else {
localYargs = localYargs.positional(dashedName, {
type: type === 'array' || type === 'count' ? 'string' : type,
...sharedOptions,
});
}
// Record option of analytics.
if (userAnalytics !== undefined) {
this.optionsWithAnalytics.set(name, userAnalytics);
}
}
// Handle options which have been defined in the schema with `no` prefix.
if (booleanOptionsWithNoPrefix.size) {
localYargs.middleware((options) => {
for (const key of booleanOptionsWithNoPrefix) {
if (key in options) {
options[`no-${key}`] = !options[key];
delete options[key];
}
}
}, false);
}
return localYargs;
}
getWorkspaceOrThrow() {
const { workspace } = this.context;
if (!workspace) {
throw new CommandModuleError('A workspace is required for this command.');
}
return workspace;
}
/**
* Flush on an interval (if the event loop is waiting).
*
* @returns a method that when called will terminate the periodic
* flush and call flush one last time.
*/
getAnalyticsParameters(options) {
const parameters = {};
const validEventCustomDimensionAndMetrics = new Set([
...Object.values(analytics_parameters_1.EventCustomDimension),
...Object.values(analytics_parameters_1.EventCustomMetric),
]);
for (const [name, ua] of this.optionsWithAnalytics) {
const value = options[name];
if ((typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') &&
validEventCustomDimensionAndMetrics.has(ua)) {
parameters[ua] = value;
}
}
return parameters;
}
reportCommandRunAnalytics(analytics) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const internalMethods = yargs_1.default.getInternalMethods();
// $0 generate component [name] -> generate_component
// $0 add <collection> -> add
const fullCommand = internalMethods.getUsageInstance().getUsage()[0][0]
.split(' ')
.filter((x) => {
const code = x.charCodeAt(0);
return code >= 97 && code <= 122;
})
.join('_');
analytics.reportCommandRunEvent(fullCommand);
}
reportWorkspaceInfoAnalytics(analytics) {
const { workspace } = this.context;
if (!workspace) {
return;
}
let applicationProjectsCount = 0;
let librariesProjectsCount = 0;
for (const project of workspace.projects.values()) {
switch (project.extensions['projectType']) {
case 'application':
applicationProjectsCount++;
break;
case 'library':
librariesProjectsCount++;
break;
}
}
analytics.reportWorkspaceInfoEvent({
[analytics_parameters_1.EventCustomMetric.AllProjectsCount]: librariesProjectsCount + applicationProjectsCount,
[analytics_parameters_1.EventCustomMetric.ApplicationProjectsCount]: applicationProjectsCount,
[analytics_parameters_1.EventCustomMetric.LibraryProjectsCount]: librariesProjectsCount,
});
}
};
})();
exports.CommandModule = CommandModule;
/**
* Creates an known command module error.
* This is used so during executation we can filter between known validation error and real non handled errors.
*/
class CommandModuleError extends Error {
}
exports.CommandModuleError = CommandModuleError;

View file

@ -0,0 +1,9 @@
/**
* @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 { logging } from '@angular-devkit/core';
export declare function runCommand(args: string[], logger: logging.Logger): Promise<number>;

View file

@ -0,0 +1,139 @@
"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 __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runCommand = runCommand;
const yargs_1 = __importDefault(require("yargs"));
const helpers_1 = require("yargs/helpers");
const command_config_1 = require("../commands/command-config");
const color_1 = require("../utilities/color");
const config_1 = require("../utilities/config");
const error_1 = require("../utilities/error");
const package_manager_1 = require("../utilities/package-manager");
const version_1 = require("../utilities/version");
const command_module_1 = require("./command-module");
const command_1 = require("./utilities/command");
const json_help_1 = require("./utilities/json-help");
const normalize_options_middleware_1 = require("./utilities/normalize-options-middleware");
const yargsParser = helpers_1.Parser;
async function runCommand(args, logger) {
const { $0, _, help = false, jsonHelp = false, getYargsCompletions = false, ...rest } = yargsParser(args, {
boolean: ['help', 'json-help', 'get-yargs-completions'],
alias: { 'collection': 'c' },
});
// When `getYargsCompletions` is true the scriptName 'ng' at index 0 is not removed.
const positional = getYargsCompletions ? _.slice(1) : _;
let workspace;
let globalConfiguration;
try {
[workspace, globalConfiguration] = await Promise.all([
(0, config_1.getWorkspace)('local'),
(0, config_1.getWorkspace)('global'),
]);
}
catch (e) {
(0, error_1.assertIsError)(e);
logger.fatal(e.message);
return 1;
}
const root = workspace?.basePath ?? process.cwd();
const context = {
globalConfiguration,
workspace,
logger,
currentDirectory: process.cwd(),
root,
packageManager: new package_manager_1.PackageManagerUtils({ globalConfiguration, workspace, root }),
args: {
positional: positional.map((v) => v.toString()),
options: {
help,
jsonHelp,
getYargsCompletions,
...rest,
},
},
};
let localYargs = (0, yargs_1.default)(args);
for (const CommandModule of await getCommandsToRegister(positional[0])) {
localYargs = (0, command_1.addCommandModuleToYargs)(localYargs, CommandModule, context);
}
if (jsonHelp) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const usageInstance = localYargs.getInternalMethods().getUsageInstance();
usageInstance.help = () => (0, json_help_1.jsonHelpUsage)();
}
// Add default command to support version option when no subcommand is specified
localYargs.command('*', false, (builder) => builder.version('version', 'Show Angular CLI version.', version_1.VERSION.full));
await localYargs
.scriptName('ng')
// https://github.com/yargs/yargs/blob/main/docs/advanced.md#customizing-yargs-parser
.parserConfiguration({
'populate--': true,
'unknown-options-as-args': false,
'dot-notation': false,
'boolean-negation': true,
'strip-aliased': true,
'strip-dashed': true,
'camel-case-expansion': false,
})
.option('json-help', {
describe: 'Show help in JSON format.',
implies: ['help'],
hidden: true,
type: 'boolean',
})
.help('help', 'Shows a help message for this command in the console.')
// A complete list of strings can be found: https://github.com/yargs/yargs/blob/main/locales/en.json
.updateStrings({
'Commands:': color_1.colors.cyan('Commands:'),
'Options:': color_1.colors.cyan('Options:'),
'Positionals:': color_1.colors.cyan('Arguments:'),
'deprecated': color_1.colors.yellow('deprecated'),
'deprecated: %s': color_1.colors.yellow('deprecated:') + ' %s',
'Did you mean %s?': 'Unknown command. Did you mean %s?',
})
.epilogue('For more information, see https://angular.dev/cli/.\n')
.demandCommand(1, command_1.demandCommandFailureMessage)
.recommendCommands()
.middleware(normalize_options_middleware_1.normalizeOptionsMiddleware)
.version(false)
.showHelpOnFail(false)
.strict()
.fail((msg, err) => {
throw msg
? // Validation failed example: `Unknown argument:`
new command_module_1.CommandModuleError(msg)
: // Unknown exception, re-throw.
err;
})
.wrap(yargs_1.default.terminalWidth())
.parseAsync();
return process.exitCode ?? 0;
}
/**
* Get the commands that need to be registered.
* @returns One or more command factories that needs to be registered.
*/
async function getCommandsToRegister(commandName) {
const commands = [];
if (commandName in command_config_1.RootCommands) {
commands.push(command_config_1.RootCommands[commandName]);
}
else if (commandName in command_config_1.RootCommandsAliases) {
commands.push(command_config_1.RootCommandsAliases[commandName]);
}
else {
// Unknown command, register every possible command.
Object.values(command_config_1.RootCommands).forEach((c) => commands.push(c));
}
return Promise.all(commands.map((command) => command.factory().then((m) => m.default)));
}

View file

@ -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 { Collection } from '@angular-devkit/schematics';
import { FileSystemCollectionDescription, FileSystemSchematicDescription, NodeWorkflow } from '@angular-devkit/schematics/tools';
import { Argv } from 'yargs';
import { CommandModule, CommandModuleImplementation, CommandScope, Options, OtherOptions } from './command-module';
import { Option } from './utilities/json-schema';
export declare const DEFAULT_SCHEMATICS_COLLECTION = "@schematics/angular";
export interface SchematicsCommandArgs {
interactive: boolean;
force: boolean;
'dry-run': boolean;
defaults: boolean;
}
export interface SchematicsExecutionOptions extends Options<SchematicsCommandArgs> {
packageRegistry?: string;
}
export declare abstract class SchematicsCommandModule extends CommandModule<SchematicsCommandArgs> implements CommandModuleImplementation<SchematicsCommandArgs> {
scope: CommandScope;
protected readonly allowPrivateSchematics: boolean;
builder(argv: Argv): Promise<Argv<SchematicsCommandArgs>>;
/** Get schematic schema options.*/
protected getSchematicOptions(collection: Collection<FileSystemCollectionDescription, FileSystemSchematicDescription>, schematicName: string, workflow: NodeWorkflow): Promise<Option[]>;
protected getOrCreateWorkflowForBuilder(collectionName: string): NodeWorkflow;
protected getOrCreateWorkflowForExecution(collectionName: string, options: SchematicsExecutionOptions): Promise<NodeWorkflow>;
protected getSchematicCollections(): Promise<Set<string>>;
protected parseSchematicInfo(schematic: string | undefined): [collectionName: string | undefined, schematicName: string | undefined];
protected runSchematic(options: {
executionOptions: SchematicsExecutionOptions;
schematicOptions: OtherOptions;
collectionName: string;
schematicName: string;
}): Promise<number>;
private getProjectName;
private getResolvePaths;
}

View file

@ -0,0 +1,382 @@
"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 __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SchematicsCommandModule = exports.DEFAULT_SCHEMATICS_COLLECTION = void 0;
const core_1 = require("@angular-devkit/core");
const schematics_1 = require("@angular-devkit/schematics");
const tools_1 = require("@angular-devkit/schematics/tools");
const path_1 = require("path");
const analytics_1 = require("../analytics/analytics");
const analytics_parameters_1 = require("../analytics/analytics-parameters");
const config_1 = require("../utilities/config");
const error_1 = require("../utilities/error");
const memoize_1 = require("../utilities/memoize");
const tty_1 = require("../utilities/tty");
const command_module_1 = require("./command-module");
const json_schema_1 = require("./utilities/json-schema");
const schematic_engine_host_1 = require("./utilities/schematic-engine-host");
const schematic_workflow_1 = require("./utilities/schematic-workflow");
exports.DEFAULT_SCHEMATICS_COLLECTION = '@schematics/angular';
let SchematicsCommandModule = (() => {
let _classSuper = command_module_1.CommandModule;
let _instanceExtraInitializers = [];
let _getOrCreateWorkflowForBuilder_decorators;
let _getOrCreateWorkflowForExecution_decorators;
let _getSchematicCollections_decorators;
return class SchematicsCommandModule extends _classSuper {
static {
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
_getOrCreateWorkflowForBuilder_decorators = [memoize_1.memoize];
_getOrCreateWorkflowForExecution_decorators = [memoize_1.memoize];
_getSchematicCollections_decorators = [memoize_1.memoize];
__esDecorate(this, null, _getOrCreateWorkflowForBuilder_decorators, { kind: "method", name: "getOrCreateWorkflowForBuilder", static: false, private: false, access: { has: obj => "getOrCreateWorkflowForBuilder" in obj, get: obj => obj.getOrCreateWorkflowForBuilder }, metadata: _metadata }, null, _instanceExtraInitializers);
__esDecorate(this, null, _getOrCreateWorkflowForExecution_decorators, { kind: "method", name: "getOrCreateWorkflowForExecution", static: false, private: false, access: { has: obj => "getOrCreateWorkflowForExecution" in obj, get: obj => obj.getOrCreateWorkflowForExecution }, metadata: _metadata }, null, _instanceExtraInitializers);
__esDecorate(this, null, _getSchematicCollections_decorators, { kind: "method", name: "getSchematicCollections", static: false, private: false, access: { has: obj => "getSchematicCollections" in obj, get: obj => obj.getSchematicCollections }, metadata: _metadata }, null, _instanceExtraInitializers);
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
}
scope = (__runInitializers(this, _instanceExtraInitializers), command_module_1.CommandScope.In);
allowPrivateSchematics = false;
async builder(argv) {
return argv
.option('interactive', {
describe: 'Enable interactive input prompts.',
type: 'boolean',
default: true,
})
.option('dry-run', {
describe: 'Run through and reports activity without writing out results.',
type: 'boolean',
alias: ['d'],
default: false,
})
.option('defaults', {
describe: 'Disable interactive input prompts for options with a default.',
type: 'boolean',
default: false,
})
.option('force', {
describe: 'Force overwriting of existing files.',
type: 'boolean',
default: false,
})
.strict();
}
/** Get schematic schema options.*/
async getSchematicOptions(collection, schematicName, workflow) {
const schematic = collection.createSchematic(schematicName, true);
const { schemaJson } = schematic.description;
if (!schemaJson) {
return [];
}
return (0, json_schema_1.parseJsonSchemaToOptions)(workflow.registry, schemaJson);
}
getOrCreateWorkflowForBuilder(collectionName) {
return new tools_1.NodeWorkflow(this.context.root, {
resolvePaths: this.getResolvePaths(collectionName),
engineHostCreator: (options) => new schematic_engine_host_1.SchematicEngineHost(options.resolvePaths),
});
}
async getOrCreateWorkflowForExecution(collectionName, options) {
const { logger, root, packageManager } = this.context;
const { force, dryRun, packageRegistry } = options;
const workflow = new tools_1.NodeWorkflow(root, {
force,
dryRun,
packageManager: packageManager.name,
// A schema registry is required to allow customizing addUndefinedDefaults
registry: new core_1.schema.CoreSchemaRegistry(schematics_1.formats.standardFormats),
packageRegistry,
resolvePaths: this.getResolvePaths(collectionName),
schemaValidation: true,
optionTransforms: [
// Add configuration file defaults
async (schematic, current) => {
const projectName = typeof current?.project === 'string' ? current.project : this.getProjectName();
return {
...(await (0, config_1.getSchematicDefaults)(schematic.collection.name, schematic.name, projectName)),
...current,
};
},
],
engineHostCreator: (options) => new schematic_engine_host_1.SchematicEngineHost(options.resolvePaths),
});
workflow.registry.addPostTransform(core_1.schema.transforms.addUndefinedDefaults);
workflow.registry.useXDeprecatedProvider((msg) => logger.warn(msg));
workflow.registry.addSmartDefaultProvider('projectName', () => this.getProjectName());
const workingDir = (0, core_1.normalize)((0, path_1.relative)(this.context.root, process.cwd()));
workflow.registry.addSmartDefaultProvider('workingDirectory', () => workingDir === '' ? undefined : workingDir);
let shouldReportAnalytics = true;
workflow.engineHost.registerOptionsTransform(async (schematic, options) => {
// Report analytics
if (shouldReportAnalytics) {
shouldReportAnalytics = false;
const { collection: { name: collectionName }, name: schematicName, } = schematic;
const analytics = (0, analytics_1.isPackageNameSafeForAnalytics)(collectionName)
? await this.getAnalytics()
: undefined;
analytics?.reportSchematicRunEvent({
[analytics_parameters_1.EventCustomDimension.SchematicCollectionName]: collectionName,
[analytics_parameters_1.EventCustomDimension.SchematicName]: schematicName,
...this.getAnalyticsParameters(options),
});
}
return options;
});
if (options.interactive !== false && (0, tty_1.isTTY)()) {
workflow.registry.usePromptProvider(async (definitions) => {
let prompts;
const answers = {};
for (const definition of definitions) {
if (options.defaults && definition.default !== undefined) {
continue;
}
// Only load prompt package if needed
prompts ??= await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
switch (definition.type) {
case 'confirmation':
answers[definition.id] = await prompts.confirm({
message: definition.message,
default: definition.default,
});
break;
case 'list':
if (!definition.items?.length) {
continue;
}
answers[definition.id] = await (definition.multiselect ? prompts.checkbox : prompts.select)({
message: definition.message,
validate: (values) => {
if (!definition.validator) {
return true;
}
return definition.validator(Object.values(values).map(({ value }) => value));
},
default: definition.default,
choices: definition.items?.map((item) => typeof item == 'string'
? {
name: item,
value: item,
}
: {
name: item.label,
value: item.value,
}),
});
break;
case 'input': {
let finalValue;
answers[definition.id] = await prompts.input({
message: definition.message,
default: definition.default,
async validate(value) {
if (definition.validator === undefined) {
return true;
}
let lastValidation = false;
for (const type of definition.propertyTypes) {
let potential;
switch (type) {
case 'string':
potential = String(value);
break;
case 'integer':
case 'number':
potential = Number(value);
break;
default:
potential = value;
break;
}
lastValidation = await definition.validator(potential);
// Can be a string if validation fails
if (lastValidation === true) {
finalValue = potential;
return true;
}
}
return lastValidation;
},
});
// Use validated value if present.
// This ensures the correct type is inserted into the final schema options.
if (finalValue !== undefined) {
answers[definition.id] = finalValue;
}
break;
}
}
}
return answers;
});
}
return workflow;
}
async getSchematicCollections() {
// Resolve relative collections from the location of `angular.json`
const resolveRelativeCollection = (collectionName) => collectionName.charAt(0) === '.'
? (0, path_1.resolve)(this.context.root, collectionName)
: collectionName;
const getSchematicCollections = (configSection) => {
if (!configSection) {
return undefined;
}
const { schematicCollections } = configSection;
if (Array.isArray(schematicCollections)) {
return new Set(schematicCollections.map((c) => resolveRelativeCollection(c)));
}
return undefined;
};
const { workspace, globalConfiguration } = this.context;
if (workspace) {
const project = (0, config_1.getProjectByCwd)(workspace);
if (project) {
const value = getSchematicCollections(workspace.getProjectCli(project));
if (value) {
return value;
}
}
}
const value = getSchematicCollections(workspace?.getCli()) ??
getSchematicCollections(globalConfiguration.getCli());
if (value) {
return value;
}
return new Set([exports.DEFAULT_SCHEMATICS_COLLECTION]);
}
parseSchematicInfo(schematic) {
if (schematic?.includes(':')) {
const [collectionName, schematicName] = schematic.split(':', 2);
return [collectionName, schematicName];
}
return [undefined, schematic];
}
async runSchematic(options) {
const { logger } = this.context;
const { schematicOptions, executionOptions, collectionName, schematicName } = options;
const workflow = await this.getOrCreateWorkflowForExecution(collectionName, executionOptions);
if (!schematicName) {
throw new Error('schematicName cannot be undefined.');
}
const { unsubscribe, files } = (0, schematic_workflow_1.subscribeToWorkflow)(workflow, logger);
try {
await workflow
.execute({
collection: collectionName,
schematic: schematicName,
options: schematicOptions,
logger,
allowPrivate: this.allowPrivateSchematics,
})
.toPromise();
if (!files.size) {
logger.info('Nothing to be done.');
}
if (executionOptions.dryRun) {
logger.warn(`\nNOTE: The "--dry-run" option means no changes were made.`);
}
}
catch (err) {
// In case the workflow was not successful, show an appropriate error message.
if (err instanceof schematics_1.UnsuccessfulWorkflowExecution) {
// "See above" because we already printed the error.
logger.fatal('The Schematic workflow failed. See above.');
}
else {
(0, error_1.assertIsError)(err);
logger.fatal(err.message);
}
return 1;
}
finally {
unsubscribe();
}
return 0;
}
getProjectName() {
const { workspace, logger } = this.context;
if (!workspace) {
return undefined;
}
const projectName = (0, config_1.getProjectByCwd)(workspace);
if (projectName) {
return projectName;
}
return undefined;
}
getResolvePaths(collectionName) {
const { workspace, root } = this.context;
return workspace
? // Workspace
collectionName === exports.DEFAULT_SCHEMATICS_COLLECTION
? // Favor __dirname for @schematics/angular to use the build-in version
[__dirname, process.cwd(), root]
: [process.cwd(), root, __dirname]
: // Global
[__dirname, process.cwd()];
}
};
})();
exports.SchematicsCommandModule = SchematicsCommandModule;

View file

@ -0,0 +1,14 @@
/**
* @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 { Argv } from 'yargs';
import { CommandContext, CommandModule, CommandModuleImplementation } from '../command-module';
export declare const demandCommandFailureMessage = "You need to specify a command before moving on. Use '--help' to view the available commands.";
export type CommandModuleConstructor = Partial<CommandModuleImplementation> & {
new (context: CommandContext): Partial<CommandModuleImplementation> & CommandModule;
};
export declare function addCommandModuleToYargs<T extends object, U extends CommandModuleConstructor>(localYargs: Argv<T>, commandModule: U, context: CommandContext): Argv<T>;

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.demandCommandFailureMessage = void 0;
exports.addCommandModuleToYargs = addCommandModuleToYargs;
const command_module_1 = require("../command-module");
exports.demandCommandFailureMessage = `You need to specify a command before moving on. Use '--help' to view the available commands.`;
function addCommandModuleToYargs(localYargs, commandModule, context) {
const cmd = new commandModule(context);
const { args: { options: { jsonHelp }, }, workspace, } = context;
const describe = jsonHelp ? cmd.fullDescribe : cmd.describe;
return localYargs.command({
command: cmd.command,
aliases: cmd.aliases,
describe:
// We cannot add custom fields in help, such as long command description which is used in AIO.
// Therefore, we get around this by adding a complex object as a string which we later parse when generating the help files.
typeof describe === 'object' ? JSON.stringify(describe) : describe,
deprecated: cmd.deprecated,
builder: (argv) => {
// Skip scope validation when running with '--json-help' since it's easier to generate the output for all commands this way.
const isInvalidScope = !jsonHelp &&
((cmd.scope === command_module_1.CommandScope.In && !workspace) ||
(cmd.scope === command_module_1.CommandScope.Out && workspace));
if (isInvalidScope) {
throw new command_module_1.CommandModuleError(`This command is not available when running the Angular CLI ${workspace ? 'inside' : 'outside'} a workspace.`);
}
return cmd.builder(argv);
},
handler: (args) => cmd.handler(args),
});
}

View file

@ -0,0 +1,36 @@
/**
* @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
*/
interface JsonHelpOption {
name: string;
type?: string;
deprecated: boolean | string;
aliases?: string[];
default?: string;
required?: boolean;
positional?: number;
enum?: string[];
description?: string;
}
interface JsonHelpDescription {
shortDescription?: string;
longDescription?: string;
longDescriptionRelativePath?: string;
}
interface JsonHelpSubcommand extends JsonHelpDescription {
name: string;
aliases: string[];
deprecated: string | boolean;
}
export interface JsonHelp extends JsonHelpDescription {
name: string;
command: string;
options: JsonHelpOption[];
subcommands?: JsonHelpSubcommand[];
}
export declare function jsonHelpUsage(): string;
export {};

View file

@ -0,0 +1,92 @@
"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 __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonHelpUsage = jsonHelpUsage;
const yargs_1 = __importDefault(require("yargs"));
const yargsDefaultCommandRegExp = /^\$0|\*/;
function jsonHelpUsage() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const localYargs = yargs_1.default;
const { deprecatedOptions, alias: aliases, array, string, boolean, number, choices, demandedOptions, default: defaultVal, hiddenOptions = [], } = localYargs.getOptions();
const internalMethods = localYargs.getInternalMethods();
const usageInstance = internalMethods.getUsageInstance();
const context = internalMethods.getContext();
const descriptions = usageInstance.getDescriptions();
const groups = localYargs.getGroups();
const positional = groups[usageInstance.getPositionalGroupName()];
const hidden = new Set(hiddenOptions);
const normalizeOptions = [];
const allAliases = new Set([...Object.values(aliases).flat()]);
for (const [names, type] of [
[array, 'array'],
[string, 'string'],
[boolean, 'boolean'],
[number, 'number'],
]) {
for (const name of names) {
if (allAliases.has(name) || hidden.has(name)) {
// Ignore hidden, aliases and already visited option.
continue;
}
const positionalIndex = positional?.indexOf(name) ?? -1;
const alias = aliases[name];
normalizeOptions.push({
name,
type,
deprecated: deprecatedOptions[name],
aliases: alias?.length > 0 ? alias : undefined,
default: defaultVal[name],
required: demandedOptions[name],
enum: choices[name],
description: descriptions[name]?.replace('__yargsString__:', ''),
positional: positionalIndex >= 0 ? positionalIndex : undefined,
});
}
}
// https://github.com/yargs/yargs/blob/00e4ebbe3acd438e73fdb101e75b4f879eb6d345/lib/usage.ts#L124
const subcommands = usageInstance.getCommands()
.map(([name, rawDescription, isDefault, aliases, deprecated]) => ({
name: name.split(' ', 1)[0].replace(yargsDefaultCommandRegExp, ''),
command: name.replace(yargsDefaultCommandRegExp, ''),
default: isDefault || undefined,
...parseDescription(rawDescription),
aliases,
deprecated,
}))
.sort((a, b) => a.name.localeCompare(b.name));
const [command, rawDescription] = usageInstance.getUsage()[0] ?? [];
const defaultSubCommand = subcommands.find((x) => x.default)?.command ?? '';
const otherSubcommands = subcommands.filter((s) => !s.default);
const output = {
name: [...context.commands].pop(),
command: `${command?.replace(yargsDefaultCommandRegExp, localYargs['$0'])}${defaultSubCommand}`,
...parseDescription(rawDescription),
options: normalizeOptions.sort((a, b) => a.name.localeCompare(b.name)),
subcommands: otherSubcommands.length ? otherSubcommands : undefined,
};
return JSON.stringify(output, undefined, 2);
}
function parseDescription(rawDescription) {
try {
const { longDescription, describe: shortDescription, longDescriptionRelativePath, } = JSON.parse(rawDescription);
return {
shortDescription,
longDescriptionRelativePath,
longDescription,
};
}
catch {
return {
shortDescription: rawDescription,
};
}
}

View file

@ -0,0 +1,40 @@
/**
* @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 } from '@angular-devkit/core';
import yargs from 'yargs';
/**
* An option description.
*/
export interface Option extends yargs.Options {
/**
* The name of the option.
*/
name: string;
/**
* Whether this option is required or not.
*/
required?: boolean;
/**
* Format field of this option.
*/
format?: string;
/**
* Whether this option should be hidden from the help output. It will still show up in JSON help.
*/
hidden?: boolean;
/**
* If this option can be used as an argument, the position of the argument. Otherwise omitted.
*/
positional?: number;
/**
* Whether or not to report this option to the Angular Team, and which custom field to use.
* If this is falsey, do not report this option.
*/
userAnalytics?: string;
}
export declare function parseJsonSchemaToOptions(registry: json.schema.SchemaRegistry, schema: json.JsonObject, interactive?: boolean): Promise<Option[]>;

View file

@ -0,0 +1,143 @@
"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.parseJsonSchemaToOptions = parseJsonSchemaToOptions;
const core_1 = require("@angular-devkit/core");
async function parseJsonSchemaToOptions(registry, schema, interactive = true) {
const options = [];
function visitor(current, pointer, parentSchema) {
if (!parentSchema) {
// Ignore root.
return;
}
else if (pointer.split(/\/(?:properties|items|definitions)\//g).length > 2) {
// Ignore subitems (objects or arrays).
return;
}
else if (core_1.json.isJsonArray(current)) {
return;
}
if (pointer.indexOf('/not/') != -1) {
// We don't support anyOf/not.
throw new Error('The "not" keyword is not supported in JSON Schema.');
}
const ptr = core_1.json.schema.parseJsonPointer(pointer);
const name = ptr[ptr.length - 1];
if (ptr[ptr.length - 2] != 'properties') {
// Skip any non-property items.
return;
}
const typeSet = core_1.json.schema.getTypesOfSchema(current);
if (typeSet.size == 0) {
throw new Error('Cannot find type of schema.');
}
// We only support number, string or boolean (or array of those), so remove everything else.
const types = [...typeSet].filter((x) => {
switch (x) {
case 'boolean':
case 'number':
case 'string':
return true;
case 'array':
// Only include arrays if they're boolean, string or number.
if (core_1.json.isJsonObject(current.items) &&
typeof current.items.type == 'string' &&
['boolean', 'number', 'string'].includes(current.items.type)) {
return true;
}
return false;
default:
return false;
}
});
if (types.length == 0) {
// This means it's not usable on the command line. e.g. an Object.
return;
}
// Only keep enum values we support (booleans, numbers and strings).
const enumValues = ((core_1.json.isJsonArray(current.enum) && current.enum) || []).filter((x) => {
switch (typeof x) {
case 'boolean':
case 'number':
case 'string':
return true;
default:
return false;
}
});
let defaultValue = undefined;
if (current.default !== undefined) {
switch (types[0]) {
case 'string':
if (typeof current.default == 'string') {
defaultValue = current.default;
}
break;
case 'number':
if (typeof current.default == 'number') {
defaultValue = current.default;
}
break;
case 'boolean':
if (typeof current.default == 'boolean') {
defaultValue = current.default;
}
break;
}
}
const type = types[0];
const $default = current.$default;
const $defaultIndex = core_1.json.isJsonObject($default) && $default['$source'] == 'argv' ? $default['index'] : undefined;
const positional = typeof $defaultIndex == 'number' ? $defaultIndex : undefined;
let required = core_1.json.isJsonArray(schema.required) ? schema.required.includes(name) : false;
if (required && interactive && current['x-prompt']) {
required = false;
}
const alias = core_1.json.isJsonArray(current.aliases)
? [...current.aliases].map((x) => '' + x)
: current.alias
? ['' + current.alias]
: [];
const format = typeof current.format == 'string' ? current.format : undefined;
const visible = current.visible === undefined || current.visible === true;
const hidden = !!current.hidden || !visible;
const xUserAnalytics = current['x-user-analytics'];
const userAnalytics = typeof xUserAnalytics === 'string' ? xUserAnalytics : undefined;
// Deprecated is set only if it's true or a string.
const xDeprecated = current['x-deprecated'];
const deprecated = xDeprecated === true || typeof xDeprecated === 'string' ? xDeprecated : undefined;
const option = {
name,
description: '' + (current.description === undefined ? '' : current.description),
type,
default: defaultValue,
choices: enumValues.length ? enumValues : undefined,
required,
alias,
format,
hidden,
userAnalytics,
deprecated,
positional,
};
options.push(option);
}
const flattenedSchema = await registry.ɵflatten(schema);
core_1.json.schema.visitJsonSchema(flattenedSchema, visitor);
// Sort by positional and name.
return options.sort((a, b) => {
if (a.positional) {
return b.positional ? a.positional - b.positional : a.name.localeCompare(b.name);
}
else if (b.positional) {
return -1;
}
return a.name.localeCompare(b.name);
});
}

View file

@ -0,0 +1,18 @@
/**
* @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 yargs from 'yargs';
/**
* A Yargs middleware that normalizes non Array options when the argument has been provided multiple times.
*
* By default, when an option is non array and it is provided multiple times in the command line, yargs
* will not override it's value but instead it will be changed to an array unless `duplicate-arguments-array` is disabled.
* But this option also have an effect on real array options which isn't desired.
*
* See: https://github.com/yargs/yargs-parser/pull/163#issuecomment-516566614
*/
export declare function normalizeOptionsMiddleware(args: yargs.Arguments): void;

View file

@ -0,0 +1,58 @@
"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 (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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeOptionsMiddleware = normalizeOptionsMiddleware;
const yargs = __importStar(require("yargs"));
/**
* A Yargs middleware that normalizes non Array options when the argument has been provided multiple times.
*
* By default, when an option is non array and it is provided multiple times in the command line, yargs
* will not override it's value but instead it will be changed to an array unless `duplicate-arguments-array` is disabled.
* But this option also have an effect on real array options which isn't desired.
*
* See: https://github.com/yargs/yargs-parser/pull/163#issuecomment-516566614
*/
function normalizeOptionsMiddleware(args) {
// `getOptions` is not included in the types even though it's public API.
// https://github.com/yargs/yargs/issues/2098
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { array } = yargs.getOptions();
const arrayOptions = new Set(array);
for (const [key, value] of Object.entries(args)) {
if (key !== '_' && Array.isArray(value) && !arrayOptions.has(key)) {
const newValue = value.pop();
// eslint-disable-next-line no-console
console.warn(`Option '${key}' has been specified multiple times. The value '${newValue}' will be used.`);
args[key] = newValue;
}
}
}

Some files were not shown because too many files have changed in this diff Show more