depflow 1.1.1 → 2.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/build/bin.js CHANGED
@@ -1,223 +1,8 @@
1
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 = 'depFlow.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]' });
2
+ import DepFlowCLI from "./bin/DepFLowCLI.js";
3
+ const cli = new DepFlowCLI();
218
4
  try {
219
- // const command = process.argv[0];
220
- const skip = 2; // command.trim().toLowerCase() == 'npx' ? 2 : 1;
5
+ const skip = 2;
221
6
  const [commandName, ...args] = process.argv.slice(skip);
222
7
  if (commandName) {
223
8
  const command = cli.getCommand(commandName);
@@ -234,7 +19,7 @@ try {
234
19
  }
235
20
  catch (error) {
236
21
  cli.out.error(`&C(255,180,220)╭─────────────────────────────────────────────`);
237
- cli.out.error(`&C(255,180,220)│ &C1${error}`);
22
+ cli.out.error(`&C(255,180,220)│ &C1${error?.stack || error}`);
238
23
  cli.out.error(`&C(255,180,220)╰─────────────────────────────────────────────`);
239
24
  process.exit(1);
240
25
  }
package/build/bin.js.map CHANGED
@@ -1 +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,cAAc,CAAC;AAEtC;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;IACjC,MAAM,KAAK,GAAG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,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,KAAU,EAAE,CAAC;IAClB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC/E,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,uBAAuB,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IAC9D,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;IAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
@@ -0,0 +1,296 @@
1
+ import { Schema } from '@netfeez/common';
2
+ export declare const basicTsconfig: Schema<{
3
+ readonly compilerOptions: {
4
+ readonly type: "object";
5
+ readonly properties: {
6
+ readonly baseUrl: {
7
+ readonly type: "string";
8
+ };
9
+ readonly rootDir: {
10
+ readonly type: "string";
11
+ };
12
+ readonly outDir: {
13
+ readonly type: "string";
14
+ };
15
+ readonly paths: {
16
+ readonly type: "object";
17
+ };
18
+ };
19
+ };
20
+ }>;
21
+ export declare const builder: Schema<{
22
+ readonly run: {
23
+ readonly union: [{
24
+ readonly type: "string";
25
+ }, {
26
+ readonly type: "array";
27
+ readonly items: {
28
+ readonly type: "string";
29
+ };
30
+ }];
31
+ };
32
+ readonly move: {
33
+ readonly union: [{
34
+ readonly type: "string";
35
+ }, {
36
+ readonly type: "object";
37
+ }];
38
+ };
39
+ }>;
40
+ export declare const dependency: Schema<{
41
+ readonly name: {
42
+ readonly type: "string";
43
+ readonly required: true;
44
+ };
45
+ readonly repo: {
46
+ readonly type: "string";
47
+ readonly required: true;
48
+ };
49
+ readonly branch: {
50
+ readonly type: "string";
51
+ };
52
+ readonly builder: {
53
+ readonly type: "array";
54
+ readonly default: [];
55
+ readonly items: {
56
+ readonly type: "object";
57
+ readonly properties: {
58
+ readonly run: {
59
+ readonly union: [{
60
+ readonly type: "string";
61
+ }, {
62
+ readonly type: "array";
63
+ readonly items: {
64
+ readonly type: "string";
65
+ };
66
+ }];
67
+ };
68
+ readonly move: {
69
+ readonly union: [{
70
+ readonly type: "string";
71
+ }, {
72
+ readonly type: "object";
73
+ }];
74
+ };
75
+ };
76
+ };
77
+ };
78
+ }>;
79
+ export declare const config: Schema<{
80
+ readonly projectType: {
81
+ readonly type: "string";
82
+ readonly enum: readonly ["node", "web", "mixed"];
83
+ readonly default: "node";
84
+ };
85
+ readonly tsconfig: {
86
+ readonly type: "string";
87
+ readonly nullable: true;
88
+ readonly default: null;
89
+ };
90
+ readonly webTsconfig: {
91
+ readonly type: "string";
92
+ readonly nullable: true;
93
+ readonly default: null;
94
+ };
95
+ readonly paths: {
96
+ readonly type: "object";
97
+ };
98
+ readonly dependencies: {
99
+ readonly type: "array";
100
+ readonly default: [];
101
+ readonly items: {
102
+ readonly type: "object";
103
+ readonly properties: {
104
+ readonly name: {
105
+ readonly type: "string";
106
+ readonly required: true;
107
+ };
108
+ readonly repo: {
109
+ readonly type: "string";
110
+ readonly required: true;
111
+ };
112
+ readonly branch: {
113
+ readonly type: "string";
114
+ };
115
+ readonly builder: {
116
+ readonly type: "array";
117
+ readonly default: [];
118
+ readonly items: {
119
+ readonly type: "object";
120
+ readonly properties: {
121
+ readonly run: {
122
+ readonly union: [{
123
+ readonly type: "string";
124
+ }, {
125
+ readonly type: "array";
126
+ readonly items: {
127
+ readonly type: "string";
128
+ };
129
+ }];
130
+ };
131
+ readonly move: {
132
+ readonly union: [{
133
+ readonly type: "string";
134
+ }, {
135
+ readonly type: "object";
136
+ }];
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ };
143
+ };
144
+ }>;
145
+ export declare const schemas: {
146
+ basicTsconfig: Schema<{
147
+ readonly compilerOptions: {
148
+ readonly type: "object";
149
+ readonly properties: {
150
+ readonly baseUrl: {
151
+ readonly type: "string";
152
+ };
153
+ readonly rootDir: {
154
+ readonly type: "string";
155
+ };
156
+ readonly outDir: {
157
+ readonly type: "string";
158
+ };
159
+ readonly paths: {
160
+ readonly type: "object";
161
+ };
162
+ };
163
+ };
164
+ }>;
165
+ config: Schema<{
166
+ readonly projectType: {
167
+ readonly type: "string";
168
+ readonly enum: readonly ["node", "web", "mixed"];
169
+ readonly default: "node";
170
+ };
171
+ readonly tsconfig: {
172
+ readonly type: "string";
173
+ readonly nullable: true;
174
+ readonly default: null;
175
+ };
176
+ readonly webTsconfig: {
177
+ readonly type: "string";
178
+ readonly nullable: true;
179
+ readonly default: null;
180
+ };
181
+ readonly paths: {
182
+ readonly type: "object";
183
+ };
184
+ readonly dependencies: {
185
+ readonly type: "array";
186
+ readonly default: [];
187
+ readonly items: {
188
+ readonly type: "object";
189
+ readonly properties: {
190
+ readonly name: {
191
+ readonly type: "string";
192
+ readonly required: true;
193
+ };
194
+ readonly repo: {
195
+ readonly type: "string";
196
+ readonly required: true;
197
+ };
198
+ readonly branch: {
199
+ readonly type: "string";
200
+ };
201
+ readonly builder: {
202
+ readonly type: "array";
203
+ readonly default: [];
204
+ readonly items: {
205
+ readonly type: "object";
206
+ readonly properties: {
207
+ readonly run: {
208
+ readonly union: [{
209
+ readonly type: "string";
210
+ }, {
211
+ readonly type: "array";
212
+ readonly items: {
213
+ readonly type: "string";
214
+ };
215
+ }];
216
+ };
217
+ readonly move: {
218
+ readonly union: [{
219
+ readonly type: "string";
220
+ }, {
221
+ readonly type: "object";
222
+ }];
223
+ };
224
+ };
225
+ };
226
+ };
227
+ };
228
+ };
229
+ };
230
+ }>;
231
+ builder: Schema<{
232
+ readonly run: {
233
+ readonly union: [{
234
+ readonly type: "string";
235
+ }, {
236
+ readonly type: "array";
237
+ readonly items: {
238
+ readonly type: "string";
239
+ };
240
+ }];
241
+ };
242
+ readonly move: {
243
+ readonly union: [{
244
+ readonly type: "string";
245
+ }, {
246
+ readonly type: "object";
247
+ }];
248
+ };
249
+ }>;
250
+ dependency: Schema<{
251
+ readonly name: {
252
+ readonly type: "string";
253
+ readonly required: true;
254
+ };
255
+ readonly repo: {
256
+ readonly type: "string";
257
+ readonly required: true;
258
+ };
259
+ readonly branch: {
260
+ readonly type: "string";
261
+ };
262
+ readonly builder: {
263
+ readonly type: "array";
264
+ readonly default: [];
265
+ readonly items: {
266
+ readonly type: "object";
267
+ readonly properties: {
268
+ readonly run: {
269
+ readonly union: [{
270
+ readonly type: "string";
271
+ }, {
272
+ readonly type: "array";
273
+ readonly items: {
274
+ readonly type: "string";
275
+ };
276
+ }];
277
+ };
278
+ readonly move: {
279
+ readonly union: [{
280
+ readonly type: "string";
281
+ }, {
282
+ readonly type: "object";
283
+ }];
284
+ };
285
+ };
286
+ };
287
+ };
288
+ }>;
289
+ };
290
+ export declare namespace schemas {
291
+ type config = typeof config;
292
+ type builder = typeof builder;
293
+ type dependency = typeof dependency;
294
+ type basicTsconfig = typeof basicTsconfig;
295
+ }
296
+ export default schemas;
@@ -0,0 +1,29 @@
1
+ import { Schema } from '@netfeez/common';
2
+ export const basicTsconfig = new Schema({
3
+ compilerOptions: { type: 'object', properties: {
4
+ baseUrl: { type: 'string' },
5
+ rootDir: { type: 'string' },
6
+ outDir: { type: 'string' },
7
+ paths: { type: 'object' }
8
+ } }
9
+ });
10
+ export const builder = new Schema({
11
+ run: { union: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }] },
12
+ move: { union: [{ type: 'string' }, { type: 'object' }] }
13
+ });
14
+ export const dependency = new Schema({
15
+ name: { type: 'string', required: true },
16
+ repo: { type: 'string', required: true },
17
+ branch: { type: 'string' },
18
+ builder: { type: 'array', default: [], items: { type: 'object', properties: builder.schema } }
19
+ });
20
+ export const config = new Schema({
21
+ projectType: { type: 'string', enum: ['node', 'web', 'mixed'], default: 'node' },
22
+ tsconfig: { type: 'string', nullable: true, default: null },
23
+ webTsconfig: { type: 'string', nullable: true, default: null },
24
+ paths: { type: 'object' },
25
+ dependencies: { type: 'array', default: [], items: { type: 'object', properties: dependency.schema } }
26
+ });
27
+ export const schemas = { basicTsconfig, config, builder, dependency };
28
+ export default schemas;
29
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC;IACpC,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE;YAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B,EAAE;CACN,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC;IAC9B,GAAG,EAAE,EAAG,KAAK,EAAE,CAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAE,EAAG;IACvF,IAAI,EAAE,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E,OAAO,EAAE,UAAU,EAAE,CAAC;AAOtE,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "depflow",
3
3
  "description": "is a simple dependency manager based on github repositories",
4
- "version": "1.1.1",
5
- "main": "build/bin.js",
4
+ "version": "2.0.0-dev.1",
5
+ "main": "build/bin/bin.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "dep": "build/bin.js"
8
+ "dep": "build/bin/bin.js"
9
9
  },
10
10
  "scripts": {
11
11
  "dev": "npx tsc --watch",
12
- "build": "npx tsc",
13
- "prepare": "npm run build"
12
+ "compile": "npx tsc",
13
+ "prepare": "npm run compile"
14
14
  },
15
15
  "license": "Apache-2.0",
16
16
  "repository": {
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "author": {
21
21
  "name": "NetFeez",
22
- "email": "codefeez.dev@gmail.com",
23
- "url": "https://NetFeez-Labs.com"
22
+ "email": "netfeez.dev@gmail.com",
23
+ "url": "https://NetFeez.github.io"
24
24
  },
25
25
  "keywords": [
26
26
  "dependency",
@@ -33,10 +33,11 @@
33
33
  "README.md"
34
34
  ],
35
35
  "dependencies": {
36
- "vortez": "^5.0.0-dev.14"
36
+ "@netfeez/common": "^2.1.0",
37
+ "vortez": "^5.0.0"
37
38
  },
38
39
  "devDependencies": {
39
- "@types/node": "^24.10.1",
40
- "typescript": "^5.9.3"
40
+ "@types/node": "^25.6.0",
41
+ "typescript": "^6.0.2"
41
42
  }
42
43
  }