@dcupl/cli 1.4.0-beta.0 → 1.4.0-beta.10

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 (302) hide show
  1. package/README.md +45 -0
  2. package/dist/cli.js +782 -149
  3. package/dist/cli.js.map +1 -1
  4. package/dist/functions/app/app-id.js +34 -2
  5. package/dist/functions/app/app-id.js.map +1 -1
  6. package/dist/functions/app/client/daemon-client.js.map +1 -1
  7. package/dist/functions/app/commands/cdn-host.d.ts +16 -0
  8. package/dist/functions/app/commands/cdn-host.js +47 -0
  9. package/dist/functions/app/commands/cdn-host.js.map +1 -0
  10. package/dist/functions/app/commands/create.js +50 -34
  11. package/dist/functions/app/commands/create.js.map +1 -1
  12. package/dist/functions/app/commands/destroy.js +10 -4
  13. package/dist/functions/app/commands/destroy.js.map +1 -1
  14. package/dist/functions/app/commands/detect-serve.js +17 -6
  15. package/dist/functions/app/commands/detect-serve.js.map +1 -1
  16. package/dist/functions/app/commands/fn/_fn-helpers.d.ts +13 -0
  17. package/dist/functions/app/commands/fn/_fn-helpers.js +64 -0
  18. package/dist/functions/app/commands/fn/_fn-helpers.js.map +1 -1
  19. package/dist/functions/app/commands/fn/aggregate.d.ts +8 -1
  20. package/dist/functions/app/commands/fn/aggregate.js +32 -3
  21. package/dist/functions/app/commands/fn/aggregate.js.map +1 -1
  22. package/dist/functions/app/commands/fn/facets.d.ts +1 -0
  23. package/dist/functions/app/commands/fn/facets.js +2 -0
  24. package/dist/functions/app/commands/fn/facets.js.map +1 -1
  25. package/dist/functions/app/commands/fn/group-by.d.ts +6 -0
  26. package/dist/functions/app/commands/fn/group-by.js +13 -22
  27. package/dist/functions/app/commands/fn/group-by.js.map +1 -1
  28. package/dist/functions/app/commands/fn/pivot.d.ts +14 -0
  29. package/dist/functions/app/commands/fn/pivot.js +72 -0
  30. package/dist/functions/app/commands/fn/pivot.js.map +1 -0
  31. package/dist/functions/app/commands/fn/suggest.d.ts +17 -0
  32. package/dist/functions/app/commands/fn/suggest.js +34 -0
  33. package/dist/functions/app/commands/fn/suggest.js.map +1 -0
  34. package/dist/functions/app/commands/list.js +6 -2
  35. package/dist/functions/app/commands/list.js.map +1 -1
  36. package/dist/functions/app/commands/loader-hash.js.map +1 -1
  37. package/dist/functions/app/commands/loaders/add.js +6 -0
  38. package/dist/functions/app/commands/loaders/add.js.map +1 -1
  39. package/dist/functions/app/commands/loaders/process-flags.js +4 -1
  40. package/dist/functions/app/commands/loaders/process-flags.js.map +1 -1
  41. package/dist/functions/app/commands/loaders/process.js +3 -1
  42. package/dist/functions/app/commands/loaders/process.js.map +1 -1
  43. package/dist/functions/app/commands/models/get.js.map +1 -1
  44. package/dist/functions/app/commands/models/keys.js.map +1 -1
  45. package/dist/functions/app/commands/models/remove.js.map +1 -1
  46. package/dist/functions/app/commands/models/set.js +3 -1
  47. package/dist/functions/app/commands/models/set.js.map +1 -1
  48. package/dist/functions/app/commands/query/execute.js +5 -2
  49. package/dist/functions/app/commands/query/execute.js.map +1 -1
  50. package/dist/functions/app/commands/query/one.js +3 -1
  51. package/dist/functions/app/commands/query/one.js.map +1 -1
  52. package/dist/functions/app/commands/render.js +10 -4
  53. package/dist/functions/app/commands/render.js.map +1 -1
  54. package/dist/functions/app/commands/resolve-app.js.map +1 -1
  55. package/dist/functions/app/commands/resolve-source.d.ts +1 -0
  56. package/dist/functions/app/commands/resolve-source.js +29 -6
  57. package/dist/functions/app/commands/resolve-source.js.map +1 -1
  58. package/dist/functions/app/commands/validate-report.d.ts +31 -0
  59. package/dist/functions/app/commands/validate-report.js +20 -1
  60. package/dist/functions/app/commands/validate-report.js.map +1 -1
  61. package/dist/functions/app/commands/validate.d.ts +1 -0
  62. package/dist/functions/app/commands/validate.js +32 -14
  63. package/dist/functions/app/commands/validate.js.map +1 -1
  64. package/dist/functions/app/daemon/app-server.module.js +6 -1
  65. package/dist/functions/app/daemon/app-server.module.js.map +1 -1
  66. package/dist/functions/app/daemon/controllers/data.controller.js +17 -6
  67. package/dist/functions/app/daemon/controllers/data.controller.js.map +1 -1
  68. package/dist/functions/app/daemon/controllers/fn.controller.d.ts +8 -0
  69. package/dist/functions/app/daemon/controllers/fn.controller.js +20 -0
  70. package/dist/functions/app/daemon/controllers/fn.controller.js.map +1 -1
  71. package/dist/functions/app/daemon/controllers/lifecycle.controller.js.map +1 -1
  72. package/dist/functions/app/daemon/controllers/query.controller.js +4 -1
  73. package/dist/functions/app/daemon/controllers/query.controller.js.map +1 -1
  74. package/dist/functions/app/daemon/daemon-args.js +2 -2
  75. package/dist/functions/app/daemon/daemon-args.js.map +1 -1
  76. package/dist/functions/app/daemon/filters/envelope-exception.filter.js +6 -1
  77. package/dist/functions/app/daemon/filters/envelope-exception.filter.js.map +1 -1
  78. package/dist/functions/app/daemon/main.js +14 -7
  79. package/dist/functions/app/daemon/main.js.map +1 -1
  80. package/dist/functions/app/daemon/services/attribute-validation.d.ts +21 -0
  81. package/dist/functions/app/daemon/services/attribute-validation.js +164 -0
  82. package/dist/functions/app/daemon/services/attribute-validation.js.map +1 -0
  83. package/dist/functions/app/daemon/services/dcupl-host.service.d.ts +7 -0
  84. package/dist/functions/app/daemon/services/dcupl-host.service.js +93 -16
  85. package/dist/functions/app/daemon/services/dcupl-host.service.js.map +1 -1
  86. package/dist/functions/app/daemon/services/idle-watchdog.service.js.map +1 -1
  87. package/dist/functions/app/daemon/services/ingest.service.js +8 -4
  88. package/dist/functions/app/daemon/services/ingest.service.js.map +1 -1
  89. package/dist/functions/app/daemon/services/init-options.js.map +1 -1
  90. package/dist/functions/app/daemon/services/loaders.service.d.ts +3 -1
  91. package/dist/functions/app/daemon/services/loaders.service.js +22 -6
  92. package/dist/functions/app/daemon/services/loaders.service.js.map +1 -1
  93. package/dist/functions/app/e2e/port-lock.d.ts +8 -0
  94. package/dist/functions/app/e2e/port-lock.js +66 -2
  95. package/dist/functions/app/e2e/port-lock.js.map +1 -1
  96. package/dist/functions/app/registry/registry.js +11 -10
  97. package/dist/functions/app/registry/registry.js.map +1 -1
  98. package/dist/functions/app/registry/serve-registry.js +13 -9
  99. package/dist/functions/app/registry/serve-registry.js.map +1 -1
  100. package/dist/functions/app/types.d.ts +2 -0
  101. package/dist/functions/config/commands/get.d.ts +3 -3
  102. package/dist/functions/config/commands/get.js +34 -16
  103. package/dist/functions/config/commands/get.js.map +1 -1
  104. package/dist/functions/config/commands/set.js +9 -4
  105. package/dist/functions/config/commands/set.js.map +1 -1
  106. package/dist/functions/config/io.d.ts +4 -1
  107. package/dist/functions/config/io.js +44 -11
  108. package/dist/functions/config/io.js.map +1 -1
  109. package/dist/functions/config/prompts.js +1 -3
  110. package/dist/functions/config/prompts.js.map +1 -1
  111. package/dist/functions/files/commands/copy.js +1 -1
  112. package/dist/functions/files/commands/copy.js.map +1 -1
  113. package/dist/functions/files/commands/delete.js +1 -1
  114. package/dist/functions/files/commands/delete.js.map +1 -1
  115. package/dist/functions/files/commands/list.js +6 -3
  116. package/dist/functions/files/commands/list.js.map +1 -1
  117. package/dist/functions/files/commands/move.js +1 -1
  118. package/dist/functions/files/commands/move.js.map +1 -1
  119. package/dist/functions/files/commands/pull.d.ts +16 -1
  120. package/dist/functions/files/commands/pull.js +135 -1
  121. package/dist/functions/files/commands/pull.js.map +1 -1
  122. package/dist/functions/files/commands/push.d.ts +1 -0
  123. package/dist/functions/files/commands/push.js +25 -3
  124. package/dist/functions/files/commands/push.js.map +1 -1
  125. package/dist/functions/files/commands/read.js +3 -2
  126. package/dist/functions/files/commands/read.js.map +1 -1
  127. package/dist/functions/files/commands/render.d.ts +29 -0
  128. package/dist/functions/files/commands/render.js +8 -4
  129. package/dist/functions/files/commands/render.js.map +1 -1
  130. package/dist/functions/files/commands/status.js +1 -0
  131. package/dist/functions/files/commands/status.js.map +1 -1
  132. package/dist/functions/files/commands/versions/copy.js +1 -1
  133. package/dist/functions/files/commands/versions/copy.js.map +1 -1
  134. package/dist/functions/files/commands/versions/delete.js +1 -1
  135. package/dist/functions/files/commands/versions/delete.js.map +1 -1
  136. package/dist/functions/files/commands/versions/list.js +4 -0
  137. package/dist/functions/files/commands/versions/list.js.map +1 -1
  138. package/dist/functions/files/commands/write.js +13 -3
  139. package/dist/functions/files/commands/write.js.map +1 -1
  140. package/dist/functions/files/files-pull.js +10 -7
  141. package/dist/functions/files/files-pull.js.map +1 -1
  142. package/dist/functions/files/files-push.js +11 -8
  143. package/dist/functions/files/files-push.js.map +1 -1
  144. package/dist/functions/files/helper/text-policy.d.ts +5 -0
  145. package/dist/functions/files/helper/text-policy.js +31 -0
  146. package/dist/functions/files/helper/text-policy.js.map +1 -0
  147. package/dist/functions/files/sync/large-upload.d.ts +20 -0
  148. package/dist/functions/files/sync/large-upload.js +140 -0
  149. package/dist/functions/files/sync/large-upload.js.map +1 -0
  150. package/dist/functions/files/sync/manifest.js +2 -1
  151. package/dist/functions/files/sync/manifest.js.map +1 -1
  152. package/dist/functions/files/sync/transfer.d.ts +5 -0
  153. package/dist/functions/files/sync/transfer.js +47 -10
  154. package/dist/functions/files/sync/transfer.js.map +1 -1
  155. package/dist/functions/files/test-helpers.d.ts +11 -0
  156. package/dist/functions/files/test-helpers.js +28 -0
  157. package/dist/functions/files/test-helpers.js.map +1 -1
  158. package/dist/functions/generate/files/generate-code.d.ts +1 -1
  159. package/dist/functions/generate/files/generate-files.d.ts +7 -1
  160. package/dist/functions/generate/files/generate-files.js +63 -15
  161. package/dist/functions/generate/files/generate-files.js.map +1 -1
  162. package/dist/functions/generate/files/workflow-presets.d.ts +6 -0
  163. package/dist/functions/generate/files/workflow-presets.js +158 -0
  164. package/dist/functions/generate/files/workflow-presets.js.map +1 -0
  165. package/dist/functions/generate/model-from-data/generate-model-from-data.js +11 -5
  166. package/dist/functions/generate/model-from-data/generate-model-from-data.js.map +1 -1
  167. package/dist/functions/generate/model-from-data/infer-key.js +1 -4
  168. package/dist/functions/generate/model-from-data/infer-key.js.map +1 -1
  169. package/dist/functions/generate/model-from-data/infer-to-model.js +6 -3
  170. package/dist/functions/generate/model-from-data/infer-to-model.js.map +1 -1
  171. package/dist/functions/generate/projects/generate-project.d.ts +5 -0
  172. package/dist/functions/generate/projects/generate-project.js +29 -8
  173. package/dist/functions/generate/projects/generate-project.js.map +1 -1
  174. package/dist/functions/helper/api-client.d.ts +3 -0
  175. package/dist/functions/helper/api-client.js +19 -17
  176. package/dist/functions/helper/api-client.js.map +1 -1
  177. package/dist/functions/helper/config.helper.d.ts +1 -0
  178. package/dist/functions/helper/config.helper.js.map +1 -1
  179. package/dist/functions/helper/credentials.helper.d.ts +21 -0
  180. package/dist/functions/helper/credentials.helper.js +39 -0
  181. package/dist/functions/helper/credentials.helper.js.map +1 -0
  182. package/dist/functions/helper/load-env.d.ts +1 -0
  183. package/dist/functions/helper/load-env.js +10 -0
  184. package/dist/functions/helper/load-env.js.map +1 -0
  185. package/dist/functions/helper/output.d.ts +1 -1
  186. package/dist/functions/helper/output.js +10 -12
  187. package/dist/functions/helper/output.js.map +1 -1
  188. package/dist/functions/helper/parse-fail.js +4 -1
  189. package/dist/functions/helper/parse-fail.js.map +1 -1
  190. package/dist/functions/schemas/command.js.map +1 -1
  191. package/dist/functions/schemas/examples/AppLoaderConfiguration.example.json +1 -3
  192. package/dist/functions/schemas/examples/AttributeQualityConfig.example.json +10 -0
  193. package/dist/functions/schemas/examples/DataMapperStepConfig.example.json +6 -1
  194. package/dist/functions/schemas/examples/ModelDefinition.example.json +29 -3
  195. package/dist/functions/schemas/examples/ScriptStepConfig.example.json +3 -1
  196. package/dist/functions/schemas/examples/TemplateV3.example.json +5 -1
  197. package/dist/functions/schemas/extract.js +1 -1
  198. package/dist/functions/schemas/extract.js.map +1 -1
  199. package/dist/functions/schemas/format.js +4 -4
  200. package/dist/functions/schemas/format.js.map +1 -1
  201. package/dist/functions/schemas/registry.d.ts +14 -0
  202. package/dist/functions/schemas/registry.js +122 -30
  203. package/dist/functions/schemas/registry.js.map +1 -1
  204. package/dist/functions/schemas/resolve.js +1 -2
  205. package/dist/functions/schemas/resolve.js.map +1 -1
  206. package/dist/functions/schemas/validate.d.ts +22 -0
  207. package/dist/functions/schemas/validate.js +67 -0
  208. package/dist/functions/schemas/validate.js.map +1 -0
  209. package/dist/functions/serve/commands/list.js +2 -1
  210. package/dist/functions/serve/commands/list.js.map +1 -1
  211. package/dist/functions/serve/commands/stop.js +10 -5
  212. package/dist/functions/serve/commands/stop.js.map +1 -1
  213. package/dist/functions/serve/dev-server/dev-server-access.guard.d.ts +11 -0
  214. package/dist/functions/serve/dev-server/dev-server-access.guard.js +41 -0
  215. package/dist/functions/serve/dev-server/dev-server-access.guard.js.map +1 -0
  216. package/dist/functions/serve/dev-server/dev-server.controller.d.ts +3 -0
  217. package/dist/functions/serve/dev-server/dev-server.controller.js +20 -0
  218. package/dist/functions/serve/dev-server/dev-server.controller.js.map +1 -1
  219. package/dist/functions/serve/dev-server/dev-server.module.d.ts +3 -0
  220. package/dist/functions/serve/dev-server/dev-server.module.js +34 -23
  221. package/dist/functions/serve/dev-server/dev-server.module.js.map +1 -1
  222. package/dist/functions/serve/dev-server/dev-server.options.d.ts +8 -0
  223. package/dist/functions/serve/dev-server/dev-server.options.js +5 -0
  224. package/dist/functions/serve/dev-server/dev-server.options.js.map +1 -0
  225. package/dist/functions/serve/dev-server/dev-server.service.d.ts +11 -3
  226. package/dist/functions/serve/dev-server/dev-server.service.js +72 -65
  227. package/dist/functions/serve/dev-server/dev-server.service.js.map +1 -1
  228. package/dist/functions/serve/dev-server/path-scope.d.ts +5 -0
  229. package/dist/functions/serve/dev-server/path-scope.js +88 -0
  230. package/dist/functions/serve/dev-server/path-scope.js.map +1 -0
  231. package/dist/functions/serve/dev-server/request-security.d.ts +34 -0
  232. package/dist/functions/serve/dev-server/request-security.js +145 -0
  233. package/dist/functions/serve/dev-server/request-security.js.map +1 -0
  234. package/dist/functions/serve/main.d.ts +13 -0
  235. package/dist/functions/serve/main.js +90 -17
  236. package/dist/functions/serve/main.js.map +1 -1
  237. package/dist/functions/serve/serve-self-register.js +2 -1
  238. package/dist/functions/serve/serve-self-register.js.map +1 -1
  239. package/dist/functions/version/command.d.ts +12 -1
  240. package/dist/functions/version/command.js +55 -7
  241. package/dist/functions/version/command.js.map +1 -1
  242. package/dist/functions/workflow/commands/deploy.d.ts +9 -1
  243. package/dist/functions/workflow/commands/deploy.js +39 -10
  244. package/dist/functions/workflow/commands/deploy.js.map +1 -1
  245. package/dist/functions/workflow/commands/get.js.map +1 -1
  246. package/dist/functions/workflow/commands/history.js.map +1 -1
  247. package/dist/functions/workflow/commands/run.d.ts +26 -0
  248. package/dist/functions/workflow/commands/run.js +101 -0
  249. package/dist/functions/workflow/commands/run.js.map +1 -0
  250. package/dist/functions/workflow/commands/runners-get.js.map +1 -1
  251. package/dist/functions/workflow/commands/runners.d.ts +2 -0
  252. package/dist/functions/workflow/commands/runners.js +10 -1
  253. package/dist/functions/workflow/commands/runners.js.map +1 -1
  254. package/dist/functions/workflow/commands/status.d.ts +1 -1
  255. package/dist/functions/workflow/commands/status.js +7 -1
  256. package/dist/functions/workflow/commands/status.js.map +1 -1
  257. package/dist/functions/workflow/commands/template.js.map +1 -1
  258. package/dist/functions/workflow/commands/test.d.ts +3 -0
  259. package/dist/functions/workflow/commands/test.js +22 -73
  260. package/dist/functions/workflow/commands/test.js.map +1 -1
  261. package/dist/functions/workflow/commands/trace.d.ts +4 -2
  262. package/dist/functions/workflow/commands/trace.js +22 -1
  263. package/dist/functions/workflow/commands/trace.js.map +1 -1
  264. package/dist/functions/workflow/commands/undeploy.js +3 -1
  265. package/dist/functions/workflow/commands/undeploy.js.map +1 -1
  266. package/dist/functions/workflow/commands/validate.d.ts +2 -0
  267. package/dist/functions/workflow/commands/validate.js +16 -2
  268. package/dist/functions/workflow/commands/validate.js.map +1 -1
  269. package/dist/functions/workflow/resolve-runner.d.ts +17 -0
  270. package/dist/functions/workflow/resolve-runner.js +41 -0
  271. package/dist/functions/workflow/resolve-runner.js.map +1 -0
  272. package/dist/functions/workflow/run-failure.d.ts +11 -0
  273. package/dist/functions/workflow/run-failure.js +74 -0
  274. package/dist/functions/workflow/run-failure.js.map +1 -0
  275. package/dist/functions/workflow/runner-health.d.ts +16 -0
  276. package/dist/functions/workflow/runner-health.js +36 -0
  277. package/dist/functions/workflow/runner-health.js.map +1 -0
  278. package/dist/functions/workflow/script-lint.d.ts +10 -0
  279. package/dist/functions/workflow/script-lint.js +513 -0
  280. package/dist/functions/workflow/script-lint.js.map +1 -0
  281. package/dist/functions/workflow/template-io.js +1 -1
  282. package/dist/functions/workflow/template-io.js.map +1 -1
  283. package/dist/functions/workflow/trace.js.map +1 -1
  284. package/dist/functions/workflow/types.d.ts +11 -2
  285. package/dist/functions/workflow/types.js +4 -0
  286. package/dist/functions/workflow/types.js.map +1 -1
  287. package/dist/functions/workflow/validate.js +4 -1
  288. package/dist/functions/workflow/validate.js.map +1 -1
  289. package/dist/functions/workflow/wait-for-swap.d.ts +24 -1
  290. package/dist/functions/workflow/wait-for-swap.js +58 -0
  291. package/dist/functions/workflow/wait-for-swap.js.map +1 -1
  292. package/dist/functions/workflow/workflow-api.js +3 -1
  293. package/dist/functions/workflow/workflow-api.js.map +1 -1
  294. package/dist/index.js +6 -3
  295. package/dist/index.js.map +1 -1
  296. package/files/common/.env.example +4 -0
  297. package/files/common/_gitignore +3 -1
  298. package/files/dev-server/index.html +2 -1
  299. package/package.json +45 -42
  300. package/dist/functions/serve/guards/apiKey.guard.d.ts +0 -4
  301. package/dist/functions/serve/guards/apiKey.guard.js +0 -23
  302. package/dist/functions/serve/guards/apiKey.guard.js.map +0 -1
