@outfitter/cli 0.5.3 → 1.0.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.
Files changed (106) hide show
  1. package/README.md +105 -2
  2. package/dist/actions.d.ts +5 -2
  3. package/dist/actions.js +2 -2
  4. package/dist/cli.d.ts +1 -1
  5. package/dist/cli.js +8 -1
  6. package/dist/command.d.ts +3 -43
  7. package/dist/command.js +241 -13
  8. package/dist/envelope.d.ts +5 -0
  9. package/dist/envelope.js +160 -0
  10. package/dist/flags.d.ts +5 -189
  11. package/dist/flags.js +5 -1
  12. package/dist/hints.d.ts +34 -0
  13. package/dist/hints.js +26 -0
  14. package/dist/index.d.ts +3 -2
  15. package/dist/input.d.ts +3 -124
  16. package/dist/input.js +14 -359
  17. package/dist/internal/envelope-helpers.d.ts +4 -0
  18. package/dist/internal/envelope-helpers.js +24 -0
  19. package/dist/internal/envelope-types.d.ts +3 -0
  20. package/dist/internal/envelope-types.js +1 -0
  21. package/dist/internal/flag-builders.d.ts +3 -0
  22. package/dist/internal/flag-builders.js +155 -0
  23. package/dist/internal/flag-types.d.ts +3 -0
  24. package/dist/internal/flag-types.js +13 -0
  25. package/dist/internal/hint-action-graph.d.ts +5 -0
  26. package/dist/internal/hint-action-graph.js +11 -0
  27. package/dist/internal/hint-command-tree.d.ts +5 -0
  28. package/dist/internal/hint-command-tree.js +9 -0
  29. package/dist/internal/hint-error-recovery.d.ts +2 -0
  30. package/dist/internal/hint-error-recovery.js +7 -0
  31. package/dist/internal/hint-types.d.ts +4 -0
  32. package/dist/internal/hint-types.js +1 -0
  33. package/dist/internal/input-helpers.d.ts +18 -0
  34. package/dist/internal/input-helpers.js +11 -0
  35. package/dist/internal/input-normalization.d.ts +3 -0
  36. package/dist/internal/input-normalization.js +9 -0
  37. package/dist/internal/input-parsers.d.ts +3 -0
  38. package/dist/internal/input-parsers.js +19 -0
  39. package/dist/internal/input-security.d.ts +22 -0
  40. package/dist/internal/input-security.js +11 -0
  41. package/dist/internal/output-formatting.d.ts +3 -0
  42. package/dist/internal/output-formatting.js +21 -0
  43. package/dist/internal/presets.d.ts +3 -0
  44. package/dist/{shared/@outfitter/cli-pdb7znbq.js → internal/presets.js} +49 -223
  45. package/dist/internal/schema-commands.d.ts +3 -0
  46. package/dist/{shared/@outfitter/cli-5vtr4bdt.js → internal/schema-commands.js} +8 -99
  47. package/dist/internal/schema-formatting.d.ts +2 -0
  48. package/dist/internal/schema-formatting.js +7 -0
  49. package/dist/internal/schema-types.d.ts +2 -0
  50. package/dist/internal/schema-types.js +1 -0
  51. package/dist/output.d.ts +4 -3
  52. package/dist/output.js +13 -166
  53. package/dist/pagination.d.ts +1 -1
  54. package/dist/query.d.ts +84 -2
  55. package/dist/query.js +8 -45
  56. package/dist/schema-input.d.ts +80 -0
  57. package/dist/schema-input.js +15 -0
  58. package/dist/schema.d.ts +4 -1
  59. package/dist/schema.js +1 -1
  60. package/dist/shared/@outfitter/cli-10wxfc78.d.ts +45 -0
  61. package/dist/shared/@outfitter/cli-16wg5mka.d.ts +71 -0
  62. package/dist/shared/@outfitter/cli-1q5redaj.js +267 -0
  63. package/dist/shared/@outfitter/cli-2dfxs239.js +98 -0
  64. package/dist/shared/@outfitter/cli-30mt7c5w.d.ts +112 -0
  65. package/dist/shared/@outfitter/cli-3jta1h1h.js +134 -0
  66. package/dist/shared/@outfitter/cli-4h85mpth.js +76 -0
  67. package/dist/shared/@outfitter/cli-6shkwxdc.js +28 -0
  68. package/dist/shared/@outfitter/cli-89335n9a.js +16 -0
  69. package/dist/shared/@outfitter/cli-8999qjdd.js +3 -0
  70. package/dist/shared/@outfitter/cli-8cfxdady.js +60 -0
  71. package/dist/shared/@outfitter/cli-bcajqy33.d.ts +25 -0
  72. package/dist/shared/@outfitter/cli-c09332vm.d.ts +39 -0
  73. package/dist/shared/@outfitter/cli-cgha038c.d.ts +3 -0
  74. package/dist/shared/@outfitter/{cli-zahqsaby.js → cli-d40m2x1d.js} +19 -3
  75. package/dist/shared/@outfitter/cli-dg0cz7rw.js +127 -0
  76. package/dist/shared/@outfitter/cli-dv8kk4jw.d.ts +24 -0
  77. package/dist/shared/@outfitter/cli-g43887b7.js +20 -0
  78. package/dist/shared/@outfitter/cli-gqtkhgw4.js +52 -0
  79. package/dist/shared/@outfitter/cli-h4ejpmjs.d.ts +104 -0
  80. package/dist/shared/@outfitter/cli-htzez8v2.js +70 -0
  81. package/dist/shared/@outfitter/cli-hvg2m5gf.js +79 -0
  82. package/dist/shared/@outfitter/cli-n54zs151.d.ts +78 -0
  83. package/dist/shared/@outfitter/cli-nbpgw7z7.d.ts +15 -0
  84. package/dist/shared/@outfitter/cli-nkt399zf.d.ts +94 -0
  85. package/dist/shared/@outfitter/cli-pmd04gtv.d.ts +60 -0
  86. package/dist/shared/@outfitter/{cli-xy3gs50c.d.ts → cli-q6csxmeh.d.ts} +19 -12
  87. package/dist/shared/@outfitter/cli-qcskd96y.d.ts +11 -0
  88. package/dist/shared/@outfitter/cli-ry7btmy4.js +118 -0
  89. package/dist/shared/@outfitter/cli-sy99pjyj.js +32 -0
  90. package/dist/shared/@outfitter/cli-tm2fzngs.d.ts +23 -0
  91. package/dist/shared/@outfitter/cli-vvvhjwks.js +106 -0
  92. package/dist/shared/@outfitter/cli-wjv7g1aq.d.ts +16 -0
  93. package/dist/shared/@outfitter/{cli-98aa9104.d.ts → cli-x6qr7bnd.d.ts} +338 -16
  94. package/dist/shared/@outfitter/cli-xde45xcc.d.ts +53 -0
  95. package/dist/shared/@outfitter/cli-xw8ys1je.d.ts +123 -0
  96. package/dist/shared/@outfitter/cli-yfewnyc2.d.ts +43 -0
  97. package/dist/shared/@outfitter/cli-zkzj0q4q.js +99 -0
  98. package/dist/shared/@outfitter/cli-zv3ah6f0.js +3 -0
  99. package/dist/streaming.d.ts +47 -0
  100. package/dist/streaming.js +13 -0
  101. package/dist/truncation.d.ts +104 -0
  102. package/dist/truncation.js +111 -0
  103. package/dist/types.d.ts +2 -2
  104. package/dist/verbs.d.ts +1 -1
  105. package/package.json +55 -25
  106. package/dist/shared/@outfitter/cli-n1k0d23k.d.ts +0 -33
