saturndocs 0.1.2 → 0.3.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 (63) hide show
  1. package/dist/auth-OIEL34E4.js +16 -0
  2. package/dist/{chunk-3V753MRI.js → chunk-32ATWMIS.js} +3 -3
  3. package/dist/{chunk-U7PKMSB3.js → chunk-3EW6ZPL6.js} +5 -5
  4. package/dist/{chunk-GYRVGWDM.js → chunk-3KCCCMQY.js} +408 -36
  5. package/dist/{chunk-SABK3R2P.js → chunk-3X2NBWZN.js} +245 -161
  6. package/dist/chunk-5ZYUBLEH.js +5154 -0
  7. package/dist/{chunk-N7QPZMLP.js → chunk-6EKGBIUR.js} +2 -2
  8. package/dist/{chunk-CMNX5DLQ.js → chunk-BOWRQKXR.js} +12 -6
  9. package/dist/chunk-E3G56DR2.js +949 -0
  10. package/dist/chunk-FUZE54DG.js +905 -0
  11. package/dist/chunk-HBSJ4Z4S.js +53 -0
  12. package/dist/{chunk-5KX4ZK5E.js → chunk-IJOYWJVM.js} +13 -7
  13. package/dist/chunk-IWIVHHZI.js +426 -0
  14. package/dist/{chunk-XO4CUC7V.js → chunk-PU37LVIF.js} +3 -3
  15. package/dist/{chunk-STCCGFKC.js → chunk-RKM7YWPD.js} +25 -6
  16. package/dist/{chunk-KGJESHJC.js → chunk-T3MCJYSF.js} +1 -1
  17. package/dist/chunk-TEYHAN2L.js +90 -0
  18. package/dist/chunk-VDGVERLX.js +87 -0
  19. package/dist/{chunk-S45UWCML.js → chunk-W3FZTCKV.js} +15 -13
  20. package/dist/chunk-WMS6FUKK.js +414 -0
  21. package/dist/chunk-WXLJZ7RD.js +115 -0
  22. package/dist/chunk-YGVC4N4V.js +29 -0
  23. package/dist/chunk-YPWPLIEZ.js +86 -0
  24. package/dist/cli.js +6 -6
  25. package/dist/coverage-SRIA65FT.js +15 -0
  26. package/dist/dist-LJSALT4X.js +150 -0
  27. package/dist/index.d.ts +99 -34
  28. package/dist/index.js +142 -49
  29. package/dist/{init-7T5TEPBH.js → init-Y3GDNDWW.js} +5 -3
  30. package/dist/lint-XM26WIGE.js +13 -0
  31. package/dist/login-HIXLPRUI.js +22 -0
  32. package/dist/{manage-MKH27U3B.js → manage-3HEBB3EQ.js} +6 -2
  33. package/dist/nav-K43WZJ4J.js +14 -0
  34. package/dist/openapiCheck-CL2AH3YC.js +105 -0
  35. package/dist/pages-4VWB7Z4S.js +16 -0
  36. package/dist/{read-DMSJUEDA.js → read-DYGYUOFK.js} +5 -4
  37. package/dist/{read-ZEVUZNNB.js → read-RKT6HUZ7.js} +41 -7
  38. package/dist/requests-CZYE6GI3.js +13 -0
  39. package/dist/{schema-XJUEZSIW.js → schema-QMJMGD5P.js} +3 -3
  40. package/dist/{sites-I4WI2MPG.js → sites-JKS25SEM.js} +5 -4
  41. package/dist/{status-7R3NOI5H.js → status-FM2ALQUJ.js} +4 -4
  42. package/dist/{suggestions-4WFQ3APX.js → suggestions-Z6XIHMFN.js} +13 -7
  43. package/dist/unavailable-DVPNUO3J.js +40 -0
  44. package/dist/validate-X42T4TJ6.js +12 -0
  45. package/package.json +14 -7
  46. package/dist/auth-FRCFGNYT.js +0 -14
  47. package/dist/brokenLinks-TTOBP4P7.js +0 -48
  48. package/dist/build-F5PWGP57.js +0 -39
  49. package/dist/chunk-3P2OFTXR.js +0 -71
  50. package/dist/chunk-I6U4V7B4.js +0 -1552
  51. package/dist/chunk-OEAEX5YW.js +0 -51
  52. package/dist/chunk-OZWTXMO3.js +0 -584
  53. package/dist/chunk-QLFODLVN.js +0 -46
  54. package/dist/chunk-R3X2DPFF.js +0 -568
  55. package/dist/chunk-TKISMN3P.js +0 -39
  56. package/dist/chunk-VNYDYHXM.js +0 -22
  57. package/dist/chunk-VXEUNRVA.js +0 -26
  58. package/dist/deploy-QU7DCKWU.js +0 -11
  59. package/dist/dev-VDSDCBO2.js +0 -43
  60. package/dist/openapiCheck-KGBQJTIQ.js +0 -66
  61. package/dist/pages-HIPXRLSY.js +0 -15
  62. package/dist/requests-H5MIGBIS.js +0 -13
  63. package/dist/validate-VXL4PL42.js +0 -30
