@fedify/cli 2.0.0-pr.458.1788 → 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
package/dist/deno.js
CHANGED
|
@@ -8,12 +8,12 @@ import { message } from "@optique/core/message";
|
|
|
8
8
|
import process from "node:process";
|
|
9
9
|
|
|
10
10
|
//#region src/generate-vocab/action.ts
|
|
11
|
-
async function runGenerateVocab({
|
|
12
|
-
if (!(await stat(
|
|
13
|
-
printError(message`${
|
|
11
|
+
async function runGenerateVocab({ schemaDir, generatedPath }) {
|
|
12
|
+
if (!(await stat(schemaDir)).isDirectory()) {
|
|
13
|
+
printError(message`${schemaDir} is not a directory.`);
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
|
-
await generateVocab(
|
|
16
|
+
await generateVocab(schemaDir, generatedPath);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
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
|
|
9
|
-
const generatedPath = option("-o", "--output", path({ metavar: "
|
|
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
|
-
|
|
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.
|
|
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",
|
|
@@ -71,9 +71,10 @@
|
|
|
71
71
|
"ora": "^8.2.0",
|
|
72
72
|
"shiki": "^1.6.4",
|
|
73
73
|
"srvx": "^0.8.7",
|
|
74
|
-
"@fedify/
|
|
75
|
-
"@fedify/
|
|
76
|
-
"@fedify/
|
|
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",
|
|
@@ -6,12 +6,12 @@ import process from "node:process";
|
|
|
6
6
|
import type { GenerateVocabCommand } from "./command.ts";
|
|
7
7
|
|
|
8
8
|
export default async function runGenerateVocab(
|
|
9
|
-
{
|
|
9
|
+
{ schemaDir, generatedPath }: GenerateVocabCommand,
|
|
10
10
|
) {
|
|
11
|
-
if (!(await stat(
|
|
12
|
-
printError(message`${
|
|
11
|
+
if (!(await stat(schemaDir)).isDirectory()) {
|
|
12
|
+
printError(message`${schemaDir} is not a directory.`);
|
|
13
13
|
process.exit(1);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
await generateVocab(
|
|
16
|
+
await generateVocab(schemaDir, generatedPath);
|
|
17
17
|
}
|
|
@@ -8,22 +8,22 @@ import {
|
|
|
8
8
|
} from "@optique/core";
|
|
9
9
|
import { path } from "@optique/run";
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const schemaDir = option(
|
|
12
12
|
"-i",
|
|
13
13
|
"--input",
|
|
14
|
-
path({ metavar: "
|
|
14
|
+
path({ metavar: "DIR" }),
|
|
15
15
|
);
|
|
16
16
|
const generatedPath = option(
|
|
17
17
|
"-o",
|
|
18
18
|
"--output",
|
|
19
|
-
path({ metavar: "
|
|
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
|
-
|
|
26
|
+
schemaDir,
|
|
27
27
|
generatedPath,
|
|
28
28
|
}),
|
|
29
29
|
{
|