@kubb/cli 5.1.0 → 5.2.1

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 (101) hide show
  1. package/README.md +66 -0
  2. package/dist/{Telemetry-Fiymfxez.js → Telemetry-BCTY-Nzq.js} +3 -49
  3. package/dist/Telemetry-BCTY-Nzq.js.map +1 -0
  4. package/dist/{Telemetry-D-Jpt27O.cjs → Telemetry-DKfJQxnC.cjs} +8 -60
  5. package/dist/Telemetry-DKfJQxnC.cjs.map +1 -0
  6. package/dist/constants-CdxpgX3_.cjs +115 -0
  7. package/dist/constants-CdxpgX3_.cjs.map +1 -0
  8. package/dist/constants-DHRspBTo.js +92 -0
  9. package/dist/constants-DHRspBTo.js.map +1 -0
  10. package/dist/env-DHaFBZTX.cjs +82 -0
  11. package/dist/env-DHaFBZTX.cjs.map +1 -0
  12. package/dist/env-DqPKEL59.js +59 -0
  13. package/dist/env-DqPKEL59.js.map +1 -0
  14. package/dist/{errors-CZtH2dKk.cjs → errors-C-wEou02.cjs} +2 -19
  15. package/dist/errors-C-wEou02.cjs.map +1 -0
  16. package/dist/errors-C8yNfV7w.js +20 -0
  17. package/dist/errors-C8yNfV7w.js.map +1 -0
  18. package/dist/{generate-HzSh9v2l.js → generate-CEHA2OSd.js} +9 -6
  19. package/dist/generate-CEHA2OSd.js.map +1 -0
  20. package/dist/{generate-BO_Gv-vi.cjs → generate-P5PWAa7J.cjs} +9 -6
  21. package/dist/generate-P5PWAa7J.cjs.map +1 -0
  22. package/dist/index.cjs +14 -9
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.ts +2 -3
  25. package/dist/index.js +15 -10
  26. package/dist/index.js.map +1 -1
  27. package/dist/{init-BslRoYhh.js → init-CgQnnwbc.js} +3 -3
  28. package/dist/{init-BslRoYhh.js.map → init-CgQnnwbc.js.map} +1 -1
  29. package/dist/{init-EJOY4K6y.cjs → init-_p5e5VuD.cjs} +3 -3
  30. package/dist/{init-EJOY4K6y.cjs.map → init-_p5e5VuD.cjs.map} +1 -1
  31. package/dist/{mcp-CtV0d0Dc.js → mcp-B-GxGgVr.js} +8 -10
  32. package/dist/mcp-B-GxGgVr.js.map +1 -0
  33. package/dist/{mcp-BIcX2H1u.cjs → mcp-B3B-rE7W.cjs} +8 -10
  34. package/dist/mcp-B3B-rE7W.cjs.map +1 -0
  35. package/dist/output-B2V2MN_C.cjs +137 -0
  36. package/dist/output-B2V2MN_C.cjs.map +1 -0
  37. package/dist/output-LZvrgF3z.js +89 -0
  38. package/dist/output-LZvrgF3z.js.map +1 -0
  39. package/dist/package-GR1Pi9JF.js +6 -0
  40. package/dist/package-GR1Pi9JF.js.map +1 -0
  41. package/dist/{package-CnUMuss9.cjs → package-vVVyiYqL.cjs} +2 -2
  42. package/dist/package-vVVyiYqL.cjs.map +1 -0
  43. package/dist/{run-DSgLksGj.js → run-BzvsJ0Ek.js} +80 -112
  44. package/dist/run-BzvsJ0Ek.js.map +1 -0
  45. package/dist/run-CH9jQeET.js +499 -0
  46. package/dist/run-CH9jQeET.js.map +1 -0
  47. package/dist/run-D-XYvWxQ.js +281 -0
  48. package/dist/run-D-XYvWxQ.js.map +1 -0
  49. package/dist/{run-BV2tMjuz.cjs → run-D6yr3HEE.cjs} +15 -4
  50. package/dist/run-D6yr3HEE.cjs.map +1 -0
  51. package/dist/{run-FPqeAEF4.cjs → run-DRBqVXX0.cjs} +93 -125
  52. package/dist/run-DRBqVXX0.cjs.map +1 -0
  53. package/dist/{run-DCfdTu52.js → run-DgV0unjs.js} +11 -4
  54. package/dist/run-DgV0unjs.js.map +1 -0
  55. package/dist/{run-Cs5FunVC.cjs → run-FLh61kzq.cjs} +11 -4
  56. package/dist/run-FLh61kzq.cjs.map +1 -0
  57. package/dist/run-Z_y-m4dQ.cjs +283 -0
  58. package/dist/run-Z_y-m4dQ.cjs.map +1 -0
  59. package/dist/{run-ChKPZlIB.js → run-n7yOll1q.js} +15 -4
  60. package/dist/run-n7yOll1q.js.map +1 -0
  61. package/dist/run-pPsQ2MsX.cjs +502 -0
  62. package/dist/run-pPsQ2MsX.cjs.map +1 -0
  63. package/dist/studio-DKv2YLJZ.js +77 -0
  64. package/dist/studio-DKv2YLJZ.js.map +1 -0
  65. package/dist/studio-PDMxqFN0.cjs +76 -0
  66. package/dist/studio-PDMxqFN0.cjs.map +1 -0
  67. package/dist/{run-DAGbErY0.cjs → utils-B0SrWoNh.cjs} +303 -323
  68. package/dist/utils-B0SrWoNh.cjs.map +1 -0
  69. package/dist/{run-CLGgnrjg.js → utils-CzoNURwq.js} +274 -364
  70. package/dist/utils-CzoNURwq.js.map +1 -0
  71. package/dist/{validate-BxCwQou-.cjs → validate-BcB0tFQ6.cjs} +8 -13
  72. package/dist/validate-BcB0tFQ6.cjs.map +1 -0
  73. package/dist/{validate-DD2S9ffV.js → validate-QpkCbIFJ.js} +8 -13
  74. package/dist/validate-QpkCbIFJ.js.map +1 -0
  75. package/package.json +18 -9
  76. package/dist/Telemetry-D-Jpt27O.cjs.map +0 -1
  77. package/dist/Telemetry-Fiymfxez.js.map +0 -1
  78. package/dist/errors-CMvLO2NE.js +0 -31
  79. package/dist/errors-CMvLO2NE.js.map +0 -1
  80. package/dist/errors-CZtH2dKk.cjs.map +0 -1
  81. package/dist/generate-BO_Gv-vi.cjs.map +0 -1
  82. package/dist/generate-HzSh9v2l.js.map +0 -1
  83. package/dist/mcp-BIcX2H1u.cjs.map +0 -1
  84. package/dist/mcp-CtV0d0Dc.js.map +0 -1
  85. package/dist/package-CnUMuss9.cjs.map +0 -1
  86. package/dist/package-DiBDd6nT.js +0 -6
  87. package/dist/package-DiBDd6nT.js.map +0 -1
  88. package/dist/run-BV2tMjuz.cjs.map +0 -1
  89. package/dist/run-CLGgnrjg.js.map +0 -1
  90. package/dist/run-ChKPZlIB.js.map +0 -1
  91. package/dist/run-Cs5FunVC.cjs.map +0 -1
  92. package/dist/run-DAGbErY0.cjs.map +0 -1
  93. package/dist/run-DCfdTu52.js.map +0 -1
  94. package/dist/run-DSgLksGj.js.map +0 -1
  95. package/dist/run-FPqeAEF4.cjs.map +0 -1
  96. package/dist/tools-DH1a7ZJH.js +0 -152
  97. package/dist/tools-DH1a7ZJH.js.map +0 -1
  98. package/dist/tools-bwKAf_r-.cjs +0 -175
  99. package/dist/tools-bwKAf_r-.cjs.map +0 -1
  100. package/dist/validate-BxCwQou-.cjs.map +0 -1
  101. package/dist/validate-DD2S9ffV.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-DKv2YLJZ.js","names":[],"sources":["../src/commands/studio.ts"],"sourcesContent":["import { define } from 'gunshi'\n\n/**\n * Declaration only, so listing `kubb --help` never loads `@kubb/studio`. `index.ts` pairs this\n * with the runner through gunshi's `lazy`.\n */\nexport const definition = define({\n name: 'studio',\n description:\n 'Connect this project to Kubb Studio and generate from the browser. The first run pairs the machine: the CLI shows a code, you approve it in Studio, and the token is stored in ~/.kubb. The connection is read-only unless you grant more with --allowWrite, --allowConfigEdit, --allowInput or --allowExec.',\n examples: [\n 'kubb studio # connect this project, asking what Studio may do',\n 'kubb studio --allowWrite # grant writing generated files, no question asked',\n 'kubb studio --allowWrite --allowExec # also run the formatter, the linter, and postGenerate',\n 'kubb studio --allowConfigEdit # let Studio change plugin options in kubb.config.ts',\n 'kubb studio login # pair this machine without connecting',\n 'kubb studio status # show what this machine is paired as',\n 'kubb studio logout # forget the stored token',\n 'kubb studio --url http://localhost:3000 # use a self-hosted Studio',\n ].join('\\n'),\n args: {\n action: {\n type: 'positional',\n required: false,\n description: 'connect (default), login, logout or status',\n },\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n url: {\n type: 'string',\n description: 'Base URL of the Kubb Studio instance',\n },\n allowWrite: {\n type: 'boolean',\n description: 'Write generated files to disk. Asked for once per project when omitted',\n default: false,\n },\n allowConfigEdit: {\n type: 'boolean',\n description: 'Let Studio change plugin options in kubb.config.ts. Asked for once per project when omitted',\n default: false,\n },\n allowInput: {\n type: 'boolean',\n description: 'Generate from an OpenAPI spec sent by Studio instead of the one on disk. Asked for once per project when omitted',\n default: false,\n },\n allowExec: {\n type: 'boolean',\n description: 'Run the formatter, the linter, and output.postGenerate after a generation',\n default: false,\n },\n open: {\n type: 'boolean',\n description: 'Open the approval page in a browser while pairing',\n default: true,\n negatable: true,\n },\n logLevel: {\n type: 'enum',\n choices: ['silent', 'info', 'verbose'] as const,\n description: 'Info, silent or verbose',\n short: 'l',\n default: 'info',\n },\n },\n})\n"],"mappings":";;;;;;AAMA,MAAa,aAAa,OAAO;CAC/B,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;CACX,MAAM;EACJ,QAAQ;GACN,MAAM;GACN,UAAU;GACV,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,KAAK;GACH,MAAM;GACN,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,iBAAiB;GACf,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,WAAW;GACT,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACT,WAAW;EACb;EACA,UAAU;GACR,MAAM;GACN,SAAS;IAAC;IAAU;IAAQ;GAAS;GACrC,aAAa;GACb,OAAO;GACP,SAAS;EACX;CACF;AACF,CAAC"}
