@clidoc/core 0.1.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/schema.js ADDED
@@ -0,0 +1,393 @@
1
+ // Exact OpenCLI 1.0.0-alpha.14 schema, vendored from upstream/opencli/spec.schema.json.
2
+ export const schema = {
3
+ $schema: 'https://json-schema.org/draft/2020-12/schema',
4
+ $id: 'github.com/bcdxn/opencli/blob/1.0.0-alpha.14/spec.schema.json',
5
+ title: 'OpenCLI Specification',
6
+ description: 'This is the root object of an OpenCLI Specification-compliant document.',
7
+ type: 'object',
8
+ properties: {
9
+ opencliVersion: {
10
+ type: 'string',
11
+ description: 'This property MUST be the exact version number of the OpenCLI Specification that this OpenCLI Document uses. The opencli field SHOULD be used by tooling to interpret the OpenCLI Document. This field is not related to the CLI `info.version` string.',
12
+ enum: ['1.0.0-alpha.14'],
13
+ },
14
+ info: { $ref: '#/$defs/InfoObject' },
15
+ install: {
16
+ type: 'array',
17
+ description: 'The installation methods available for the CLI.',
18
+ items: { $ref: '#/$defs/InstallMethodItemObject' },
19
+ },
20
+ global: { $ref: '#/$defs/GlobalObject' },
21
+ commands: {
22
+ type: 'object',
23
+ description: 'The commands available for the CLI. Each key should contain the full command starting with the CLI binary name (e.g.: `$.info.binary`)',
24
+ patternProperties: { '^.*$': { $ref: '#/$defs/CommandItemObject' } },
25
+ },
26
+ },
27
+ patternProperties: { '^x-': {} },
28
+ required: ['opencliVersion', 'info'],
29
+ additionalProperties: false,
30
+ $defs: {
31
+ InfoObject: {
32
+ type: 'object',
33
+ description: 'Provides metadata about the CLI. This metadata is used for generating help output and documentation.',
34
+ properties: {
35
+ title: {
36
+ type: 'string',
37
+ description: 'The title of the CLI. This will appear in generated help output and documentation.',
38
+ },
39
+ summary: {
40
+ type: 'string',
41
+ description: 'A short summary of the CLI. This will appear in generated help output and documentation in addition to the description. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
42
+ },
43
+ description: {
44
+ type: 'string',
45
+ description: 'A longer description of the CLI. This will appear in generated help output and documentation in addition to the summary. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
46
+ },
47
+ license: { $ref: '#/$defs/LicenseObject' },
48
+ contact: { $ref: '#/$defs/ContactObject' },
49
+ binary: {
50
+ type: 'string',
51
+ description: 'The name of the CLI binary. This is the name that will be used to invoke the CLI from the command line.',
52
+ },
53
+ version: {
54
+ type: 'string',
55
+ description: 'The version of the OpenCLI Document which typically corresponds to the release version of your CLI.',
56
+ },
57
+ },
58
+ patternProperties: { '^x-': {} },
59
+ required: ['title', 'binary', 'version'],
60
+ additionalProperties: false,
61
+ },
62
+ LicenseObject: {
63
+ type: 'object',
64
+ description: 'Describes the license used by the CLI.',
65
+ properties: {
66
+ name: { type: 'string', description: 'The name of the license used by the CLI.' },
67
+ spdxId: {
68
+ type: 'string',
69
+ description: 'The [SPDX identifier](https://spdx.org/licenses/) of the license used by the CLI.',
70
+ },
71
+ url: { type: 'string', format: 'uri', description: 'A URL to the license used by the CLI.' },
72
+ },
73
+ patternProperties: { '^x-': {} },
74
+ required: ['name'],
75
+ additionalProperties: false,
76
+ },
77
+ ContactObject: {
78
+ type: 'object',
79
+ description: 'Contact information for the CLI.',
80
+ properties: {
81
+ name: { type: 'string', description: 'The name of the contact person/organization.' },
82
+ email: {
83
+ type: 'string',
84
+ format: 'email',
85
+ description: 'The email address of the contact person/organization.',
86
+ },
87
+ url: { type: 'string', format: 'uri', description: 'A URL pointing to the contact information.' },
88
+ },
89
+ anyOf: [{ required: ['name'] }, { required: ['email'] }, { required: ['url'] }],
90
+ patternProperties: { '^x-': {} },
91
+ additionalProperties: false,
92
+ },
93
+ InstallMethodItemObject: {
94
+ type: 'object',
95
+ description: 'An installation method for the CLI.',
96
+ properties: {
97
+ name: {
98
+ type: 'string',
99
+ description: 'The name of the installation method.',
100
+ examples: ['homebrew', 'apt', 'chocolatey', 'binary', 'source'],
101
+ },
102
+ command: { type: 'string', description: 'The command to install the CLI.' },
103
+ url: { type: 'string', format: 'uri', description: 'A URL pointing to the binary or source code.' },
104
+ description: {
105
+ type: 'string',
106
+ description: 'The description for the installation method. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
107
+ },
108
+ },
109
+ anyOf: [{ required: ['name', 'command'] }, { required: ['name', 'url'] }],
110
+ patternProperties: { '^x-': {} },
111
+ additionalProperties: false,
112
+ },
113
+ GlobalObject: {
114
+ type: 'object',
115
+ description: 'properties that apply to all commands',
116
+ properties: {
117
+ exitCodes: {
118
+ type: 'array',
119
+ description: 'The list of possible error codes that the CLI can return. Command-specific exit codes can be defined at the command-level.',
120
+ items: { $ref: '#/$defs/ExitCodeObject' },
121
+ },
122
+ config: {
123
+ type: 'object',
124
+ description: 'An object where each property key is a supported file format and each property value is the path to a config file of that format; the defined paths are the expected locations of those config iles. Once defined, `alternativeSourced` referenced elsewhere in the OpenCLI Spec Document ca use the `$FILE` type.',
125
+ properties: { json: { type: 'string' }, toml: { type: 'string' }, yaml: { type: 'string' } },
126
+ patternProperties: { '^x-': {} },
127
+ additionalProperties: false,
128
+ minProperties: 1,
129
+ },
130
+ flags: { type: 'array', items: { $ref: '#/$defs/FlagItemObject' } },
131
+ },
132
+ patternProperties: { '^x-': {} },
133
+ },
134
+ CommandItemObject: {
135
+ type: 'object',
136
+ description: 'Describes a command for the CLI.',
137
+ properties: {
138
+ summary: {
139
+ type: 'string',
140
+ description: 'A short summary of the command. This will appear in generated help output and documentation in addition to the description. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
141
+ },
142
+ description: {
143
+ type: 'string',
144
+ description: 'A longer description of the command. This will appear in generated help output and documentation in addition to the summary. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
145
+ },
146
+ aliases: {
147
+ type: 'array',
148
+ description: 'Alternative names for a given command, e.g. `list` could be aliases with a shorter version like `ls`',
149
+ items: { type: 'string' },
150
+ },
151
+ args: {
152
+ type: 'array',
153
+ description: 'The positional arguments available for the command. The order in which the arguments are defined is the order in which they should be provided to the command.',
154
+ items: { $ref: '#/$defs/ArgumentItemObject' },
155
+ },
156
+ flags: {
157
+ type: 'array',
158
+ description: 'The flags available for the command. Flags can be provided in any order.',
159
+ items: { $ref: '#/$defs/FlagItemObject' },
160
+ },
161
+ hidden: {
162
+ type: 'boolean',
163
+ description: 'Determines if the command is hidden from generated help output and documentation. Note that the command is still documented in the OpenCLI document itself and so you should not include anything sensitive. Typically developer helper functions or alternative testing commands may be hidden.',
164
+ default: false,
165
+ },
166
+ kind: {
167
+ type: 'string',
168
+ description: 'The kind of command determines if the command is runnable (action) or not (group). `group` commands act as logical groupings of related commands, e.g. the `pet` in `petstore pet add` and `petstore pet update`.',
169
+ enum: ['action', 'group'],
170
+ default: 'action',
171
+ },
172
+ exitCodes: { type: 'array', items: { $ref: '#/$defs/ExitCodeObject' } },
173
+ examples: {
174
+ type: 'array',
175
+ items: {
176
+ type: 'object',
177
+ properties: {
178
+ title: { type: 'string', description: 'A short description of the example' },
179
+ content: {
180
+ type: 'string',
181
+ description: 'The content to be displayed in the example, typically a sample command line invocation with parameters.',
182
+ },
183
+ },
184
+ patternProperties: { '^x-': {} },
185
+ required: ['content'],
186
+ additionalProperties: false,
187
+ },
188
+ },
189
+ },
190
+ patternProperties: { '^x-': {} },
191
+ additionalProperties: false,
192
+ },
193
+ ArgumentItemObject: {
194
+ type: 'object',
195
+ description: 'A positional argument for a command.',
196
+ properties: {
197
+ name: { type: 'string', description: 'The name of the argument.' },
198
+ type: {
199
+ description: 'The type of the argument. Codegen tools MAY use this field to coerce argument types before passing them to the command handler implementations.',
200
+ $ref: '#/$defs/Type',
201
+ },
202
+ variadic: {
203
+ type: 'boolean',
204
+ description: 'Indicates if the the argument value is variadic. Multiple values for variadic argumuments can be supplied. A variadic argument must be the last argument declared and only one variadic argument may be declared.',
205
+ default: false,
206
+ },
207
+ minItems: {
208
+ type: 'integer',
209
+ description: 'The minimum number of items the variadic argument must receive. Only applicable when variadic is true.',
210
+ minimum: 0,
211
+ },
212
+ maxItems: {
213
+ type: 'integer',
214
+ description: 'The maximum number of items the variadic argument may receive. Only applicable when variadic is true.',
215
+ minimum: 0,
216
+ },
217
+ choices: {
218
+ type: 'array',
219
+ description: 'The enumerated choices available for the argument. Codegen tools MAY enforce this enumeration before passing them to the command handler implementations. This will appear in generated help output and documentation. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
220
+ items: {
221
+ type: 'object',
222
+ properties: {
223
+ value: { type: ['string', 'number', 'integer', 'boolean'], description: 'The value of the choice.' },
224
+ description: {
225
+ type: 'string',
226
+ description: 'A description of the choice. This will appear in generated documentation',
227
+ },
228
+ },
229
+ patternProperties: { '^x-': {} },
230
+ required: ['value'],
231
+ additionalProperties: false,
232
+ },
233
+ },
234
+ summary: {
235
+ type: 'string',
236
+ description: 'A short summary of the argument. This will appear in generated help output and documentation in addition to the description. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
237
+ },
238
+ description: {
239
+ type: 'string',
240
+ description: 'A description of the argument. This will appear in generated help output and documentation in addition to the summary. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
241
+ },
242
+ required: {
243
+ type: 'boolean',
244
+ description: 'Determines if the argument is mandatory. If required arguments are not supplied, the command will exit in error.',
245
+ default: false,
246
+ },
247
+ passthrough: {
248
+ description: 'Arguments specified after the standard POSIX double dash (`--`) convention used to signal the end of options/flags. Passthrough arguments follow the `--` are treated strictly as a positional arguments, even if it starts with a hyphen (e.g., -f or --verbose). Typically these are literally passed-through to an underlying tool call.',
249
+ type: 'boolean',
250
+ default: false,
251
+ },
252
+ },
253
+ patternProperties: { '^x-': {} },
254
+ required: ['name'],
255
+ additionalProperties: false,
256
+ },
257
+ FlagItemObject: {
258
+ type: 'object',
259
+ description: 'A flag for a command.',
260
+ properties: {
261
+ name: { type: 'string', description: 'The name of the flag.' },
262
+ aliases: { type: 'array', description: 'The single character short flag.', items: { type: 'string' } },
263
+ type: {
264
+ description: 'The type of the flag. Codegen tools WILL use this field to coerce flag types before passing them to the command handler implementations.',
265
+ $ref: '#/$defs/Type',
266
+ },
267
+ variadic: {
268
+ type: 'boolean',
269
+ description: 'Indicates if the the flag value is variadic. Variadic flags can be supplied multiple times. e.g.: `--flag value --flag value_two --flag value_three`',
270
+ default: false,
271
+ },
272
+ minItems: {
273
+ type: 'integer',
274
+ description: 'The minimum number of items the variadic flag must receive. Only applicable when variadic is true.',
275
+ minimum: 0,
276
+ },
277
+ maxItems: {
278
+ type: 'integer',
279
+ description: 'The maximum number of items the variadic flag may receive. Only applicable when variadic is true.',
280
+ minimum: 0,
281
+ },
282
+ choices: {
283
+ type: 'array',
284
+ description: 'The enumerated choices available for the flag. If the flag is not one of the choices, the command will exit in error.',
285
+ items: {
286
+ type: 'object',
287
+ properties: {
288
+ value: { type: ['string', 'number', 'integer', 'boolean'], description: 'The value of the choice.' },
289
+ description: {
290
+ type: 'string',
291
+ description: 'A description of the choice. This will appear in generated documentation',
292
+ },
293
+ },
294
+ patternProperties: { '^x-': {} },
295
+ required: ['value'],
296
+ additionalProperties: false,
297
+ },
298
+ },
299
+ hint: {
300
+ type: 'string',
301
+ description: 'A hint to the user about the value of the flag. This will appear in generated help output and documentation.',
302
+ },
303
+ summary: {
304
+ type: 'string',
305
+ description: 'A short summary of the flag. This will appear in generated help output and documentation in addition to the description. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
306
+ },
307
+ description: {
308
+ type: 'string',
309
+ description: 'A description of the flag. This will appear in generated help output and documentation in addition to the summary. [Markdown](https://spec.commonmark.org) may be used for rich text representation.',
310
+ },
311
+ required: {
312
+ type: 'boolean',
313
+ description: 'Determines if the flag is mandatory. If required flags are not supplied, the command will exit in error.',
314
+ default: false,
315
+ },
316
+ default: {
317
+ description: 'default is the default value the flag will take if it is not provided in the command line. It can be a constant or it can be sourced from the environment or a file. If sourced, resolution will be attempted from each source in the order it is defined, stopping once a value is found or the sources have been exhausted.',
318
+ oneOf: [{ type: 'string' }, { type: 'number' }, { type: 'boolean' }],
319
+ },
320
+ alternativeSources: {
321
+ description: 'The possible sources of the default value; order is important as it determines the order of resolution.',
322
+ type: 'array',
323
+ items: { $ref: '#/$defs/AlternativeSource' },
324
+ minItems: 1,
325
+ },
326
+ hidden: {
327
+ type: 'boolean',
328
+ description: 'Determines if the flag is hidden from generated help output and documentation.',
329
+ default: false,
330
+ },
331
+ },
332
+ patternProperties: { '^x-': {} },
333
+ required: ['name', 'type'],
334
+ additionalProperties: false,
335
+ },
336
+ AlternativeSource: {
337
+ type: 'object',
338
+ description: 'A source for a parameter value that is not stdin, e.g. environment variables or a property within a specified config file.',
339
+ properties: {
340
+ type: {
341
+ description: 'The name of the source; it can be `$ENV` indicating the property is sourced from an environment variable OR $FILE, indicating the property is sourced from a config file defined in the global.configFiles section of the document.',
342
+ type: 'string',
343
+ enum: ['$ENV', '$FILE'],
344
+ },
345
+ property: {
346
+ description: 'The variable name within the environment or JSON path to the property in the config file.',
347
+ type: 'string',
348
+ },
349
+ },
350
+ patternProperties: { '^x-': {} },
351
+ required: ['type', 'property'],
352
+ additionalProperties: false,
353
+ },
354
+ ExitCodeObject: {
355
+ type: 'object',
356
+ description: 'The exit code returned by the CLI upon termination to report its execution status.',
357
+ properties: {
358
+ code: {
359
+ type: 'integer',
360
+ description: 'The literal code that is returned by the CLI to the operating system and/or parent process indicating status. Non-zero codes indicate an error.',
361
+ },
362
+ status: {
363
+ type: 'string',
364
+ description: 'The enumerated exit code categories. These help the users quickly understand the scope of the error.',
365
+ enum: [
366
+ 'BAD_USER_INPUT_ERROR',
367
+ 'UNAUTHENTICATED_ERROR',
368
+ 'UNAUTHORIZED_ERROR',
369
+ 'CANCELED_ERROR',
370
+ 'INTERNAL_CLI_ERROR',
371
+ 'NOT_IMPLEMENTED_ERROR',
372
+ 'OK',
373
+ ],
374
+ },
375
+ summary: { type: 'string', description: 'A brief, one-line summary of the exit code.' },
376
+ description: {
377
+ type: 'string',
378
+ description: 'A detailed description of the exit code; can include expected side effects or triage steps.',
379
+ },
380
+ },
381
+ patternProperties: { '^x-': {} },
382
+ required: ['code', 'status', 'summary'],
383
+ additionalProperties: false,
384
+ },
385
+ Type: {
386
+ type: 'string',
387
+ description: 'The types available to specify for arguments and flags.',
388
+ enum: ['string', 'number', 'integer', 'boolean'],
389
+ default: 'string',
390
+ },
391
+ },
392
+ };
393
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,+DAA+D;IACpE,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,yEAAyE;IACtF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,yPAAyP;YAC3P,IAAI,EAAE,CAAC,gBAAgB,CAAC;SACzB;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE;QACpC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,iDAAiD;YAC9D,KAAK,EAAE,EAAE,IAAI,EAAE,iCAAiC,EAAE;SACnD;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;QACxC,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,wIAAwI;YAC1I,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE,EAAE;SACrE;KACF;IACD,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAChC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACpC,oBAAoB,EAAE,KAAK;IAC3B,KAAK,EAAE;QACL,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;YACxG,UAAU,EAAE;gBACV,KAAK,EAAE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AC5B;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oFAAoF;YACjG,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,iJAAiJ;iBACpJ;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sGAAsG;oBACxG,IAAI,EAAE;wBACJ,sBAAsB;wBACtB,uBAAuB;wBACvB,oBAAoB;wBACpB,gBAAgB;wBAChB,oBAAoB;wBACpB,uBAAuB;wBACvB,IAAI;qBACL;iBACF;gBACD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6CAA6C,EAAE;gBACvF,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6FAA6F;iBAC3G;aACF;YACD,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC;YACvC,oBAAoB,EAAE,KAAK;SAC5B;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;YACtE,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;YAChD,OAAO,EAAE,QAAQ;SAClB;KACF;CACF,CAAC"}
@@ -0,0 +1,131 @@
1
+ /** Vendor-aligned TypeScript representation of OpenCLI 1.0.0-alpha.14. */
2
+ /** Vendor extension keys permitted throughout an OpenCLI document. */
3
+ export type ExtensionProperties = {
4
+ [key: `x-${string}`]: unknown;
5
+ };
6
+ /** Primitive value types supported by CLI arguments and flags. */
7
+ export type ValueType = 'string' | 'number' | 'integer' | 'boolean';
8
+ /** One allowed value and its optional user-facing description. */
9
+ export type ChoiceObject = ExtensionProperties & {
10
+ value: string | number | boolean;
11
+ description?: string;
12
+ };
13
+ /** License metadata for a described CLI. */
14
+ export type LicenseObject = ExtensionProperties & {
15
+ name: string;
16
+ spdxId?: string;
17
+ url?: string;
18
+ };
19
+ /** A maintainer contact with at least one contact method. */
20
+ export type ContactObject = ExtensionProperties & ({
21
+ name: string;
22
+ email?: string;
23
+ url?: string;
24
+ } | {
25
+ name?: string;
26
+ email: string;
27
+ url?: string;
28
+ } | {
29
+ name?: string;
30
+ email?: string;
31
+ url: string;
32
+ });
33
+ /** Identity and overview shown in generated documentation. */
34
+ export type InfoObject = ExtensionProperties & {
35
+ title: string;
36
+ binary: string;
37
+ version: string;
38
+ summary?: string;
39
+ description?: string;
40
+ license?: LicenseObject;
41
+ contact?: ContactObject;
42
+ };
43
+ /** A command or URL users can use to install the CLI. */
44
+ export type InstallMethodItemObject = ExtensionProperties & {
45
+ name: string;
46
+ description?: string;
47
+ } & ({
48
+ command: string;
49
+ url?: string;
50
+ } | {
51
+ command?: string;
52
+ url: string;
53
+ });
54
+ /** A process exit code with its OpenCLI status and explanation. */
55
+ export type ExitCodeObject = ExtensionProperties & {
56
+ code: number;
57
+ status: 'BAD_USER_INPUT_ERROR' | 'UNAUTHENTICATED_ERROR' | 'UNAUTHORIZED_ERROR' | 'CANCELED_ERROR' | 'INTERNAL_CLI_ERROR' | 'NOT_IMPLEMENTED_ERROR' | 'OK';
58
+ summary: string;
59
+ description?: string;
60
+ };
61
+ /** An environment variable or file that can supply a flag value. */
62
+ export type AlternativeSource = ExtensionProperties & {
63
+ type: '$ENV' | '$FILE';
64
+ property: string;
65
+ };
66
+ /** A positional command argument and its constraints. */
67
+ export type ArgumentItemObject = ExtensionProperties & {
68
+ name: string;
69
+ type?: ValueType;
70
+ variadic?: boolean;
71
+ minItems?: number;
72
+ maxItems?: number;
73
+ choices?: ChoiceObject[];
74
+ summary?: string;
75
+ description?: string;
76
+ required?: boolean;
77
+ passthrough?: boolean;
78
+ };
79
+ /** A named command option and its constraints. */
80
+ export type FlagItemObject = ExtensionProperties & {
81
+ name: string;
82
+ type: ValueType;
83
+ aliases?: string[];
84
+ variadic?: boolean;
85
+ minItems?: number;
86
+ maxItems?: number;
87
+ choices?: ChoiceObject[];
88
+ hint?: string;
89
+ summary?: string;
90
+ description?: string;
91
+ required?: boolean;
92
+ default?: string | number | boolean;
93
+ alternativeSources?: AlternativeSource[];
94
+ hidden?: boolean;
95
+ };
96
+ /** A runnable example for a command. */
97
+ export type CommandExampleObject = ExtensionProperties & {
98
+ title?: string;
99
+ content: string;
100
+ };
101
+ /** A command or command group, including arguments, flags, and examples. */
102
+ export type CommandItemObject = ExtensionProperties & {
103
+ summary?: string;
104
+ description?: string;
105
+ aliases?: string[];
106
+ args?: ArgumentItemObject[];
107
+ flags?: FlagItemObject[];
108
+ hidden?: boolean;
109
+ kind?: 'action' | 'group';
110
+ exitCodes?: ExitCodeObject[];
111
+ examples?: CommandExampleObject[];
112
+ };
113
+ /** Options and configuration shared by all commands. */
114
+ export type GlobalObject = ExtensionProperties & {
115
+ exitCodes?: ExitCodeObject[];
116
+ config?: ExtensionProperties & {
117
+ json?: string;
118
+ toml?: string;
119
+ yaml?: string;
120
+ };
121
+ flags?: FlagItemObject[];
122
+ };
123
+ /** The root OpenCLI document consumed by clidoc. */
124
+ export type OpenCliDocument = ExtensionProperties & {
125
+ opencliVersion: '1.0.0-alpha.14';
126
+ info: InfoObject;
127
+ install?: InstallMethodItemObject[];
128
+ global?: GlobalObject;
129
+ commands?: Record<string, CommandItemObject>;
130
+ };
131
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG;IAAE,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO,CAAA;CAAE,CAAC;AACpE,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AACpE,k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,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B,CAAC;AACF,oDAAoD;AACpD,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG;IAClD,cAAc,EAAE,gBAAgB,CAAC;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC9C,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@clidoc/core",
3
+ "version": "0.1.0",
4
+ "description": "OpenCLI specification types, validation, and Markdown documentation generation",
5
+ "keywords": [
6
+ "cli",
7
+ "docs",
8
+ "documentation",
9
+ "json-schema",
10
+ "markdown",
11
+ "opencli"
12
+ ],
13
+ "homepage": "https://clidoc.dev",
14
+ "bugs": {
15
+ "url": "https://github.com/bhouston/clidoc/issues"
16
+ },
17
+ "license": "MIT",
18
+ "author": "Ben Houston <ben@ben3d.ca> (https://ben3d.ca)",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/bhouston/clidoc.git",
22
+ "directory": "packages/core"
23
+ },
24
+ "files": [
25
+ "dist/**/*.js",
26
+ "dist/**/*.js.map",
27
+ "dist/**/*.d.ts",
28
+ "dist/**/*.d.ts.map",
29
+ "schema/spec.schema.json",
30
+ "src/**/*.ts",
31
+ "!src/**/*.test.ts",
32
+ "THIRD_PARTY_NOTICES.md",
33
+ "README.md",
34
+ "LICENSE",
35
+ "CHANGELOG.md"
36
+ ],
37
+ "type": "module",
38
+ "main": "./dist/index.js",
39
+ "types": "./dist/index.d.ts",
40
+ "exports": {
41
+ ".": {
42
+ "types": "./dist/index.d.ts",
43
+ "import": "./dist/index.js"
44
+ },
45
+ "./schema": "./schema/spec.schema.json"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "registry": "https://registry.npmjs.org/"
50
+ },
51
+ "scripts": {
52
+ "build": "tsc",
53
+ "tsc": "tsc && tsc -p tsconfig.type-tests.json"
54
+ },
55
+ "dependencies": {
56
+ "ajv": "^8.17.1",
57
+ "ajv-formats": "^3.0.1",
58
+ "yaml": "^2.8.1"
59
+ },
60
+ "engines": {
61
+ "node": ">=22.12.0"
62
+ }
63
+ }