@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.
@@ -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 };
@@ -32,4 +32,4 @@ async function generateActorKeys(standards) {
32
32
  };
33
33
  }
34
34
  //#endregion
35
- export { generateActorKeys };
35
+ export { generateActorKeys, needsEd25519, needsRsa };
@@ -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 };
@@ -64,4 +64,4 @@ function selectInbox(discovered, mode) {
64
64
  return discovered.sharedInbox ?? discovered.personalInbox;
65
65
  }
66
66
  //#endregion
67
- export { discoverInbox, selectInbox };
67
+ export { DiscoveryError, discoverInbox, selectInbox };
@@ -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: "https://json-schema.fedify.dev/bench/report-v1.json",
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 };
@@ -94,4 +94,4 @@ function classifyIpv6(host) {
94
94
  return "public";
95
95
  }
96
96
  //#endregion
97
- export { classifyResolvedTarget };
97
+ export { classifyResolvedTarget, classifyTarget, defaultResolveTargetAddresses };
@@ -66,4 +66,4 @@ function suiteTarget(raw) {
66
66
  }
67
67
  }
68
68
  //#endregion
69
- export { loadSuiteFile, renderSuiteTemplates };
69
+ export { loadSuiteFile, parseSuiteText, renderSuiteTemplates };
@@ -122,4 +122,4 @@ function resolveDuration(value, fallback) {
122
122
  return value == null ? fallback : parseDuration(value);
123
123
  }
124
124
  //#endregion
125
- export { normalizeSuite };
125
+ export { SuiteNormalizeError, normalizeSuite };
@@ -52,7 +52,7 @@ const FANOUT_METRICS = [
52
52
  "queueDrain.p95",
53
53
  "queueDrain.p99"
54
54
  ];
55
- const MIXED_METRICS = [...new Set([...INBOX_METRICS, ...FANOUT_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 };
@@ -241,4 +241,4 @@ function mergeErrors(measurements) {
241
241
  return [...buckets.values()].sort((a, b) => b.count - a.count);
242
242
  }
243
243
  //#endregion
244
- export { mixedRunner };
244
+ export { createLimiter, mergeMeasurements, mixedRunner };
@@ -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",
@@ -36,4 +36,4 @@ function runnerFor(type) {
36
36
  }
37
37
  }
38
38
  //#endregion
39
- export { runnerFor };
39
+ export { IMPLEMENTED_SCENARIO_TYPES, runnerFor };
@@ -115,4 +115,4 @@ function resolveAdvertiseHost(host) {
115
115
  };
116
116
  }
117
117
  //#endregion
118
- export { resolveAdvertiseHost, spawnSyntheticServer };
118
+ export { AdvertiseHostError, resolveAdvertiseHost, spawnSyntheticServer };
@@ -131,4 +131,4 @@ function delay() {
131
131
  return new Promise((resolve) => setTimeout(resolve, 1));
132
132
  }
133
133
  //#endregion
134
- export { createSigningPipeline };
134
+ export { PipelineClosedError, createSigningPipeline };
@@ -87,4 +87,4 @@ function generateLorem(size) {
87
87
  return out;
88
88
  }
89
89
  //#endregion
90
- export { isGenerateDirective, resolveGenerate };
90
+ export { isGenerateDirective, parseSize, resolveGenerate };
@@ -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
- let currentCacheDir = getDefaultCacheDir();
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
- * Config context for use with bindConfig().
91
+ * Schema for the complete configuration file.
92
92
  */
93
- const configContext = createConfigContext({ schema: object$1({
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
@@ -1,5 +1,5 @@
1
1
  import "temporal-polyfill";
2
2
  //#region deno.json
3
- var version = "2.4.0-dev.1668+90797b01";
3
+ var version = "2.4.0-dev.1727+1eadcb04";
4
4
  //#endregion
5
5
  export { version };
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: await getKvStore(),
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 };
@@ -137,4 +137,4 @@ async function renderImages(imageUrls) {
137
137
  }
138
138
  }
139
139
  //#endregion
140
- export { renderImages };
140
+ export { detectTerminalCapabilities, downloadImage, renderImageITerm2, renderImageKitty, renderImages };
package/dist/log.js CHANGED
@@ -79,4 +79,4 @@ async function configureLogging() {
79
79
  });
80
80
  }
81
81
  //#endregion
82
- export { configureLogging, recordingSink };
82
+ export { configureLogging, getRecordingSink, logFile, recordingSink };
@@ -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
- layout = getAsciiArt(await readImage(buffer), DEFAULT_IMAGE_WIDTH, checkTerminalColorSupport(), colors).split("\n").map((line) => ` ${line} `);
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
- if (attrs.href.endsWith(".svg")) continue;
231
- return new URL(attrs.href, response.url);
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 char = ASCII_CHARS[Math.round(brightness / 255 * 72)];
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
@@ -118,4 +118,4 @@ async function parseCliProgram(args) {
118
118
  return toCliProgram(await run(runnableCommand, getRunOptions(args)));
119
119
  }
120
120
  //#endregion
121
- export { parseCliProgram };
121
+ export { loadConfig, parseCliProgram, toCliProgram };
@@ -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 };
@@ -35,4 +35,4 @@ function spinnerWrapper(func) {
35
35
  };
36
36
  }
37
37
  //#endregion
38
- export { runWebFinger as default };
38
+ export { runWebFinger as default, lookupSingleWebFinger };
@@ -37,4 +37,4 @@ function convertHandleToUrl(handle) {
37
37
  return toAcctUrl(handle) ?? new InvalidHandleError(handle).throw();
38
38
  }
39
39
  //#endregion
40
- export { convertUrlIfHandle };
40
+ export { convertHandleToUrl, convertUrlIfHandle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.4.0-dev.1668+90797b01",
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.20.0",
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.1668+90797b01",
92
- "@fedify/sqlite": "2.4.0-dev.1668+90797b01",
93
- "@fedify/vocab": "2.4.0-dev.1668+90797b01",
94
- "@fedify/init": "2.4.0-dev.1668+90797b01",
95
- "@fedify/vocab-runtime": "2.4.0-dev.1668+90797b01",
96
- "@fedify/vocab-tools": "2.4.0-dev.1668+90797b01",
97
- "@fedify/webfinger": "2.4.0-dev.1668+90797b01",
98
- "@fedify/relay": "2.4.0-dev.1668+90797b01"
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",