nx 13.8.8 → 13.9.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/nx.d.ts +1 -0
- package/bin/nx.js +78 -1
- package/bin/nx.js.map +1 -1
- package/package.json +19 -2
- package/src/cli/decorate-cli.d.ts +1 -0
- package/src/cli/decorate-cli.js +19 -0
- package/src/cli/decorate-cli.js.map +1 -0
- package/src/cli/find-workspace-root.d.ts +8 -0
- package/src/cli/find-workspace-root.js +25 -0
- package/src/cli/find-workspace-root.js.map +1 -0
- package/src/cli/index.d.ts +3 -0
- package/src/cli/index.js +74 -0
- package/src/cli/index.js.map +1 -0
- package/src/cli/init-local.d.ts +2 -0
- package/src/cli/init-local.js +109 -0
- package/src/cli/init-local.js.map +1 -0
- package/src/cli/is_ci.d.ts +1 -0
- package/src/cli/is_ci.js +20 -0
- package/src/cli/is_ci.js.map +1 -0
- package/src/cli/output.d.ts +58 -0
- package/src/cli/output.js +129 -0
- package/src/cli/output.js.map +1 -0
- package/src/cli/parse-run-one-options.d.ts +6 -0
- package/src/cli/parse-run-one-options.js +139 -0
- package/src/cli/parse-run-one-options.js.map +1 -0
- package/src/cli/run-cli.d.ts +1 -0
- package/src/cli/run-cli.js +69 -0
- package/src/cli/run-cli.js.map +1 -0
- package/src/cli/workspace.d.ts +4 -0
- package/src/cli/workspace.js +3 -0
- package/src/cli/workspace.js.map +1 -0
- package/src/commands/generate.d.ts +15 -0
- package/src/commands/generate.js +170 -0
- package/src/commands/generate.js.map +1 -0
- package/src/commands/help.d.ts +1 -0
- package/src/commands/help.js +34 -0
- package/src/commands/help.js.map +1 -0
- package/src/commands/migrate.d.ts +77 -0
- package/src/commands/migrate.js +584 -0
- package/src/commands/migrate.js.map +1 -0
- package/src/commands/ngcli-adapter.d.ts +111 -0
- package/src/commands/ngcli-adapter.js +940 -0
- package/src/commands/ngcli-adapter.js.map +1 -0
- package/src/commands/run.d.ts +51 -0
- package/src/commands/run.js +224 -0
- package/src/commands/run.js.map +1 -0
- package/src/compat/compat.d.ts +1 -0
- package/src/compat/compat.js +86 -0
- package/src/compat/compat.js.map +1 -0
- package/src/shared/logger.d.ts +11 -0
- package/src/shared/logger.js +48 -0
- package/src/shared/logger.js.map +1 -0
- package/src/shared/nx-plugin.d.ts +18 -0
- package/src/shared/nx-plugin.js +53 -0
- package/src/shared/nx-plugin.js.map +1 -0
- package/src/shared/nx.d.ts +110 -0
- package/src/shared/nx.js +3 -0
- package/src/shared/nx.js.map +1 -0
- package/src/shared/package-json.d.ts +28 -0
- package/src/shared/package-json.js +10 -0
- package/src/shared/package-json.js.map +1 -0
- package/src/shared/package-manager.d.ts +32 -0
- package/src/shared/package-manager.js +83 -0
- package/src/shared/package-manager.js.map +1 -0
- package/src/shared/params.d.ts +113 -0
- package/src/shared/params.js +587 -0
- package/src/shared/params.js.map +1 -0
- package/src/shared/print-help.d.ts +2 -0
- package/src/shared/print-help.js +32 -0
- package/src/shared/print-help.js.map +1 -0
- package/src/shared/project-graph.d.ts +135 -0
- package/src/shared/project-graph.js +22 -0
- package/src/shared/project-graph.js.map +1 -0
- package/src/shared/tasks.d.ts +82 -0
- package/src/shared/tasks.js +3 -0
- package/src/shared/tasks.js.map +1 -0
- package/src/shared/tree.d.ts +115 -0
- package/src/shared/tree.js +259 -0
- package/src/shared/tree.js.map +1 -0
- package/src/shared/workspace.d.ts +257 -0
- package/src/shared/workspace.js +522 -0
- package/src/shared/workspace.js.map +1 -0
- package/src/utils/app-root.d.ts +2 -0
- package/src/utils/app-root.js +30 -0
- package/src/utils/app-root.js.map +1 -0
- package/src/utils/fileutils.d.ts +31 -0
- package/src/utils/fileutils.js +45 -0
- package/src/utils/fileutils.js.map +1 -0
- package/src/utils/json.d.ts +39 -0
- package/src/utils/json.js +48 -0
- package/src/utils/json.js.map +1 -0
- package/src/utils/object-sort.d.ts +1 -0
- package/src/utils/object-sort.js +12 -0
- package/src/utils/object-sort.js.map +1 -0
- package/src/utils/register.d.ts +9 -0
- package/src/utils/register.js +36 -0
- package/src/utils/register.js.map +1 -0
- package/src/utils/split-target.d.ts +1 -0
- package/src/utils/split-target.js +26 -0
- package/src/utils/split-target.js.map +1 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { logging, Path, PathFragment, virtualFs } from '@angular-devkit/core';
|
|
2
|
+
import { GenerateOptions } from './generate';
|
|
3
|
+
import { Tree } from '../shared/tree';
|
|
4
|
+
import { RawWorkspaceJsonConfiguration, WorkspaceJsonConfiguration } from '../shared/workspace';
|
|
5
|
+
import { FileBuffer } from '@angular-devkit/core/src/virtual-fs/host/interface';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { NxJsonConfiguration } from '../shared/nx';
|
|
8
|
+
export declare function scheduleTarget(root: string, opts: {
|
|
9
|
+
project: string;
|
|
10
|
+
target: string;
|
|
11
|
+
configuration: string;
|
|
12
|
+
runOptions: any;
|
|
13
|
+
executor: string;
|
|
14
|
+
}, verbose: boolean): Promise<Observable<import('@angular-devkit/architect').BuilderOutput>>;
|
|
15
|
+
export declare class NxScopedHost extends virtualFs.ScopedHost<any> {
|
|
16
|
+
protected __nxInMemoryWorkspace: WorkspaceJsonConfiguration | null;
|
|
17
|
+
constructor(root: Path);
|
|
18
|
+
protected __readWorkspaceConfiguration: (configFileName: ChangeContext['actualConfigFileName'], overrides?: {
|
|
19
|
+
workspace?: Observable<RawWorkspaceJsonConfiguration>;
|
|
20
|
+
nx?: Observable<NxJsonConfiguration>;
|
|
21
|
+
}) => Observable<FileBuffer>;
|
|
22
|
+
read(path: Path): Observable<FileBuffer>;
|
|
23
|
+
write(path: Path, content: FileBuffer): Observable<void>;
|
|
24
|
+
isFile(path: Path): Observable<boolean>;
|
|
25
|
+
exists(path: Path): Observable<boolean>;
|
|
26
|
+
workspaceConfigName(): Promise<string>;
|
|
27
|
+
protected context(path: string): Observable<ChangeContext>;
|
|
28
|
+
private writeWorkspaceConfiguration;
|
|
29
|
+
private __saveNxJsonProps;
|
|
30
|
+
private writeWorkspaceConfigFiles;
|
|
31
|
+
protected resolveInlineProjectConfigurations(config: RawWorkspaceJsonConfiguration): Observable<WorkspaceJsonConfiguration>;
|
|
32
|
+
}
|
|
33
|
+
declare type ConfigFilePath = ('/angular.json' | '/workspace.json') & {
|
|
34
|
+
__PRIVATE_DEVKIT_PATH: void;
|
|
35
|
+
};
|
|
36
|
+
declare type ChangeContext = {
|
|
37
|
+
isWorkspaceConfig: boolean;
|
|
38
|
+
actualConfigFileName: ConfigFilePath | null;
|
|
39
|
+
isNewFormat: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* This host contains the workaround needed to run Angular migrations
|
|
43
|
+
*/
|
|
44
|
+
export declare class NxScopedHostForMigrations extends NxScopedHost {
|
|
45
|
+
constructor(root: Path);
|
|
46
|
+
read(path: Path): Observable<FileBuffer>;
|
|
47
|
+
write(path: Path, content: FileBuffer): Observable<void>;
|
|
48
|
+
}
|
|
49
|
+
export declare class NxScopeHostUsedForWrappedSchematics extends NxScopedHost {
|
|
50
|
+
private readonly host;
|
|
51
|
+
constructor(root: Path, host: Tree);
|
|
52
|
+
read(path: Path): Observable<FileBuffer>;
|
|
53
|
+
exists(path: Path): Observable<boolean>;
|
|
54
|
+
isDirectory(path: Path): Observable<boolean>;
|
|
55
|
+
isFile(path: Path): Observable<boolean>;
|
|
56
|
+
list(path: Path): Observable<PathFragment[]>;
|
|
57
|
+
}
|
|
58
|
+
export declare function generate(root: string, opts: GenerateOptions, verbose: boolean): Promise<number>;
|
|
59
|
+
export declare function runMigration(root: string, packageName: string, migrationName: string, isVerbose: boolean): Promise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* By default, Angular Devkit schematic collections will be resolved using the Node resolution.
|
|
62
|
+
* This doesn't work if you are testing schematics that refer to other schematics in the
|
|
63
|
+
* same repo.
|
|
64
|
+
*
|
|
65
|
+
* This function can can be used to override the resolution behaviour.
|
|
66
|
+
*
|
|
67
|
+
* Example:
|
|
68
|
+
*
|
|
69
|
+
* ```typescript
|
|
70
|
+
* overrideCollectionResolutionForTesting({
|
|
71
|
+
* '@nrwl/workspace': path.join(__dirname, '../../../../workspace/generators.json'),
|
|
72
|
+
* '@nrwl/angular': path.join(__dirname, '../../../../angular/generators.json'),
|
|
73
|
+
* '@nrwl/linter': path.join(__dirname, '../../../../linter/generators.json')
|
|
74
|
+
* });
|
|
75
|
+
*
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare function overrideCollectionResolutionForTesting(collections: {
|
|
79
|
+
[name: string]: string;
|
|
80
|
+
}): void;
|
|
81
|
+
/**
|
|
82
|
+
* If you have an Nx Devkit generator invoking the wrapped Angular Devkit schematic,
|
|
83
|
+
* and you don't want the Angular Devkit schematic to run, you can mock it up using this function.
|
|
84
|
+
*
|
|
85
|
+
* Unfortunately, there are some edge cases in the Nx-Angular devkit integration that
|
|
86
|
+
* can be seen in the unit tests context. This function is useful for handling that as well.
|
|
87
|
+
*
|
|
88
|
+
* In this case, you can mock it up.
|
|
89
|
+
*
|
|
90
|
+
* Example:
|
|
91
|
+
*
|
|
92
|
+
* ```typescript
|
|
93
|
+
* mockSchematicsForTesting({
|
|
94
|
+
* 'mycollection:myschematic': (tree, params) => {
|
|
95
|
+
* tree.write('README.md');
|
|
96
|
+
* }
|
|
97
|
+
* });
|
|
98
|
+
*
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare function mockSchematicsForTesting(schematics: {
|
|
102
|
+
[name: string]: (host: Tree, generatorOptions: {
|
|
103
|
+
[k: string]: any;
|
|
104
|
+
}) => Promise<void>;
|
|
105
|
+
}): void;
|
|
106
|
+
export declare function wrapAngularDevkitSchematic(collectionName: string, generatorName: string): (host: Tree, generatorOptions: {
|
|
107
|
+
[k: string]: any;
|
|
108
|
+
}) => Promise<any>;
|
|
109
|
+
export declare function invokeNew(root: string, opts: GenerateOptions, verbose: boolean): Promise<number>;
|
|
110
|
+
export declare const getLogger: (isVerbose?: boolean) => logging.Logger;
|
|
111
|
+
export {};
|