package/package.json CHANGED
@@ -1,28 +1,11 @@
1
1
  {
2
2
  "name": "@outfitter/cli",
3
- "version": "0.5.3",
4
3
  "description": "Typed CLI runtime with terminal detection, rendering, output contracts, and input parsing",
5
- "keywords": [
6
- "bun",
7
- "cli",
8
- "colors",
9
- "commander",
10
- "outfitter",
11
- "renderers",
12
- "terminal",
13
- "typescript"
14
- ],
15
- "license": "MIT",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/outfitter-dev/outfitter.git",
19
- "directory": "packages/cli"
20
- },
4
+ "version": "1.0.0",
5
+ "type": "module",
21
6
  "files": [
22
7
  "dist"
23
8
  ],
24
- "type": "module",
25
- "sideEffects": false,
26
9
  "module": "./dist/index.js",
27
10
  "types": "./dist/index.d.ts",
28
11
  "exports": {
@@ -56,12 +39,24 @@
56
39
  "default": "./dist/completion.js"
57
40
  }
58
41
  },
42
+ "./envelope": {
43
+ "import": {
44
+ "types": "./dist/envelope.d.ts",
45
+ "default": "./dist/envelope.js"
46
+ }
47
+ },
59
48
  "./flags": {
60
49
  "import": {
61
50
  "types": "./dist/flags.d.ts",
62
51
  "default": "./dist/flags.js"
63
52
  }
64
53
  },
