repo-util 1.22.6 → 1.23.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 +6 -6
- package/src/repo-util-cli.mjs +11 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"aggregation-repository-provider": "^5.2.
|
|
25
|
-
"bitbucket-repository-provider": "^4.2.
|
|
24
|
+
"aggregation-repository-provider": "^5.2.36",
|
|
25
|
+
"bitbucket-repository-provider": "^4.2.10",
|
|
26
26
|
"commander": "^9.3.0",
|
|
27
|
-
"etag-cache-leveldb": "^1.
|
|
28
|
-
"gitea-repository-provider": "^2.2.
|
|
29
|
-
"github-repository-provider": "^7.30.
|
|
27
|
+
"etag-cache-leveldb": "^1.2.0",
|
|
28
|
+
"gitea-repository-provider": "^2.2.11",
|
|
29
|
+
"github-repository-provider": "^7.30.12",
|
|
30
30
|
"leveldown": "^6.1.1",
|
|
31
31
|
"levelup": "^5.1.1",
|
|
32
32
|
"local-repository-provider": "^8.0.12"
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { readFileSync } from "fs";
|
|
4
|
-
import { mkdir } from "fs/promises";
|
|
5
|
-
import { join } from "path";
|
|
6
|
-
import { homedir } from "os";
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { mkdir } from "node:fs/promises";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { homedir } from "node:os";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { program } from "commander";
|
|
9
9
|
import levelup from "levelup";
|
|
10
10
|
import leveldown from "leveldown";
|
|
@@ -88,7 +88,8 @@ for (const o of [
|
|
|
88
88
|
command
|
|
89
89
|
.option("--trace", "log level trace")
|
|
90
90
|
.option("--debug", "log level debug")
|
|
91
|
-
.option("--cache", "cache requests")
|
|
91
|
+
.option("--no-cache", "cache requests")
|
|
92
|
+
.option("--statistics", "cache statistics")
|
|
92
93
|
.option("--json", "output as json")
|
|
93
94
|
.option("--no-identifier", "do not output identifier, show attributes only")
|
|
94
95
|
.option("-a, --attribute <attributes>", "list attribute", a =>
|
|
@@ -177,6 +178,10 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
177
178
|
if (options.json) {
|
|
178
179
|
console.log(JSON.stringify(json));
|
|
179
180
|
}
|
|
181
|
+
|
|
182
|
+
if (options.statistics) {
|
|
183
|
+
console.error(provider._providers[0].cache.statistics);
|
|
184
|
+
}
|
|
180
185
|
}
|
|
181
186
|
|
|
182
187
|
async function createCache() {
|