vag_tools 0.0.5 → 0.0.7
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 +76 -3
- package/dist/vag_cli.js +13 -12
- package/dist/vag_core.js +13 -12
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -1,8 +1,81 @@
|
|
|
1
|
-
README of vag
|
|
2
|
-
|
|
1
|
+
README of vag\_tools
|
|
2
|
+
====================
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
Presentation
|
|
6
6
|
------------
|
|
7
7
|
|
|
8
|
-
*vag* is a
|
|
8
|
+
*vag\_tools* is a *nodejs* package for managing git sub-repositories. It contains:
|
|
9
|
+
|
|
10
|
+
- vag\_core: a javascript library proposing all the featues via an API
|
|
11
|
+
- vag: a CLI-app with the same features for the command-line
|
|
12
|
+
- vagg: a Web-UI (starting a server and opening a UI-page in the browser) with the same features
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Requirements
|
|
16
|
+
------------
|
|
17
|
+
|
|
18
|
+
- [node](https://nodejs.org) > 20.10.0
|
|
19
|
+
- [npm](https://docs.npmjs.com/cli) > 10.1.0
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Installation
|
|
23
|
+
------------
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm i -D vag_tools
|
|
27
|
+
npx vag --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Config file
|
|
32
|
+
-----------
|
|
33
|
+
|
|
34
|
+
An example of config file for *vag*:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
repositories:
|
|
38
|
+
repos/parametrix:
|
|
39
|
+
type: git
|
|
40
|
+
url: git@github.com:charlyoleg2/parametrix.git
|
|
41
|
+
version: main
|
|
42
|
+
repos/parame_paxApps:
|
|
43
|
+
url: https://github.com/charlyoleg2/parame_paxApps.git
|
|
44
|
+
version: main
|
|
45
|
+
parame51:
|
|
46
|
+
url: https://github.com/charlyoleg2/parame51.git
|
|
47
|
+
version: main
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Usage in script
|
|
52
|
+
---------------
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
import { Vag } from 'vag_core';
|
|
56
|
+
|
|
57
|
+
Vag.version_short()
|
|
58
|
+
|
|
59
|
+
const vag = new Vag(argv.discoverDir, argv.deepSearch, argv.importYaml, argv.importDir);
|
|
60
|
+
await vag.init();
|
|
61
|
+
|
|
62
|
+
await vag.c_clone();
|
|
63
|
+
await vag.cd_checkout();
|
|
64
|
+
await vag.d_pull(argv.only_configured);
|
|
65
|
+
await vag.d_push(argv.only_configured);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Usage in command-line
|
|
70
|
+
---------------------
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx vag --help
|
|
74
|
+
npx vag --importYaml=parametrix_repos.yml list
|
|
75
|
+
npx vag --importYaml=parametrix_repos.yml clone
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
package/dist/vag_cli.js
CHANGED
|
@@ -15,9 +15,10 @@ import { simpleGit } from "simple-git";
|
|
|
15
15
|
// package.json
|
|
16
16
|
var package_default = {
|
|
17
17
|
name: "vag_tools",
|
|
18
|
-
version: "0.0.
|
|
18
|
+
version: "0.0.7",
|
|
19
19
|
description: "api and cli for managing sub-git-repositories",
|
|
20
20
|
type: "module",
|
|
21
|
+
private: false,
|
|
21
22
|
main: "./dist/vag_core.js",
|
|
22
23
|
types: "./dist/vag_core.d.ts",
|
|
23
24
|
bin: {
|
|
@@ -85,22 +86,22 @@ var package_default = {
|
|
|
85
86
|
homepage: "https://github.com/charlyoleg2/vag#readme",
|
|
86
87
|
dependencies: {
|
|
87
88
|
"fs-extra": "^11.2.0",
|
|
88
|
-
"simple-git": "^3.
|
|
89
|
-
yaml: "^2.
|
|
89
|
+
"simple-git": "^3.25.0",
|
|
90
|
+
yaml: "^2.5.0",
|
|
90
91
|
yargs: "^17.7.2"
|
|
91
92
|
},
|
|
92
93
|
devDependencies: {
|
|
93
94
|
"@types/fs-extra": "^11.0.4",
|
|
94
|
-
"@types/node": "^
|
|
95
|
+
"@types/node": "^22.1.0",
|
|
95
96
|
"@types/yargs": "^17.0.32",
|
|
96
|
-
eslint: "^8.
|
|
97
|
+
eslint: "^9.8.0",
|
|
97
98
|
"npm-run-all": "^4.1.5",
|
|
98
|
-
prettier: "^3.
|
|
99
|
+
prettier: "^3.3.3",
|
|
99
100
|
shx: "^0.3.4",
|
|
100
|
-
tsup: "^8.
|
|
101
|
-
typescript: "^5.
|
|
102
|
-
"typescript-eslint": "^
|
|
103
|
-
vitest: "^
|
|
101
|
+
tsup: "^8.2.4",
|
|
102
|
+
typescript: "^5.5.4",
|
|
103
|
+
"typescript-eslint": "^8.0.0",
|
|
104
|
+
vitest: "^2.0.5"
|
|
104
105
|
},
|
|
105
106
|
prettier: {
|
|
106
107
|
useTabs: true,
|
|
@@ -133,6 +134,7 @@ async function isGitRepo(pathDir2) {
|
|
|
133
134
|
isRepo = true;
|
|
134
135
|
}
|
|
135
136
|
} catch (err) {
|
|
137
|
+
console.log(err);
|
|
136
138
|
}
|
|
137
139
|
if (!isRepo) {
|
|
138
140
|
console.log(
|
|
@@ -307,8 +309,7 @@ async function validate_yaml_external(yamlPath) {
|
|
|
307
309
|
return -1;
|
|
308
310
|
}
|
|
309
311
|
try {
|
|
310
|
-
if (!Object.hasOwn(fyaml, "repositories"))
|
|
311
|
-
throw 'The property "repositories" is missing!';
|
|
312
|
+
if (!Object.hasOwn(fyaml, "repositories")) throw 'The property "repositories" is missing!';
|
|
312
313
|
for (const repo in fyaml.repositories) {
|
|
313
314
|
if (!Object.hasOwn(fyaml.repositories[repo], "url"))
|
|
314
315
|
throw `The property "url" is missing for repo ${repo} !`;
|
package/dist/vag_core.js
CHANGED
|
@@ -9,9 +9,10 @@ import { simpleGit } from "simple-git";
|
|
|
9
9
|
// package.json
|
|
10
10
|
var package_default = {
|
|
11
11
|
name: "vag_tools",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.7",
|
|
13
13
|
description: "api and cli for managing sub-git-repositories",
|
|
14
14
|
type: "module",
|
|
15
|
+
private: false,
|
|
15
16
|
main: "./dist/vag_core.js",
|
|
16
17
|
types: "./dist/vag_core.d.ts",
|
|
17
18
|
bin: {
|
|
@@ -79,22 +80,22 @@ var package_default = {
|
|
|
79
80
|
homepage: "https://github.com/charlyoleg2/vag#readme",
|
|
80
81
|
dependencies: {
|
|
81
82
|
"fs-extra": "^11.2.0",
|
|
82
|
-
"simple-git": "^3.
|
|
83
|
-
yaml: "^2.
|
|
83
|
+
"simple-git": "^3.25.0",
|
|
84
|
+
yaml: "^2.5.0",
|
|
84
85
|
yargs: "^17.7.2"
|
|
85
86
|
},
|
|
86
87
|
devDependencies: {
|
|
87
88
|
"@types/fs-extra": "^11.0.4",
|
|
88
|
-
"@types/node": "^
|
|
89
|
+
"@types/node": "^22.1.0",
|
|
89
90
|
"@types/yargs": "^17.0.32",
|
|
90
|
-
eslint: "^8.
|
|
91
|
+
eslint: "^9.8.0",
|
|
91
92
|
"npm-run-all": "^4.1.5",
|
|
92
|
-
prettier: "^3.
|
|
93
|
+
prettier: "^3.3.3",
|
|
93
94
|
shx: "^0.3.4",
|
|
94
|
-
tsup: "^8.
|
|
95
|
-
typescript: "^5.
|
|
96
|
-
"typescript-eslint": "^
|
|
97
|
-
vitest: "^
|
|
95
|
+
tsup: "^8.2.4",
|
|
96
|
+
typescript: "^5.5.4",
|
|
97
|
+
"typescript-eslint": "^8.0.0",
|
|
98
|
+
vitest: "^2.0.5"
|
|
98
99
|
},
|
|
99
100
|
prettier: {
|
|
100
101
|
useTabs: true,
|
|
@@ -127,6 +128,7 @@ async function isGitRepo(pathDir2) {
|
|
|
127
128
|
isRepo = true;
|
|
128
129
|
}
|
|
129
130
|
} catch (err) {
|
|
131
|
+
console.log(err);
|
|
130
132
|
}
|
|
131
133
|
if (!isRepo) {
|
|
132
134
|
console.log(
|
|
@@ -301,8 +303,7 @@ async function validate_yaml_external(yamlPath) {
|
|
|
301
303
|
return -1;
|
|
302
304
|
}
|
|
303
305
|
try {
|
|
304
|
-
if (!Object.hasOwn(fyaml, "repositories"))
|
|
305
|
-
throw 'The property "repositories" is missing!';
|
|
306
|
+
if (!Object.hasOwn(fyaml, "repositories")) throw 'The property "repositories" is missing!';
|
|
306
307
|
for (const repo in fyaml.repositories) {
|
|
307
308
|
if (!Object.hasOwn(fyaml.repositories[repo], "url"))
|
|
308
309
|
throw `The property "url" is missing for repo ${repo} !`;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vag_tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "api and cli for managing sub-git-repositories",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"private": false,
|
|
6
7
|
"main": "./dist/vag_core.js",
|
|
7
8
|
"types": "./dist/vag_core.d.ts",
|
|
8
9
|
"bin": {
|
|
@@ -70,22 +71,22 @@
|
|
|
70
71
|
"homepage": "https://github.com/charlyoleg2/vag#readme",
|
|
71
72
|
"dependencies": {
|
|
72
73
|
"fs-extra": "^11.2.0",
|
|
73
|
-
"simple-git": "^3.
|
|
74
|
-
"yaml": "^2.
|
|
74
|
+
"simple-git": "^3.25.0",
|
|
75
|
+
"yaml": "^2.5.0",
|
|
75
76
|
"yargs": "^17.7.2"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@types/fs-extra": "^11.0.4",
|
|
79
|
-
"@types/node": "^
|
|
80
|
+
"@types/node": "^22.1.0",
|
|
80
81
|
"@types/yargs": "^17.0.32",
|
|
81
|
-
"eslint": "^8.
|
|
82
|
+
"eslint": "^9.8.0",
|
|
82
83
|
"npm-run-all": "^4.1.5",
|
|
83
|
-
"prettier": "^3.
|
|
84
|
+
"prettier": "^3.3.3",
|
|
84
85
|
"shx": "^0.3.4",
|
|
85
|
-
"tsup": "^8.
|
|
86
|
-
"typescript": "^5.
|
|
87
|
-
"typescript-eslint": "^
|
|
88
|
-
"vitest": "^
|
|
86
|
+
"tsup": "^8.2.4",
|
|
87
|
+
"typescript": "^5.5.4",
|
|
88
|
+
"typescript-eslint": "^8.0.0",
|
|
89
|
+
"vitest": "^2.0.5"
|
|
89
90
|
},
|
|
90
91
|
"prettier": {
|
|
91
92
|
"useTabs": true,
|