depflow 2.0.2 → 3.0.0-dev.10

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.
Files changed (78) hide show
  1. package/README.md +129 -58
  2. package/build/cli/DepFLowCLI.d.ts +1 -0
  3. package/build/cli/DepFLowCLI.js +66 -19
  4. package/build/cli/DepFLowCLI.js.map +1 -1
  5. package/build/cli/bin.js +13 -12
  6. package/build/cli/bin.js.map +1 -1
  7. package/build/config/Config.d.ts +3 -3
  8. package/build/config/Config.js +3 -3
  9. package/build/config/Config.js.map +1 -1
  10. package/build/config/ImportMap.d.ts +24 -11
  11. package/build/config/ImportMap.js +43 -29
  12. package/build/config/ImportMap.js.map +1 -1
  13. package/build/config/{Tsconfig.d.ts → TSConfig.d.ts} +14 -17
  14. package/build/config/{Tsconfig.js → TSConfig.js} +42 -37
  15. package/build/config/TSConfig.js.map +1 -0
  16. package/build/schema/Config/Builder.d.ts +431 -0
  17. package/build/schema/Config/Builder.js +48 -0
  18. package/build/schema/Config/Builder.js.map +1 -0
  19. package/build/schema/Config/Config.d.ts +582 -0
  20. package/build/schema/Config/Config.js +20 -0
  21. package/build/schema/Config/Config.js.map +1 -0
  22. package/build/schema/Config/Dependency.d.ts +748 -0
  23. package/build/schema/Config/Dependency.js +25 -0
  24. package/build/schema/Config/Dependency.js.map +1 -0
  25. package/build/schema/Config/Extractor.d.ts +133 -0
  26. package/build/schema/Config/Extractor.js +25 -0
  27. package/build/schema/Config/Extractor.js.map +1 -0
  28. package/build/schema/Config/Resolver.d.ts +70 -0
  29. package/build/schema/Config/Resolver.js +25 -0
  30. package/build/schema/Config/Resolver.js.map +1 -0
  31. package/build/schema/Config/Transform.d.ts +73 -0
  32. package/build/schema/Config/Transform.js +27 -0
  33. package/build/schema/Config/Transform.js.map +1 -0
  34. package/build/schema/ImportMap.d.ts +22 -0
  35. package/build/schema/ImportMap.js +12 -0
  36. package/build/schema/ImportMap.js.map +1 -0
  37. package/build/schema/TSConfig.d.ts +56 -0
  38. package/build/schema/TSConfig.js +19 -0
  39. package/build/schema/TSConfig.js.map +1 -0
  40. package/build/schema/schema.d.ts +29 -0
  41. package/build/schema/schema.js +31 -0
  42. package/build/schema/schema.js.map +1 -0
  43. package/build/support/Builder/Builder.d.ts +46 -0
  44. package/build/support/Builder/Builder.js +116 -0
  45. package/build/support/Builder/Builder.js.map +1 -0
  46. package/build/support/Dependency/Dependency.d.ts +38 -0
  47. package/build/support/Dependency/Dependency.js +14 -0
  48. package/build/support/Dependency/Dependency.js.map +1 -0
  49. package/build/support/Dependency/GitDependency.d.ts +20 -0
  50. package/build/support/Dependency/GitDependency.js +67 -0
  51. package/build/support/Dependency/GitDependency.js.map +1 -0
  52. package/build/support/Dependency/NpmDependency.d.ts +18 -0
  53. package/build/support/Dependency/NpmDependency.js +65 -0
  54. package/build/support/Dependency/NpmDependency.js.map +1 -0
  55. package/build/support/Git.js +1 -1
  56. package/build/support/Git.js.map +1 -1
  57. package/build/support/PathResolver/AliasCompiler.d.ts +13 -6
  58. package/build/support/PathResolver/AliasCompiler.js +35 -12
  59. package/build/support/PathResolver/AliasCompiler.js.map +1 -1
  60. package/build/support/PathResolver/PathResolver.d.ts +4 -4
  61. package/build/support/PathResolver/PathResolver.js +23 -17
  62. package/build/support/PathResolver/PathResolver.js.map +1 -1
  63. package/build/support/Task/Task.js +1 -1
  64. package/build/support/Task/Task.js.map +1 -1
  65. package/build/support/Utils.d.ts +9 -1
  66. package/build/support/Utils.js +30 -0
  67. package/build/support/Utils.js.map +1 -1
  68. package/package.json +6 -7
  69. package/build/config/Tsconfig.js.map +0 -1
  70. package/build/config/schemas.d.ts +0 -641
  71. package/build/config/schemas.js +0 -51
  72. package/build/config/schemas.js.map +0 -1
  73. package/build/support/Async.d.ts +0 -22
  74. package/build/support/Async.js +0 -62
  75. package/build/support/Async.js.map +0 -1
  76. package/build/support/Dependency.d.ts +0 -109
  77. package/build/support/Dependency.js +0 -274
  78. package/build/support/Dependency.js.map +0 -1
