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

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);
});