@@ -1,6 +1,6 @@
1
1
  import {
2
- invalidInput
3
- } from "./chunk-GYRVGWDM.js";
2
+ invalidInput2 as invalidInput
3
+ } from "./chunk-3KCCCMQY.js";
4
4
 
5
5
  // src/adapter/input.ts
6
6
  import { readFile } from "fs/promises";
@@ -1,7 +1,11 @@
1
+ import {
2
+ SITES_CREATE_METADATA,
3
+ registerSitesCreate
4
+ } from "./chunk-IWIVHHZI.js";
1
5
  import {
2
6
  asCliError,
3
7
  clientFor
4
- } from "./chunk-TKISMN3P.js";
8
+ } from "./chunk-FUZE54DG.js";
5
9
  import {
6
10
  applyCommandHelp
7
11
  } from "./chunk-M2BZEDAS.js";
@@ -9,13 +13,13 @@ import {
9
13
  commandMetadata,
10
14
  createResultWriter,
11
15
  failureResult,
12
- invalidInput,
16
+ invalidInput2 as invalidInput,
13
17
  listSites,
14
18
  readSiteDetail,
15
19
  resolveGlobalOptions,
16
20
  resolveTarget,
17
21
  successResult
18
- } from "./chunk-GYRVGWDM.js";
22
+ } from "./chunk-3KCCCMQY.js";
19
23
 
20
24
  // src/commands/sites.ts
21
25
  var SITES_METADATA = Object.freeze([
@@ -45,7 +49,8 @@ var SITES_METADATA = Object.freeze([
45
49
  { command: "saturndocs sites get acme --connections", description: "One site with its documentation repository and watched repositories." },
46
50
  { command: "saturndocs sites get --json", description: "The site read as one result object, with the resolved site_id in the envelope." }
47
51
  ]
48
- })
52
+ }),
53
+ SITES_CREATE_METADATA
49
54
  ]);
50
55
  function requestedSite(positional, flag) {
51
56
  const named = positional ?? flag ?? void 0;
@@ -79,7 +84,8 @@ function detailText(detail) {
79
84
  return lines.join("\n");
80
85
  }
81
86
  function registerSites(program, _cliDir, environment = {}) {
82
- const sites = program.command("sites").description("Discover and inspect the sites this credential reaches");
87
+ const sites = program.command("sites").description("Create a site, or discover and inspect the sites this credential reaches");
88
+ registerSitesCreate(sites, environment);
83
89
  const list = sites.command("list").action(async (_options, self) => {
84
90
  const globals = resolveGlobalOptions(self);
85
91
  const writer = createResultWriter({ json: globals.json });
@@ -98,8 +104,8 @@ function registerSites(program, _cliDir, environment = {}) {
98
104
  const writer = createResultWriter({ json: globals.json });
99
105
  const context = { command: "sites get", siteId: null };
100
106
  try {
101
- const client = clientFor(globals, environment);
102
107
  const named = requestedSite(siteId, globals.site);
108
+ const client = clientFor(named === void 0 ? globals : { ...globals, site: named }, environment);
103
109
  const target = await resolveTarget(client, named === void 0 ? {} : { site: named });
104
110
  context.siteId = target.site_id;
105
111
  const detail = await readSiteDetail(client, target.site_id, { connections: options.connections === true });