depflow 2.0.0 β 2.0.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 +66 -55
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,89 +1,100 @@
|
|
|
1
|
-
# π Dependency Flow
|
|
1
|
+
# π DepFlow (Dependency Flow)
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
4
4
|
|
|
5
|
-
|
|
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.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# πΎ Installation
|
|
10
10
|
|
|
11
|
-
Install
|
|
11
|
+
Install DepFlow globally using **npm**:
|
|
12
12
|
|
|
13
13
|
```console
|
|
14
|
-
npm install -g depflow
|
|
14
|
+
npm install -g @netfeez/depflow
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
> [!
|
|
18
|
-
>
|
|
17
|
+
> [!TIP]
|
|
18
|
+
> Global installation makes the `dep` command available everywhere. For version 2.0.0, ensure you are using the `@netfeez` scope.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
# π» CLI Usage
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
1. **Interactive Mode**: Run `dep` without any arguments to open an interactive command-line interface.
|
|
27
|
-
2. **Direct Command**: Execute commands directly, for example: `dep list`.
|
|
24
|
+
DepFlow offers a clean interface for managing your project's lifecycle:
|
|
28
25
|
|
|
29
26
|
### Commands
|
|
30
27
|
|
|
31
28
|
| Command | Usage | Description |
|
|
32
29
|
|---|---|---|
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
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. |
|
|
38
36
|
|
|
39
37
|
---
|
|
40
38
|
|
|
41
|
-
# βοΈ Configuration File (`
|
|
42
|
-
|
|
43
|
-
All dependencies are defined in a `depFlow.json` file located in your project's root directory. This file contains a JSON array of dependency objects.
|
|
39
|
+
# βοΈ Configuration File (`depflow.json`)
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
The configuration has evolved from a simple array to a powerful object schema.
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
## New Schema Structure
|
|
48
44
|
|
|
49
45
|
```json
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
{
|
|
47
|
+
"flowFolder": ".depflow",
|
|
48
|
+
"tsconfig": "tsconfig.json",
|
|
49
|
+
"importmap": "importmap.json",
|
|
50
|
+
"dependencies": [
|
|
51
|
+
{
|
|
52
|
+
"name": "my-library",
|
|
53
|
+
"repo": "https://github.com/user/my-library.git",
|
|
54
|
+
"tag": "main",
|
|
55
|
+
"builder": [
|
|
56
|
+
{ "run": "npm install", "maxTimeMs": 10000 },
|
|
57
|
+
{ "move": { "build": "web/logic/.lib/my-lib" } }
|
|
58
|
+
],
|
|
59
|
+
"resolver": [
|
|
60
|
+
{
|
|
61
|
+
"alias": "my-lib",
|
|
62
|
+
"target": {
|
|
63
|
+
"local": "./web/logic/.lib/my-lib/index.js",
|
|
64
|
+
"cdn": "https://cdn.com/my-lib.js"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
72
68
|
}
|
|
73
|
-
}
|
|
74
69
|
]
|
|
75
|
-
|
|
76
|
-
]
|
|
70
|
+
}
|
|
77
71
|
```
|
|
78
72
|
|
|
79
73
|
## Fields Explained
|
|
80
74
|
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
# π Migration to v2.0.0
|
|
95
|
+
|
|
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.
|