1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { json, workspaces } from '@angular-devkit/core';
|
9 | import { PackageManager } from '../../lib/config/workspace-schema';
|
10 | import { JSONFile } from './json-file';
|
11 | export declare const workspaceSchemaPath: string;
|
12 | export declare class AngularWorkspace {
|
13 | private readonly workspace;
|
14 | readonly filePath: string;
|
15 | readonly basePath: string;
|
16 | constructor(workspace: workspaces.WorkspaceDefinition, filePath: string);
|
17 | get extensions(): Record<string, json.JsonValue | undefined>;
|
18 | get projects(): workspaces.ProjectDefinitionCollection;
|
19 | getCli(): Record<string, any> | undefined;
|
20 | getProjectCli(projectName: string): Record<string, any> | undefined;
|
21 | save(): Promise<void>;
|
22 | static load(workspaceFilePath: string): Promise<AngularWorkspace>;
|
23 | }
|
24 | export declare function getWorkspace(level: 'global'): Promise<AngularWorkspace>;
|
25 | export declare function getWorkspace(level: 'local'): Promise<AngularWorkspace | undefined>;
|
26 | export declare function getWorkspace(level: 'local' | 'global'): Promise<AngularWorkspace | undefined>;
|
27 | /**
|
28 | * This method will load the workspace configuration in raw JSON format.
|
29 | * When `level` is `global` and file doesn't exists, it will be created.
|
30 | *
|
31 | * NB: This method is intended to be used only for `ng config`.
|
32 | */
|
33 | export declare function getWorkspaceRaw(level?: 'local' | 'global'): Promise<[JSONFile | null, string | null]>;
|
34 | export declare function validateWorkspace(data: json.JsonObject, isGlobal: boolean): Promise<void>;
|
35 | export declare function getProjectByCwd(workspace: AngularWorkspace): string | null;
|
36 | export declare function getConfiguredPackageManager(): Promise<PackageManager | null>;
|
37 | export declare function getSchematicDefaults(collection: string, schematic: string, project?: string | null): Promise<{}>;
|
38 | export declare function isWarningEnabled(warning: string): Promise<boolean>;
|