package/README.md CHANGED
@@ -1,100 +1,171 @@
1
- # 🚀 DepFlow (Dependency Flow)
1
+ # DepFlow — Dependency Flow Manager
2
2
 
3
- **DepFlow** is a lightweight, high-performance dependency manager that leverages Git repositories and NPM packages to orchestrate your project's infrastructure. Designed for the **NetFeez** ecosystem, it allows you to manage dependencies directly from their source without the overhead of traditional package managers.
3
+ DepFlow is a focused dependency orchestration tool that lets projects consume Git repositories and NPM packages as managed dependencies. It simplifies building, extracting, and mapping artifacts into your application (for example, populating an `importmap` or TypeScript `paths`).
4
4
 
5
- Starting with **v2.0.0**, DepFlow introduces a schema-driven architecture that automatically configures your development environment, providing a seamless experience in editors like VSCode.
5
+ Key goals:
6
+ - Keep repository-sourced modules reproducible and buildable.
7
+ - Provide automatic path/importmap resolution for browser and TypeScript workflows.
8
+ - Support lightweight builder pipelines for extracted artifacts.
6
9
 
7
10
  ---
8
11
 
9
- # 💾 Installation
12
+ ## Features
13
+ - Git-based dependencies with optional build pipelines
14
+ - NPM dependency extraction and local mirroring
15
+ - Automatic `tsconfig` paths and browser `importmap` generation via `dep sync`
16
+ - Flexible resolver aliases for local and CDN targets
10
17
 
11
- Install DepFlow globally using **npm**:
18
+ ---
19
+
20
+ ## Installation
21
+
22
+ Install globally with npm to use the CLI system-wide:
12
23
 
13
- ```console
24
+ ```bash
14
25
  npm install -g @netfeez/depflow
15
26
  ```
16
27
 
17
- > [!TIP]
18
- > Global installation makes the `dep` command available everywhere. For version 2.0.0, ensure you are using the `@netfeez` scope.
28
+ Alternatively, add it as a dev-dependency for project-specific usage.
19
29
 
20
30
  ---
21
31
 
22
- # 💻 CLI Usage
32
+ ## Quick Start
23
33
 
24
- DepFlow offers a clean interface for managing your project's lifecycle:
34
+ 1. Create a configuration file (recommended name: `depflow.json`).
35
+ 2. Run `dep install` to fetch and build all configured dependencies.
36
+ 3. Run `dep sync` to update `tsconfig` paths and `importmap` (if configured).
25
37
 
26
- ### Commands
38
+ CLI examples:
27
39
 
28
- | Command | Usage | Description |
29
- |---|---|---|
30
- | `sync` | `dep sync` | **(New)** Synchronizes `tsconfig.json` paths and `importmap` based on your config. |
31
- | `install`| `dep install [name...]`| Clones, builds, and sets up all or specific dependencies. |
32
- | `list` | `dep list` | Lists all dependencies configured in your project. |
33
- | `add` | `dep add <repo_url> [name]` | Adds a new repository dependency to your configuration. |
34
- | `remove`| `dep remove <name>` | Removes a dependency from the configuration. |
35
- | `uninstall`| `dep uninstall [name...]`| Removes the local files of your dependencies. |
40
+ ```bash
41
+ # install dependencies defined in .df.json
42
+ dep install
43
+ # --flow filepath.json for use an specific config
44
+
45
+ # sync tsconfig/importmap from the configuration
46
+ dep sync
47
+ ```
36
48
 
37
49
  ---
38
50
 
39
- # ⚙️ Configuration File (`depflow.json`)
51
+ ## Configuration
52
+
53
+ DepFlow uses a JSON configuration file describing where to fetch dependencies and how to build and expose them. The minimal structure:
54
+
55
+ - `flowFolder` (string): folder where DepFlow stores temporary state (default: `.depflow`).
56
+ - `outDir` (string): project output root used by extract rules.
57
+ - `tsconfig` (string|null): optional path to TypeScript `tsconfig.json` to update `compilerOptions.paths`.
58
+ - `importmap` (string|null): optional path to write a browser `importmap`.
59
+ - `dependencies` (array): Git-based dependencies.
60
+ - `npmDependencies` (array): NPM packages to extract files from.
40
61
 
41
- The configuration has evolved from a simple array to a powerful object schema.
62
+ Each dependency supports `builder` steps (run commands, file extraction) and `resolver` entries that map aliases to local or CDN targets.
42
63
 
43
- ## New Schema Structure
64
+ ### Example Configuration
65
+
66
+ Below is an example adapted from a real project configuration. Use it as a template for your repository.
44
67
 
45
68
  ```json
