@fedify/cli 2.3.0-dev.1214 → 2.3.0-dev.1258

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.
Files changed (61) hide show
  1. package/dist/bench/action.js +203 -0
  2. package/dist/bench/actor/documents.js +39 -0
  3. package/dist/bench/actor/fleet.js +39 -0
  4. package/dist/bench/actor/keys.js +35 -0
  5. package/dist/bench/command.js +42 -0
  6. package/dist/bench/discovery/discover.js +67 -0
  7. package/dist/bench/discovery/probe.js +50 -0
  8. package/dist/bench/load/arrival.js +27 -0
  9. package/dist/bench/load/clock.js +15 -0
  10. package/dist/bench/load/generator.js +112 -0
  11. package/dist/bench/metrics/aggregate.js +64 -0
  12. package/dist/bench/metrics/histogram.js +141 -0
  13. package/dist/bench/metrics/stats-client.js +154 -0
  14. package/dist/bench/mod.js +4 -0
  15. package/dist/bench/render/format.js +46 -0
  16. package/dist/bench/render/index.js +20 -0
  17. package/dist/bench/render/json.js +12 -0
  18. package/dist/bench/render/markdown.js +62 -0
  19. package/dist/bench/render/text.js +74 -0
  20. package/dist/bench/result/build.js +129 -0
  21. package/dist/bench/result/expect/assert.js +74 -0
  22. package/dist/bench/result/expect/evaluate.js +128 -0
  23. package/dist/bench/result/expect/metrics.js +34 -0
  24. package/dist/bench/result/schema.js +15 -0
  25. package/dist/bench/safety/gate.js +54 -0
  26. package/dist/bench/safety/tiers.js +41 -0
  27. package/dist/bench/scenario/coerce.js +24 -0
  28. package/dist/bench/scenario/errors.js +36 -0
  29. package/dist/bench/scenario/load.js +69 -0
  30. package/dist/bench/scenario/normalize.js +126 -0
  31. package/dist/bench/scenario/schema.js +358 -0
  32. package/dist/bench/scenario/units.js +56 -0
  33. package/dist/bench/scenario/validate.js +29 -0
  34. package/dist/bench/scenarios/inbox.js +155 -0
  35. package/dist/bench/scenarios/registry.js +21 -0
  36. package/dist/bench/scenarios/runner.js +76 -0
  37. package/dist/bench/scenarios/webfinger.js +44 -0
  38. package/dist/bench/server/synthetic.js +118 -0
  39. package/dist/bench/signing/activity-id.js +18 -0
  40. package/dist/bench/signing/pipeline.js +134 -0
  41. package/dist/bench/signing/signer.js +39 -0
  42. package/dist/bench/template/generate.js +90 -0
  43. package/dist/bench/template/helpers.js +19 -0
  44. package/dist/bench/template/template.js +132 -0
  45. package/dist/cache.js +1 -1
  46. package/dist/config.js +14 -2
  47. package/dist/deno.js +1 -1
  48. package/dist/generate-vocab/action.js +3 -3
  49. package/dist/generate-vocab/command.js +1 -1
  50. package/dist/imagerenderer.js +1 -1
  51. package/dist/inbox.js +1 -1
  52. package/dist/lookup.js +34 -34
  53. package/dist/mod.js +3 -0
  54. package/dist/nodeinfo.js +6 -6
  55. package/dist/options.js +1 -1
  56. package/dist/runner.js +9 -8
  57. package/dist/tempserver.js +1 -1
  58. package/dist/tunnel.js +2 -2
  59. package/dist/utils.js +3 -2
  60. package/dist/webfinger/action.js +2 -2
  61. package/package.json +12 -10
package/dist/runner.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import "@js-temporal/polyfill";
2
- import generateVocabCommand from "./generate-vocab/command.js";
3
- import "./generate-vocab/mod.js";
4
2
  import { version } from "./deno.js";
5
- import { initCommand } from "./init/mod.js";
6
3
  import { configContext, tryLoadToml } from "./config.js";
7
4
  import { globalOptions } from "./options.js";
5
+ import { benchCommand } from "./bench/command.js";
6
+ import generateVocabCommand from "./generate-vocab/command.js";
7
+ import "./generate-vocab/mod.js";
8
+ import { initCommand } from "./init/mod.js";
8
9
  import { nodeInfoCommand } from "./nodeinfo.js";
9
10
  import { lookupCommand } from "./lookup.js";
10
11
  import { inboxCommand } from "./inbox/command.js";
@@ -12,14 +13,14 @@ import { relayCommand } from "./relay/command.js";
12
13
  import { tunnelCommand } from "./tunnel.js";
13
14
  import { webFingerCommand } from "./webfinger/command.js";
14
15
  import "./webfinger/mod.js";
15
- import { printError, run } from "@optique/run";
16
16
  import process from "node:process";
17
+ import { homedir } from "node:os";
17
18
  import { group, merge, message, or } from "@optique/core";
18
- import { join } from "node:path";
19
- import { merge as merge$1 } from "es-toolkit";
19
+ import { printError, run } from "@optique/run";
20
20
  import { readFileSync } from "node:fs";
21
21
  import { parse } from "smol-toml";
22
- import { homedir } from "node:os";
22
+ import { join } from "node:path";
23
+ import { merge as merge$1 } from "es-toolkit";
23
24
  //#region src/runner.ts
