repo-util 1.25.11 → 1.27.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/package.json +10 -12
- package/src/repo-util-cli.mjs +15 -8
- package/src/setup-provider.mjs +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,25 +21,23 @@
|
|
|
21
21
|
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"aggregation-repository-provider": "^5.3.
|
|
25
|
-
"bitbucket-repository-provider": "^5.0.
|
|
24
|
+
"aggregation-repository-provider": "^5.3.24",
|
|
25
|
+
"bitbucket-repository-provider": "^5.0.7",
|
|
26
26
|
"commander": "^10.0.0",
|
|
27
|
-
"etag-cache-leveldb": "^
|
|
28
|
-
"gitea-repository-provider": "^
|
|
29
|
-
"github-repository-provider": "^8.0.
|
|
27
|
+
"etag-cache-leveldb": "^2.0.1",
|
|
28
|
+
"gitea-repository-provider": "^3.0.5",
|
|
29
|
+
"github-repository-provider": "^8.0.11",
|
|
30
30
|
"leveldown": "^6.1.1",
|
|
31
|
-
"levelup": "^5.1.1"
|
|
32
|
-
"local-repository-provider": "^8.1.12",
|
|
33
|
-
"node-fetch": "^3.3.0"
|
|
31
|
+
"levelup": "^5.1.1"
|
|
34
32
|
},
|
|
35
33
|
"devDependencies": {
|
|
36
34
|
"ava": "^5.2.0",
|
|
37
35
|
"c8": "^7.13.0",
|
|
38
|
-
"execa": "^7.
|
|
39
|
-
"semantic-release": "^
|
|
36
|
+
"execa": "^7.1.1",
|
|
37
|
+
"semantic-release": "^21.0.1"
|
|
40
38
|
},
|
|
41
39
|
"engines": {
|
|
42
|
-
"node": ">=18.
|
|
40
|
+
"node": ">=18.15.0"
|
|
43
41
|
},
|
|
44
42
|
"repository": {
|
|
45
43
|
"type": "git",
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node --no-warnings
|
|
2
2
|
|
|
3
3
|
import { program } from "commander";
|
|
4
4
|
import {
|
|
@@ -54,7 +54,21 @@ for (const t of [
|
|
|
54
54
|
await provider.createRepository(name, properties);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
},
|
|
58
|
+
addHook: {
|
|
59
|
+
suffix: "<names>",
|
|
60
|
+
description: "add a Hook",
|
|
61
|
+
executeInstance: async (repository, options) => {
|
|
62
|
+
const hook = new repository.hookClass(repository, "hook1", {
|
|
63
|
+
id: 77,
|
|
64
|
+
url: "http://somewere.com/path",
|
|
65
|
+
events: new Set(["a"])
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log(hook);
|
|
69
|
+
}
|
|
57
70
|
}
|
|
71
|
+
|
|
58
72
|
}),
|
|
59
73
|
type(Branch),
|
|
60
74
|
type(Tag),
|
|
@@ -62,13 +76,6 @@ for (const t of [
|
|
|
62
76
|
type(Milestone),
|
|
63
77
|
type(Application),
|
|
64
78
|
type(Hook, {
|
|
65
|
-
create: {
|
|
66
|
-
suffix: "<name>",
|
|
67
|
-
description: "create a hook",
|
|
68
|
-
execute: () => {
|
|
69
|
-
console.log("create a hook");
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
79
|
delete: {
|
|
73
80
|
description: "delete a hook",
|
|
74
81
|
executeInstance: hook => hook.delete()
|
package/src/setup-provider.mjs
CHANGED
|
@@ -20,11 +20,6 @@ async function createCache() {
|
|
|
20
20
|
const httpsAgent = new Agent({ keepAlive: true });
|
|
21
21
|
|
|
22
22
|
export async function initializeRepositoryProvider(program, properties) {
|
|
23
|
-
if (!globalThis.fetch) {
|
|
24
|
-
const module = await import("node-fetch");
|
|
25
|
-
globalThis.fetch = module.default;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
23
|
const provider = await AggregationProvider.initialize(
|
|
29
24
|
[],
|
|
30
25
|
properties,
|