depflow 1.0.0
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/.gitignore +7 -0
- package/LICENCE +201 -0
- package/README.md +89 -0
- package/build/Dependency.d.ts +99 -0
- package/build/Dependency.js +258 -0
- package/build/Dependency.js.map +1 -0
- package/build/File.d.ts +45 -0
- package/build/File.js +113 -0
- package/build/File.js.map +1 -0
- package/build/Git.d.ts +36 -0
- package/build/Git.js +68 -0
- package/build/Git.js.map +1 -0
- package/build/PathFixer.d.ts +35 -0
- package/build/PathFixer.js +158 -0
- package/build/PathFixer.js.map +1 -0
- package/build/Validator.d.ts +54 -0
- package/build/Validator.js +150 -0
- package/build/Validator.js.map +1 -0
- package/build/bin.d.ts +7 -0
- package/build/bin.js +241 -0
- package/build/bin.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author NetFeez <codefeez.dev@gmail.com>
|
|
3
|
+
* @description Utility to validate dependencies.
|
|
4
|
+
* @license Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { promises as FS } from "fs";
|
|
7
|
+
export class Validator {
|
|
8
|
+
/**
|
|
9
|
+
* Validates the 'name' property.
|
|
10
|
+
* @param name The 'name' property to validate.
|
|
11
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
12
|
+
*/
|
|
13
|
+
static validateName(name) {
|
|
14
|
+
if (name === null || name === undefined)
|
|
15
|
+
throw new Error('Dependency is missing a name');
|
|
16
|
+
if (typeof name !== 'string')
|
|
17
|
+
throw new Error('Dependency name is not a string.');
|
|
18
|
+
if (name.length === 0)
|
|
19
|
+
throw new Error('Dependency name is empty.');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Validates the repository URL.
|
|
24
|
+
* @param repo The repository URL to validate.
|
|
25
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
26
|
+
* @throws Error if the repository URL is invalid.
|
|
27
|
+
*/
|
|
28
|
+
static validateRepo(repo) {
|
|
29
|
+
if (repo === null || repo === undefined)
|
|
30
|
+
throw new Error('Dependency is missing a repo');
|
|
31
|
+
if (typeof repo !== 'string')
|
|
32
|
+
throw new Error('Dependency repo is not a string.');
|
|
33
|
+
if (!/^https:\/\/github\.com\/[^\/]+\/[^\/]+(?:\.git)?$/.test(repo))
|
|
34
|
+
throw new Error(`Dependency repo "${repo}" is not a valid github repo URL.`);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Validates the 'branch' property.
|
|
39
|
+
* @param branch The 'branch' property to validate.
|
|
40
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
41
|
+
*/
|
|
42
|
+
static validateBranch(branch) {
|
|
43
|
+
if (branch === null || branch === undefined)
|
|
44
|
+
return;
|
|
45
|
+
if (typeof branch !== 'string')
|
|
46
|
+
throw new Error('Dependency branch is not a string.');
|
|
47
|
+
if (branch.length === 0)
|
|
48
|
+
throw new Error('Dependency branch is empty.');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
static validateBuilder(builder) {
|
|
52
|
+
if (builder === null || builder === undefined)
|
|
53
|
+
return;
|
|
54
|
+
if (!Array.isArray(builder))
|
|
55
|
+
throw new Error('Dependency "builder" property must be an array.');
|
|
56
|
+
for (const step of builder) {
|
|
57
|
+
if (typeof step !== 'object' || step == null)
|
|
58
|
+
throw new Error('Dependency "builder" property must be an object.');
|
|
59
|
+
if ('run' in step)
|
|
60
|
+
this.validateRun(step.run);
|
|
61
|
+
if ('move' in step)
|
|
62
|
+
this.validateMove(step.move);
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Validates the 'builder.run' property.
|
|
68
|
+
* @param run The 'builder.run' property to validate.
|
|
69
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
70
|
+
*/
|
|
71
|
+
static validateRun(run) {
|
|
72
|
+
if (run === null || run === undefined)
|
|
73
|
+
return;
|
|
74
|
+
if (typeof run !== 'string' && !Array.isArray(run))
|
|
75
|
+
throw new Error('Dependency "run" property must be a string or an array of strings.');
|
|
76
|
+
if (typeof run === 'string' && run.length === 0)
|
|
77
|
+
throw new Error('Dependency "run" property is empty.');
|
|
78
|
+
if (Array.isArray(run) && run.some(cmd => typeof cmd !== 'string'))
|
|
79
|
+
throw new Error('Dependency "run" property must be an array of strings.');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Validates the 'builder.move' property.
|
|
84
|
+
* @param move The 'builder.move' property to validate.
|
|
85
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
86
|
+
*/
|
|
87
|
+
static validateMove(move) {
|
|
88
|
+
if (move === null || move === undefined)
|
|
89
|
+
return;
|
|
90
|
+
if (typeof move !== 'string' && !Array.isArray(move) && typeof move !== 'object')
|
|
91
|
+
throw new Error('Dependency "out" property must be a string, an array of strings, or a valid builder object.');
|
|
92
|
+
if (typeof move === 'string' && move.length === 0)
|
|
93
|
+
throw new Error('Dependency "out" property is empty.');
|
|
94
|
+
if (Array.isArray(move) && move.some(folder => typeof folder !== 'string'))
|
|
95
|
+
throw new Error('Dependency "out" property must be an array of strings.');
|
|
96
|
+
if (typeof move === 'object' && !Array.isArray(move))
|
|
97
|
+
for (const key in move) {
|
|
98
|
+
const folders = move[key];
|
|
99
|
+
if (typeof folders !== 'string' && !Array.isArray(folders))
|
|
100
|
+
throw new Error('Dependency "out" property must be a string, an array of strings, or a valid builder object.');
|
|
101
|
+
if (Array.isArray(folders) && folders.some(folder => typeof folder !== 'string'))
|
|
102
|
+
throw new Error('Dependency "out" property must be an array of strings.');
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Validates a full dependency definition object.
|
|
108
|
+
* @param data The dependency data to validate.
|
|
109
|
+
* @returns `true` if valid, otherwise throws an error.
|
|
110
|
+
*/
|
|
111
|
+
static validateDependency(data) {
|
|
112
|
+
if (typeof data !== 'object' || data === null || Array.isArray(data))
|
|
113
|
+
throw new Error('Dependency definition must be an object.');
|
|
114
|
+
this.validateName(data.name);
|
|
115
|
+
this.validateRepo(data.repo);
|
|
116
|
+
this.validateBranch(data.branch);
|
|
117
|
+
this.validateBuilder(data.builder);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Check if a file exists
|
|
122
|
+
* @param path Path to check
|
|
123
|
+
* @returns Promise<boolean>
|
|
124
|
+
*/
|
|
125
|
+
async isFile(path) {
|
|
126
|
+
try {
|
|
127
|
+
const stats = await FS.stat(path);
|
|
128
|
+
return stats.isFile();
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Check if a file or folder exists
|
|
136
|
+
* @param path Path to check
|
|
137
|
+
* @returns Promise<boolean>
|
|
138
|
+
*/
|
|
139
|
+
async exists(path) {
|
|
140
|
+
try {
|
|
141
|
+
await FS.access(path);
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export default Validator;
|
|
150
|
+
//# sourceMappingURL=Validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../src/Validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAIpC,MAAM,OAAO,SAAS;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CAAC,IAAS;QAChC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACzF,IAAI,OAAO,IAAI,KAAK,Q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AAC,MAAM,CAAC,IAAY;QAC/B,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QAAC,CAAC;IAC7B,CAAC;IACD;;;;OAIG;IACO,KAAK,CAAC,MAAM,CAAC,IAAY;QAC/B,IAAI,CAAC;YAAC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QAAC,CAAC;IACvE,CAAC;CACJ;AAED,eAAe,SAAS,CAAC"}
|
package/build/bin.d.ts
ADDED
package/build/bin.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @author NetFeez <codefeez.dev@gmail.com>
|
|
4
|
+
* @description Dependency Flow CLI.
|
|
5
|
+
* @license Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { Utilities } from 'vortez';
|
|
8
|
+
import Dependency from './Dependency.js';
|
|
9
|
+
import File from './File.js';
|
|
10
|
+
import PathFixer from './PathFixer.js';
|
|
11
|
+
import Validator from './Validator.js';
|
|
12
|
+
const dependencyFile = 'dep.NetFeez-Labs.json';
|
|
13
|
+
/**
|
|
14
|
+
* Extracts a repository name from its URL.
|
|
15
|
+
* @param repo - The repository URL.
|
|
16
|
+
* @returns The repository name.
|
|
17
|
+
*/
|
|
18
|
+
const getRepoName = (repo) => {
|
|
19
|
+
const match = repo.match(/\/([^/]+\.git)$/);
|
|
20
|
+
return match ? match[1].replace('.git', '') : null;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Appends a value to an array or string.
|
|
24
|
+
* @param current - The current value.
|
|
25
|
+
* @param value - The value to append.
|
|
26
|
+
*/
|
|
27
|
+
function appendValue(current, value) {
|
|
28
|
+
if (!current)
|
|
29
|
+
return value;
|
|
30
|
+
if (typeof current === 'string')
|
|
31
|
+
return [current, value];
|
|
32
|
+
return [...current, value];
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
async function add(command, args) {
|
|
36
|
+
try {
|
|
37
|
+
this.out.info(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
38
|
+
const [repo, name] = args;
|
|
39
|
+
this.out.info(`&C(255,180,220)│ Adding dependency...`);
|
|
40
|
+
Validator.validateRepo(repo);
|
|
41
|
+
const dependencies = await File.load(dependencyFile);
|
|
42
|
+
const dependencyName = name || getRepoName(repo);
|
|
43
|
+
Validator.validateName(dependencyName);
|
|
44
|
+
if (dependencies.some(dep => dep.name === dependencyName))
|
|
45
|
+
throw new Error(`A dependency with the name "${dependencyName}" already exists.`);
|
|
46
|
+
const newDep = { name: dependencyName, repo };
|
|
47
|
+
await File.save(dependencyFile, [...dependencies, newDep]);
|
|
48
|
+
this.out.info(`&C(255,180,220)│ Added dependency "${dependencyName}".`);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
this.out.error(`&C(255,180,220)│ &C1${error}`);
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
this.out.info(`&C(255,180,220)╰─────────────────────────────────────────────`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async function remove(command, args) {
|
|
58
|
+
try {
|
|
59
|
+
this.out.info(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
60
|
+
const [identifier] = args;
|
|
61
|
+
if (!identifier)
|
|
62
|
+
throw new Error('Usage: dep remove <name_or_repo_url>');
|
|
63
|
+
const dependencies = await File.load(dependencyFile);
|
|
64
|
+
const updatedDependencies = dependencies.filter(dep => dep.name !== identifier && dep.repo !== identifier);
|
|
65
|
+
if (dependencies.length === updatedDependencies.length)
|
|
66
|
+
throw new Error(`Dependency "${identifier}" not found.`);
|
|
67
|
+
await File.save(dependencyFile, updatedDependencies);
|
|
68
|
+
this.out.info(`&C(255,180,220)│ Removed dependency "${identifier}".`);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
this.out.error(`&C(255,180,220)│ &C1${error}`);
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
this.out.info(`&C(255,180,220)╰─────────────────────────────────────────────`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/* async function output(this: Utilities.DebugUI, command: string, args: string[]): Promise<void> {
|
|
78
|
+
try {
|
|
79
|
+
this.out.info(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
80
|
+
const [identifier, output, source] = args;
|
|
81
|
+
if (!identifier || !output) throw new Error('Usage: dep output <name_or_repo_url> <output_path> [source_path]');
|
|
82
|
+
const dependencies = await File.load(dependencyFile);
|
|
83
|
+
const dependency = dependencies.find(dep => dep.name === identifier || dep.repo === identifier);
|
|
84
|
+
if (!dependency) throw new Error(`Dependency "${identifier}" not found.`);
|
|
85
|
+
|
|
86
|
+
let out = dependency.out;
|
|
87
|
+
|
|
88
|
+
if (!out) out = source ? { [source]: output } : output;
|
|
89
|
+
else if (typeof out === 'string') {
|
|
90
|
+
if (!source) out = appendValue(out, output);
|
|
91
|
+
else if (source === '/') out = { '/': appendValue(out, output) };
|
|
92
|
+
else out = { [source]: output, '/': out };
|
|
93
|
+
} else if (Array.isArray(out)) {
|
|
94
|
+
if (!source) out = appendValue(out, output);
|
|
95
|
+
else if (source === '/') out = { '/': appendValue(out, output) };
|
|
96
|
+
else out = { [source]: output, '/': out };
|
|
97
|
+
} else {
|
|
98
|
+
const key = source || '/';
|
|
99
|
+
out[key] = appendValue(out[key], output);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
dependency.out = out;
|
|
103
|
+
await File.save(dependencyFile, dependencies);
|
|
104
|
+
this.out.info(`&C(255,180,220)│ Updated dependency output from &C4${identifier}`);
|
|
105
|
+
} catch (error) { this.out.error(`&C(255,180,220)│ &C1${error}`); }
|
|
106
|
+
finally { this.out.info(`&C(255,180,220)╰─────────────────────────────────────────────`); }
|
|
107
|
+
} */
|
|
108
|
+
async function install(command, args) {
|
|
109
|
+
try {
|
|
110
|
+
this.out.info(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
111
|
+
const dependencies = await File.load(dependencyFile);
|
|
112
|
+
const toInstall = args.length > 0
|
|
113
|
+
? dependencies.filter(dep => args.includes(dep.name) || args.includes(dep.repo))
|
|
114
|
+
: dependencies;
|
|
115
|
+
if (toInstall.length === 0)
|
|
116
|
+
throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to install.');
|
|
117
|
+
let isFirst = true;
|
|
118
|
+
for (const data of toInstall) {
|
|
119
|
+
if (!isFirst)
|
|
120
|
+
this.out.info(`&C(255,180,220)│`);
|
|
121
|
+
else
|
|
122
|
+
isFirst = false;
|
|
123
|
+
this.out.info(`&C(255,180,220)│ &C3Installing dependency: &C3${data.name}`);
|
|
124
|
+
const dependency = new Dependency(data);
|
|
125
|
+
const result = await dependency.install();
|
|
126
|
+
this.out.info(`&C(255,180,220)│ ${result.join('\n').replace(/\n/g, '\n&C(255,180,220)│ ')}`);
|
|
127
|
+
this.out.info(`&C(255,180,220)│ &C3Installed dependency: &C3${data.name}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
this.out.error(`&C(255,180,220)│ &C1${`${error}`.split('\n').join('\n&C(255,180,220)│ ')}`);
|
|
132
|
+
}
|
|
133
|
+
finally {
|
|
134
|
+
this.out.info(`&C(255,180,220)╰─────────────────────────────────────────────`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
async function uninstall(command, args) {
|
|
138
|
+
try {
|
|
139
|
+
this.out.info(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
140
|
+
const dependencies = await File.load(dependencyFile);
|
|
141
|
+
const toUninstall = args.length > 0
|
|
142
|
+
? dependencies.filter(dep => args.includes(dep.name) || args.includes(dep.repo))
|
|
143
|
+
: dependencies;
|
|
144
|
+
if (toUninstall.length === 0)
|
|
145
|
+
throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to uninstall.');
|
|
146
|
+
let isFirst = true;
|
|
147
|
+
for (const data of toUninstall) {
|
|
148
|
+
if (!isFirst)
|
|
149
|
+
this.out.info(`&C(255,180,220)│`);
|
|
150
|
+
else
|
|
151
|
+
isFirst = false;
|
|
152
|
+
this.out.info(`&C(255,180,220)│ &C3Uninstalling dependency: &C3${data.name}`);
|
|
153
|
+
const dependency = new Dependency(data);
|
|
154
|
+
const result = await dependency.uninstall();
|
|
155
|
+
this.out.info(`&C(255,180,220)│ ${result.join('\n').replace(/\n/g, '\n&C(255,180,220)│ ')}`);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
this.out.error(`&C(255,180,220)│ &C1${error}`);
|
|
160
|
+
}
|
|
161
|
+
finally {
|
|
162
|
+
this.out.info(`&C(255,180,220)╰─────────────────────────────────────────────`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
async function list() {
|
|
166
|
+
const dependencies = await File.load(dependencyFile);
|
|
167
|
+
if (dependencies.length === 0) {
|
|
168
|
+
this.out.info('No dependencies found.');
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.out.info('&C(255,180,220)╭─────────────────────────────────────────────');
|
|
172
|
+
this.out.info(`&C(255,180,220)│ &C3Dependencies:`);
|
|
173
|
+
for (const dependency of dependencies) {
|
|
174
|
+
this.out.info(`&C(255,180,220)│ - &C3${dependency.name}: &C2${dependency.repo}`);
|
|
175
|
+
}
|
|
176
|
+
this.out.info('&C(255,180,220)╰─────────────────────────────────────────────');
|
|
177
|
+
}
|
|
178
|
+
async function fixPaths(command, args) {
|
|
179
|
+
try {
|
|
180
|
+
const watch = args.includes('--watch') || args.includes('-w');
|
|
181
|
+
let projectPath = process.cwd();
|
|
182
|
+
const projectFlagIndex = args.findIndex(arg => arg === '-p' || arg === '--project');
|
|
183
|
+
if (projectFlagIndex !== -1) {
|
|
184
|
+
const pathValueIndex = projectFlagIndex + 1;
|
|
185
|
+
if (args.length > pathValueIndex && args[pathValueIndex] && !args[pathValueIndex].startsWith('-')) {
|
|
186
|
+
projectPath = args[pathValueIndex];
|
|
187
|
+
}
|
|
188
|
+
else
|
|
189
|
+
return void this.out.error('Invalid project path specified in command line arguments.');
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
const positionalPath = args.find(arg => !arg.startsWith('-'));
|
|
193
|
+
if (positionalPath)
|
|
194
|
+
projectPath = positionalPath;
|
|
195
|
+
}
|
|
196
|
+
const projectInfo = await PathFixer.getProjectInfo(`${projectPath}/tsconfig.json`);
|
|
197
|
+
const pathFixer = new PathFixer(projectInfo, projectPath);
|
|
198
|
+
if (watch)
|
|
199
|
+
await pathFixer.watch();
|
|
200
|
+
else
|
|
201
|
+
await pathFixer.run();
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
if (error instanceof Error)
|
|
205
|
+
this.out.error(`An error occurred: ${error.message}`);
|
|
206
|
+
else
|
|
207
|
+
this.out.error(`An unknown error occurred: ${error}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const cli = new Utilities.DebugUI();
|
|
211
|
+
cli.addCommand('list', list, { description: 'Lists all configured dependencies.', usage: 'list' });
|
|
212
|
+
cli.addCommand('install', install, { description: 'Installs all or specific dependencies.', usage: 'install [name...]' });
|
|
213
|
+
cli.addCommand('add', add, { description: 'Adds a new dependency.', usage: 'add <repo_url> [name]' });
|
|
214
|
+
// cli.addCommand('output', output, { description: 'Sets the output path for a dependency.', usage: 'output <name_or_repo_url> <output_path> [source_path]' });
|
|
215
|
+
cli.addCommand('remove', remove, { description: 'Removes a dependency.', usage: 'remove <name_or_repo_url>' });
|
|
216
|
+
cli.addCommand('uninstall', uninstall, { description: 'Uninstalls all or specific dependencies.', usage: 'uninstall [name...]' });
|
|
217
|
+
cli.addCommand('fix-paths', fixPaths, { description: 'Fixes import paths in the compiled output.', usage: 'fix-paths [-p, --project <path>] [--watch]' });
|
|
218
|
+
try {
|
|
219
|
+
// const command = process.argv[0];
|
|
220
|
+
const skip = 2; // command.trim().toLowerCase() == 'npx' ? 2 : 1;
|
|
221
|
+
const [commandName, ...args] = process.argv.slice(skip);
|
|
222
|
+
if (commandName) {
|
|
223
|
+
const command = cli.getCommand(commandName);
|
|
224
|
+
if (command) {
|
|
225
|
+
await command.exec.call(cli, commandName, args);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
cli.out.error(`Unknown command: ${commandName}`);
|
|
229
|
+
cli.getCommand('help')?.exec.call(cli, 'help', []);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
else
|
|
233
|
+
cli.start();
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
cli.out.error(`&C(255,180,220)╭─────────────────────────────────────────────`);
|
|
237
|
+
cli.out.error(`&C(255,180,220)│ &C1${error}`);
|
|
238
|
+
cli.out.error(`&C(255,180,220)╰─────────────────────────────────────────────`);
|
|
239
|
+
process.exit(1);
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=bin.js.map
|
package/build/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;IACjC,MAAM,KAAK,GA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ACnC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,iDAAiD;IACjE,MAAM,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExD,IAAI,WAAW,EAAE,CAAC;QACd,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,OAAO,EAAE,CAAC;YACV,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACJ,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,oBAAoB,WAAW,EAAE,CAAC,CAAC;YACjD,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QACvD,CAAC;IACL,CAAC;;QAAM,GAAG,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACb,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC/E,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;IAC9C,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "depflow",
|
|
3
|
+
"description": "is a simple dependency manager based on github repositories",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"main": "build/bin.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"dep": "build/bin.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "npx tsc --watch",
|
|
12
|
+
"build": "npx tsc",
|
|
13
|
+
"prepare": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/NetFeez/DependencyManager.git"
|
|
19
|
+
},
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "NetFeez",
|
|
22
|
+
"email": "codefeez.dev@gmail.com",
|
|
23
|
+
"url": "https://NetFeez-Labs.com"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"dependency",
|
|
27
|
+
"manager"
|
|
28
|
+
],
|
|
29
|
+
"files": [
|
|
30
|
+
"build",
|
|
31
|
+
".gitignore",
|
|
32
|
+
"LICENCE",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"vortez": "^5.0.0-dev.14"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^24.10.1",
|
|
40
|
+
"typescript": "^5.9.3"
|
|
41
|
+
}
|
|
42
|
+
}
|