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,135 @@
|
|
|
1
|
+
import type { TargetConfiguration, Workspace } from './workspace';
|
|
2
|
+
/**
|
|
3
|
+
* Some metadata about a file
|
|
4
|
+
*/
|
|
5
|
+
export interface FileData {
|
|
6
|
+
file: string;
|
|
7
|
+
hash: string;
|
|
8
|
+
/** @deprecated this field will be removed in v13. Use {@link path.extname} to parse extension */
|
|
9
|
+
ext?: string;
|
|
10
|
+
deps?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A list of files separated by the project they belong to
|
|
14
|
+
*/
|
|
15
|
+
export interface ProjectFileMap {
|
|
16
|
+
[projectName: string]: FileData[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Graph of projects in the workspace and dependencies between them
|
|
20
|
+
*/
|
|
21
|
+
export interface ProjectGraph<T = any> {
|
|
22
|
+
nodes: Record<string, ProjectGraphProjectNode<T>>;
|
|
23
|
+
externalNodes?: Record<string, ProjectGraphExternalNode>;
|
|
24
|
+
dependencies: Record<string, ProjectGraphDependency[]>;
|
|
25
|
+
allWorkspaceFiles?: FileData[];
|
|
26
|
+
version?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ProjectGraphV4<T = any> {
|
|
29
|
+
nodes: Record<string, ProjectGraphNode<T>>;
|
|
30
|
+
dependencies: Record<string, ProjectGraphDependency[]>;
|
|
31
|
+
allWorkspaceFiles?: FileData[];
|
|
32
|
+
version?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Type of dependency between projects
|
|
36
|
+
*/
|
|
37
|
+
export declare enum DependencyType {
|
|
38
|
+
/**
|
|
39
|
+
* Static dependencies are tied to the loading of the module
|
|
40
|
+
*/
|
|
41
|
+
static = "static",
|
|
42
|
+
/**
|
|
43
|
+
* Dynamic dependencies are brought in by the module at run time
|
|
44
|
+
*/
|
|
45
|
+
dynamic = "dynamic",
|
|
46
|
+
/**
|
|
47
|
+
* Implicit dependencies are inferred
|
|
48
|
+
*/
|
|
49
|
+
implicit = "implicit"
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A node describing a project or an external node in a workspace
|
|
53
|
+
*/
|
|
54
|
+
export declare type ProjectGraphNode<T = any> = ProjectGraphProjectNode<T> | ProjectGraphExternalNode;
|
|
55
|
+
/**
|
|
56
|
+
* A node describing a project in a workspace
|
|
57
|
+
*/
|
|
58
|
+
export interface ProjectGraphProjectNode<T = any> {
|
|
59
|
+
type: 'app' | 'e2e' | 'lib';
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Additional metadata about a project
|
|
63
|
+
*/
|
|
64
|
+
data: T & {
|
|
65
|
+
/**
|
|
66
|
+
* The project's root directory
|
|
67
|
+
*/
|
|
68
|
+
root: string;
|
|
69
|
+
sourceRoot?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Targets associated to the project
|
|
72
|
+
*/
|
|
73
|
+
targets?: {
|
|
74
|
+
[targetName: string]: TargetConfiguration;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Project's tags used for enforcing module boundaries
|
|
78
|
+
*/
|
|
79
|
+
tags?: string[];
|
|
80
|
+
/**
|
|
81
|
+
* Projects on which this node implicitly depends on
|
|
82
|
+
*/
|
|
83
|
+
implicitDependencies?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Files associated to the project
|
|
86
|
+
*/
|
|
87
|
+
files: FileData[];
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A node describing an external dependency
|
|
92
|
+
*/
|
|
93
|
+
export interface ProjectGraphExternalNode {
|
|
94
|
+
type: 'npm';
|
|
95
|
+
name: `npm:${string}`;
|
|
96
|
+
data: {
|
|
97
|
+
version: string;
|
|
98
|
+
packageName: string;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A dependency between two projects
|
|
103
|
+
*/
|
|
104
|
+
export interface ProjectGraphDependency {
|
|
105
|
+
type: DependencyType | string;
|
|
106
|
+
/**
|
|
107
|
+
* The project being imported by the other
|
|
108
|
+
*/
|
|
109
|
+
target: string;
|
|
110
|
+
/**
|
|
111
|
+
* The project importing the other
|
|
112
|
+
*/
|
|
113
|
+
source: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Additional information to be used to process a project graph
|
|
117
|
+
*/
|
|
118
|
+
export interface ProjectGraphProcessorContext {
|
|
119
|
+
/**
|
|
120
|
+
* Workspace information such as projects and configuration
|
|
121
|
+
*/
|
|
122
|
+
workspace: Workspace;
|
|
123
|
+
/**
|
|
124
|
+
* All files in the workspace
|
|
125
|
+
*/
|
|
126
|
+
fileMap: ProjectFileMap;
|
|
127
|
+
/**
|
|
128
|
+
* Files changes since last invocation
|
|
129
|
+
*/
|
|
130
|
+
filesToProcess: ProjectFileMap;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* A function that produces an updated ProjectGraph
|
|
134
|
+
*/
|
|
135
|
+
export declare type ProjectGraphProcessor = (currentGraph: ProjectGraph, context: ProjectGraphProcessorContext) => ProjectGraph;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DependencyType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Type of dependency between projects
|
|
6
|
+
*/
|
|
7
|
+
var DependencyType;
|
|
8
|
+
(function (DependencyType) {
|
|
9
|
+
/**
|
|
10
|
+
* Static dependencies are tied to the loading of the module
|
|
11
|
+
*/
|
|
12
|
+
DependencyType["static"] = "static";
|
|
13
|
+
/**
|
|
14
|
+
* Dynamic dependencies are brought in by the module at run time
|
|
15
|
+
*/
|
|
16
|
+
DependencyType["dynamic"] = "dynamic";
|
|
17
|
+
/**
|
|
18
|
+
* Implicit dependencies are inferred
|
|
19
|
+
*/
|
|
20
|
+
DependencyType["implicit"] = "implicit";
|
|
21
|
+
})(DependencyType = exports.DependencyType || (exports.DependencyType = {}));
|
|
22
|
+
//# sourceMappingURL=project-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-graph.js","sourceRoot":"","sources":["../../../../../packages/nx/src/shared/project-graph.ts"],"names":[],"mappings":";;;AAwCA;;GAEG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACxB;;OAEG;IACH,mCAAiB,CAAA;IACjB;;OAEG;IACH,qCAAmB,CAAA;IACnB;;OAEG;IACH,uCAAqB,CAAA;AACvB,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A representation of the invocation of an Executor
|
|
3
|
+
*/
|
|
4
|
+
export interface Task {
|
|
5
|
+
/**
|
|
6
|
+
* Unique ID
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Details about which project, target, and configuration to run.
|
|
11
|
+
*/
|
|
12
|
+
target: {
|
|
13
|
+
/**
|
|
14
|
+
* The project for which the task belongs to
|
|
15
|
+
*/
|
|
16
|
+
project: string;
|
|
17
|
+
/**
|
|
18
|
+
* The target name which the task should invoke
|
|
19
|
+
*/
|
|
20
|
+
target: string;
|
|
21
|
+
/**
|
|
22
|
+
* The configuration of the target which the task invokes
|
|
23
|
+
*/
|
|
24
|
+
configuration?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Overrides for the configured options of the target
|
|
28
|
+
*/
|
|
29
|
+
overrides: any;
|
|
30
|
+
/**
|
|
31
|
+
* Root of the project the task belongs to
|
|
32
|
+
*/
|
|
33
|
+
projectRoot?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Hash of the task which is used for caching.
|
|
36
|
+
*/
|
|
37
|
+
hash?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Details about the composition of the hash
|
|
40
|
+
*/
|
|
41
|
+
hashDetails?: {
|
|
42
|
+
/**
|
|
43
|
+
* Command of the task
|
|
44
|
+
*/
|
|
45
|
+
command: string;
|
|
46
|
+
/**
|
|
47
|
+
* Hashes of other nodes which are included in the hash
|
|
48
|
+
*/
|
|
49
|
+
nodes: {
|
|
50
|
+
[name: string]: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Hashes of implicit dependencies which are included in the hash
|
|
54
|
+
*/
|
|
55
|
+
implicitDeps: {
|
|
56
|
+
[fileName: string]: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Hash of the runtime environment which the task was executed
|
|
60
|
+
*/
|
|
61
|
+
runtime: {
|
|
62
|
+
[input: string]: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Graph of Tasks to be executed
|
|
68
|
+
*/
|
|
69
|
+
export interface TaskGraph {
|
|
70
|
+
/**
|
|
71
|
+
* IDs of Tasks which do not have any dependencies and are thus ready to execute immediately
|
|
72
|
+
*/
|
|
73
|
+
roots: string[];
|
|
74
|
+
/**
|
|
75
|
+
* Map of Task IDs to Tasks
|
|
76
|
+
*/
|
|
77
|
+
tasks: Record<string, Task>;
|
|
78
|
+
/**
|
|
79
|
+
* Map of Task IDs to IDs of tasks which the task depends on
|
|
80
|
+
*/
|
|
81
|
+
dependencies: Record<string, string[]>;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../../../packages/nx/src/shared/tasks.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Options to set when writing a file in the Virtual file system tree.
|
|
4
|
+
*/
|
|
5
|
+
export interface TreeWriteOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Permission to be granted on the file, given as a string (e.g `755`) or octal integer (e.g `0o755`).
|
|
8
|
+
* The logical OR operator can be used to separate multiple permissions.
|
|
9
|
+
* See https://nodejs.org/api/fs.html#fs_file_modes
|
|
10
|
+
*/
|
|
11
|
+
mode?: string | number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Virtual file system tree.
|
|
15
|
+
*/
|
|
16
|
+
export interface Tree {
|
|
17
|
+
/**
|
|
18
|
+
* Root of the workspace. All paths are relative to this.
|
|
19
|
+
*/
|
|
20
|
+
root: string;
|
|
21
|
+
/**
|
|
22
|
+
* Read the contents of a file.
|
|
23
|
+
* @param filePath A path to a file.
|
|
24
|
+
*/
|
|
25
|
+
read(filePath: string): Buffer | null;
|
|
26
|
+
/**
|
|
27
|
+
* Read the contents of a file as string.
|
|
28
|
+
* @param filePath A path to a file.
|
|
29
|
+
* @param encoding the encoding for the result
|
|
30
|
+
*/
|
|
31
|
+
read(filePath: string, encoding: BufferEncoding): string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Update the contents of a file or create a new file.
|
|
34
|
+
*/
|
|
35
|
+
write(filePath: string, content: Buffer | string, options?: TreeWriteOptions): void;
|
|
36
|
+
/**
|
|
37
|
+
* Check if a file exists.
|
|
38
|
+
*/
|
|
39
|
+
exists(filePath: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Delete the file.
|
|
42
|
+
*/
|
|
43
|
+
delete(filePath: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Rename the file or the folder.
|
|
46
|
+
*/
|
|
47
|
+
rename(from: string, to: string): void;
|
|
48
|
+
/**
|
|
49
|
+
* Check if this is a file or not.
|
|
50
|
+
*/
|
|
51
|
+
isFile(filePath: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the list of children of a folder.
|
|
54
|
+
*/
|
|
55
|
+
children(dirPath: string): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Returns the list of currently recorded changes.
|
|
58
|
+
*/
|
|
59
|
+
listChanges(): FileChange[];
|
|
60
|
+
/**
|
|
61
|
+
* Changes permissions of a file.
|
|
62
|
+
* @param filePath A path to a file.
|
|
63
|
+
* @param mode The permission to be granted on the file, given as a string (e.g `755`) or octal integer (e.g `0o755`).
|
|
64
|
+
* See https://nodejs.org/api/fs.html#fs_file_modes.
|
|
65
|
+
*/
|
|
66
|
+
changePermissions(filePath: string, mode: string | number): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Description of a file change in the Nx virtual file system/
|
|
70
|
+
*/
|
|
71
|
+
export interface FileChange {
|
|
72
|
+
/**
|
|
73
|
+
* Path relative to the workspace root
|
|
74
|
+
*/
|
|
75
|
+
path: string;
|
|
76
|
+
/**
|
|
77
|
+
* Type of change: 'CREATE' | 'DELETE' | 'UPDATE'
|
|
78
|
+
*/
|
|
79
|
+
type: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
80
|
+
/**
|
|
81
|
+
* The content of the file or null in case of delete.
|
|
82
|
+
*/
|
|
83
|
+
content: Buffer | null;
|
|
84
|
+
/**
|
|
85
|
+
* Options to set on the file being created or updated.
|
|
86
|
+
*/
|
|
87
|
+
options?: TreeWriteOptions;
|
|
88
|
+
}
|
|
89
|
+
export declare class FsTree implements Tree {
|
|
90
|
+
readonly root: string;
|
|
91
|
+
private readonly isVerbose;
|
|
92
|
+
private recordedChanges;
|
|
93
|
+
constructor(root: string, isVerbose: boolean);
|
|
94
|
+
read(filePath: string): Buffer | null;
|
|
95
|
+
read(filePath: string, encoding: BufferEncoding): string | null;
|
|
96
|
+
write(filePath: string, content: Buffer | string, options?: TreeWriteOptions): void;
|
|
97
|
+
overwrite(filePath: string, content: Buffer | string, options?: TreeWriteOptions): void;
|
|
98
|
+
delete(filePath: string): void;
|
|
99
|
+
exists(filePath: string): boolean;
|
|
100
|
+
rename(from: string, to: string): void;
|
|
101
|
+
isFile(filePath: string): boolean;
|
|
102
|
+
children(dirPath: string): string[];
|
|
103
|
+
listChanges(): FileChange[];
|
|
104
|
+
changePermissions(filePath: string, mode: string | number): void;
|
|
105
|
+
private normalize;
|
|
106
|
+
private fsReadDir;
|
|
107
|
+
private fsIsFile;
|
|
108
|
+
private fsReadFile;
|
|
109
|
+
private fsExists;
|
|
110
|
+
private filesForDir;
|
|
111
|
+
private directChildrenOfDir;
|
|
112
|
+
private rp;
|
|
113
|
+
}
|
|
114
|
+
export declare function flushChanges(root: string, fileChanges: FileChange[]): void;
|
|
115
|
+
export declare function printChanges(fileChanges: FileChange[]): void;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printChanges = exports.flushChanges = exports.FsTree = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const logger_1 = require("./logger");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const chalk = require("chalk");
|
|
8
|
+
class FsTree {
|
|
9
|
+
constructor(root, isVerbose) {
|
|
10
|
+
this.root = root;
|
|
11
|
+
this.isVerbose = isVerbose;
|
|
12
|
+
this.recordedChanges = {};
|
|
13
|
+
}
|
|
14
|
+
read(filePath, encoding) {
|
|
15
|
+
filePath = this.normalize(filePath);
|
|
16
|
+
try {
|
|
17
|
+
let content;
|
|
18
|
+
if (this.recordedChanges[this.rp(filePath)]) {
|
|
19
|
+
content = this.recordedChanges[this.rp(filePath)].content;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
content = this.fsReadFile(filePath);
|
|
23
|
+
}
|
|
24
|
+
return encoding ? content.toString(encoding) : content;
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
if (this.isVerbose) {
|
|
28
|
+
logger_1.logger.error(e);
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
write(filePath, content, options) {
|
|
34
|
+
filePath = this.normalize(filePath);
|
|
35
|
+
if (this.fsExists(this.rp(filePath)) &&
|
|
36
|
+
Buffer.from(content).equals(this.fsReadFile(filePath))) {
|
|
37
|
+
// Remove recorded change because the file has been restored to it's original contents
|
|
38
|
+
delete this.recordedChanges[this.rp(filePath)];
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
this.recordedChanges[this.rp(filePath)] = {
|
|
43
|
+
content: Buffer.from(content),
|
|
44
|
+
isDeleted: false,
|
|
45
|
+
options,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
if (this.isVerbose) {
|
|
50
|
+
logger_1.logger.error(e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
overwrite(filePath, content, options) {
|
|
55
|
+
filePath = this.normalize(filePath);
|
|
56
|
+
this.write(filePath, content, options);
|
|
57
|
+
}
|
|
58
|
+
delete(filePath) {
|
|
59
|
+
filePath = this.normalize(filePath);
|
|
60
|
+
if (this.filesForDir(this.rp(filePath)).length > 0) {
|
|
61
|
+
this.filesForDir(this.rp(filePath)).forEach((f) => (this.recordedChanges[f] = { content: null, isDeleted: true }));
|
|
62
|
+
}
|
|
63
|
+
this.recordedChanges[this.rp(filePath)] = {
|
|
64
|
+
content: null,
|
|
65
|
+
isDeleted: true,
|
|
66
|
+
};
|
|
67
|
+
// Delete directories when
|
|
68
|
+
if (this.children((0, path_1.dirname)(this.rp(filePath))).length < 1) {
|
|
69
|
+
this.delete((0, path_1.dirname)(this.rp(filePath)));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exists(filePath) {
|
|
73
|
+
filePath = this.normalize(filePath);
|
|
74
|
+
try {
|
|
75
|
+
if (this.recordedChanges[this.rp(filePath)]) {
|
|
76
|
+
return !this.recordedChanges[this.rp(filePath)].isDeleted;
|
|
77
|
+
}
|
|
78
|
+
else if (this.filesForDir(this.rp(filePath)).length > 0) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return this.fsExists(filePath);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (_a) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
rename(from, to) {
|
|
90
|
+
from = this.normalize(from);
|
|
91
|
+
to = this.normalize(to);
|
|
92
|
+
const content = this.read(this.rp(from));
|
|
93
|
+
this.delete(this.rp(from));
|
|
94
|
+
this.write(this.rp(to), content);
|
|
95
|
+
}
|
|
96
|
+
isFile(filePath) {
|
|
97
|
+
filePath = this.normalize(filePath);
|
|
98
|
+
try {
|
|
99
|
+
if (this.recordedChanges[this.rp(filePath)]) {
|
|
100
|
+
return !this.recordedChanges[this.rp(filePath)].isDeleted;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return this.fsIsFile(filePath);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch (_a) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
children(dirPath) {
|
|
111
|
+
dirPath = this.normalize(dirPath);
|
|
112
|
+
let res = this.fsReadDir(dirPath);
|
|
113
|
+
res = [...res, ...this.directChildrenOfDir(this.rp(dirPath))];
|
|
114
|
+
res = res.filter((q) => {
|
|
115
|
+
const r = this.recordedChanges[(0, path_1.join)(this.rp(dirPath), q)];
|
|
116
|
+
return !(r === null || r === void 0 ? void 0 : r.isDeleted);
|
|
117
|
+
});
|
|
118
|
+
// Dedupe
|
|
119
|
+
return Array.from(new Set(res));
|
|
120
|
+
}
|
|
121
|
+
listChanges() {
|
|
122
|
+
const res = [];
|
|
123
|
+
Object.keys(this.recordedChanges).forEach((f) => {
|
|
124
|
+
if (this.recordedChanges[f].isDeleted) {
|
|
125
|
+
if (this.fsExists(f)) {
|
|
126
|
+
res.push({ path: f, type: 'DELETE', content: null });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
if (this.fsExists(f)) {
|
|
131
|
+
res.push({
|
|
132
|
+
path: f,
|
|
133
|
+
type: 'UPDATE',
|
|
134
|
+
content: this.recordedChanges[f].content,
|
|
135
|
+
options: this.recordedChanges[f].options,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
res.push({
|
|
140
|
+
path: f,
|
|
141
|
+
type: 'CREATE',
|
|
142
|
+
content: this.recordedChanges[f].content,
|
|
143
|
+
options: this.recordedChanges[f].options,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return res;
|
|
149
|
+
}
|
|
150
|
+
changePermissions(filePath, mode) {
|
|
151
|
+
filePath = this.normalize(filePath);
|
|
152
|
+
const filePathChangeKey = this.rp(filePath);
|
|
153
|
+
if (this.recordedChanges[filePathChangeKey]) {
|
|
154
|
+
if (this.recordedChanges[filePathChangeKey].isDeleted) {
|
|
155
|
+
throw new Error(`Cannot change permissions of deleted file ${filePath}.`);
|
|
156
|
+
}
|
|
157
|
+
this.recordedChanges[filePathChangeKey].options = { mode };
|
|
158
|
+
}
|
|
159
|
+
else if (!this.fsExists(filePath)) {
|
|
160
|
+
throw new Error(`Cannot change permissions of non-existing file ${filePath}.`);
|
|
161
|
+
}
|
|
162
|
+
else if (!this.fsIsFile(filePath)) {
|
|
163
|
+
// To fully support directories we'd need to change how we store
|
|
164
|
+
// changes to keep a record of directories so we can associate
|
|
165
|
+
// permissions to them.
|
|
166
|
+
throw new Error(`Cannot change permissions of non-file ${filePath}.`);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
this.recordedChanges[filePathChangeKey] = {
|
|
170
|
+
content: this.fsReadFile(filePath),
|
|
171
|
+
isDeleted: false,
|
|
172
|
+
options: { mode },
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
normalize(path) {
|
|
177
|
+
return (0, path_1.relative)(this.root, (0, path_1.join)(this.root, path)).split(path_1.sep).join('/');
|
|
178
|
+
}
|
|
179
|
+
fsReadDir(dirPath) {
|
|
180
|
+
try {
|
|
181
|
+
return (0, fs_extra_1.readdirSync)((0, path_1.join)(this.root, dirPath));
|
|
182
|
+
}
|
|
183
|
+
catch (_a) {
|
|
184
|
+
return [];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
fsIsFile(filePath) {
|
|
188
|
+
const stat = (0, fs_extra_1.statSync)((0, path_1.join)(this.root, filePath));
|
|
189
|
+
return stat.isFile();
|
|
190
|
+
}
|
|
191
|
+
fsReadFile(filePath) {
|
|
192
|
+
return (0, fs_extra_1.readFileSync)((0, path_1.join)(this.root, filePath));
|
|
193
|
+
}
|
|
194
|
+
fsExists(filePath) {
|
|
195
|
+
try {
|
|
196
|
+
const stat = (0, fs_extra_1.statSync)((0, path_1.join)(this.root, filePath));
|
|
197
|
+
return stat.isFile() || stat.isDirectory();
|
|
198
|
+
}
|
|
199
|
+
catch (_a) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
filesForDir(path) {
|
|
204
|
+
return Object.keys(this.recordedChanges).filter((f) => f.startsWith(`${path}/`) && !this.recordedChanges[f].isDeleted);
|
|
205
|
+
}
|
|
206
|
+
directChildrenOfDir(path) {
|
|
207
|
+
const res = {};
|
|
208
|
+
if (path === '') {
|
|
209
|
+
return Object.keys(this.recordedChanges).map((file) => file.split('/')[0]);
|
|
210
|
+
}
|
|
211
|
+
Object.keys(this.recordedChanges).forEach((f) => {
|
|
212
|
+
if (f.startsWith(`${path}/`)) {
|
|
213
|
+
const [_, file] = f.split(`${path}/`);
|
|
214
|
+
res[file.split('/')[0]] = true;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
return Object.keys(res);
|
|
218
|
+
}
|
|
219
|
+
rp(pp) {
|
|
220
|
+
return pp.startsWith('/') ? pp.substring(1) : pp;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.FsTree = FsTree;
|
|
224
|
+
function flushChanges(root, fileChanges) {
|
|
225
|
+
fileChanges.forEach((f) => {
|
|
226
|
+
var _a, _b;
|
|
227
|
+
const fpath = (0, path_1.join)(root, f.path);
|
|
228
|
+
if (f.type === 'CREATE') {
|
|
229
|
+
(0, fs_extra_1.ensureDirSync)((0, path_1.dirname)(fpath));
|
|
230
|
+
(0, fs_extra_1.writeFileSync)(fpath, f.content);
|
|
231
|
+
if ((_a = f.options) === null || _a === void 0 ? void 0 : _a.mode)
|
|
232
|
+
(0, fs_extra_1.chmodSync)(fpath, f.options.mode);
|
|
233
|
+
}
|
|
234
|
+
else if (f.type === 'UPDATE') {
|
|
235
|
+
(0, fs_extra_1.writeFileSync)(fpath, f.content);
|
|
236
|
+
if ((_b = f.options) === null || _b === void 0 ? void 0 : _b.mode)
|
|
237
|
+
(0, fs_extra_1.chmodSync)(fpath, f.options.mode);
|
|
238
|
+
}
|
|
239
|
+
else if (f.type === 'DELETE') {
|
|
240
|
+
(0, fs_extra_1.removeSync)(fpath);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
exports.flushChanges = flushChanges;
|
|
245
|
+
function printChanges(fileChanges) {
|
|
246
|
+
fileChanges.forEach((f) => {
|
|
247
|
+
if (f.type === 'CREATE') {
|
|
248
|
+
console.log(`${chalk.green('CREATE')} ${f.path}`);
|
|
249
|
+
}
|
|
250
|
+
else if (f.type === 'UPDATE') {
|
|
251
|
+
console.log(`${chalk.white('UPDATE')} ${f.path}`);
|
|
252
|
+
}
|
|
253
|
+
else if (f.type === 'DELETE') {
|
|
254
|
+
console.log(`${chalk.yellow('DELETE')} ${f.path}`);
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
exports.printChanges = printChanges;
|
|
259
|
+
//# sourceMappingURL=tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../../packages/nx/src/shared/tree.ts"],"names":[],"mappings":";;;AAAA,uCAQkB;AACl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