54
+ "./hints": {
55
+ "import": {
56
+ "types": "./dist/hints.d.ts",
57
+ "default": "./dist/hints.js"
58
+ }
59
+ },
65
60
  "./input": {
66
61
  "import": {
67
62
  "types": "./dist/input.d.ts",
@@ -93,6 +88,18 @@
93
88
  "default": "./dist/schema.js"
94
89
  }
95
90
  },
91
+ "./schema-input": {
92
+ "import": {
93
+ "types": "./dist/schema-input.d.ts",
94
+ "default": "./dist/schema-input.js"
95
+ }
96
+ },
97
+ "./streaming": {
98
+ "import": {
99
+ "types": "./dist/streaming.d.ts",
100
+ "default": "./dist/streaming.js"
101
+ }
102
+ },
96
103
  "./terminal": {
97
104
  "import": {
98
105
  "types": "./dist/terminal/index.d.ts",
@@ -111,6 +118,12 @@
111
118
  "default": "./dist/text.js"
112
119
  }
113
120
  },
121
+ "./truncation": {
122
+ "import": {
123
+ "types": "./dist/truncation.d.ts",
124
+ "default": "./dist/truncation.js"
125
+ }
126
+ },
114
127
  "./types": {
115
128
  "import": {
116
129
  "types": "./dist/types.d.ts",
@@ -124,11 +137,28 @@
124
137
  }
125
138
  }
126
139
  },
140
+ "keywords": [
141
+ "bun",
142
+ "cli",
143
+ "colors",
144
+ "commander",
145
+ "outfitter",
146
+ "renderers",
147
+ "terminal",
148
+ "typescript"
149
+ ],
150
+ "license": "MIT",
151
+ "repository": {
152
+ "type": "git",
153
+ "url": "https://github.com/outfitter-dev/outfitter.git",
154
+ "directory": "packages/cli"
155
+ },
156
+ "sideEffects": false,
127
157
  "publishConfig": {
128
158
  "access": "public"
129
159
  },
130
160
  "scripts": {
131
- "build": "cd ../.. && bunup --filter @outfitter/cli",
161
+ "build": "cd ../.. && bash ./scripts/run-bunup-with-lock.sh bunup --filter @outfitter/cli",
132
162
  "test": "bun test",
133
163
  "test:watch": "bun test --watch",
134
164
  "lint": "oxlint ./src",
@@ -139,13 +169,12 @@
139
169
  },
140
170
  "dependencies": {
141
171
  "@clack/prompts": "^1.0.1",
142
- "better-result": "^2.5.1",
143
- "commander": "^14.0.2"
172
+ "better-result": "^2.5.1"
144
173
  },
145
174
  "devDependencies": {
146
- "@outfitter/config": "0.3.4",
147
- "@outfitter/contracts": "0.4.2",
148
- "@outfitter/schema": "0.2.3",
175
+ "@outfitter/config": "0.4.0",
176
+ "@outfitter/contracts": "0.5.0",
177
+ "@outfitter/schema": "0.2.4",
149
178
  "@types/bun": "^1.3.9",
150
179
  "@types/node": "^25.3.0",
151
180
  "typescript": "^5.9.3"
@@ -155,6 +184,7 @@
155
184
  "@outfitter/contracts": ">=0.2.0",
156
185
  "@outfitter/schema": ">=0.1.0",
157
186
  "@outfitter/types": ">=0.2.0",
187
+ "commander": ">=14.0.0",
158
188
  "zod": ">=4.0.0"
159
189
  },
160
190
  "engines": {
@@ -1,33 +0,0 @@
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 };