@@ -0,0 +1,76 @@
1
+ //#region src/commands/studio.ts
2
+ /**
3
+ * Declaration only, so listing `kubb --help` never loads `@kubb/studio`. `index.ts` pairs this
4
+ * with the runner through gunshi's `lazy`.
5
+ */
6
+ const definition = (0, require("gunshi").define)({
7
+ name: "studio",
8
+ description: "Connect this project to Kubb Studio and generate from the browser. The first run pairs the machine: the CLI shows a code, you approve it in Studio, and the token is stored in ~/.kubb. The connection is read-only unless you grant more with --allowWrite, --allowConfigEdit, --allowInput or --allowExec.",
9
+ examples: [
10
+ "kubb studio # connect this project, asking what Studio may do",
11
+ "kubb studio --allowWrite # grant writing generated files, no question asked",
12
+ "kubb studio --allowWrite --allowExec # also run the formatter, the linter, and postGenerate",
13
+ "kubb studio --allowConfigEdit # let Studio change plugin options in kubb.config.ts",
14
+ "kubb studio login # pair this machine without connecting",
15
+ "kubb studio status # show what this machine is paired as",
16
+ "kubb studio logout # forget the stored token",
17
+ "kubb studio --url http://localhost:3000 # use a self-hosted Studio"
18
+ ].join("\n"),
19
+ args: {
20
+ action: {
21
+ type: "positional",
22
+ required: false,
23
+ description: "connect (default), login, logout or status"
24
+ },
25
+ config: {
26
+ type: "string",
27
+ description: "Path to the Kubb config",
28
+ short: "c"
29
+ },
30
+ url: {
31
+ type: "string",
32
+ description: "Base URL of the Kubb Studio instance"
33
+ },
34
+ allowWrite: {
35
+ type: "boolean",
36
+ description: "Write generated files to disk. Asked for once per project when omitted",
37
+ default: false
38
+ },
39
+ allowConfigEdit: {
40
+ type: "boolean",
41
+ description: "Let Studio change plugin options in kubb.config.ts. Asked for once per project when omitted",
42
+ default: false
43
+ },
44
+ allowInput: {
45
+ type: "boolean",
46
+ description: "Generate from an OpenAPI spec sent by Studio instead of the one on disk. Asked for once per project when omitted",
47
+ default: false
48
+ },
49
+ allowExec: {
50
+ type: "boolean",
51
+ description: "Run the formatter, the linter, and output.postGenerate after a generation",
52
+ default: false
53
+ },
54
+ open: {
55
+ type: "boolean",
56
+ description: "Open the approval page in a browser while pairing",
57
+ default: true,
58
+ negatable: true
59
+ },
60
+ logLevel: {
61
+ type: "enum",
62
+ choices: [
63
+ "silent",
64
+ "info",
65
+ "verbose"
66
+ ],
67
+ description: "Info, silent or verbose",
68
+ short: "l",
69
+ default: "info"
70
+ }
71
+ }
72
+ });
73
+ //#endregion
74
+ exports.definition = definition;
75
+
76
+ //# sourceMappingURL=studio-PDMxqFN0.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-PDMxqFN0.cjs","names":["define"],"sources":["../src/commands/studio.ts"],"sourcesContent":["import { define } from 'gunshi'\n\n/**\n * Declaration only, so listing `kubb --help` never loads `@kubb/studio`. `index.ts` pairs this\n * with the runner through gunshi's `lazy`.\n */\nexport const definition = define({\n name: 'studio',\n description:\n 'Connect this project to Kubb Studio and generate from the browser. The first run pairs the machine: the CLI shows a code, you approve it in Studio, and the token is stored in ~/.kubb. The connection is read-only unless you grant more with --allowWrite, --allowConfigEdit, --allowInput or --allowExec.',\n examples: [\n 'kubb studio # connect this project, asking what Studio may do',\n 'kubb studio --allowWrite # grant writing generated files, no question asked',\n 'kubb studio --allowWrite --allowExec # also run the formatter, the linter, and postGenerate',\n 'kubb studio --allowConfigEdit # let Studio change plugin options in kubb.config.ts',\n 'kubb studio login # pair this machine without connecting',\n 'kubb studio status # show what this machine is paired as',\n 'kubb studio logout # forget the stored token',\n 'kubb studio --url http://localhost:3000 # use a self-hosted Studio',\n ].join('\\n'),\n args: {\n action: {\n type: 'positional',\n required: false,\n description: 'connect (default), login, logout or status',\n },\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n url: {\n type: 'string',\n description: 'Base URL of the Kubb Studio instance',\n },\n allowWrite: {\n type: 'boolean',\n description: 'Write generated files to disk. Asked for once per project when omitted',\n default: false,\n },\n allowConfigEdit: {\n type: 'boolean',\n description: 'Let Studio change plugin options in kubb.config.ts. Asked for once per project when omitted',\n default: false,\n },\n allowInput: {\n type: 'boolean',\n description: 'Generate from an OpenAPI spec sent by Studio instead of the one on disk. Asked for once per project when omitted',\n default: false,\n },\n allowExec: {\n type: 'boolean',\n description: 'Run the formatter, the linter, and output.postGenerate after a generation',\n default: false,\n },\n open: {\n type: 'boolean',\n description: 'Open the approval page in a browser while pairing',\n default: true,\n negatable: true,\n },\n logLevel: {\n type: 'enum',\n choices: ['silent', 'info', 'verbose'] as const,\n description: 'Info, silent or verbose',\n short: 'l',\n default: 'info',\n },\n },\n})\n"],"mappings":";;;;;AAMA,MAAa,cAAA,mBAAaA,CAAAA,CAAAA,OAAAA,CAAO;CAC/B,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;CACX,MAAM;EACJ,QAAQ;GACN,MAAM;GACN,UAAU;GACV,aAAa;EACf;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,KAAK;GACH,MAAM;GACN,aAAa;EACf;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,iBAAiB;GACf,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,WAAW;GACT,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACT,WAAW;EACb;EACA,UAAU;GACR,MAAM;GACN,SAAS;IAAC;IAAU;IAAQ;GAAS;GACrC,aAAa;GACb,OAAO;GACP,SAAS;EACX;CACF;AACF,CAAC"}