46
69
  {
47
70
  "flowFolder": ".depflow",
48
- "tsconfig": "tsconfig.json",
49
- "importmap": "importmap.json",
71
+ "outDir": ".",
72
+ "tsconfig": "tsconfig.web.json",
73
+ "importmap": "public/importmap.json",
50
74
  "dependencies": [
51
75
  {
52
- "name": "my-library",
53
- "repo": "https://github.com/user/my-library.git",
54
- "tag": "main",
76
+ "name": "NetFeez.Vizui",
77
+ "repo": "https://github.com/NetFeez/Vizui.git",
55
78
  "builder": [
56
- { "run": "npm install", "maxTimeMs": 10000 },
57
- { "move": { "build": "web/logic/.lib/my-lib" } }
79
+ {
80
+ "run": ["npm install", "npm run compile"],
81
+ "extract": [
82
+ { "from": "build/**/*.js", "to": "public/lib/vizui/", "replacer": "^build/" },
83
+ { "from": "build/**/*.d.ts", "to": "public/lib/vizui/", "replacer": "^build/" }
84
+ ]
85
+ }
58
86
  ],
59
87
  "resolver": [
88
+ { "alias": "vizui", "target": "public/lib/vizui/vizui.js" },
89
+ { "alias": "vizui/*", "target": "public/lib/vizui/*" }
90
+ ]
91
+ }
92
+ ],
93
+ "npmDependencies": [
94
+ {
95
+ "name": "@netfeez/common",
96
+ "version": "latest",
97
+ "builder": [
60
98
  {
61
- "alias": "my-lib",
62
- "target": {
63
- "local": "./web/logic/.lib/my-lib/index.js",
64
- "cdn": "https://cdn.com/my-lib.js"
65
- }
99
+ "extract": [
100
+ { "from": "build/**/*.js", "to": "public/lib/common/", "replacer": "^build/" },
101
+ { "from": "build/**/*.d.ts", "to": "public/lib/common/", "replacer": "^build/" }
102
+ ]
66
103
  }
104
+ ],
105
+ "resolver": [
106
+ { "alias": "@netfeez/common", "target": "public/lib/common/index.js" },
107
+ { "alias": "@netfeez/common/*", "target": "public/lib/common/*" }
67
108
  ]
68
109
  }
69
110
  ]
70
111
  }
71
112
  ```
72
113
 
73
- ## Fields Explained
74
-
75
- ### Root Configuration
76
- * **`flowFolder`** (string): The directory where DepFlow stores internal data (default: `.depflow`).
77
- * **`tsconfig`** (string, optional): Path to your TypeScript config. When set, `dep sync` will automatically manage your `compilerOptions.paths`.
78
- * **`importmap`** (string, optional): Path to your importmap file. When set, `dep sync` keeps your browser imports up to date.
79
- * **`dependencies`** (array): Your list of Git-based dependencies.
80
-
81
- ### Dependency Object
82
- * **`name`** (string): Unique identifier for the dependency.
83
- * **`repo`** (string): The Git repository URL.
84
- * **`tag`** (string, optional): **(New)** Specify a branch, tag, or commit hash (e.g., `main`, `v1.2.0`).
85
- * **`builder`**: A pipeline to build and organize the dependency files.
86
- * **`run`** (string | string[]): Command(s) to execute (e.g., `npm run compile`).
87
- * **`move`** (string | object): Defines where to place the built files.
88
- * **`resolver`**: **(Renamed)** Configuration for path mapping.
89
- * alias`**: The import alias (e.g., `my-lib`).
90
- * **`target`**: Can be a string path or an object defining `local` and `cdn` targets for hybrid environments.
114
+ ### Builder rules
115
+ - `run`: a string or array of shell commands executed inside the dependency checkout.
116
+ - `extract`: patterns describing which files to copy from the dependency build output into your project. Each extractor may include `from`, `to`, and an optional `replacer` regex used to rewrite paths.
117
+
118
+ ### Resolver entries
119
+ - `alias`: module alias exposed to your project (used in `importmap` and `tsconfig` paths).
120
+ - `target`: a string path or an object with `local` and `cdn` properties for multi-target deployments.
91
121
 
