@fedify/cli 2.4.0-dev.1668 → 2.4.0-dev.1727
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/dist/bench/action.js +1 -1
- package/dist/bench/actor/keys.js +1 -1
- package/dist/bench/compare.js +1 -1
- package/dist/bench/discovery/discover.js +1 -1
- package/dist/bench/metrics/stats-client.js +1 -1
- package/dist/bench/result/schema.js +4 -2
- package/dist/bench/safety/tiers.js +1 -1
- package/dist/bench/scenario/load.js +1 -1
- package/dist/bench/scenario/normalize.js +1 -1
- package/dist/bench/scenario/schema.js +2 -2
- package/dist/bench/scenarios/mixed.js +1 -1
- package/dist/bench/scenarios/object-discovery.js +1 -1
- package/dist/bench/scenarios/registry.js +1 -1
- package/dist/bench/server/synthetic.js +1 -1
- package/dist/bench/signing/pipeline.js +1 -1
- package/dist/bench/template/generate.js +1 -1
- package/dist/bench/template/template.js +2 -2
- package/dist/cache.js +3 -2
- package/dist/config.js +8 -4
- package/dist/deno.js +1 -1
- package/dist/docloader.js +3 -2
- package/dist/imagerenderer.js +1 -1
- package/dist/log.js +1 -1
- package/dist/lookup/command.js +1 -1
- package/dist/lookup.js +1 -1
- package/dist/nodeinfo.js +9 -5
- package/dist/options.js +1 -1
- package/dist/runner.js +1 -1
- package/dist/tunnelservice.js +1 -1
- package/dist/webfinger/action.js +1 -1
- package/dist/webfinger/lib.js +1 -1
- package/package.json +10 -10
package/dist/bench/action.js
CHANGED
|
@@ -466,4 +466,4 @@ function isRemoteFailureFault(fault) {
|
|
|
466
466
|
return fault === "remote-404" || fault === "remote-410" || fault === "slow-inbox" || fault === "network-error";
|
|
467
467
|
}
|
|
468
468
|
//#endregion
|
|
469
|
-
export { runBench as default };
|
|
469
|
+
export { runBench as default, withUserAgent };
|
package/dist/bench/actor/keys.js
CHANGED
package/dist/bench/compare.js
CHANGED
|
@@ -664,4 +664,4 @@ async function defaultWriteOutput(content, outputPath) {
|
|
|
664
664
|
await writeFile(outputPath, content, { encoding: "utf-8" });
|
|
665
665
|
}
|
|
666
666
|
//#endregion
|
|
667
|
-
export { runBenchCompare };
|
|
667
|
+
export { buildCompareReport, createBenchmarkWorktree, parseRegressionTolerance, runBenchCompare, startBenchmarkTarget, stopTargetProcess, waitReadyUrl, windowsTaskkillArgs };
|
|
@@ -213,4 +213,4 @@ function histogramPercentile(histogram, p) {
|
|
|
213
213
|
return boundaries[boundaries.length - 1] ?? 0;
|
|
214
214
|
}
|
|
215
215
|
//#endregion
|
|
216
|
-
export { diffSnapshots, fetchServerSnapshot, queueTaskRemaining, snapshotToMetrics };
|
|
216
|
+
export { diffSnapshots, fetchServerSnapshot, parseServerSnapshot, queueTaskRemaining, snapshotToMetrics };
|
|
@@ -13,10 +13,12 @@ import "temporal-polyfill";
|
|
|
13
13
|
const REPORT_SCHEMA_ID = "https://json-schema.fedify.dev/bench/report-v3.json";
|
|
14
14
|
/** The hosted URL for the version 2 report schema. */
|
|
15
15
|
const REPORT_SCHEMA_V2_ID = "https://json-schema.fedify.dev/bench/report-v2.json";
|
|
16
|
+
/** The hosted URL for the original report schema. */
|
|
17
|
+
const REPORT_SCHEMA_V1_ID = "https://json-schema.fedify.dev/bench/report-v1.json";
|
|
16
18
|
/** The benchmark report JSON Schema (draft 2020-12). */
|
|
17
19
|
const reportSchemaV1 = {
|
|
18
20
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
19
|
-
$id:
|
|
21
|
+
$id: REPORT_SCHEMA_V1_ID,
|
|
20
22
|
title: "Fedify benchmark report",
|
|
21
23
|
type: "object",
|
|
22
24
|
additionalProperties: false,
|
|
@@ -362,4 +364,4 @@ const reportSchemaV2 = {
|
|
|
362
364
|
};
|
|
363
365
|
({ ...reportSchemaV2 }), { ...reportSchemaV2.properties }, { ...reportSchemaV2.$defs }, { ...reportSchemaV2.$defs.scenarioResult }, [...reportSchemaV2.$defs.scenarioResult.required], { ...reportSchemaV2.$defs.scenarioResult.properties };
|
|
364
366
|
//#endregion
|
|
365
|
-
export { REPORT_SCHEMA_ID };
|
|
367
|
+
export { REPORT_SCHEMA_ID, REPORT_SCHEMA_V1_ID, REPORT_SCHEMA_V2_ID, reportSchemaV1, reportSchemaV2 };
|
|
@@ -52,7 +52,7 @@ const FANOUT_METRICS = [
|
|
|
52
52
|
"queueDrain.p95",
|
|
53
53
|
"queueDrain.p99"
|
|
54
54
|
];
|
|
55
|
-
const MIXED_METRICS = [
|
|
55
|
+
const MIXED_METRICS = [.../* @__PURE__ */ new Set([...INBOX_METRICS, ...FANOUT_METRICS])];
|
|
56
56
|
const MIXED_V2_METRICS = [...READ_METRICS, "deliveryThroughput"];
|
|
57
57
|
/** The benchmark scenario suite JSON Schema (draft 2020-12). */
|
|
58
58
|
const scenarioSchemaV1 = {
|
|
@@ -396,4 +396,4 @@ const scenarioSchemaV2 = {
|
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
//#endregion
|
|
399
|
-
export { scenarioSchemaV2 };
|
|
399
|
+
export { SCENARIO_SCHEMA_ID, SCENARIO_SCHEMA_ID_V1, scenarioSchemaV1, scenarioSchemaV2 };
|
|
@@ -11,7 +11,7 @@ const ACTIVITY_JSON_ACCEPT = "application/activity+json, application/ld+json";
|
|
|
11
11
|
const WEBFINGER_ACCEPT = "application/jrd+json, application/json";
|
|
12
12
|
const MAX_COLLECTION_CRAWL_PAGES = 100;
|
|
13
13
|
const MAX_ACTIVITY_UNWRAP_DEPTH = 10;
|
|
14
|
-
const ACTIVITY_WRAPPER_TYPES = new Set([
|
|
14
|
+
const ACTIVITY_WRAPPER_TYPES = /* @__PURE__ */ new Set([
|
|
15
15
|
"Accept",
|
|
16
16
|
"Add",
|
|
17
17
|
"Announce",
|
|
@@ -6,7 +6,7 @@ const EXPR_RE = /\$\{\{([\s\S]*?)\}\}/g;
|
|
|
6
6
|
const CALL_RE = /^([A-Za-z_]\w*)\s*\(([\s\S]*)\)$/;
|
|
7
7
|
const IDENT_RE = /^[A-Za-z_]\w*$/;
|
|
8
8
|
/** Property names that must never be resolved, to avoid prototype access. */
|
|
9
|
-
const FORBIDDEN = new Set([
|
|
9
|
+
const FORBIDDEN = /* @__PURE__ */ new Set([
|
|
10
10
|
"__proto__",
|
|
11
11
|
"prototype",
|
|
12
12
|
"constructor"
|
|
@@ -129,4 +129,4 @@ function stringify(value) {
|
|
|
129
129
|
return value == null ? "" : String(value);
|
|
130
130
|
}
|
|
131
131
|
//#endregion
|
|
132
|
-
export { renderTemplates };
|
|
132
|
+
export { TemplateError, renderTemplates };
|
package/dist/cache.js
CHANGED
|
@@ -13,10 +13,11 @@ function getDefaultCacheDir() {
|
|
|
13
13
|
if (process.platform === "win32") return join(process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local"), "fedify");
|
|
14
14
|
return join(process.env.XDG_CACHE_HOME || join(homedir(), ".cache"), "fedify");
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const DEFAULT_CACHE_DIR = getDefaultCacheDir();
|
|
17
|
+
let currentCacheDir = DEFAULT_CACHE_DIR;
|
|
17
18
|
async function getCacheDir() {
|
|
18
19
|
await mkdir(currentCacheDir, { recursive: true });
|
|
19
20
|
return currentCacheDir;
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
|
22
|
-
export { getCacheDir };
|
|
23
|
+
export { DEFAULT_CACHE_DIR, getCacheDir };
|
package/dist/config.js
CHANGED
|
@@ -88,9 +88,9 @@ const benchSchema = object$1({ format: optional$1(picklist([
|
|
|
88
88
|
"markdown"
|
|
89
89
|
])) });
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Schema for the complete configuration file.
|
|
92
92
|
*/
|
|
93
|
-
const
|
|
93
|
+
const configSchema = object$1({
|
|
94
94
|
debug: optional$1(boolean()),
|
|
95
95
|
userAgent: optional$1(string$1()),
|
|
96
96
|
tunnelService: optional$1(picklist(TUNNEL_SERVICE_NAMES)),
|
|
@@ -100,7 +100,11 @@ const configContext = createConfigContext({ schema: object$1({
|
|
|
100
100
|
relay: optional$1(relaySchema),
|
|
101
101
|
nodeinfo: optional$1(nodeinfoSchema),
|
|
102
102
|
bench: optional$1(benchSchema)
|
|
103
|
-
})
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* Config context for use with bindConfig().
|
|
106
|
+
*/
|
|
107
|
+
const configContext = createConfigContext({ schema: configSchema });
|
|
104
108
|
/**
|
|
105
109
|
* Try to load and parse a TOML config file.
|
|
106
110
|
* Returns an empty object if the file doesn't exist.
|
|
@@ -116,4 +120,4 @@ function tryLoadToml(filePath) {
|
|
|
116
120
|
}
|
|
117
121
|
}
|
|
118
122
|
//#endregion
|
|
119
|
-
export { configContext, tryLoadToml };
|
|
123
|
+
export { configContext, configSchema, tryLoadToml };
|
package/dist/deno.js
CHANGED
package/dist/docloader.js
CHANGED
|
@@ -20,8 +20,9 @@ function getDocumentLoaderCachePrefix(userAgent, allowPrivateAddress) {
|
|
|
20
20
|
async function getDocumentLoader$1({ userAgent, allowPrivateAddress = false } = {}) {
|
|
21
21
|
const cacheKey = `${userAgent ?? ""}:${allowPrivateAddress}`;
|
|
22
22
|
if (documentLoaders[cacheKey]) return documentLoaders[cacheKey];
|
|
23
|
+
const kv = await getKvStore();
|
|
23
24
|
return documentLoaders[cacheKey] = kvCache({
|
|
24
|
-
kv
|
|
25
|
+
kv,
|
|
25
26
|
prefix: getDocumentLoaderCachePrefix(userAgent, allowPrivateAddress),
|
|
26
27
|
rules: [
|
|
27
28
|
[new URLPattern({
|
|
@@ -59,4 +60,4 @@ function getContextLoader(options = {}) {
|
|
|
59
60
|
return getDocumentLoader$1(options);
|
|
60
61
|
}
|
|
61
62
|
//#endregion
|
|
62
|
-
export { getContextLoader, getDocumentLoader$1 as getDocumentLoader };
|
|
63
|
+
export { getContextLoader, getDocumentLoader$1 as getDocumentLoader, getDocumentLoaderCachePrefix };
|
package/dist/imagerenderer.js
CHANGED
package/dist/log.js
CHANGED
package/dist/lookup/command.js
CHANGED
|
@@ -118,4 +118,4 @@ The arguments can be either URLs or actor handles (e.g., ${"@username@domain"}),
|
|
|
118
118
|
};
|
|
119
119
|
command("lookup", lookupOptions, lookupMetadata);
|
|
120
120
|
//#endregion
|
|
121
|
-
export { FEDIBIRD_QUOTE_IRI, IN_REPLY_TO_IRI, MISSKEY_QUOTE_IRI, QUOTE_IRI, QUOTE_URL_IRI, authorizedFetchOption, lookupMetadata, lookupOptions };
|
|
121
|
+
export { FEDIBIRD_QUOTE_IRI, IN_REPLY_TO_IRI, MISSKEY_QUOTE_IRI, QUOTE_IRI, QUOTE_URL_IRI, authorizedFetchOption, lookupMetadata, lookupOptions, recurseProperties };
|
package/dist/lookup.js
CHANGED
|
@@ -707,4 +707,4 @@ async function runLookup(command, deps = {}) {
|
|
|
707
707
|
if (success && command.output) spinner.succeed(`Successfully wrote output to ${colors.green(command.output)}.`);
|
|
708
708
|
}
|
|
709
709
|
//#endregion
|
|
710
|
-
export { runLookup };
|
|
710
|
+
export { RecursiveLookupError, TimeoutError, clearTimeoutSignal, collectAsyncItems, collectRecursiveObjects, createTimeoutSignal, getLookupFailureHint, getPrivateUrlCandidate, getRecursiveTargetId, runLookup, shouldPrintLookupFailureHint, shouldSuggestSuppressErrorsForLookupFailure, toPresentationOrder, writeObjectToStream, writeSeparator };
|
package/dist/nodeinfo.js
CHANGED
|
@@ -142,7 +142,9 @@ async function runNodeInfo(command) {
|
|
|
142
142
|
if (images.length < 1) throw new Error("No images found in the ICO file.");
|
|
143
143
|
buffer = images[0].buffer;
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
const image = await readImage(buffer);
|
|
146
|
+
const colorSupport = checkTerminalColorSupport();
|
|
147
|
+
layout = getAsciiArt(image, DEFAULT_IMAGE_WIDTH, colorSupport, colors).split("\n").map((line) => ` ${line} `);
|
|
146
148
|
defaultWidth = 41;
|
|
147
149
|
} else {
|
|
148
150
|
logger.error("Failed to fetch the favicon: {status} {statusText}", {
|
|
@@ -227,8 +229,9 @@ async function getFaviconUrl(url, userAgent) {
|
|
|
227
229
|
if (w < 38 || h < 19) continue;
|
|
228
230
|
}
|
|
229
231
|
if ("href" in attrs) {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
const parsedUrl = new URL(attrs.href, response.url);
|
|
233
|
+
if (parsedUrl.pathname.toLowerCase().endsWith(".svg")) continue;
|
|
234
|
+
return parsedUrl;
|
|
232
235
|
}
|
|
233
236
|
}
|
|
234
237
|
return new URL("/favicon.ico", response.url);
|
|
@@ -299,7 +302,8 @@ function getAsciiArt(image, width = DEFAULT_IMAGE_WIDTH, colorSupport, colors) {
|
|
|
299
302
|
continue;
|
|
300
303
|
}
|
|
301
304
|
const brightness = (color.r + color.g + color.b) / 3;
|
|
302
|
-
const
|
|
305
|
+
const charIndex = Math.round(brightness / 255 * 72);
|
|
306
|
+
const char = ASCII_CHARS[charIndex];
|
|
303
307
|
if (colorSupport === "truecolor") art += colors.rgb(color.r, color.g, color.b)(char);
|
|
304
308
|
else if (colorSupport === "256color") {
|
|
305
309
|
const colorIndex = rgbTo256Color(color.r, color.g, color.b);
|
|
@@ -311,4 +315,4 @@ function getAsciiArt(image, width = DEFAULT_IMAGE_WIDTH, colorSupport, colors) {
|
|
|
311
315
|
return art;
|
|
312
316
|
}
|
|
313
317
|
//#endregion
|
|
314
|
-
export { Jimp, nodeInfoMetadata, nodeInfoOptions, runNodeInfo };
|
|
318
|
+
export { Jimp, getAsciiArt, getFaviconUrl, nodeInfoMetadata, nodeInfoOptions, readImage, rgbTo256Color, runNodeInfo };
|
package/dist/options.js
CHANGED
|
@@ -65,4 +65,4 @@ const globalOptions = merge("Global options", debugOption, withDefault(or(object
|
|
|
65
65
|
configPath: void 0
|
|
66
66
|
}));
|
|
67
67
|
//#endregion
|
|
68
|
-
export { createTunnelOption, createTunnelServiceOption, globalOptions, userAgentOption };
|
|
68
|
+
export { TUNNEL_SERVICES, createTunnelOption, createTunnelServiceOption, debugOption, globalOptions, userAgentOption };
|
package/dist/runner.js
CHANGED
package/dist/tunnelservice.js
CHANGED
|
@@ -37,4 +37,4 @@ const TUNNEL_SERVICE_REGISTRY = {
|
|
|
37
37
|
*/
|
|
38
38
|
const TUNNEL_SERVICE_NAMES = Object.freeze(Object.keys(TUNNEL_SERVICE_REGISTRY));
|
|
39
39
|
//#endregion
|
|
40
|
-
export { TUNNEL_SERVICE_NAMES, TUNNEL_SERVICE_REGISTRY };
|
|
40
|
+
export { FEDIFY_TUNNEL_SERVICE, TUNNEL_SERVICE_NAMES, TUNNEL_SERVICE_REGISTRY };
|
package/dist/webfinger/action.js
CHANGED
package/dist/webfinger/lib.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/cli",
|
|
3
|
-
"version": "2.4.0-dev.
|
|
3
|
+
"version": "2.4.0-dev.1727+1eadcb04",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"README.md",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@cfworker/json-schema": "^4.1.1",
|
|
58
|
-
"@fxts/core": "^1.
|
|
58
|
+
"@fxts/core": "^1.21.1",
|
|
59
59
|
"@optique/config": "^1.1.0",
|
|
60
60
|
"@optique/core": "^1.1.0",
|
|
61
61
|
"@optique/discover": "^1.1.0",
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"temporal-polyfill": "^1.0.1",
|
|
89
89
|
"valibot": "^1.4.0",
|
|
90
90
|
"yaml": "^2.9.0",
|
|
91
|
-
"@fedify/fedify": "2.4.0-dev.
|
|
92
|
-
"@fedify/
|
|
93
|
-
"@fedify/
|
|
94
|
-
"@fedify/
|
|
95
|
-
"@fedify/
|
|
96
|
-
"@fedify/vocab-tools": "2.4.0-dev.
|
|
97
|
-
"@fedify/webfinger": "2.4.0-dev.
|
|
98
|
-
"@fedify/
|
|
91
|
+
"@fedify/fedify": "2.4.0-dev.1727+1eadcb04",
|
|
92
|
+
"@fedify/relay": "2.4.0-dev.1727+1eadcb04",
|
|
93
|
+
"@fedify/sqlite": "2.4.0-dev.1727+1eadcb04",
|
|
94
|
+
"@fedify/vocab-runtime": "2.4.0-dev.1727+1eadcb04",
|
|
95
|
+
"@fedify/init": "2.4.0-dev.1727+1eadcb04",
|
|
96
|
+
"@fedify/vocab-tools": "2.4.0-dev.1727+1eadcb04",
|
|
97
|
+
"@fedify/webfinger": "2.4.0-dev.1727+1eadcb04",
|
|
98
|
+
"@fedify/vocab": "2.4.0-dev.1727+1eadcb04"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@types/bun": "^1.2.23",
|