depflow 2.0.2 → 3.0.0-dev.1
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/README.md +129 -58
- package/build/cli/DepFLowCLI.js +32 -16
- package/build/cli/DepFLowCLI.js.map +1 -1
- package/build/cli/bin.js +16 -12
- package/build/cli/bin.js.map +1 -1
- package/build/config/Config.d.ts +3 -3
- package/build/config/Config.js +3 -3
- package/build/config/ImportMap.d.ts +2 -3
- package/build/config/ImportMap.js +9 -10
- package/build/config/ImportMap.js.map +1 -1
- package/build/config/Tsconfig.d.ts +2 -2
- package/build/config/Tsconfig.js +7 -6
- package/build/config/Tsconfig.js.map +1 -1
- package/build/config/schemas.d.ts +604 -51
- package/build/config/schemas.js +36 -21
- package/build/config/schemas.js.map +1 -1
- package/build/support/Builder/Builder.d.ts +36 -0
- package/build/support/Builder/Builder.js +89 -0
- package/build/support/Builder/Builder.js.map +1 -0
- package/build/support/Dependency/Dependency.d.ts +38 -0
- package/build/support/Dependency/Dependency.js +14 -0
- package/build/support/Dependency/Dependency.js.map +1 -0
- package/build/support/Dependency/GitDependency.d.ts +20 -0
- package/build/support/Dependency/GitDependency.js +67 -0
- package/build/support/Dependency/GitDependency.js.map +1 -0
- package/build/support/Dependency/NpmDependency.d.ts +18 -0
- package/build/support/Dependency/NpmDependency.js +65 -0
- package/build/support/Dependency/NpmDependency.js.map +1 -0
- package/build/support/Dependency/Resolver.d.ts +7 -0
- package/build/support/Dependency/Resolver.js +4 -0
- package/build/support/Dependency/Resolver.js.map +1 -0
- package/build/support/PathResolver/AliasCompiler.d.ts +2 -2
- package/build/support/PathResolver/PathResolver.d.ts +3 -3
- package/build/support/PathResolver/PathResolver.js +6 -1
- package/build/support/PathResolver/PathResolver.js.map +1 -1
- package/build/support/Utils.d.ts +8 -0
- package/build/support/Utils.js +30 -0
- package/build/support/Utils.js.map +1 -1
- package/package.json +2 -2
- package/build/support/Dependency.d.ts +0 -109
- package/build/support/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KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depflow",
|
|
3
3
|
"description": "is a simple dependency manager based on github repositories",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-dev.1",
|
|
5
5
|
"main": "build/bin/bin.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@netfeez/common": "^3.0.0",
|
|
37
|
-
"@netfeez/common-node": "^
|
|
37
|
+
"@netfeez/common-node": "^3.0.0",
|
|
38
38
|
"@netfeez/vterm": "^1.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import Logger from "@netfeez/vterm";
|
|
2
|
-
import schemas from "../config/schemas.js";
|
|
3
|
-
import Config from "../config/Config.js";
|
|
4
|
-
export declare class Dependency implements Dependency.Dependency {
|
|
5
|
-
protected readonly config: Config.Config;
|
|
6
|
-
protected logger: Logger;
|
|
7
|
-
static include: string[];
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly repo: Dependency.repo;
|
|
10
|
-
readonly tag?: string;
|
|
11
|
-
readonly builder: Dependency.Builder[];
|
|
12
|
-
readonly resolver: Dependency.Resolver[];
|
|
13
|
-
constructor(config: Config.Config, dependency: Dependency.Dependency, logger: Logger);
|
|
14
|
-
/** Get the folder of the dependency */
|
|
15
|
-
get folder(): string;
|
|
16
|
-
/**
|
|
17
|
-
* Updates the local repository of the dependency by either cloning it if it does not exist or pulling the latest changes if it already exists. It checks for the existence of the dependency's folder and performs the appropriate Git operations, providing logging throughout the process to indicate the status of the operations. This method ensures that the local copy of the dependency is up-to-date with its remote repository, allowing for a smooth installation and build process when managing dependencies in a project.
|
|
18
|
-
* @returns A promise that resolves when the update process is complete, or rejects with an error if any step of the process fails, allowing callers to handle such scenarios appropriately.
|
|
19
|
-
* @throws Will throw an error if any issues occur during the cloning or pulling process, such as problems with Git commands or file system access.
|
|
20
|
-
*/
|
|
21
|
-
protected update(): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Installs the dependency by first cloning its repository (or pulling updates if it already exists) and then executing any build steps defined in the builder property. It manages the entire installation process, including handling the cloning/pulling of the repository and running any necessary commands to set up the dependency according to its configuration. This method ensures that the dependency is properly installed and ready for use, providing feedback on each step of the process through returned messages.
|
|
24
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the cloning/pulling and building processes.
|
|
25
|
-
* @throws Will throw an error if any step of the installation process fails, such as issues with cloning, pulling, or executing build commands.
|
|
26
|
-
*/
|
|
27
|
-
install(): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Uninstalls the dependency by removing its local folder and any additional folders specified in the builder's move steps.
|
|
30
|
-
* It checks for the existence of each folder before attempting to remove it, ensuring that it only tries to delete valid paths.
|
|
31
|
-
* This method is crucial for cleanly removing a dependency from the local file system, allowing for a complete uninstallation that includes all related files and directories as defined by the dependency's configuration.
|
|
32
|
-
* @return A promise that resolves to an array of string messages indicating the results of the uninstallation process, such as which folders were removed.
|
|
33
|
-
* @throws Will throw an error if any issues occur during the uninstallation process, such as problems with file system access or if the specified folders cannot be removed.
|
|
34
|
-
*/
|
|
35
|
-
uninstall(): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Builds the dependency by executing the commands specified in the builder property.
|
|
38
|
-
* It iterates through each build step, running any defined commands and handling file movements as necessary.
|
|
39
|
-
* The method uses a child process to execute shell commands, capturing the output and errors for each step.
|
|
40
|
-
* This allows for a flexible build process that can accommodate various setup requirements defined by the dependency's configuration, ensuring that the dependency is properly built and ready for use after installation.
|
|
41
|
-
* @return A promise that resolves to an array of string messages indicating the results of the build process, including any command outputs and file movements.
|
|
42
|
-
* @throws Will throw an error if any issues occur during the build process, such as command execution failures or problems with file movements.
|
|
43
|
-
*/
|
|
44
|
-
protected build(): Promise<boolean>;
|
|
45
|
-
/**
|
|
46
|
-
* Runs a series of shell commands as part of the build process, using a child process to execute the commands and capturing the output for logging. It handles the execution of the commands, providing feedback on the progress and any errors that occur during the process. This method is essential for executing the necessary setup commands defined in the builder configuration, allowing for a flexible and dynamic build process that can accommodate various requirements for different dependencies.
|
|
47
|
-
* @param commands An array of strings representing the shell commands to be executed as part of the build process.
|
|
48
|
-
* @param logger An optional Logger instance for logging the output and errors from the command execution.
|
|
49
|
-
* @returns A promise that resolves when the command execution is complete, or rejects with an error if any command fails, allowing callers to handle such scenarios appropriately.
|
|
50
|
-
* @throws Will throw an error if any issues occur during the execution of the commands, such as problems with spawning the child process or if any command returns a non-zero exit code.
|
|
51
|
-
*/
|
|
52
|
-
protected runTask(commands: string[], options?: Dependency.taskOptions): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Handles the file movements defined in the builder's move steps.
|
|
55
|
-
* It supports various formats for specifying destinations, including strings, arrays, and objects with keys representing source paths.
|
|
56
|
-
* The method checks for the existence of source files or directories before attempting to move them to the specified destinations, ensuring that it only operates on valid paths.
|
|
57
|
-
* This function is essential for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
58
|
-
* @param move The move configuration from the builder, which can be a string, an array of strings, or an object mapping source paths to destination paths.
|
|
59
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the file movements, including any errors encountered during the process.
|
|
60
|
-
* @throws Will throw an error if any issues occur during the file movement process, such as missing source paths or problems with file system access.
|
|
61
|
-
*/
|
|
62
|
-
protected move(move: Dependency.Builder['move'], logger: Logger): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Handles the file movements for a specific source and destination.
|
|
65
|
-
* It checks for the existence of the source path and creates the destination folder if it does not exist.
|
|
66
|
-
* The method uses fs.cp to copy files or directories from the source to the destination, supporting recursive copying for directories.
|
|
67
|
-
* It captures any errors that occur during the process and provides descriptive error messages to help identify issues with file movements.
|
|
68
|
-
* This function is crucial for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
69
|
-
* @param destination The target path(s) where the source should be moved to.
|
|
70
|
-
* @param source An optional specific source path within the dependency folder to move, defaulting to the entire folder if not provided.
|
|
71
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the file movements, including any errors encountered during the process.
|
|
72
|
-
* @throws Will throw an error if any issues occur during the file movement process, such as missing source paths or problems with file system access.
|
|
73
|
-
*/
|
|
74
|
-
protected moveFiles(destination: string | string[], source?: string, logger?: Logger): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Constructs the source path for file movements based on the dependency's folder and an optional specific source path.
|
|
77
|
-
* If a specific source is provided, it concatenates it with the dependency's folder; otherwise, it returns the dependency's folder as the source path.
|
|
78
|
-
* The method also ensures that any trailing slashes are removed from the folder and that any leading slashes are removed from the source to create a valid path for file operations.
|
|
79
|
-
* This function is essential for determining the correct source path when moving files as part of the build process, allowing for flexible configurations that can specify either the entire dependency folder or specific subpaths within it.
|
|
80
|
-
* @param folder The base folder of the dependency.
|
|
81
|
-
* @param source An optional specific source path within the dependency folder to use for file movements.
|
|
82
|
-
* @returns A string representing the constructed source path for file operations.
|
|
83
|
-
*/
|
|
84
|
-
static getSourcePath(folder: string, source?: string): string;
|
|
85
|
-
/**
|
|
86
|
-
* Recursively extracts all destination folders from the builder's move configuration, supporting various formats such as strings, arrays, and nested objects.
|
|
87
|
-
* It traverses the move configuration, collecting all destination paths into a single array, which can then be used for file operations during the build process.
|
|
88
|
-
* This method is crucial for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
89
|
-
* @param builder The move configuration from the builder, which can be a string, an array of strings, or an object mapping source paths to destination paths.
|
|
90
|
-
* @returns An array of strings representing all destination folders extracted from the move configuration.
|
|
91
|
-
*/
|
|
92
|
-
static getAllOutFolders(builder: Dependency.Builder['move']): string[];
|
|
93
|
-
}
|
|
94
|
-
export declare namespace Dependency {
|
|
95
|
-
type logCallback = (messages: string[]) => void;
|
|
96
|
-
type repo = `https://github.com/${string}/${string}.git` | `git@github.com:${string}/${string}.git`;
|
|
97
|
-
type Builder = schemas.builder['infer'];
|
|
98
|
-
type Resolver = schemas.pathResolverEntry['infer'];
|
|
99
|
-
type Dependency = schemas.dependency['infer'];
|
|
100
|
-
type newDependency = schemas.dependency['inferToProcess'];
|
|
101
|
-
interface manageOptions {
|
|
102
|
-
force?: boolean;
|
|
103
|
-
}
|
|
104
|
-
interface taskOptions {
|
|
105
|
-
logger?: Logger;
|
|
106
|
-
maxTimeMs?: number;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
export default Dependency;
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author NetFeez <netfeez.dev@gmail.com>
|
|
3
|
-
* @description Dependency utility.
|
|
4
|
-
* @license Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { promises as FS } from "fs";
|
|
7
|
-
import { File, Path } from '@netfeez/common-node';
|
|
8
|
-
import Validator from "./Validator.js";
|
|
9
|
-
import Git from "./Git.js";
|
|
10
|
-
import Async from "./Async.js";
|
|
11
|
-
import Task from "./Task/Task.js";
|
|
12
|
-
import Utils from "./Utils.js";
|
|
13
|
-
export class Dependency {
|
|
14
|
-
config;
|
|
15
|
-
logger;
|
|
16
|
-
static include = ['*'];
|
|
17
|
-
name;
|
|
18
|
-
repo;
|
|
19
|
-
tag;
|
|
20
|
-
builder;
|
|
21
|
-
resolver;
|
|
22
|
-
constructor(config, dependency, logger) {
|
|
23
|
-
this.config = config;
|
|
24
|
-
this.logger = logger;
|
|
25
|
-
Validator.validateRepo(dependency.repo);
|
|
26
|
-
this.name = dependency.name;
|
|
27
|
-
this.repo = dependency.repo;
|
|
28
|
-
this.tag = dependency.tag;
|
|
29
|
-
this.builder = dependency.builder;
|
|
30
|
-
this.resolver = dependency.resolver || [];
|
|
31
|
-
}
|
|
32
|
-
/** Get the folder of the dependency */
|
|
33
|
-
get folder() {
|
|
34
|
-
let path = Path.join(this.config.flowFolder, this.name);
|
|
35
|
-
path = Path.normalize(path);
|
|
36
|
-
return path;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Updates the local repository of the dependency by either cloning it if it does not exist or pulling the latest changes if it already exists. It checks for the existence of the dependency's folder and performs the appropriate Git operations, providing logging throughout the process to indicate the status of the operations. This method ensures that the local copy of the dependency is up-to-date with its remote repository, allowing for a smooth installation and build process when managing dependencies in a project.
|
|
40
|
-
* @returns A promise that resolves when the update process is complete, or rejects with an error if any step of the process fails, allowing callers to handle such scenarios appropriately.
|
|
41
|
-
* @throws Will throw an error if any issues occur during the cloning or pulling process, such as problems with Git commands or file system access.
|
|
42
|
-
*/
|
|
43
|
-
async update() {
|
|
44
|
-
if (this.logger)
|
|
45
|
-
this.logger.group(Utils.newGroup('#00B4FF'));
|
|
46
|
-
if (await File.exists(this.folder)) {
|
|
47
|
-
this.logger.log(`&C3Repository already exists, pulling latest changes...`);
|
|
48
|
-
await Git.pull(this.folder, { logger: this.logger });
|
|
49
|
-
this.logger.log(`&C2Pull completed successfully.`);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.logger.log(`&C5Cloning repository from &C6${this.repo}&C5...`);
|
|
53
|
-
await Git.clone(this.repo, this.folder, { tag: this.tag, logger: this.logger });
|
|
54
|
-
this.logger.log(`&C2Clone completed successfully.`);
|
|
55
|
-
}
|
|
56
|
-
if (this.logger)
|
|
57
|
-
this.logger.groupEnd();
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Installs the dependency by first cloning its repository (or pulling updates if it already exists) and then executing any build steps defined in the builder property. It manages the entire installation process, including handling the cloning/pulling of the repository and running any necessary commands to set up the dependency according to its configuration. This method ensures that the dependency is properly installed and ready for use, providing feedback on each step of the process through returned messages.
|
|
61
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the cloning/pulling and building processes.
|
|
62
|
-
* @throws Will throw an error if any step of the installation process fails, such as issues with cloning, pulling, or executing build commands.
|
|
63
|
-
*/
|
|
64
|
-
async install() {
|
|
65
|
-
try {
|
|
66
|
-
await this.update();
|
|
67
|
-
await this.build();
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
throw error;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Uninstalls the dependency by removing its local folder and any additional folders specified in the builder's move steps.
|
|
75
|
-
* It checks for the existence of each folder before attempting to remove it, ensuring that it only tries to delete valid paths.
|
|
76
|
-
* This method is crucial for cleanly removing a dependency from the local file system, allowing for a complete uninstallation that includes all related files and directories as defined by the dependency's configuration.
|
|
77
|
-
* @return A promise that resolves to an array of string messages indicating the results of the uninstallation process, such as which folders were removed.
|
|
78
|
-
* @throws Will throw an error if any issues occur during the uninstallation process, such as problems with file system access or if the specified folders cannot be removed.
|
|
79
|
-
*/
|
|
80
|
-
async uninstall() {
|
|
81
|
-
try {
|
|
82
|
-
const moves = this.builder
|
|
83
|
-
? this.builder
|
|
84
|
-
.map(step => step.move ? Dependency.getAllOutFolders(step.move) : [])
|
|
85
|
-
.reduce((acc, val) => acc.concat(val), [])
|
|
86
|
-
: [];
|
|
87
|
-
const folders = [this.folder, ...moves];
|
|
88
|
-
for (const folder of folders) {
|
|
89
|
-
if (!await File.exists(folder))
|
|
90
|
-
continue;
|
|
91
|
-
if (this.logger)
|
|
92
|
-
this.logger.log(`&R[${this.name}] &GRemoving folder: &C4${folder}`);
|
|
93
|
-
await FS.rm(folder, { recursive: true });
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
throw error;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Builds the dependency by executing the commands specified in the builder property.
|
|
102
|
-
* It iterates through each build step, running any defined commands and handling file movements as necessary.
|
|
103
|
-
* The method uses a child process to execute shell commands, capturing the output and errors for each step.
|
|
104
|
-
* This allows for a flexible build process that can accommodate various setup requirements defined by the dependency's configuration, ensuring that the dependency is properly built and ready for use after installation.
|
|
105
|
-
* @return A promise that resolves to an array of string messages indicating the results of the build process, including any command outputs and file movements.
|
|
106
|
-
* @throws Will throw an error if any issues occur during the build process, such as command execution failures or problems with file movements.
|
|
107
|
-
*/
|
|
108
|
-
async build() {
|
|
109
|
-
if (!this.builder || this.builder.length === 0)
|
|
110
|
-
return true;
|
|
111
|
-
try {
|
|
112
|
-
if (this.logger)
|
|
113
|
-
this.logger.group(Utils.newGroup('#00f048'));
|
|
114
|
-
for (const step of this.builder) {
|
|
115
|
-
if (step.run) {
|
|
116
|
-
if (this.logger)
|
|
117
|
-
this.logger.info(`&C5Running command task...`);
|
|
118
|
-
const commands = Array.isArray(step.run) ? step.run : [step.run];
|
|
119
|
-
await this.runTask(commands, { logger: this.logger, maxTimeMs: step.maxTimeMs });
|
|
120
|
-
}
|
|
121
|
-
if (step.move) {
|
|
122
|
-
if (this.logger) {
|
|
123
|
-
if (step.run)
|
|
124
|
-
this.logger.line();
|
|
125
|
-
this.logger.info(`&C5Running move task...`);
|
|
126
|
-
}
|
|
127
|
-
await this.move(step.move, this.logger);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
if (this.logger)
|
|
133
|
-
this.logger.error(`&C1Build failed: ${error}`);
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
finally {
|
|
137
|
-
if (this.logger)
|
|
138
|
-
this.logger.groupEnd();
|
|
139
|
-
}
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Runs a series of shell commands as part of the build process, using a child process to execute the commands and capturing the output for logging. It handles the execution of the commands, providing feedback on the progress and any errors that occur during the process. This method is essential for executing the necessary setup commands defined in the builder configuration, allowing for a flexible and dynamic build process that can accommodate various requirements for different dependencies.
|
|
144
|
-
* @param commands An array of strings representing the shell commands to be executed as part of the build process.
|
|
145
|
-
* @param logger An optional Logger instance for logging the output and errors from the command execution.
|
|
146
|
-
* @returns A promise that resolves when the command execution is complete, or rejects with an error if any command fails, allowing callers to handle such scenarios appropriately.
|
|
147
|
-
* @throws Will throw an error if any issues occur during the execution of the commands, such as problems with spawning the child process or if any command returns a non-zero exit code.
|
|
148
|
-
*/
|
|
149
|
-
runTask(commands, options = {}) {
|
|
150
|
-
const { logger, maxTimeMs } = options;
|
|
151
|
-
return Async.awaitEvent((done, fail) => {
|
|
152
|
-
const pollito = new Task(this.folder, commands);
|
|
153
|
-
if (logger) {
|
|
154
|
-
pollito.on('line', (line) => logger.info(`${line}`));
|
|
155
|
-
pollito.on('error', (msg, step) => logger.error(`&C1[Step ${step}]&C7: &C1${msg}`));
|
|
156
|
-
}
|
|
157
|
-
pollito.once('finish', (data) => {
|
|
158
|
-
if (data.fails > 0)
|
|
159
|
-
fail(new Error(`Build failed with ${data.fails} failed steps.`));
|
|
160
|
-
else
|
|
161
|
-
done();
|
|
162
|
-
});
|
|
163
|
-
pollito.start().catch(fail);
|
|
164
|
-
return () => { pollito.stop(); };
|
|
165
|
-
}, maxTimeMs);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Handles the file movements defined in the builder's move steps.
|
|
169
|
-
* It supports various formats for specifying destinations, including strings, arrays, and objects with keys representing source paths.
|
|
170
|
-
* The method checks for the existence of source files or directories before attempting to move them to the specified destinations, ensuring that it only operates on valid paths.
|
|
171
|
-
* This function is essential for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
172
|
-
* @param move The move configuration from the builder, which can be a string, an array of strings, or an object mapping source paths to destination paths.
|
|
173
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the file movements, including any errors encountered during the process.
|
|
174
|
-
* @throws Will throw an error if any issues occur during the file movement process, such as missing source paths or problems with file system access.
|
|
175
|
-
*/
|
|
176
|
-
async move(move, logger) {
|
|
177
|
-
if (!move)
|
|
178
|
-
return;
|
|
179
|
-
if (typeof move === 'string' || Array.isArray(move)) {
|
|
180
|
-
const moves = Array.isArray(move) ? move : [move];
|
|
181
|
-
for (const destination of moves) {
|
|
182
|
-
await this.moveFiles(destination, undefined, logger);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
for (const key in move) {
|
|
187
|
-
const value = move[key];
|
|
188
|
-
const destinations = typeof value === 'string' ? [value] : value;
|
|
189
|
-
for (const destination of destinations) {
|
|
190
|
-
await this.moveFiles(destination, key, logger);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Handles the file movements for a specific source and destination.
|
|
197
|
-
* It checks for the existence of the source path and creates the destination folder if it does not exist.
|
|
198
|
-
* The method uses fs.cp to copy files or directories from the source to the destination, supporting recursive copying for directories.
|
|
199
|
-
* It captures any errors that occur during the process and provides descriptive error messages to help identify issues with file movements.
|
|
200
|
-
* This function is crucial for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
201
|
-
* @param destination The target path(s) where the source should be moved to.
|
|
202
|
-
* @param source An optional specific source path within the dependency folder to move, defaulting to the entire folder if not provided.
|
|
203
|
-
* @returns A promise that resolves to an array of string messages indicating the results of the file movements, including any errors encountered during the process.
|
|
204
|
-
* @throws Will throw an error if any issues occur during the file movement process, such as missing source paths or problems with file system access.
|
|
205
|
-
*/
|
|
206
|
-
async moveFiles(destination, source, logger) {
|
|
207
|
-
destination = Array.isArray(destination) ? destination : [destination];
|
|
208
|
-
source = Dependency.getSourcePath(this.folder, source);
|
|
209
|
-
for (const folder of destination) {
|
|
210
|
-
try {
|
|
211
|
-
if (!await File.exists(source))
|
|
212
|
-
throw new Error(`Source path ${source} does not exist.`);
|
|
213
|
-
if (!await File.exists(folder)) {
|
|
214
|
-
if (!await File.isFile(source))
|
|
215
|
-
await FS.mkdir(folder, { recursive: true });
|
|
216
|
-
else {
|
|
217
|
-
const toCreate = folder.slice(0, folder.lastIndexOf('/'));
|
|
218
|
-
if (!await File.exists(toCreate))
|
|
219
|
-
await FS.mkdir(toCreate, { recursive: true });
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
if (logger)
|
|
223
|
-
logger.info(`&RMoving source &C4${source} &Rto &C4${folder}`);
|
|
224
|
-
await FS.cp(source, folder, { recursive: true, force: true });
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
throw new Error(`Failed to move files from ${this.name} to ${folder}, \n${error}`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Constructs the source path for file movements based on the dependency's folder and an optional specific source path.
|
|
233
|
-
* If a specific source is provided, it concatenates it with the dependency's folder; otherwise, it returns the dependency's folder as the source path.
|
|
234
|
-
* The method also ensures that any trailing slashes are removed from the folder and that any leading slashes are removed from the source to create a valid path for file operations.
|
|
235
|
-
* This function is essential for determining the correct source path when moving files as part of the build process, allowing for flexible configurations that can specify either the entire dependency folder or specific subpaths within it.
|
|
236
|
-
* @param folder The base folder of the dependency.
|
|
237
|
-
* @param source An optional specific source path within the dependency folder to use for file movements.
|
|
238
|
-
* @returns A string representing the constructed source path for file operations.
|
|
239
|
-
*/
|
|
240
|
-
static getSourcePath(folder, source) {
|
|
241
|
-
folder = folder.endsWith('/') ? folder.slice(0, -1) : folder;
|
|
242
|
-
if (!source)
|
|
243
|
-
return folder;
|
|
244
|
-
source = source.startsWith('/') ? source.slice(1) : source;
|
|
245
|
-
return `${folder}/${source}`.replace(/ /g, '\\ ');
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Recursively extracts all destination folders from the builder's move configuration, supporting various formats such as strings, arrays, and nested objects.
|
|
249
|
-
* It traverses the move configuration, collecting all destination paths into a single array, which can then be used for file operations during the build process.
|
|
250
|
-
* This method is crucial for managing the organization of files after building a dependency, allowing for flexible configurations that can accommodate different project structures and requirements.
|
|
251
|
-
* @param builder The move configuration from the builder, which can be a string, an array of strings, or an object mapping source paths to destination paths.
|
|
252
|
-
* @returns An array of strings representing all destination folders extracted from the move configuration.
|
|
253
|
-
*/
|
|
254
|
-
static getAllOutFolders(builder) {
|
|
255
|
-
if (!builder)
|
|
256
|
-
return [];
|
|
257
|
-
const folders = [];
|
|
258
|
-
if (typeof builder === 'string')
|
|
259
|
-
folders.push(builder);
|
|
260
|
-
else if (Array.isArray(builder))
|
|
261
|
-
folders.push(...builder);
|
|
262
|
-
else
|
|
263
|
-
for (const key in builder) {
|
|
264
|
-
const out = this.getAllOutFolders(builder[key]);
|
|
265
|
-
folders.push(...out);
|
|
266
|
-
}
|
|
267
|
-
return folders;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
(function (Dependency) {
|
|
271
|
-
;
|
|
272
|
-
})(Dependency || (Dependency = {}));
|
|
273
|
-
export default Dependency;
|
|
274
|
-
//# sourceMappingURL=Dependency.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dependency.js","sourceRoot":"","sources":["../../src/support/Dependency.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAGpC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIlD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,OAAO,UAAU;IASI;IAET;IAVP,MAAM,CAAC,OAAO,GAAa,CAAE,GAAG,CAAE,CAAC;IAC1B,IAAI,CAAS;IACb,IAAI,CAAkB;IACtB,GAAG,CAAU;IACb,OAAO,CAAuB;IAC9B,QAAQ,CAAwB;IAEhD,YACuB,MAAqB,EACxC,UAAiC,EACvB,MAAc;QAFL,WAAM,GAAN,MAAM,CAAe;QAE9B,WAAM,GAAN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