92
122
  ---
93
123
 
94
- # 🚀 Migration to v2.0.0
124
+ ## CLI Reference
125
+
126
+ Use the distribution script in `build/cli/bin.js` or install the package globally.
127
+
128
+ - `install`: Clone, build and extract artifacts for all dependencies in your config.
129
+ - `sync`: Generate/update `tsconfig` paths and browser `importmap` according to `resolver` entries.
130
+ - `list`: Show configured dependencies and their status.
131
+
132
+ Use `node ./build/cli/bin.js <command> --flow <config>` when running locally from the repository.
133
+
134
+ ### Commands
135
+
136
+ The CLI exposes the following commands (all commands accept the global `--flow <file>` flag to specify a custom configuration file):
137
+
138
+ | Command | Usage | Description |
139
+ |---|---|---|
140
+ | `add` | `dep add <repo_url> [name] [--flow <file>]` | Add a git dependency to the configuration file. If the configuration file does not exist it will be created automatically (default: `depflow.json`). If `name` is omitted the repo name is used. |
141
+ | `remove` | `dep remove <name|repo_url> [--flow <file>]` | Remove a dependency by `name` or repository URL. |
142
+ | `install` | `dep install [name1 name2 ...] [--flow <file>]` | Clone, build and extract artifacts for all or specific dependencies. Runs `dep sync` after install. |
143
+ | `uninstall` | `dep uninstall [name1 name2 ...] [--flow <file>]` | Remove local files for configured dependencies. |
144
+ | `list` | `dep list [--flow <file>]` | List all dependencies declared in the configuration. |
145
+ | `rewrite-paths` | `dep rewrite-paths [--watch] [--cdn] [--flow <file>]` | Rewrite built files' paths according to resolver aliases. Use `--watch` to run a watcher; use `--cdn` to apply CDN targets instead of local targets. |
146
+ | `sync` | `dep sync [--cdn] [--flow <file>]` | Update `tsconfig` paths and generate `importmap` from resolver aliases. Use `--cdn` to prefer CDN targets when generating the importmap. |
147
+
148
+ ### Flags
149
+
150
+ - `--flow <file>`: Specify an alternate configuration file (for example `.df.json` or `depflow.json`). If omitted, the CLI defaults to `depflow.json` in the current working directory.
151
+ - `--cdn`: When present for `sync` or `rewrite-paths`, instructs the tool to use CDN targets from resolver entries instead of `local` targets when generating the `importmap` or rewriting paths.
152
+ - `--watch` / `-w`: For `rewrite-paths` only — run a file watcher that keeps rewriting paths as files change.
153
+
154
+ Examples:
155
+
156
+ ```bash
157
+ # install using custom flow file
158
+ dep install --flow .df.json
159
+
160
+ # sync using CDN targets for importmap
161
+ dep sync --flow .df.json --cdn
162
+
163
+ # rewrite paths and start watcher (local targets)
164
+ dep rewrite-paths --flow .df.json --watch
165
+ ```
166
+
167
+ ---
95
168
 