package/README.md CHANGED
@@ -47,10 +47,55 @@ Add this to your project's `.gitignore`:
47
47
 
48
48
  Pushing directly to `production` is rejected. Push to a named version, then promote with the existing copy-version flow.
49
49
 
50
+ ### JSON output (`--json`)
51
+
52
+ Every `files` subcommand run with `--json` emits exactly one JSON object on stdout, and every result carries a `success` boolean, so a scripted caller can branch on `.success` across all verbs. `.success` and the exit code always agree:
53
+
54
+ | Outcome | `success` | Exit code | Shape |
55
+ | -------------------------------------------------------------------------------- | --------- | --------- | ---------------------------------------------------------------------------- |
56
+ | Full success | `true` | 0 | the verb's payload (see table below) |
57
+ | Partial failure (`push`/`pull` only: a transfer failed or could not be verified) | `false` | 2 | the verb's payload — inspect `failed` / `unverified`; no `error`/`code` keys |
58
+ | Hard error (any verb) | `false` | 1 | `{ "success": false, "error": "<message>", "code": "<CODE>", ... }` |
59
+
60
+ Warnings and progress notices go to stderr, so stdout always stays a single parseable object.
61
+
62
+ Guaranteed keys per verb (additional keys may appear):
63
+
64
+ | Verb | Keys |
65
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
+ | `status` | `success` (always `true` — status is a report), `versionId`, `hasBaseline`, `uploads`, `downloads`, `conflicts`, `wouldDeleteOnServerInStrictMode`, `wouldDeleteLocallyInStrictMode`, `unchanged` |
67
+ | `push` | `success` (`false` on partial failure, exit 2), `versionId`, `uploaded`, `deleted`, `failed`, `conflicts`, `resolvedConflicts`, `unchanged`, `unverified` |
68
+ | `pull` | `success` (`false` on partial failure, exit 2), `versionId`, `downloaded`, `deletedLocally`, `failed`, `switched`, `unchanged`, `unverified` |
69
+ | `list` | `success`, `paths` |
70
+ | `read` | `success`, `path`, `content` |
71
+ | `write` | `success`, `path`, `bytes`, `version` |
72
+ | `copy` | `success`, `from`, `to`, `version` |
73
+ | `move` | `success`, `from`, `to`, `version` |
74
+ | `delete` | `success`, `path`, `version` |
75
+ | `create-folder` | `success`, `path` |
76
+ | `versions list` | `success`, `versions` |
77
+ | `versions copy` | `success`, `from`, `to` |
78
+ | `versions delete` | `success`, `id` |
79
+
80
+ `--dry-run` results use the same shape as the real operation.
81
+
50
82
  ### Legacy commands
51
83
 
52
84
  `dcupl files:push` and `dcupl files:pull` (with the colon syntax) are the original zip-based commands. They keep their existing behavior unchanged. Prefer the new `dcupl files <subcommand>` commands for new workflows.
53
85
 
86
+ Note: the deprecated `dcupl files:versions` alias delegates to `dcupl files versions list`, so its `--json` output uses the same `{ success, versions }` envelope documented above.
87
+
88
+ ## Credentials
89
+
90
+ Provide `apiKey` / `projectId` via (highest priority first):
91
+
92
+ 1. CLI flags `--api-key` / `--project-id`
93
+ 2. Env vars `DCUPL_API_KEY` / `DCUPL_PROJECT_ID`
94
+ 3. A workspace `.env` (auto-loaded; real env vars override it)
95
+ 4. `dcupl.secrets.json` (apiKey) and `dcupl.config.json` (projectId)
96
+
97
+ `dcupl config set` writes to `dcupl.secrets.json` if present, else to `.env`.
98
+
54
99
  ## CLI Lifecycle Contract
55
100
 
56
101
  The dcupl CLI mirrors the dcupl SDK's declarative model: the SDK separates