@outfitter/cli 0.4.1 → 0.5.0
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/actions.d.ts +2 -0
- package/dist/actions.js +11 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +11 -0
- package/dist/shared/@outfitter/cli-g0sn0r0b.js +319 -0
- package/dist/shared/@outfitter/cli-n1k0d23k.d.ts +33 -0
- package/package.json +11 -3
package/dist/actions.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SchemaCommandOptions } from "./shared/@outfitter/cli-n1k0d23k";
|
|
1
2
|
import { ActionRegistry, ActionSurface, AnyActionSpec, HandlerContext } from "@outfitter/contracts";
|
|
2
3
|
import { Command } from "commander";
|
|
3
4
|
interface BuildCliCommandsOptions {
|
|
@@ -7,6 +8,7 @@ interface BuildCliCommandsOptions {
|
|
|
7
8
|
flags: Record<string, unknown>;
|
|
8
9
|
}) => HandlerContext;
|
|
9
10
|
readonly includeSurfaces?: readonly ActionSurface[];
|
|
11
|
+
readonly schema?: boolean | SchemaCommandOptions;
|
|
10
12
|
}
|
|
11
13
|
type ActionSource = ActionRegistry | readonly AnyActionSpec[];
|
|
12
14
|
declare function buildCliCommands(source: ActionSource, options?: BuildCliCommandsOptions): Command[];
|
package/dist/actions.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
createSchemaCommand
|
|
4
|
+
} from "./shared/@outfitter/cli-g0sn0r0b.js";
|
|
5
|
+
|
|
2
6
|
// packages/cli/src/actions.ts
|
|
3
7
|
import {
|
|
4
8
|
createContext as createHandlerContext,
|
|
@@ -163,6 +167,13 @@ function buildCliCommands(source, options = {}) {
|
|
|
163
167
|
}
|
|
164
168
|
commands.push(groupCommand);
|
|
165
169
|
}
|
|
170
|
+
if (options.schema !== false) {
|
|
171
|
+
const hasSchemaCommand = commands.some((cmd) => cmd.name() === "schema");
|
|
172
|
+
if (!hasSchemaCommand) {
|
|
173
|
+
const schemaOptions = typeof options.schema === "object" ? options.schema : undefined;
|
|
174
|
+
commands.push(createSchemaCommand(source, schemaOptions));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
166
177
|
return commands;
|
|
167
178
|
}
|
|
168
179
|
function isActionRegistry(source) {
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ActionManifest, ActionManifestEntry, ActionSource, GenerateManifestOptions, SchemaCommandOptions, SurfaceCommandOptions, createSchemaCommand, formatManifestHuman, generateManifest } from "./shared/@outfitter/cli-n1k0d23k";
|
|
2
|
+
export { generateManifest, formatManifestHuman, createSchemaCommand, SurfaceCommandOptions, SchemaCommandOptions, GenerateManifestOptions, ActionSource, ActionManifestEntry, ActionManifest };
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/cli/src/schema.ts
|
|
3
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
4
|
+
import { dirname, join } from "path";
|
|
5
|
+
import {
|
|
6
|
+
diffSurfaceMaps,
|
|
7
|
+
formatManifestMarkdown,
|
|
8
|
+
generateManifest,
|
|
9
|
+
generateSurfaceMap,
|
|
10
|
+
readSurfaceMap,
|
|
11
|
+
resolveSnapshotPath,
|
|
12
|
+
writeSurfaceMap
|
|
13
|
+
} from "@outfitter/schema";
|
|
14
|
+
import { Command } from "commander";
|
|
15
|
+
import { generateManifest as generateManifest2 } from "@outfitter/schema";
|
|
16
|
+
function formatManifestHuman(manifest, programName, actionId) {
|
|
17
|
+
if (actionId) {
|
|
18
|
+
return formatActionDetail(manifest, actionId);
|
|
19
|
+
}
|
|
20
|
+
return formatSummary(manifest, programName);
|
|
21
|
+
}
|
|
22
|
+
function formatSummary(manifest, programName) {
|
|
23
|
+
const lines = [];
|
|
24
|
+
const name = programName ?? "cli";
|
|
25
|
+
const actionCount = manifest.actions.length;
|
|
26
|
+
const surfaceCount = manifest.surfaces.length;
|
|
27
|
+
const surfaceLabel = surfaceCount === 1 ? `${surfaceCount} surface` : `${surfaceCount} surfaces`;
|
|
28
|
+
lines.push(`${name} \u2014 ${actionCount} actions across ${surfaceLabel}`);
|
|
29
|
+
lines.push("");
|
|
30
|
+
const grouped = new Map;
|
|
31
|
+
const ungrouped = [];
|
|
32
|
+
for (const action of manifest.actions) {
|
|
33
|
+
const group = action.cli?.group;
|
|
34
|
+
if (group) {
|
|
35
|
+
const existing = grouped.get(group) ?? [];
|
|
36
|
+
existing.push(action);
|
|
37
|
+
grouped.set(group, existing);
|
|
38
|
+
} else {
|
|
39
|
+
ungrouped.push(action);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
for (const [groupName, groupActions] of grouped.entries()) {
|
|
43
|
+
lines.push(groupName);
|
|
44
|
+
for (const action of groupActions) {
|
|
45
|
+
const commandPart = action.cli?.command ?? action.id;
|
|
46
|
+
const isBase = !commandPart || commandPart.startsWith("[") || commandPart.startsWith("<");
|
|
47
|
+
const displayCommand = isBase ? ` ${groupName} ${commandPart ?? ""}`.trimEnd() : ` ${groupName} ${commandPart}`;
|
|
48
|
+
const desc = action.cli?.description ?? action.description ?? "";
|
|
49
|
+
lines.push(padCommand(displayCommand, desc));
|
|
50
|
+
}
|
|
51
|
+
lines.push("");
|
|
52
|
+
}
|
|
53
|
+
for (const action of ungrouped) {
|
|
54
|
+
const commandPart = action.cli?.command ?? action.id;
|
|
55
|
+
const desc = action.cli?.description ?? action.description ?? "";
|
|
56
|
+
lines.push(padCommand(`${commandPart}`, desc));
|
|
57
|
+
}
|
|
58
|
+
lines.push("");
|
|
59
|
+
lines.push("Use --output json for machine-readable format.");
|
|
60
|
+
lines.push("Use --surface <name> to filter (cli, mcp, api, server).");
|
|
61
|
+
return lines.join(`
|
|
62
|
+
`);
|
|
63
|
+
}
|
|
64
|
+
function padCommand(command, description) {
|
|
65
|
+
const padding = Math.max(1, 32 - command.length);
|
|
66
|
+
return `${command}${" ".repeat(padding)}${description}`;
|
|
67
|
+
}
|
|
68
|
+
function formatActionDetail(manifest, actionId) {
|
|
69
|
+
const entry = manifest.actions.find((a) => a.id === actionId);
|
|
70
|
+
if (!entry) {
|
|
71
|
+
return `Unknown action: ${actionId}`;
|
|
72
|
+
}
|
|
73
|
+
const lines = [];
|
|
74
|
+
const desc = entry.cli?.description ?? entry.description ?? "";
|
|
75
|
+
lines.push(`${entry.id} \u2014 ${desc}`);
|
|
76
|
+
lines.push("");
|
|
77
|
+
if (entry.cli) {
|
|
78
|
+
const group = entry.cli.group;
|
|
79
|
+
const commandPart = entry.cli.command ?? entry.id;
|
|
80
|
+
const fullCommand = group ? `${group} ${commandPart}` : commandPart;
|
|
81
|
+
lines.push(` Command: ${fullCommand}`);
|
|
82
|
+
}
|
|
83
|
+
lines.push(` Surfaces: ${entry.surfaces.join(", ")}`);
|
|
84
|
+
if (entry.cli?.group) {
|
|
85
|
+
lines.push(` Group: ${entry.cli.group}`);
|
|
86
|
+
}
|
|
87
|
+
if (entry.cli?.aliases && entry.cli.aliases.length > 0) {
|
|
88
|
+
lines.push(` Aliases: ${entry.cli.aliases.join(", ")}`);
|
|
89
|
+
}
|
|
90
|
+
if (entry.cli?.options && entry.cli.options.length > 0) {
|
|
91
|
+
lines.push("");
|
|
92
|
+
lines.push(" Options:");
|
|
93
|
+
for (const opt of entry.cli.options) {
|
|
94
|
+
const defaultStr = opt.defaultValue !== undefined ? ` [${String(opt.defaultValue)}]` : "";
|
|
95
|
+
lines.push(padCommand(` ${opt.flags}`, `${opt.description}${defaultStr}`));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (entry.mcp) {
|
|
99
|
+
lines.push("");
|
|
100
|
+
lines.push(" MCP:");
|
|
101
|
+
if (entry.mcp.tool) {
|
|
102
|
+
lines.push(` Tool: ${entry.mcp.tool}`);
|
|
103
|
+
}
|
|
104
|
+
if (entry.mcp.description) {
|
|
105
|
+
lines.push(` Description: ${entry.mcp.description}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return lines.join(`
|
|
109
|
+
`);
|
|
110
|
+
}
|
|
111
|
+
function handleShow(source, programName, parentCmd, actionArg, cmdOptions) {
|
|
112
|
+
const manifestOptions = {};
|
|
113
|
+
if (cmdOptions.surface) {
|
|
114
|
+
manifestOptions.surface = cmdOptions.surface;
|
|
115
|
+
}
|
|
116
|
+
const manifest = generateManifest(source, manifestOptions);
|
|
117
|
+
if (cmdOptions.output === "json") {
|
|
118
|
+
const indent = cmdOptions.pretty ? 2 : undefined;
|
|
119
|
+
if (actionArg) {
|
|
120
|
+
const entry = manifest.actions.find((a) => a.id === actionArg);
|
|
121
|
+
if (!entry) {
|
|
122
|
+
process.stderr.write(`Unknown action: ${actionArg}
|
|
123
|
+
`);
|
|
124
|
+
process.exitCode = 1;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
process.stdout.write(`${JSON.stringify(entry, null, indent)}
|
|
128
|
+
`);
|
|
129
|
+
} else {
|
|
130
|
+
process.stdout.write(`${JSON.stringify(manifest, null, indent)}
|
|
131
|
+
`);
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const resolvedName = programName ?? parentCmd.parent?.name() ?? undefined;
|
|
136
|
+
const output = formatManifestHuman(manifest, resolvedName, actionArg);
|
|
137
|
+
process.stdout.write(`${output}
|
|
138
|
+
`);
|
|
139
|
+
}
|
|
140
|
+
function createSchemaCommand(source, options) {
|
|
141
|
+
const cmd = new Command("schema").description("Show CLI schema for machine or human consumption").argument("[action]", "Show detail for a specific action").option("--output <mode>", "Output mode (human, json)", "human").option("--surface <name>", "Filter by surface (cli, mcp, api, server)").option("--pretty", "Pretty-print JSON output").action((actionArg, cmdOptions) => {
|
|
142
|
+
handleShow(source, options?.programName, cmd, actionArg, cmdOptions);
|
|
143
|
+
});
|
|
144
|
+
const showCmd = new Command("show").description("Show schema for all actions or a specific action").argument("[action]", "Show detail for a specific action").option("--output <mode>", "Output mode (human, json)", "human").option("--surface <name>", "Filter by surface (cli, mcp, api, server)").option("--pretty", "Pretty-print JSON output").action((actionArg, cmdOptions) => {
|
|
145
|
+
handleShow(source, options?.programName, cmd, actionArg, cmdOptions);
|
|
146
|
+
});
|
|
147
|
+
cmd.addCommand(showCmd);
|
|
148
|
+
if (options?.surface) {
|
|
149
|
+
const surfaceOpts = options.surface;
|
|
150
|
+
const cwd = surfaceOpts.cwd ?? process.cwd();
|
|
151
|
+
const outputDir = surfaceOpts.outputDir ?? ".outfitter";
|
|
152
|
+
const generateCmd = new Command("generate").description("Generate surface map and write to disk").option("--dry-run", "Print surface map without writing to disk").option("--snapshot <version>", "Write snapshot to .outfitter/snapshots/<version>.json").action(async (genOptions) => {
|
|
153
|
+
const surfaceMap = generateSurfaceMap(source, {
|
|
154
|
+
generator: "build"
|
|
155
|
+
});
|
|
156
|
+
if (genOptions.dryRun) {
|
|
157
|
+
process.stdout.write(`${JSON.stringify(surfaceMap, null, 2)}
|
|
158
|
+
`);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (genOptions.snapshot) {
|
|
162
|
+
const snapshotPath = resolveSnapshotPath(cwd, outputDir, genOptions.snapshot);
|
|
163
|
+
await writeSurfaceMap(surfaceMap, snapshotPath);
|
|
164
|
+
process.stdout.write(`Snapshot written to ${snapshotPath}
|
|
165
|
+
`);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const outputPath = join(cwd, outputDir, "surface.json");
|
|
169
|
+
await writeSurfaceMap(surfaceMap, outputPath);
|
|
170
|
+
process.stdout.write(`Surface map written to ${outputPath}
|
|
171
|
+
`);
|
|
172
|
+
});
|
|
173
|
+
cmd.addCommand(generateCmd);
|
|
174
|
+
const diffCmd = new Command("diff").description("Compare runtime schema against committed surface map").option("--output <mode>", "Output mode (human, json)", "human").option("--against <version>", "Compare runtime against a named snapshot").option("--from <version>", "Base snapshot for snapshot-to-snapshot diff").option("--to <version>", "Target snapshot for snapshot-to-snapshot diff").action(async (diffOptions) => {
|
|
175
|
+
let left;
|
|
176
|
+
let right;
|
|
177
|
+
if (diffOptions.from && !diffOptions.to || !diffOptions.from && diffOptions.to) {
|
|
178
|
+
process.stderr.write(`Both --from and --to are required for snapshot-to-snapshot diff.
|
|
179
|
+
`);
|
|
180
|
+
process.exitCode = 1;
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (diffOptions.from && diffOptions.to) {
|
|
184
|
+
const fromPath = resolveSnapshotPath(cwd, outputDir, diffOptions.from);
|
|
185
|
+
const toPath = resolveSnapshotPath(cwd, outputDir, diffOptions.to);
|
|
186
|
+
try {
|
|
187
|
+
left = await readSurfaceMap(fromPath);
|
|
188
|
+
} catch (err) {
|
|
189
|
+
if (err.code === "ENOENT") {
|
|
190
|
+
process.stderr.write(`No snapshot at ${fromPath}
|
|
191
|
+
`);
|
|
192
|
+
} else {
|
|
193
|
+
process.stderr.write(`Failed to read snapshot at ${fromPath}: ${err instanceof Error ? err.message : String(err)}
|
|
194
|
+
`);
|
|
195
|
+
}
|
|
196
|
+
process.exitCode = 1;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
try {
|
|
200
|
+
right = await readSurfaceMap(toPath);
|
|
201
|
+
} catch (err) {
|
|
202
|
+
if (err.code === "ENOENT") {
|
|
203
|
+
process.stderr.write(`No snapshot at ${toPath}
|
|
204
|
+
`);
|
|
205
|
+
} else {
|
|
206
|
+
process.stderr.write(`Failed to read snapshot at ${toPath}: ${err instanceof Error ? err.message : String(err)}
|
|
207
|
+
`);
|
|
208
|
+
}
|
|
209
|
+
process.exitCode = 1;
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
} else if (diffOptions.against) {
|
|
213
|
+
const snapshotPath = resolveSnapshotPath(cwd, outputDir, diffOptions.against);
|
|
214
|
+
try {
|
|
215
|
+
left = await readSurfaceMap(snapshotPath);
|
|
216
|
+
} catch (err) {
|
|
217
|
+
if (err.code === "ENOENT") {
|
|
218
|
+
process.stderr.write(`No snapshot at ${snapshotPath}
|
|
219
|
+
`);
|
|
220
|
+
} else {
|
|
221
|
+
process.stderr.write(`Failed to read snapshot at ${snapshotPath}: ${err instanceof Error ? err.message : String(err)}
|
|
222
|
+
`);
|
|
223
|
+
}
|
|
224
|
+
process.exitCode = 1;
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
right = generateSurfaceMap(source, { generator: "runtime" });
|
|
228
|
+
} else {
|
|
229
|
+
const surfacePath = join(cwd, outputDir, "surface.json");
|
|
230
|
+
try {
|
|
231
|
+
left = await readSurfaceMap(surfacePath);
|
|
232
|
+
} catch (err) {
|
|
233
|
+
if (err.code === "ENOENT") {
|
|
234
|
+
process.stderr.write(`No committed surface map at ${surfacePath}
|
|
235
|
+
`);
|
|
236
|
+
process.stderr.write(`Run 'schema generate' first.
|
|
237
|
+
`);
|
|
238
|
+
} else {
|
|
239
|
+
process.stderr.write(`Failed to read surface map at ${surfacePath}: ${err instanceof Error ? err.message : String(err)}
|
|
240
|
+
`);
|
|
241
|
+
}
|
|
242
|
+
process.exitCode = 1;
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
right = generateSurfaceMap(source, { generator: "runtime" });
|
|
246
|
+
}
|
|
247
|
+
const result = diffSurfaceMaps(left, right);
|
|
248
|
+
if (diffOptions.output === "json") {
|
|
249
|
+
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
250
|
+
`);
|
|
251
|
+
} else {
|
|
252
|
+
if (!result.hasChanges) {
|
|
253
|
+
process.stdout.write(`No schema drift detected.
|
|
254
|
+
`);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const lines = [];
|
|
258
|
+
lines.push(`Schema drift detected:
|
|
259
|
+
`);
|
|
260
|
+
if (result.added.length > 0) {
|
|
261
|
+
lines.push(" Added:");
|
|
262
|
+
for (const entry of result.added) {
|
|
263
|
+
lines.push(` + ${entry.id}`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (result.removed.length > 0) {
|
|
267
|
+
lines.push(" Removed:");
|
|
268
|
+
for (const entry of result.removed) {
|
|
269
|
+
lines.push(` - ${entry.id}`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
if (result.modified.length > 0) {
|
|
273
|
+
lines.push(" Modified:");
|
|
274
|
+
for (const entry of result.modified) {
|
|
275
|
+
lines.push(` ~ ${entry.id} (${entry.changes.join(", ")})`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (result.metadataChanges.length > 0) {
|
|
279
|
+
lines.push(" Metadata:");
|
|
280
|
+
for (const field of result.metadataChanges) {
|
|
281
|
+
lines.push(` ~ ${field}`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
process.stdout.write(`${lines.join(`
|
|
285
|
+
`)}
|
|
286
|
+
`);
|
|
287
|
+
}
|
|
288
|
+
if (result.hasChanges) {
|
|
289
|
+
process.exitCode = 1;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
cmd.addCommand(diffCmd);
|
|
293
|
+
const docsCmd = new Command("docs").description("Generate markdown reference documentation").option("--surface <name>", "Which surface to document (cli, mcp)", "mcp").option("--output-dir <dir>", "Directory to write the reference doc", "docs/reference").option("--dry-run", "Print to stdout instead of writing to disk").action(async (docsOptions) => {
|
|
294
|
+
const surface = docsOptions.surface ?? "mcp";
|
|
295
|
+
if (surface !== "mcp" && surface !== "cli") {
|
|
296
|
+
process.stderr.write(`Unsupported surface for docs: "${surface}". Use "mcp" or "cli".
|
|
297
|
+
`);
|
|
298
|
+
process.exitCode = 1;
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const manifest = generateManifest(source, { surface });
|
|
302
|
+
const markdown = formatManifestMarkdown(manifest, { surface });
|
|
303
|
+
if (docsOptions.dryRun) {
|
|
304
|
+
process.stdout.write(markdown);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const outDir = docsOptions.outputDir ?? "docs/reference";
|
|
308
|
+
const outputPath = join(cwd, outDir, `${surface.toUpperCase()}_REFERENCE.md`);
|
|
309
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
310
|
+
await writeFile(outputPath, markdown, "utf-8");
|
|
311
|
+
process.stdout.write(`Reference written to ${outputPath}
|
|
312
|
+
`);
|
|
313
|
+
});
|
|
314
|
+
cmd.addCommand(docsCmd);
|
|
315
|
+
}
|
|
316
|
+
return cmd;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { formatManifestHuman, createSchemaCommand, generateManifest2 as generateManifest };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ActionManifest, ActionSource } from "@outfitter/schema";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { ActionManifest as ActionManifest2, ActionManifestEntry, ActionSource as ActionSource2, GenerateManifestOptions } from "@outfitter/schema";
|
|
4
|
+
import { generateManifest } from "@outfitter/schema";
|
|
5
|
+
interface SurfaceCommandOptions {
|
|
6
|
+
readonly cwd?: string;
|
|
7
|
+
readonly outputDir?: string;
|
|
8
|
+
}
|
|
9
|
+
interface SchemaCommandOptions {
|
|
10
|
+
readonly programName?: string;
|
|
11
|
+
readonly surface?: SurfaceCommandOptions;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Format a manifest for human-readable terminal output.
|
|
15
|
+
*
|
|
16
|
+
* @param manifest - The manifest to format
|
|
17
|
+
* @param programName - CLI program name (for header)
|
|
18
|
+
* @param actionId - If provided, show detail for this single action
|
|
19
|
+
* @returns Formatted string
|
|
20
|
+
*/
|
|
21
|
+
declare function formatManifestHuman(manifest: ActionManifest, programName?: string, actionId?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Create a `schema` command for CLI introspection.
|
|
24
|
+
*
|
|
25
|
+
* When `options.surface` is provided, adds `generate` and `diff` subcommands
|
|
26
|
+
* for surface map file I/O and drift detection.
|
|
27
|
+
*
|
|
28
|
+
* @param source - ActionRegistry or array of ActionSpec
|
|
29
|
+
* @param options - Command configuration
|
|
30
|
+
* @returns A Commander command instance
|
|
31
|
+
*/
|
|
32
|
+
declare function createSchemaCommand(source: ActionSource, options?: SchemaCommandOptions): Command;
|
|
33
|
+
export { SurfaceCommandOptions, SchemaCommandOptions, formatManifestHuman, createSchemaCommand, ActionManifest2 as ActionManifest, ActionManifestEntry, ActionSource2 as ActionSource, GenerateManifestOptions, generateManifest };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outfitter/cli",
|
|
3
3
|
"description": "Typed CLI runtime with terminal detection, rendering, output contracts, and input parsing",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -70,6 +70,12 @@
|
|
|
70
70
|
"default": "./dist/query.js"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
+
"./schema": {
|
|
74
|
+
"import": {
|
|
75
|
+
"types": "./dist/schema.d.ts",
|
|
76
|
+
"default": "./dist/schema.js"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
73
79
|
"./terminal": {
|
|
74
80
|
"import": {
|
|
75
81
|
"types": "./dist/terminal/index.d.ts",
|
|
@@ -119,12 +125,14 @@
|
|
|
119
125
|
"peerDependencies": {
|
|
120
126
|
"@outfitter/config": ">=0.3.0",
|
|
121
127
|
"@outfitter/contracts": ">=0.2.0",
|
|
128
|
+
"@outfitter/schema": ">=0.1.0",
|
|
122
129
|
"@outfitter/types": ">=0.2.0",
|
|
123
130
|
"zod": "^4.3.5"
|
|
124
131
|
},
|
|
125
132
|
"devDependencies": {
|
|
126
|
-
"@outfitter/config": "0.3.
|
|
127
|
-
"@outfitter/contracts": "0.
|
|
133
|
+
"@outfitter/config": "0.3.2",
|
|
134
|
+
"@outfitter/contracts": "0.4.0",
|
|
135
|
+
"@outfitter/schema": "0.2.0",
|
|
128
136
|
"@types/bun": "^1.3.7",
|
|
129
137
|
"@types/node": "^25.0.10",
|
|
130
138
|
"typescript": "^5.9.3"
|