96
- To upgrade from v1:
97
- 1. Wrap your existing array into a `{"dependencies": [...]}` object.
98
- 2. Rename any `pathResolver` fields to `resolver`.
99
- 3. Add the `$schema` field to enable VSCode autocompletion and validation.
100
- 4. Run `dep sync` to initialize your environment.
169
+ If you want, I can also:
170
+ - add quick examples for `tsconfig` path snippets generated by `dep sync`,
171
+ - or produce a Spanish summary for quick internal reference.
@@ -7,6 +7,7 @@ export declare class DepFlowCLI extends DebugUI {
7
7
  commandRemove(command: string, args: string[]): Promise<void>;
8
8
  commandInstall(command: string, args: string[]): Promise<void>;
9
9
  uninstall(command: string, args: string[]): Promise<void>;
10
+ commandRun(command: string, args: string[]): Promise<void>;
10
11
  list(command: string, args: string[]): Promise<void>;
11
12
  rewritePaths(command: string, args: string[]): Promise<void>;
12
13
  commandSync(command: string, args: string[]): Promise<void>;
@@ -1,13 +1,15 @@
1
+ import path from "node:path";
1
2
  import Logger, { DebugUI } from "@netfeez/vterm";
2
- import Validator from "../support/Validator.js";
3
3
  import Utils from "../support/Utils.js";
4
+ import Validator from "../support/Validator.js";
5
+ import GitDependency from "../support/Dependency/GitDependency.js";
6
+ import PathResolver from "../support/PathResolver/PathResolver.js";
4
7
  import Config from "../config/Config.js";
5
- import schemas from "../config/schemas.js";
6
- import Dependency from "../support/Dependency.js";
7
- import Tsconfig from "../config/Tsconfig.js";
8
- import pathResolver from "../support/PathResolver/PathResolver.js";
8
+ import schema from "../schema/schema.js";
9
+ import TSConfig from "../config/TSConfig.js";
9
10
  import ImportMap from "../config/ImportMap.js";
10
- import path from "node:path";
11
+ import NpmDependency from "../support/Dependency/NpmDependency.js";
12
+ import Builder from "../support/Builder/Builder.js";
11
13
  export class DepFlowCLI extends DebugUI {
12
14
  configPath;
13
15
  projectRoot;
@@ -24,6 +26,7 @@ export class DepFlowCLI extends DebugUI {
24
26
  this.addCommand('remove', this.commandRemove, { usage: 'dep remove <name> | <repo_url>', description: 'Remove a dependency from the configuration file by name or repo URL.' });
25
27
  this.addCommand('install', this.commandInstall, { usage: 'dep install [name1 name2 ...]', description: 'Install dependencies. If names are provided, only those dependencies will be installed.' });
26
28
  this.addCommand('uninstall', this.uninstall, { usage: 'dep uninstall [name1 name2 ...]', description: 'Uninstall dependencies. If names are provided, only those dependencies will be uninstalled.' });
29
+ this.addCommand('run', this.commandRun, { usage: 'dep run <script>', description: 'Run a custom action defined in the configuration file.' });
27
30
  this.addCommand('list', this.list, { usage: 'dep list', description: 'List all dependencies in the configuration file.' });
28
31
  this.addCommand('rewrite-paths', this.rewritePaths, { usage: 'dep rewrite-paths [--watch] [--cdn]', description: 'Resolve and rewrite paths in built files based on depFlow configuration.' });
29
32
  this.addCommand('sync', this.commandSync, { usage: 'dep sync', description: 'Syncs depFlow.json with tsconfig.json and generates the importmap.' });
@@ -36,7 +39,7 @@ export class DepFlowCLI extends DebugUI {
36
39
  Validator.validateRepo(repo);
37
40
  if (!name)
38
41
  name = Utils.getRepoName(repo);
39
- const dep = schemas.dependency.processData({ name, repo });
42
+ const dep = schema.Dependency.GitDependency.processData({ name, repo });
40
43
  const config = await Config.load(this.configPath);
41
44
  config.dependencies.push(dep);
42
45
  await Config.save(this.configPath, config);
@@ -71,16 +74,16 @@ export class DepFlowCLI extends DebugUI {
71
74
  try {
72
75
  this.out.group(Utils.newGroup('#FFB4DC'));
73
76
  const config = await Config.load(this.configPath);
74
- const dependencies = config.dependencies;
75
- if (dependencies.length === 0)
77
+ const gitDependencies = config.dependencies;
78
+ if (gitDependencies.length === 0)
76
79
  throw new Error(args.length > 0 ? 'Specified dependencies not found.' : 'No dependencies to install.');
77
80
  this.out.info(`&C5Installing dependencies...`);
78
- for (const dep of dependencies) {
81
+ for (const dep of gitDependencies) {
79
82
  try {
80
83
  this.out.group(Utils.newGroup('#FFB4DC'));
81
84
  this.out.info(`&C5Installing &C6"${dep.name}" &C5from &C6${dep.repo}&C5...`);
82
85
  this.out.line();
83
- const dependency = new Dependency(config, dep, this.out);
86
+ const dependency = new GitDependency(config.flowFolder, dep, this.out);
84
87
  await dependency.install();
85
88
  this.out.line();
86
89
  this.out.info(`&C2Installed &C6${dep.name}.`);
@@ -89,6 +92,21 @@ export class DepFlowCLI extends DebugUI {
89
92
  this.out.groupEnd();
90
93
  }
91
94
  }
95
+ const npmDependencies = config.npmDependencies;
96
+ for (const dep of npmDependencies) {
97
+ try {
98
+ this.out.group(Utils.newGroup('#FFB4DC'));
99
+ this.out.info(`&C5Installing npm dependency &C6"${dep.name}" &C5version &C6${dep.version}&C5...`);
100
+ this.out.line();
101
+ const dependency = new NpmDependency(config.flowFolder, dep, this.out);
102
+ await dependency.install();
103
+ this.out.line();
104
+ this.out.info(`&C2Installed npm dependency &C6${dep.name}.`);
105
+ }
106
+ finally {
107
+ this.out.groupEnd();
108
+ }
109
+ }
92
110
  await this.commandSync('sync', []);
93
111
  }
94
112
  catch (error) {
@@ -110,7 +128,7 @@ export class DepFlowCLI extends DebugUI {
110
128
  this.out.group(Utils.newGroup('#FFB4DC'));
111
129
  this.out.info(`&C1Uninstalling "${dep.name}" from "${dep.repo}"...`);
112
130
  this.out.line();
113
- const dependency = new Dependency(config, dep, this.out);
131
+ const dependency = new GitDependency(config.flowFolder, dep, this.out);
114
132
  await dependency.uninstall();
115
133
  this.out.line();
116
134
  this.out.info(`Uninstalled "${dep.name}".`);
@@ -128,6 +146,32 @@ export class DepFlowCLI extends DebugUI {
128
146
  this.out.groupEnd();
129
147
  }
130
148
  }
149
+ async commandRun(command, args) {
150
+ try {
151
+ const [actionName] = args;
152
+ if (!actionName)
153
+ throw new Error('Usage: dep run <action>');
154
+ this.out.group(Utils.newGroup('#FFB4DC'));
155
+ this.out.info(`&C5Running action &C6${actionName}&C5...`);
156
+ const config = await Config.load(this.configPath);
157
+ const action = config.actions[actionName];
158
+ if (!action)
159
+ throw new Error(`action "${actionName}" not found in configuration.`);
160
+ const pipeline = Array.isArray(action) ? action : [action];
161
+ const builder = new Builder({
162
+ cwd: this.projectRoot,
163
+ pipeline,
164
+ logger: this.out
165
+ });
166
+ await builder.run();
167
+ }
168
+ catch (error) {
169
+ this.out.error(`&C1${error}`);
170
+ }
171
+ finally {
172
+ this.out.groupEnd();
173
+ }
174
+ }
131
175
  async list(command, args) {
132
176
  this.out.group(Utils.newGroup('#FFB4DC'));
133
177
  try {
@@ -153,10 +197,11 @@ export class DepFlowCLI extends DebugUI {
153
197
  const watch = args.includes('--watch') || args.includes('-w');
154
198
  const useCDN = args.includes('--cdn');
155
199
  const mode = useCDN ? 'cdn' : 'local';
200
+ const dir = config.outDir;
156
201
  this.out.info(`Mode: &C3${useCDN ? 'CDN' : 'Local'}`);
157
202
  if (watch)
158
203
  this.out.info(`Watcher: &C2Enabled`);
159
- const resolver = new pathResolver(config, { logger: this.out });
204
+ const resolver = new PathResolver(config, { logger: this.out });
160
205
  if (watch)
161
206
  await resolver.watch(mode);
162
207
  else
@@ -170,24 +215,26 @@ export class DepFlowCLI extends DebugUI {
170
215
  }
171
216
  }
172
217
  async commandSync(command, args) {
173
- this.out.group(Utils.newGroup('#FFB4DC'));
174
- this.out.info(`Synchronizing configurations...`);
175
218
  try {
219
+ this.out.group(Utils.newGroup('#FFB4DC'));
220
+ this.out.info(`Synchronizing configurations...`);
176
221
  const useCDN = args.includes('--cdn');
177
222
  const mode = useCDN ? 'cdn' : 'local';
178
223
  const config = await Config.load(this.configPath);
179
- const resolver = new pathResolver(config, { logger: this.out });
224
+ const resolver = new PathResolver(config, { logger: this.out });
180
225
  const tsconfigFile = config.tsconfig;
181
226
  const importMapFile = config.importmap;
227
+ const tsconfigPath = path.join(this.projectRoot, tsconfigFile || 'tsconfig.json');
228
+ const importMapPath = path.join(this.projectRoot, importMapFile || 'importmap.json');
182
229
  if (tsconfigFile) {
183
- const tsconfig = await Tsconfig.load(this.projectRoot, tsconfigFile, { logger: this.out });
230
+ const tsconfig = await TSConfig.load(tsconfigPath, { logger: this.out });
184
231
  tsconfig.updatePaths(resolver.aliases);
185
232
  await tsconfig.save();
186
233
  }
187
234
  else
188
235
  this.out.warn(`No tsconfig file specified in configuration. Skipping tsconfig synchronization.`);
189
236
  if (importMapFile) {
190
- const importmap = await ImportMap.load(this.projectRoot, importMapFile, { logger: this.out });
237
+ const importmap = await ImportMap.load(importMapPath, { logger: this.out });
191
238
  importmap.updateImports(resolver.aliases, mode);
192
239
  await importmap.save();
193
240
  }
@@ -196,7 +243,7 @@ export class DepFlowCLI extends DebugUI {
196
243
  this.out.info(`&C2Successfully synced all configurations.`);
197
244
  }
198
245
  catch (error) {
199
- this.out.error(`&C1Error during sync: ${error.message}`);
246
+ this.out.error(`&C1Error during sync: ${error}`);
200
247
  }
201
248
  finally {
202
249
  this.out.groupEnd();
@@ -1 +1 @@
1
- {"version":3,"file":"DepFLowCLI.js","sourceRoot":"","sources":["../../src/cli/DepFLowCLI.ts"],"names":[],"m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
+ import { File } from "@netfeez/common-node";
2
3
  import DepFlowCLI from "./DepFLowCLI.js";
3
4
  import { Utils } from "../support/Utils.js";
4
- import schemas from "../config/schemas.js";
5
- function startupSchemaValidation(flowPath) {
6
- const jsonSchema = schemas.config.jsonSchema;
7
- Utils.addVscodeValidation(flowPath, jsonSchema);
5
+ import schema from "../schema/schema.js";
6
+ async function startupSchemaValidation(flowPath) {
7
+ const jsonSchema = schema.Config.jsonSchema;
8
+ File.write(`.depflow/schema.json`, JSON.stringify(jsonSchema));
8
9
  }
9
10
  const skip = 2;
10
- const [commandName, ...args] = process.argv.slice(skip);
11
- const flowTag = (Utils.getFlagValue(args, '--flow') ||
12
- Utils.getFlagValue(args, '-f'));
11
+ const [commandName, ...argsList] = process.argv.slice(skip);
12
+ const { args, flags } = Utils.extractFlags(argsList);
13
+ console.log(commandName, args, flags);
14
+ const flowTag = flags['--flow'] || flags['-f'] || [];
13
15
  const flowPath = flowTag[0] || 'depflow.json';
14
16
  const cli = new DepFlowCLI(flowPath);
15
- startupSchemaValidation(flowPath);
16
- console.log(flowPath);
17
+ await startupSchemaValidation(flowPath);
17
18
  try {
18
19
  if (commandName !== null) {
19
20
  const command = cli.getCommand(commandName);
@@ -29,9 +30,9 @@ try {
29
30
  cli.start();
30
31
  }
31
32
  catch (error) {
32
- cli.out.error(`&C(255,180,220)╭─────────────────────────────────────────────`);
33
- cli.out.error(`&C(255,180,220)│ &C1${error?.stack || error}`);
34
- cli.out.error(`&C(255,180,220)╰─────────────────────────────────────────────`);
33
+ cli.out.error(`&C(#FFB4DC)╭─────────────────────────────────────────────`);
34
+ cli.out.error(`&C(#FFB4DC)│ &C1${error?.stack || error}`);
35
+ cli.out.error(`&C(#FFB4DC)╰─────────────────────────────────────────────`);
35
36
  process.exit(1);
36
37
  }
37
38
  //# sourceMappingURL=bin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":";AAEA,OAAO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I,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAErD,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC;AAE9C,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;AAErC,MAAM,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAExC,IAAI,CAAC;IACD,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACvB,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,2DAA2D,CAAC,CAAC;IAC3E,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IAC1D,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
@@ -1,4 +1,4 @@
1
- import schemas from './schemas.js';
1
+ import schema from '../schema/schema.js';
2
2
  export declare class Config {
3
3
  /**
4
4
  * Loads the configuration from a file at the specified path.
@@ -22,7 +22,7 @@ export declare class Config {
22
22
  static save(path: string, config: Config.ConfigToProcess): Promise<void>;
23
23
  }
24
24
  export declare namespace Config {
25
- type Config = typeof schemas.config.infer;
26
- type ConfigToProcess = typeof schemas.config.inferToProcess;
25
+ type Config = schema.Config;
26
+ type ConfigToProcess = schema.Config.toProcess;
27
27
  }
28
28
  export default Config;
@@ -4,7 +4,7 @@
4
4
  * @license Apache-2.0
5
5
  */
6
6
  import { File } from '@netfeez/common-node';
7
- import schemas from './schemas.js';
7
+ import schema from '../schema/schema.js';
8
8
  export class Config {
9
9
  /**
10
10
  * Loads the configuration from a file at the specified path.
@@ -17,14 +17,14 @@ export class Config {
17
17
  */
18
18
  static async load(path) {
19
19
  if (!await File.exists(path)) {
20
- const defaults = schemas.config.processData({});
20
+ const defaults = schema.Config.processData({});
21
21
  await Config.save(path, defaults);
22
22
  return defaults;
23
23
  }
24
24
  else {
25
25
  const content = await File.read(path, 'utf-8');
26
26
  const json = JSON.parse(content);
27
- const config = schemas.config.processData(json);
27
+ const config = schema.Config.processData(json);
28
28
  return config;
29
29
  }
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,OAAO,MAAM;IACf;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAY;QAC1B,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;YAChD,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClC,OAAO,QAAQ,CAAC;QACpB,CAAC;aAAM,CAAC;YACJ,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAA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AAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC;QAClB,CAAC;IACL,CAAC;IACD;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,MAA8B;QAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAChD,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACJ;AAMD,eAAe,MAAM,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { Logger } from '@netfeez/vterm';
2
2
  import AliasCompiler from '../support/PathResolver/AliasCompiler.js';
3
+ import schema from '../schema/schema.js';
3
4
  export declare class ImportMap {
4
5
  protected data: ImportMap.Data;
5
- protected projectRoot: string;
6
- protected filename: string;
6
+ protected path: string;
7
7
  protected logger: Logger;
8
- constructor(data: ImportMap.Data, projectRoot: string, filename: string, options?: ImportMap.Options);
8
+ constructor(data: ImportMap.Data, path: string, options?: ImportMap.Options);
9
9
  /**
10
10
  * Updates the import map data based on the provided compiled aliases.
11
11
  * It constructs an "imports" section where each alias is mapped to its target path.
@@ -13,24 +13,37 @@ export declare class ImportMap {
13
13
  * @param mode The resolution mode ('local' or 'cdn').
14
14
  */
15
15
  updateImports(aliases: AliasCompiler.CompiledAlias[], mode: 'local' | 'cdn'): void;
16
- save(filename?: string): Promise<void>;
17
- static save(projectRoot: string, filename: string, data: ImportMap.Data, options?: ImportMap.Options): Promise<void>;
16
+ /**
17
+ * Saves the provided import map data to a specified file path.
18
+ * It ensures that the directory for the file exists, converts the data to a JSON string with proper formatting, and writes it to the file system.
19
+ * The method also includes logging to inform users when the save operation is successful.
20
+ * @param path The path to the import map file to save.
21
+ * @returns A promise that resolves when the save operation is complete, or rejects if an error occurs during the process.
22
+ */
23
+ save(path?: string): Promise<void>;
24
+ /**
25
+ * Saves the provided import map data to a specified file path.
26
+ * It ensures that the directory for the file exists, converts the data to a JSON string with proper formatting, and writes it to the file system.
27
+ * The method also includes logging to inform users when the save operation is successful.
28
+ * @param path The path to the import map file to save.
29
+ * @param data The import map data to be saved.
30
+ * @param options Additional options for saving, such as a logger for logging messages during the save process.
31
+ * @returns A promise that resolves when the save operation is complete, or rejects if an error occurs during the process.
32
+ */
33
+ static save(path: string, data: ImportMap.Data, options?: ImportMap.Options): Promise<void>;
18
34
  /**
19
35
  * Factory method: Loads, validates (or creates default), and returns an instance of the ImportMap class.
20
36
  * It checks if the specified import map file exists, and if it does, it attempts to read and parse its content as JSON.
21
37
  * If the file does not exist or contains invalid JSON, it initializes the data with a default structure containing an empty "imports" object.
22
38
  * Finally, it returns a new instance of ImportMap with the loaded or default data, allowing for further manipulation and saving of the import map configuration.
23
- * @param projectRoot The root directory of the project where the import map file is located.
24
- * @param filename The name of the import map file to load (e.g., 'import-map.json').
39
+ * @param path The path to the import map file to load.
25
40
  * @param options Additional options for loading, such as a logger for logging messages during the load process.
26
41
  * @returns A promise that resolves to an instance of ImportMap initialized with the loaded or default data.
27
42
  */
28
- static load(projectRoot: string, filename: string, options?: ImportMap.Options): Promise<ImportMap>;
43
+ static load(path: string, options?: ImportMap.Options): Promise<ImportMap>;
29
44
  }
30
45
  export declare namespace ImportMap {
31
- interface Data {
32
- imports: Record<string, string>;
33
- }
46
+ type Data = schema.ImportMap.Root;
34
47
  interface Options {
35
48
  logger?: Logger;
36
49
  }