24
25
  /**
25
26
  * Returns the system-wide configuration file paths.
@@ -39,7 +40,7 @@ function getUserConfigPath() {
39
40
  if (process.platform === "win32") return join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), "fedify", "config.toml");
40
41
  return join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "fedify", "config.toml");
41
42
  }
42
- const command$1 = merge(or(group("Generating code", or(initCommand, generateVocabCommand)), group("ActivityPub tools", or(webFingerCommand, lookupCommand, inboxCommand, nodeInfoCommand, relayCommand)), group("Network tools", tunnelCommand)), globalOptions);
43
+ const command$1 = merge(or(group("Generating code", or(initCommand, generateVocabCommand)), group("ActivityPub tools", or(webFingerCommand, lookupCommand, inboxCommand, nodeInfoCommand, relayCommand, benchCommand)), group("Network tools", tunnelCommand)), globalOptions);
43
44
  function loadConfig(parsed) {
44
45
  if (parsed.ignoreConfig) return void 0;
45
46
  const system = getSystemConfigPaths().map(tryLoadToml).reduce((acc, config) => merge$1(acc, config), {});
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import { getLogger } from "@logtape/logtape";
3
- import { openTunnel } from "@hongminhee/localtunnel";
4
3
  import { serve } from "srvx";
4
+ import { openTunnel } from "@hongminhee/localtunnel";
5
5
  //#region src/tempserver.ts
6
6
  const logger = getLogger([
7
7
  "fedify",
package/dist/tunnel.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
- import { configureLogging } from "./log.js";
3
2
  import { createTunnelServiceOption } from "./options.js";
4
- import { print, printError } from "@optique/run";
3
+ import { configureLogging } from "./log.js";
5
4
  import process from "node:process";
6
5
  import { argument, command, constant, integer, merge, message, object } from "@optique/core";
6
+ import { print, printError } from "@optique/run";
7
7
  import ora from "ora";
8
8
  import { openTunnel } from "@hongminhee/localtunnel";
9
9
  //#region src/tunnel.ts
package/dist/utils.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
- import { print, printError } from "@optique/run";
2
+ import "node:fs/promises";
3
3
  import process from "node:process";
4
- import { message } from "@optique/core";
5
4
  import { getActorHandle } from "@fedify/vocab";
5
+ import { message } from "@optique/core";
6
+ import { print, printError } from "@optique/run";
6
7
  import util from "node:util";
7
8
  import "@fxts/core";
8
9
  import { Chalk } from "chalk";
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
- import { formatObject } from "../utils.js";
3
2
  import { NotFoundError, getErrorMessage } from "./error.js";
4
3
  import { convertUrlIfHandle } from "./lib.js";
5
- import { formatMessage, message } from "@optique/core/message";
4
+ import { formatObject } from "../utils.js";
6
5
  import { print } from "@optique/run";
6
+ import { formatMessage, message } from "@optique/core/message";
7
7
  import ora from "ora";
8
8
  import { lookupWebFinger } from "@fedify/webfinger";
9
9
  //#region src/webfinger/action.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.3.0-dev.1214+0f808ac3",
3
+ "version": "2.3.0-dev.1258+a2a67992",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "README.md",
@@ -57,6 +57,7 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
+ "@cfworker/json-schema": "^4.1.1",
60
61
  "@fxts/core": "^1.20.0",
61
62
  "@optique/config": "^1.0.2",
62
63
  "@optique/core": "^1.0.2",
@@ -87,14 +88,15 @@
87
88
  "smol-toml": "^1.6.1",
88
89
  "srvx": "^0.8.7",
89
90
  "valibot": "^1.4.0",
90
- "@fedify/init": "2.3.0-dev.1214+0f808ac3",
91
- "@fedify/sqlite": "2.3.0-dev.1214+0f808ac3",
92
- "@fedify/vocab": "2.3.0-dev.1214+0f808ac3",
93
- "@fedify/relay": "2.3.0-dev.1214+0f808ac3",
94
- "@fedify/vocab-runtime": "2.3.0-dev.1214+0f808ac3",
95
- "@fedify/fedify": "2.3.0-dev.1214+0f808ac3",
96
- "@fedify/vocab-tools": "2.3.0-dev.1214+0f808ac3",
97
- "@fedify/webfinger": "2.3.0-dev.1214+0f808ac3"
91
+ "yaml": "^2.9.0",
92
+ "@fedify/fedify": "2.3.0-dev.1258+a2a67992",
93
+ "@fedify/init": "2.3.0-dev.1258+a2a67992",
94
+ "@fedify/relay": "2.3.0-dev.1258+a2a67992",
95
+ "@fedify/sqlite": "2.3.0-dev.1258+a2a67992",
96
+ "@fedify/webfinger": "2.3.0-dev.1258+a2a67992",
97
+ "@fedify/vocab-tools": "2.3.0-dev.1258+a2a67992",
98
+ "@fedify/vocab": "2.3.0-dev.1258+a2a67992",
99
+ "@fedify/vocab-runtime": "2.3.0-dev.1258+a2a67992"
98
100
  },
99
101
  "devDependencies": {
100
102
  "@types/bun": "^1.2.23",
@@ -110,7 +112,7 @@
110
112
  "test": "node --test --experimental-transform-types 'src/**/*.test.ts' '!src/init/test/**'",
111
113
  "test-init": "deno task test-init",
112
114
  "pretest:bun": "pnpm build",
113
- "test:bun": "bun test",
115
+ "test:bun": "bun test --timeout 60000",
114
116
  "run": "pnpm build && node --disable-warning=ExperimentalWarning dist/mod.js",
115
117
  "runi": "tsdown && node --disable-warning=ExperimentalWarning dist/mod.js",
116
118
  "run:bun": "pnpm build && bun dist/mod.js",