@fedify/cli 2.0.0-pr.458.1785 → 2.0.0-pr.458.1791

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.0.0-pr.458.1785+f5e97597",
3
+ "version": "2.0.0-pr.458.1791+b05bfa06",
4
4
  "license": "MIT",
5
5
  "exports": "./src/mod.ts",
6
6
  "imports": {
package/dist/deno.js CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  //#region deno.json
5
5
  var name = "@fedify/cli";
6
- var version = "2.0.0-pr.458.1785+f5e97597";
6
+ var version = "2.0.0-pr.458.1791+b05bfa06";
7
7
  var license = "MIT";
8
8
  var exports = "./src/mod.ts";
9
9
  var imports = {
@@ -2,17 +2,18 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
 
4
4
  import { stat } from "node:fs/promises";
5
+ import { printError } from "@optique/run";
5
6
  import { generateVocab } from "@fedify/vocab-tools";
6
7
  import { message } from "@optique/core/message";
7
8
  import process from "node:process";
8
9
 
9
10
  //#region src/generate-vocab/action.ts
10
- async function runGenerateVocab({ schemaPath, generatedPath }) {
11
- if (!(await stat(schemaPath)).isDirectory()) {
12
- message`"error: ${schemaPath} is not a directory"`;
11
+ async function runGenerateVocab({ schemaDir, generatedPath }) {
12
+ if (!(await stat(schemaDir)).isDirectory()) {
13
+ printError(message`${schemaDir} is not a directory.`);
13
14
  process.exit(1);
14
15
  }
15
- await generateVocab(schemaPath, generatedPath);
16
+ await generateVocab(schemaDir, generatedPath);
16
17
  }
17
18
 
18
19
  //#endregion
@@ -5,11 +5,11 @@ import { command, constant, message, object, option } from "@optique/core";
5
5
  import { path } from "@optique/run";
6
6
 
7
7
  //#region src/generate-vocab/command.ts
8
- const schemaPath = option("-i", "--input", path({ metavar: "SCHEMA FILES PATH" }));
9
- const generatedPath = option("-o", "--output", path({ metavar: "GENERATED CODE PATH" }));
8
+ const schemaDir = option("-i", "--input", path({ metavar: "DIR" }));
9
+ const generatedPath = option("-o", "--output", path({ metavar: "PATH" }));
10
10
  const generateVocabCommand = command("generate-vocab", object({
11
11
  command: constant("generate-vocab"),
12
- schemaPath,
12
+ schemaDir,
13
13
  generatedPath
14
14
  }), { description: message`Generate Vocabulary Classes from Schema Files` });
15
15
  var command_default = generateVocabCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/cli",
3
- "version": "2.0.0-pr.458.1785+f5e97597",
3
+ "version": "2.0.0-pr.458.1791+b05bfa06",
4
4
  "description": "CLI toolchain for Fedify and debugging ActivityPub",
5
5
  "keywords": [
6
6
  "fedify",
@@ -61,7 +61,7 @@
61
61
  "cli-table3": "^0.6.5",
62
62
  "enquirer": "^2.4.1",
63
63
  "env-paths": "^3.0.0",
64
- "es-toolkit": "1.39.5",
64
+ "es-toolkit": "1.39.10",
65
65
  "fetch-mock": "^12.5.4",
66
66
  "hono": "^4.8.3",
67
67
  "icojs": "^0.19.5",
@@ -71,9 +71,10 @@
71
71
  "ora": "^8.2.0",
72
72
  "shiki": "^1.6.4",
73
73
  "srvx": "^0.8.7",
74
- "@fedify/sqlite": "2.0.0-pr.458.1785+f5e97597",
75
- "@fedify/vocab-runtime": "2.0.0-pr.458.1785+f5e97597",
76
- "@fedify/fedify": "2.0.0-pr.458.1785+f5e97597"
74
+ "@fedify/vocab-runtime": "2.0.0-pr.458.1791+b05bfa06",
75
+ "@fedify/fedify": "2.0.0-pr.458.1791+b05bfa06",
76
+ "@fedify/sqlite": "2.0.0-pr.458.1791+b05bfa06",
77
+ "@fedify/vocab-tools": "2.0.0-pr.458.1791+b05bfa06"
77
78
  },
78
79
  "devDependencies": {
79
80
  "@types/bun": "^1.2.23",
@@ -1,16 +1,17 @@
1
1
  import { generateVocab } from "@fedify/vocab-tools";
2
2
  import { message } from "@optique/core/message";
3
+ import { printError } from "@optique/run";
3
4
  import { stat } from "node:fs/promises";
4
5
  import process from "node:process";
5
6
  import type { GenerateVocabCommand } from "./command.ts";
6
7
 
7
8
  export default async function runGenerateVocab(
8
- { schemaPath, generatedPath }: GenerateVocabCommand,
9
+ { schemaDir, generatedPath }: GenerateVocabCommand,
9
10
  ) {
10
- if (!(await stat(schemaPath)).isDirectory()) {
11
- message`"error: ${schemaPath} is not a directory"`;
11
+ if (!(await stat(schemaDir)).isDirectory()) {
12
+ printError(message`${schemaDir} is not a directory.`);
12
13
  process.exit(1);
13
14
  }
14
15
 
15
- await generateVocab(schemaPath, generatedPath);
16
+ await generateVocab(schemaDir, generatedPath);
16
17
  }
@@ -8,22 +8,22 @@ import {
8
8
  } from "@optique/core";
9
9
  import { path } from "@optique/run";
10
10
 
11
- const schemaPath = option(
11
+ const schemaDir = option(
12
12
  "-i",
13
13
  "--input",
14
- path({ metavar: "SCHEMA FILES PATH" }),
14
+ path({ metavar: "DIR" }),
15
15
  );
16
16
  const generatedPath = option(
17
17
  "-o",
18
18
  "--output",
19
- path({ metavar: "GENERATED CODE PATH" }),
19
+ path({ metavar: "PATH" }),
20
20
  );
21
21
 
22
22
  const generateVocabCommand = command(
23
23
  "generate-vocab",
24
24
  object({
25
25
  command: constant("generate-vocab"),
26
- schemaPath,
26
+ schemaDir,
27
27
  generatedPath,
28
28
  }),
29
29
  {