@jini-ai/devops 0.7.3-next.2 → 0.7.4

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 (402) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +16 -0
  3. package/dist/backup/site/archive-extensions.d.ts +73 -0
  4. package/dist/backup/site/archive-extensions.js +129 -0
  5. package/dist/backup/site/archive-manifest.d.ts +85 -0
  6. package/dist/backup/site/archive-manifest.js +176 -0
  7. package/dist/backup/site/archive-media.d.ts +121 -0
  8. package/dist/backup/site/archive-media.js +93 -0
  9. package/dist/backup/site/backup-service.credentials.d.ts +31 -0
  10. package/dist/backup/site/backup-service.credentials.js +158 -0
  11. package/dist/backup/site/backup-service.d.ts +336 -0
  12. package/dist/backup/site/backup-service.js +127 -0
  13. package/dist/backup/site/backup-service.plan.d.ts +64 -0
  14. package/dist/backup/site/backup-service.plan.js +207 -0
  15. package/dist/backup/site/backup-service.push.d.ts +29 -0
  16. package/dist/backup/site/backup-service.push.js +94 -0
  17. package/dist/backup/site/backup-service.shared.d.ts +40 -0
  18. package/dist/backup/site/backup-service.shared.js +37 -0
  19. package/dist/backup/site/bundled-export-file-policy.d.ts +38 -0
  20. package/dist/backup/site/bundled-export-file-policy.js +39 -0
  21. package/dist/backup/site/credential-warnings.d.ts +41 -0
  22. package/dist/backup/site/credential-warnings.js +50 -0
  23. package/dist/backup/site/import-backend-steps.d.ts +167 -0
  24. package/dist/backup/site/import-backend-steps.js +170 -0
  25. package/dist/backup/site/import-backend.d.ts +167 -0
  26. package/dist/backup/site/import-backend.js +298 -0
  27. package/dist/backup/site/import-database.d.ts +118 -0
  28. package/dist/backup/site/import-database.js +167 -0
  29. package/dist/backup/site/import-index/admission.d.ts +54 -0
  30. package/dist/backup/site/import-index/admission.js +46 -0
  31. package/dist/backup/site/import-index/backfill.d.ts +106 -0
  32. package/dist/backup/site/import-index/backfill.js +137 -0
  33. package/dist/backup/site/import-index/errors.d.ts +28 -0
  34. package/dist/backup/site/import-index/errors.js +38 -0
  35. package/dist/backup/site/import-index/migrations/checksums.d.ts +4 -0
  36. package/dist/backup/site/import-index/migrations/checksums.js +4 -0
  37. package/dist/backup/site/import-index/migrations/site-imports-v1.d.ts +2 -0
  38. package/dist/backup/site/import-index/migrations/site-imports-v1.js +10 -0
  39. package/dist/backup/site/import-index/mode.d.ts +191 -0
  40. package/dist/backup/site/import-index/mode.js +272 -0
  41. package/dist/backup/site/import-index/open.d.ts +40 -0
  42. package/dist/backup/site/import-index/open.js +87 -0
  43. package/dist/backup/site/import-index/paging.d.ts +28 -0
  44. package/dist/backup/site/import-index/paging.js +66 -0
  45. package/dist/backup/site/import-index/payload-namespace.d.ts +80 -0
  46. package/dist/backup/site/import-index/payload-namespace.js +156 -0
  47. package/dist/backup/site/import-index/rows.d.ts +32 -0
  48. package/dist/backup/site/import-index/rows.js +61 -0
  49. package/dist/backup/site/import-index/schema.d.ts +8 -0
  50. package/dist/backup/site/import-index/schema.js +31 -0
  51. package/dist/backup/site/import-index/store.d.ts +27 -0
  52. package/dist/backup/site/import-index/store.js +33 -0
  53. package/dist/backup/site/import-index/sweep.d.ts +10 -0
  54. package/dist/backup/site/import-index/sweep.js +26 -0
  55. package/dist/backup/site/import-keep-off.d.ts +128 -0
  56. package/dist/backup/site/import-keep-off.js +204 -0
  57. package/dist/backup/site/import-plugin-state.d.ts +74 -0
  58. package/dist/backup/site/import-plugin-state.js +67 -0
  59. package/dist/backup/site/import-registry.d.ts +110 -0
  60. package/dist/backup/site/import-registry.js +205 -0
  61. package/dist/backup/site/import-restore-placement.d.ts +94 -0
  62. package/dist/backup/site/import-restore-placement.js +158 -0
  63. package/dist/backup/site/import-restore.d.ts +111 -0
  64. package/dist/backup/site/import-restore.js +120 -0
  65. package/dist/backup/site/import-verifier-inventory.d.ts +137 -0
  66. package/dist/backup/site/import-verifier-inventory.js +236 -0
  67. package/dist/backup/site/import-verifier-projection.d.ts +78 -0
  68. package/dist/backup/site/import-verifier-projection.js +100 -0
  69. package/dist/backup/site/import-verifier.d.ts +126 -0
  70. package/dist/backup/site/import-verifier.js +53 -0
  71. package/dist/backup/site/owned-temp-root.d.ts +12 -0
  72. package/dist/backup/site/owned-temp-root.js +2 -0
  73. package/dist/backup/site/package-file-inventory.d.ts +63 -0
  74. package/dist/backup/site/package-file-inventory.js +56 -0
  75. package/dist/backup/site/push-content.d.ts +70 -0
  76. package/dist/backup/site/push-content.js +56 -0
  77. package/dist/backup/site/react/ShowMoreImports.d.ts +21 -0
  78. package/dist/backup/site/react/ShowMoreImports.js +8 -0
  79. package/dist/backup/site/saved-keys-port.d.ts +47 -0
  80. package/dist/backup/site/saved-keys-port.js +3 -0
  81. package/dist/backup/site/saved-keys.d.ts +25 -0
  82. package/dist/backup/site/saved-keys.js +38 -0
  83. package/dist/backup/site/share-backend.d.ts +243 -0
  84. package/dist/backup/site/share-backend.js +284 -0
  85. package/dist/backup/site/share-database/projection.d.ts +197 -0
  86. package/dist/backup/site/share-database/projection.js +90 -0
  87. package/dist/backup/site/share-database/projection.media.d.ts +38 -0
  88. package/dist/backup/site/share-database/projection.media.js +179 -0
  89. package/dist/backup/site/share-database/projection.tables.d.ts +46 -0
  90. package/dist/backup/site/share-database/projection.tables.js +210 -0
  91. package/dist/backup/site/share-expiry.d.ts +75 -0
  92. package/dist/backup/site/share-expiry.js +49 -0
  93. package/dist/backup/site/share-export-failure.d.ts +17 -0
  94. package/dist/backup/site/share-export-failure.js +16 -0
  95. package/dist/backup/site/share-file-policy.d.ts +60 -0
  96. package/dist/backup/site/share-file-policy.js +146 -0
  97. package/dist/backup/site/share-hosting.d.ts +107 -0
  98. package/dist/backup/site/share-hosting.js +148 -0
  99. package/dist/backup/site/share-preparation-steps.d.ts +180 -0
  100. package/dist/backup/site/share-preparation-steps.js +107 -0
  101. package/dist/backup/site/share-preparation.d.ts +122 -0
  102. package/dist/backup/site/share-preparation.js +43 -0
  103. package/dist/backup/site/share-refusal.d.ts +21 -0
  104. package/dist/backup/site/share-refusal.js +20 -0
  105. package/dist/backup/site/share-registry.d.ts +124 -0
  106. package/dist/backup/site/share-registry.js +219 -0
  107. package/dist/backup/site/share-retention.d.ts +62 -0
  108. package/dist/backup/site/share-retention.js +126 -0
  109. package/dist/backup/site/share-service.d.ts +128 -0
  110. package/dist/backup/site/share-service.js +194 -0
  111. package/dist/backup/site/share-zip.d.ts +115 -0
  112. package/dist/backup/site/share-zip.js +144 -0
  113. package/dist/backup/site/sources.d.ts +344 -0
  114. package/dist/backup/site/sources.js +595 -0
  115. package/dist/backup/site/static-copy.d.ts +122 -0
  116. package/dist/backup/site/static-copy.js +165 -0
  117. package/dist/backup/site/static-download-html.d.ts +76 -0
  118. package/dist/backup/site/static-download-html.js +149 -0
  119. package/dist/backup/site/static-download-landing.d.ts +52 -0
  120. package/dist/backup/site/static-download-landing.js +95 -0
  121. package/dist/backup/site/static-download-layout.d.ts +96 -0
  122. package/dist/backup/site/static-download-layout.js +325 -0
  123. package/dist/backup/site/static-export-selection.d.ts +50 -0
  124. package/dist/backup/site/static-export-selection.js +75 -0
  125. package/dist/backup/site/static-site-packager.d.ts +42 -0
  126. package/dist/backup/site/static-site-packager.js +32 -0
  127. package/dist/backup/site/tool-registrations.d.ts +74 -0
  128. package/dist/backup/site/tool-registrations.js +204 -0
  129. package/dist/checks/complexity-debt.d.ts +100 -0
  130. package/dist/checks/complexity-debt.js +131 -0
  131. package/dist/checks/coverage/diff.js +5 -1
  132. package/dist/checks/coverage/lcov.js +1 -1
  133. package/dist/checks/env-access.d.ts +14 -1
  134. package/dist/checks/env-access.js +92 -6
  135. package/dist/checks/live-verify-checks.d.ts +29 -0
  136. package/dist/checks/live-verify-checks.js +30 -0
  137. package/dist/checks/quality-gates.d.ts +137 -0
  138. package/dist/checks/quality-gates.js +209 -0
  139. package/dist/core/deploy-types.d.ts +2 -0
  140. package/dist/deploy/admin-http/site-update-status.d.ts +8 -0
  141. package/dist/deploy/admin-http/site-update-status.js +15 -0
  142. package/dist/deploy/host-kit.d.ts +3 -0
  143. package/dist/deploy/index.d.ts +6 -0
  144. package/dist/deploy/index.js +6 -0
  145. package/dist/deploy/ops-runner.js +7 -0
  146. package/dist/deploy/ops-tool-contracts.d.ts +10 -1
  147. package/dist/deploy/react/Deployment.d.ts +37 -0
  148. package/dist/deploy/react/Deployment.js +94 -0
  149. package/dist/deploy/react/DockerfileTab.d.ts +72 -0
  150. package/dist/deploy/react/DockerfileTab.js +131 -0
  151. package/dist/deploy/react/HistoryTab.d.ts +43 -0
  152. package/dist/deploy/react/HistoryTab.js +12 -0
  153. package/dist/deploy/react/OverviewTab.d.ts +60 -0
  154. package/dist/deploy/react/OverviewTab.js +75 -0
  155. package/dist/deploy/react/PublishRunResult.d.ts +5 -1
  156. package/dist/deploy/react/PublishRunResult.js +4 -4
  157. package/dist/deploy/react/SiteUpdateNotice.d.ts +22 -0
  158. package/dist/deploy/react/SiteUpdateNotice.js +25 -0
  159. package/dist/deploy/react/StaticCredentialFields.d.ts +36 -0
  160. package/dist/deploy/react/StaticCredentialFields.js +63 -0
  161. package/dist/deploy/react/StaticCredentialSteps.d.ts +23 -0
  162. package/dist/deploy/react/StaticCredentialSteps.js +152 -0
  163. package/dist/deploy/react/StaticExportCard.d.ts +11 -0
  164. package/dist/deploy/react/StaticExportCard.js +97 -0
  165. package/dist/deploy/react/StaticPublishCredentials.d.ts +50 -0
  166. package/dist/deploy/react/StaticPublishCredentials.js +77 -0
  167. package/dist/deploy/react/StaticPublishForm.d.ts +12 -0
  168. package/dist/deploy/react/StaticPublishForm.js +91 -0
  169. package/dist/deploy/react/StaticSiteTab.d.ts +207 -0
  170. package/dist/deploy/react/StaticSiteTab.js +117 -0
  171. package/dist/deploy/react/deployment-visuals.d.ts +207 -0
  172. package/dist/deploy/react/deployment-visuals.js +101 -0
  173. package/dist/deploy/react/download-dockerfile.d.ts +14 -0
  174. package/dist/deploy/react/download-dockerfile.js +15 -0
  175. package/dist/deploy/react/hooks/publish-credential-draft.d.ts +33 -0
  176. package/dist/deploy/react/hooks/publish-credential-draft.js +54 -0
  177. package/dist/deploy/react/hooks/publish-credential-selection.d.ts +13 -0
  178. package/dist/deploy/react/hooks/publish-credential-selection.js +34 -0
  179. package/dist/deploy/react/hooks/publish-credential-writes.d.ts +20 -0
  180. package/dist/deploy/react/hooks/publish-credential-writes.js +99 -0
  181. package/dist/deploy/react/hooks/static-publish-actions.d.ts +10 -0
  182. package/dist/deploy/react/hooks/static-publish-actions.js +62 -0
  183. package/dist/deploy/react/hooks/static-publish-form.hooks.d.ts +38 -0
  184. package/dist/deploy/react/hooks/static-publish-form.hooks.js +103 -0
  185. package/dist/deploy/react/hooks/static-publish-run.hooks.d.ts +28 -0
  186. package/dist/deploy/react/hooks/static-publish-run.hooks.js +92 -0
  187. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.d.ts +148 -0
  188. package/dist/deploy/react/hooks/use-dockerfile-source.hooks.js +155 -0
  189. package/dist/deploy/react/hooks/use-publish-credentials.hooks.d.ts +268 -0
  190. package/dist/deploy/react/hooks/use-publish-credentials.hooks.js +52 -0
  191. package/dist/deploy/react/hooks/use-static-export.hooks.d.ts +128 -0
  192. package/dist/deploy/react/hooks/use-static-export.hooks.js +159 -0
  193. package/dist/deploy/react/hooks/use-static-publish.hooks.d.ts +208 -0
  194. package/dist/deploy/react/hooks/use-static-publish.hooks.js +48 -0
  195. package/dist/deploy/react/index.d.ts +4 -0
  196. package/dist/deploy/react/index.js +2 -0
  197. package/dist/deploy/react/rules.d.ts +363 -0
  198. package/dist/deploy/react/rules.js +314 -0
  199. package/dist/deploy/react/use-deployment-overview.hooks.d.ts +41 -0
  200. package/dist/deploy/react/use-deployment-overview.hooks.js +11 -0
  201. package/dist/deploy/site/agent-tools.d.ts +42 -0
  202. package/dist/deploy/site/agent-tools.js +119 -0
  203. package/dist/deploy/site/deploy-config-registry.d.ts +155 -0
  204. package/dist/deploy/site/deploy-config-registry.js +124 -0
  205. package/dist/deploy/site/deploy-config.d.ts +97 -0
  206. package/dist/deploy/site/deploy-config.js +115 -0
  207. package/dist/deploy/site/deploy-ops/agent-tools.d.ts +22 -0
  208. package/dist/deploy/site/deploy-ops/agent-tools.js +76 -0
  209. package/dist/deploy/site/deploy-ops/registry.d.ts +134 -0
  210. package/dist/deploy/site/deploy-ops/registry.js +106 -0
  211. package/dist/deploy/site/deploy-ops/run-ops.d.ts +66 -0
  212. package/dist/deploy/site/deploy-ops/run-ops.js +34 -0
  213. package/dist/deploy/site/deploy-ops/secret-confirm.d.ts +36 -0
  214. package/dist/deploy/site/deploy-ops/secret-confirm.js +27 -0
  215. package/dist/deploy/site/deploy-targets/host-kit.d.ts +28 -0
  216. package/dist/deploy/site/deploy-targets/host-kit.js +120 -0
  217. package/dist/deploy/site/deploy-targets/registry.d.ts +157 -0
  218. package/dist/deploy/site/deploy-targets/registry.js +130 -0
  219. package/dist/deploy/site/deploy-targets/types.d.ts +27 -0
  220. package/dist/deploy/site/deploy-targets/types.js +2 -0
  221. package/dist/deploy/site/dockerfile.d.ts +137 -0
  222. package/dist/deploy/site/dockerfile.js +101 -0
  223. package/dist/deploy/site/export-run.d.ts +137 -0
  224. package/dist/deploy/site/export-run.js +152 -0
  225. package/dist/deploy/site/ports.d.ts +115 -0
  226. package/dist/deploy/site/ports.js +2 -0
  227. package/dist/deploy/site/publish-agent-tools.d.ts +18 -0
  228. package/dist/deploy/site/publish-agent-tools.js +120 -0
  229. package/dist/deploy/site/publish-candidate.d.ts +26 -0
  230. package/dist/deploy/site/publish-candidate.js +37 -0
  231. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.d.ts +78 -0
  232. package/dist/deploy/site/publish-credentials/account-label-heal-scheduler.js +88 -0
  233. package/dist/deploy/site/publish-credentials/compatibility-port.d.ts +38 -0
  234. package/dist/deploy/site/publish-credentials/compatibility-port.js +19 -0
  235. package/dist/deploy/site/publish-credentials/execution-mode.d.ts +43 -0
  236. package/dist/deploy/site/publish-credentials/execution-mode.js +19 -0
  237. package/dist/deploy/site/publish-credentials/store-owner.d.ts +11 -0
  238. package/dist/deploy/site/publish-credentials/store-owner.js +9 -0
  239. package/dist/deploy/site/publish-credentials/store-resolution.d.ts +55 -0
  240. package/dist/deploy/site/publish-credentials/store-resolution.js +100 -0
  241. package/dist/deploy/site/publish-credentials/store-validation.d.ts +68 -0
  242. package/dist/deploy/site/publish-credentials/store-validation.js +182 -0
  243. package/dist/deploy/site/publish-credentials/store.d.ts +321 -0
  244. package/dist/deploy/site/publish-credentials/store.js +367 -0
  245. package/dist/deploy/site/publish-credentials/types.d.ts +85 -0
  246. package/dist/deploy/site/publish-credentials/types.js +2 -0
  247. package/dist/deploy/site/publish-tool-capabilities.d.ts +123 -0
  248. package/dist/deploy/site/publish-tool-capabilities.js +175 -0
  249. package/dist/deploy/site/publish-tool-credential.d.ts +48 -0
  250. package/dist/deploy/site/publish-tool-credential.js +284 -0
  251. package/dist/deploy/site/publish-tool-deps.d.ts +205 -0
  252. package/dist/deploy/site/publish-tool-deps.js +15 -0
  253. package/dist/deploy/site/publish-tool-execution.d.ts +78 -0
  254. package/dist/deploy/site/publish-tool-execution.js +313 -0
  255. package/dist/deploy/site/publish-tool-schema.d.ts +29 -0
  256. package/dist/deploy/site/publish-tool-schema.js +38 -0
  257. package/dist/deploy/site/static-publish/adapter-export.d.ts +54 -0
  258. package/dist/deploy/site/static-publish/adapter-export.js +89 -0
  259. package/dist/deploy/site/static-publish/adapter-plan.d.ts +99 -0
  260. package/dist/deploy/site/static-publish/adapter-plan.js +112 -0
  261. package/dist/deploy/site/static-publish/adapter.d.ts +182 -0
  262. package/dist/deploy/site/static-publish/adapter.js +321 -0
  263. package/dist/deploy/site/static-publish/admin-publish-read.d.ts +209 -0
  264. package/dist/deploy/site/static-publish/admin-publish-read.js +118 -0
  265. package/dist/deploy/site/static-publish/credentials.d.ts +114 -0
  266. package/dist/deploy/site/static-publish/credentials.js +298 -0
  267. package/dist/deploy/site/static-publish/domain-publish-rows.d.ts +25 -0
  268. package/dist/deploy/site/static-publish/domain-publish-rows.js +43 -0
  269. package/dist/deploy/site/static-publish/domain-publish-tool.d.ts +19 -0
  270. package/dist/deploy/site/static-publish/domain-publish-tool.js +111 -0
  271. package/dist/deploy/site/static-publish/inspection.d.ts +24 -0
  272. package/dist/deploy/site/static-publish/inspection.js +69 -0
  273. package/dist/deploy/site/static-publish/publish-history.d.ts +197 -0
  274. package/dist/deploy/site/static-publish/publish-history.js +153 -0
  275. package/dist/deploy/site/static-publish/publish-run.d.ts +156 -0
  276. package/dist/deploy/site/static-publish/publish-run.js +186 -0
  277. package/dist/deploy/site/static-publish/types.d.ts +168 -0
  278. package/dist/deploy/site/static-publish/types.js +2 -0
  279. package/dist/deploy/site/static-publish/verify.d.ts +237 -0
  280. package/dist/deploy/site/static-publish/verify.js +284 -0
  281. package/dist/deploy/site/tool-registrations.d.ts +97 -0
  282. package/dist/deploy/site/tool-registrations.js +130 -0
  283. package/dist/deploy/site/types.d.ts +51 -0
  284. package/dist/deploy/site/types.js +2 -0
  285. package/dist/deploy/site-update/check-for-update.d.ts +19 -0
  286. package/dist/deploy/site-update/check-for-update.js +19 -0
  287. package/dist/deploy/site-update/contracts.d.ts +161 -0
  288. package/dist/deploy/site-update/contracts.js +94 -0
  289. package/dist/deploy/site-update/desktop-site-update.d.ts +66 -0
  290. package/dist/deploy/site-update/desktop-site-update.js +43 -0
  291. package/dist/deploy/site-update/fake-site-update.d.ts +39 -0
  292. package/dist/deploy/site-update/fake-site-update.js +52 -0
  293. package/dist/deploy/site-update/run-site-update.d.ts +121 -0
  294. package/dist/deploy/site-update/run-site-update.js +219 -0
  295. package/dist/deploy/site-update/self-hosted-site-update.d.ts +71 -0
  296. package/dist/deploy/site-update/self-hosted-site-update.js +79 -0
  297. package/dist/deploy/target-contracts.d.ts +3 -0
  298. package/dist/deploy/tool.d.ts +5 -8
  299. package/dist/deploy/tool.js +6 -9
  300. package/dist/dns/binding-sweeper.d.ts +72 -0
  301. package/dist/dns/binding-sweeper.js +53 -0
  302. package/dist/dns/index.d.ts +1 -0
  303. package/dist/dns/index.js +1 -0
  304. package/dist/dns/site/binding.repo.d.ts +71 -0
  305. package/dist/dns/site/binding.repo.js +45 -0
  306. package/dist/dns/site/dns-changes.d.ts +90 -0
  307. package/dist/dns/site/dns-changes.js +271 -0
  308. package/dist/dns/site/dns-tools.d.ts +46 -0
  309. package/dist/dns/site/dns-tools.js +204 -0
  310. package/dist/dns/site/mail-dns-status.d.ts +111 -0
  311. package/dist/dns/site/mail-dns-status.js +190 -0
  312. package/dist/dns/site/mail-dns-tools.d.ts +33 -0
  313. package/dist/dns/site/mail-dns-tools.js +62 -0
  314. package/dist/dns/site/mail-requirements.d.ts +30 -0
  315. package/dist/dns/site/mail-requirements.js +78 -0
  316. package/dist/dns/site/tool-deps.d.ts +21 -0
  317. package/dist/dns/site/tool-deps.js +2 -0
  318. package/dist/dns/site/tools.d.ts +74 -0
  319. package/dist/dns/site/tools.js +124 -0
  320. package/dist/local-dev/bind-host.d.ts +80 -0
  321. package/dist/local-dev/bind-host.js +90 -0
  322. package/dist/local-dev/dev-proxy-upstream.d.ts +69 -0
  323. package/dist/local-dev/dev-proxy-upstream.js +63 -0
  324. package/dist/local-dev/index.d.ts +28 -0
  325. package/dist/local-dev/index.js +25 -0
  326. package/dist/packaging/electron/archive.d.ts +2 -9
  327. package/dist/packaging/electron/asar-adapter.d.ts +2 -1
  328. package/dist/packaging/electron/entry.d.ts +2 -0
  329. package/dist/packaging/electron/move-to-applications.d.ts +165 -0
  330. package/dist/packaging/electron/move-to-applications.js +162 -0
  331. package/dist/packaging/electron/policies.d.ts +33 -4
  332. package/dist/packaging/electron/policies.js +29 -10
  333. package/dist/packaging/electron/ports.d.ts +1 -6
  334. package/dist/packaging/electron/staging.d.ts +11 -2
  335. package/dist/packaging/electron/staging.js +15 -5
  336. package/dist/packaging/electron/update-manifest-merge.js +0 -2
  337. package/dist/react/site-share-expiry/ShareExpiryControls.d.ts +29 -0
  338. package/dist/react/site-share-expiry/ShareExpiryControls.js +7 -0
  339. package/dist/react/site-share-expiry/index.d.ts +2 -0
  340. package/dist/react/site-share-expiry/index.js +2 -0
  341. package/dist/source-control/react/ProvidersTab.d.ts +98 -0
  342. package/dist/source-control/react/ProvidersTab.js +195 -0
  343. package/dist/source-control/react/SourceControl.d.ts +51 -0
  344. package/dist/source-control/react/SourceControl.js +61 -0
  345. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.d.ts +128 -0
  346. package/dist/source-control/react/hooks/use-source-control-credentials.hooks.js +102 -0
  347. package/dist/source-control/react/rules.d.ts +167 -0
  348. package/dist/source-control/react/rules.js +125 -0
  349. package/dist/source-control/react/source-control-visuals.d.ts +75 -0
  350. package/dist/source-control/react/source-control-visuals.js +48 -0
  351. package/dist/source-control/site/agent-tools.d.ts +5 -0
  352. package/dist/source-control/site/agent-tools.js +30 -0
  353. package/dist/source-control/site/bundled-provider-registry.d.ts +33 -0
  354. package/dist/source-control/site/bundled-provider-registry.js +37 -0
  355. package/dist/source-control/site/commit-schema.d.ts +40 -0
  356. package/dist/source-control/site/commit-schema.js +29 -0
  357. package/dist/source-control/site/commit-target.d.ts +26 -0
  358. package/dist/source-control/site/commit-target.js +58 -0
  359. package/dist/source-control/site/credential-form.d.ts +36 -0
  360. package/dist/source-control/site/credential-form.js +102 -0
  361. package/dist/source-control/site/credential-setup.d.ts +107 -0
  362. package/dist/source-control/site/credential-setup.js +216 -0
  363. package/dist/source-control/site/provider-kit.d.ts +37 -0
  364. package/dist/source-control/site/provider-kit.js +35 -0
  365. package/dist/source-control/site/provider-module.d.ts +251 -0
  366. package/dist/source-control/site/provider-module.js +2 -0
  367. package/dist/source-control/site/saved-key-bindings.d.ts +4 -0
  368. package/dist/source-control/site/saved-key-bindings.js +4 -0
  369. package/dist/source-control/site/static-site-packager-port.d.ts +37 -0
  370. package/dist/source-control/site/static-site-packager-port.js +2 -0
  371. package/dist/source-control/site/store.d.ts +209 -0
  372. package/dist/source-control/site/store.js +374 -0
  373. package/dist/source-control/site/store.validation.d.ts +72 -0
  374. package/dist/source-control/site/store.validation.js +168 -0
  375. package/dist/source-control/site/tool-registrations.d.ts +190 -0
  376. package/dist/source-control/site/tool-registrations.js +379 -0
  377. package/dist/static-export/asset-crawl.d.ts +30 -0
  378. package/dist/static-export/asset-crawl.js +71 -0
  379. package/dist/static-export/dynamic-asset-locations.d.ts +23 -0
  380. package/dist/static-export/dynamic-asset-locations.js +34 -0
  381. package/dist/static-export/html-url-locations.d.ts +3 -1
  382. package/dist/static-export/html-url-locations.js +43 -9
  383. package/dist/static-export/runner.js +26 -27
  384. package/dist/static-export/site/export-preflight.d.ts +48 -0
  385. package/dist/static-export/site/export-preflight.js +82 -0
  386. package/dist/static-export/site/media-original-urls.d.ts +57 -0
  387. package/dist/static-export/site/media-original-urls.js +109 -0
  388. package/dist/static-export/site/ports.d.ts +82 -0
  389. package/dist/static-export/site/ports.js +29 -0
  390. package/dist/static-export/site/public-origin-policy.d.ts +32 -0
  391. package/dist/static-export/site/public-origin-policy.js +68 -0
  392. package/dist/static-export/site/route-manifest.d.ts +65 -0
  393. package/dist/static-export/site/route-manifest.js +139 -0
  394. package/dist/static-export/site/site-exporter.d.ts +158 -0
  395. package/dist/static-export/site/site-exporter.js +112 -0
  396. package/dist/static-export/site/static-security-headers.d.ts +39 -0
  397. package/dist/static-export/site/static-security-headers.js +43 -0
  398. package/dist/static-export/site/theme-preview-manifest.d.ts +35 -0
  399. package/dist/static-export/site/theme-preview-manifest.js +28 -0
  400. package/dist/static-export/transforms.d.ts +1 -1
  401. package/dist/static-export/transforms.js +3 -3
  402. package/package.json +911 -7
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import {} from '@jini-ai/core/text';
3
+ /**
4
+ * @file The Deployment panel's own small presentational pieces — four inline icons and the
5
+ * capability list they sit above. No hooks, no fetch, no data of its own.
6
+ *
7
+ * Icons are inline SVG at `currentColor` rather than an icon dependency: this app ships no icon
8
+ * component library to `features/` (the sidebar's own glyphs are inline SVG in `App.tsx`, and
9
+ * `SettingsUi.tsx`'s tab icons are inline SVG too), so following that is reuse, not reinvention.
10
+ * All four are `aria-hidden` — every one of them sits next to text that already says the same
11
+ * thing, and an icon that duplicates its own label is noise to a screen reader
12
+ * (`frontend-accessibility`: "do not add `aria-label` to elements that already have visible text").
13
+ * The one exception is {@link CapabilityMark}, whose ✓/✗ carries meaning the row's label does NOT
14
+ * repeat, so it gets a real accessible name.
15
+ *
16
+ * Sizes are `1em`-relative where the icon sits inline with text, so they track the type scale
17
+ * instead of pinning a px size that drifts when the surrounding text changes
18
+ * (`kole-jain-uiux-concepts`: "size icons to match the related text line height").
19
+ */
20
+ // Line-icon attributes: components/line-icon.ts.
21
+ /** Overview — a small dashboard grid, i.e. a summary of several facts at a glance. Added for the
22
+ * Deployment tab row's own icon set (owner request) — the four tabs beside it already had a glyph
23
+ * each; this is Overview's. */
24
+ export function OverviewIcon({ size = 20, lineIcon }) {
25
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1.5" }), _jsx("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1.5" })] }));
26
+ }
27
+ /** Static Site — a document, i.e. files on disk with no machine behind them. */
28
+ export function StaticSiteIcon({ size = 20, lineIcon }) {
29
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("path", { d: "M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z" }), _jsx("path", { d: "M14 3v5h5" }), _jsx("path", { d: "M9 13h6M9 17h4" })] }));
30
+ }
31
+ /** Full Site — stacked server racks, i.e. a machine that stays running. */
32
+ export function FullSiteIcon({ size = 20, lineIcon }) {
33
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }), _jsx("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }), _jsx("path", { d: "M7 7.5h.01M7 16.5h.01" })] }));
34
+ }
35
+ /** History — a clock with no hands set to a real time, for a tab that has nothing to show yet. */
36
+ export function HistoryIcon({ size = 20, lineIcon }) {
37
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("circle", { cx: "12", cy: "12", r: "9" }), _jsx("path", { d: "M12 7v5l3 2" })] }));
38
+ }
39
+ /** Dockerfile — a stack of layers, the shape of an image build. */
40
+ export function LayersIcon({ size = 20, lineIcon }) {
41
+ return (_jsxs("svg", { ...lineIcon, width: size, height: size, children: [_jsx("path", { d: "m12 3 9 5-9 5-9-5z" }), _jsx("path", { d: "m3 13 9 5 9-5" })] }));
42
+ }
43
+ /**
44
+ * The checkmark inside a completed step's marker (`StaticSiteTab.tsx`'s `CredentialStepDone`) — the
45
+ * same check-glyph path {@link CapabilityMark} uses for "Supported", reused here rather than
46
+ * redrawn, so the two ✓ marks on this tab (a capability that survives the export, a credential
47
+ * that's connected) read as the same symbol meaning the same thing. Always `aria-hidden`: the
48
+ * summary text next to it already states "connected" in words — this glyph is reinforcement on a
49
+ * step marker that already has its own accessible summary, not the only place the fact lives (a
50
+ * genuine second appearance, not this icon file's usual "every icon sits next to text that already
51
+ * says the same thing" rule stretched to cover something new).
52
+ */
53
+ export function StepDoneIcon({ size = 12, lineIcon, Icon }) {
54
+ return (_jsx(Icon, { name: "check-long", size: size, focusable: undefined, ...lineIcon, stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true" }));
55
+ }
56
+ /**
57
+ * The disclosure chevron on a collapsed `<summary>` (`StaticSiteTab.tsx`'s `CredentialStepDone`),
58
+ * rotated 180° by CSS when its `<details>` is open.
59
+ *
60
+ * Exists because that summary had NO expand affordance at all (owner-reported, 2026-08-15): the row
61
+ * was clickable and its stylesheet had deliberately stripped the browser's native triangle
62
+ * (`list-style: none` plus the `::-webkit-details-marker` reset), on the reasoning that "the row's
63
+ * own hover/focus are signifier enough". They are not — a reader with a rotated access token had no
64
+ * way to discover the row could be opened to replace it. This is that missing signifier, restored
65
+ * on purpose rather than by putting the native triangle back: the stripped triangle would sit at
66
+ * the START of the row, competing with the step marker for "which glyph means what", which is the
67
+ * problem the reset was avoiding. This one sits at the END, beside a visible text label that says
68
+ * what opening does.
69
+ *
70
+ * `aria-hidden` like every other icon here, and for the usual reason: `<summary>` already exposes
71
+ * its own expanded/collapsed state to a screen reader, and the label beside this glyph already says
72
+ * the rest in words.
73
+ */
74
+ export function DisclosureChevron({ size = 14, lineIcon, Icon }) {
75
+ return (_jsx(Icon, { name: "chevron-down", size: size, focusable: undefined, ...lineIcon }));
76
+ }
77
+ /**
78
+ * The ✓ or ✗ beside a capability row.
79
+ *
80
+ * Two distinct SHAPES, not one shape in two colors — a check and a cross are told apart with no
81
+ * color perception at all, which is the requirement (`frontend-accessibility`: "color is not the
82
+ * only means of conveying information"). The color on top is reinforcement. The `<title>` gives
83
+ * the mark a real accessible name because, unlike every other icon in this file, it states
84
+ * something its neighbouring label does not: the label is "Checkout", the mark is what says whether
85
+ * you get it.
86
+ */
87
+ export function CapabilityMark({ supported, t, lineIcon }) {
88
+ const label = supported ? t("Supported") : t("Not supported");
89
+ return (_jsx("span", { className: `deployment-caps-mark ${supported ? "deployment-caps-yes" : "deployment-caps-no"}`, children: _jsxs("svg", { ...lineIcon, "aria-hidden": undefined, role: "img", width: "1em", height: "1em", strokeWidth: 2.25, children: [_jsx("title", { children: label }), supported ? _jsx("path", { d: "m5 13 4.5 4.5L19 6.5" }) : _jsx("path", { d: "M6 6l12 12M18 6L6 18" })] }) }));
90
+ }
91
+ /**
92
+ * The "what works on this path" list — the same four rows rendered on both Overview path cards and
93
+ * again on the Static Site tab, so the reader meets one fact in one shape rather than a comparison
94
+ * on one screen and a prose restatement on another (`self-made-web-designer-core-skills`' visual
95
+ * rhyming). Rows come from `rules.ts`'s {@link DeploymentCapability} table; nothing here decides
96
+ * what is or is not supported.
97
+ */
98
+ export function CapabilityList({ rows, t, lineIcon }) {
99
+ return (_jsx("ul", { className: "deployment-caps", children: rows.map((row) => (_jsxs("li", { className: row.supported ? undefined : "is-off", children: [_jsx(CapabilityMark, { supported: row.supported, t: t, lineIcon: lineIcon }), _jsx("span", { children: t(row.labelKey) })] }, row.id))) }));
100
+ }
101
+ //# sourceMappingURL=deployment-visuals.js.map
@@ -0,0 +1,14 @@
1
+ /** Triggers a browser file download of `contents` as `Dockerfile` — plain DOM manipulation with no
2
+ * state of its own to expose, so it stays a local function rather than living in the hook (see
3
+ * `use-dockerfile-source.hooks.ts`'s header for why `copy` DOES live there but this doesn't).
4
+ * `URL.revokeObjectURL` after the click so the blob URL doesn't leak for the rest of the page's
5
+ * lifetime — the anchor never needs to be appended to the document for `.click()` to fire it. */
6
+ export declare function downloadDockerfile({ contents, Blob, URL, document }: {
7
+ contents: string;
8
+ Blob: typeof globalThis.Blob;
9
+ URL: Pick<typeof globalThis.URL, "createObjectURL" | "revokeObjectURL">;
10
+ document: {
11
+ createElement: (tag: "a") => Pick<HTMLAnchorElement, "href" | "download" | "click">;
12
+ };
13
+ }, _options?: {}): void;
14
+ //# sourceMappingURL=download-dockerfile.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Triggers a browser file download of `contents` as `Dockerfile` — plain DOM manipulation with no
2
+ * state of its own to expose, so it stays a local function rather than living in the hook (see
3
+ * `use-dockerfile-source.hooks.ts`'s header for why `copy` DOES live there but this doesn't).
4
+ * `URL.revokeObjectURL` after the click so the blob URL doesn't leak for the rest of the page's
5
+ * lifetime — the anchor never needs to be appended to the document for `.click()` to fire it. */
6
+ export function downloadDockerfile({ contents, Blob, URL, document }, _options = {}) {
7
+ const blob = new Blob([contents], { type: "text/plain" });
8
+ const url = URL.createObjectURL(blob);
9
+ const anchor = document.createElement("a");
10
+ anchor.href = url;
11
+ anchor.download = "Dockerfile";
12
+ anchor.click();
13
+ URL.revokeObjectURL(url);
14
+ }
15
+ //# sourceMappingURL=download-dockerfile.js.map
@@ -0,0 +1,33 @@
1
+ import type { Dispatch, SetStateAction } from "react";
2
+ import type { AdminPublishCredentialProviderId, AdminPublishCredentialSummary } from "@jini-ai/core/contracts/site/api-security-api-types";
3
+ import type { usePublishCredentials, RowFormState, SelectionState, PublishCredentialRowState } from "./use-publish-credentials.hooks.js";
4
+ export declare function blankRowFormState(): RowFormState;
5
+ /**
6
+ * A row's form state once its save has succeeded: blank, as before — unless the operator edited the
7
+ * draft while the request was in flight (the inputs stay editable; only Save disables). That newer
8
+ * draft was never sent, so it is kept whole rather than blanked into a "Connected" row that implies
9
+ * it was saved (terra review 2026-09-20, finding 4's sibling). Kept whole, not per field, so a
10
+ * two-field provider's draft stays savable as one piece.
11
+ * @complexity O(1).
12
+ */
13
+ export declare function rowFormStateAfterSave(current: RowFormState, sent: Readonly<Record<string, string>>): RowFormState;
14
+ /** A provider's form state, blank until its row is first touched. @complexity O(1). */
15
+ export declare function rowFormStateFor(states: Readonly<Record<string, RowFormState>>, providerId: AdminPublishCredentialProviderId): RowFormState;
16
+ export declare function patchRow({ providerId, patch, setFormStates }: {
17
+ setFormStates: Dispatch<SetStateAction<Record<AdminPublishCredentialProviderId, RowFormState>>>;
18
+ providerId: AdminPublishCredentialProviderId;
19
+ patch: (current: RowFormState) => RowFormState;
20
+ }, _options?: {}): void;
21
+ export declare function setField({ providerId, fieldName, value, targets, deps, locale, setFormStates }: Pick<Parameters<typeof usePublishCredentials>[0], "locale" | "targets" | "deps"> & {
22
+ setFormStates: Dispatch<SetStateAction<Record<AdminPublishCredentialProviderId, RowFormState>>>;
23
+ } & {
24
+ providerId: AdminPublishCredentialProviderId;
25
+ fieldName: string;
26
+ value: string;
27
+ }, _options?: {}): void;
28
+ export declare function rows({ credentials, targets, formStates, selections }: Pick<Parameters<typeof usePublishCredentials>[0], "targets"> & {
29
+ credentials: AdminPublishCredentialSummary[] | undefined;
30
+ formStates: Record<AdminPublishCredentialProviderId, RowFormState>;
31
+ selections: Partial<Record<AdminPublishCredentialProviderId, SelectionState>>;
32
+ }, _optional?: {}): readonly PublishCredentialRowState[] | undefined;
33
+ //# sourceMappingURL=publish-credential-draft.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { defaultCredentialForProvider } from "../rules.js";
2
+ export function blankRowFormState() {
3
+ return { values: {}, saving: false, error: null, verifying: false, verification: undefined, verifyError: null, verifiedCredentialId: null };
4
+ }
5
+ /**
6
+ * A row's form state once its save has succeeded: blank, as before — unless the operator edited the
7
+ * draft while the request was in flight (the inputs stay editable; only Save disables). That newer
8
+ * draft was never sent, so it is kept whole rather than blanked into a "Connected" row that implies
9
+ * it was saved (terra review 2026-09-20, finding 4's sibling). Kept whole, not per field, so a
10
+ * two-field provider's draft stays savable as one piece.
11
+ * @complexity O(1).
12
+ */
13
+ export function rowFormStateAfterSave(current, sent) {
14
+ return current.values === sent ? blankRowFormState() : { ...blankRowFormState(), values: current.values };
15
+ }
16
+ /** A provider's form state, blank until its row is first touched. @complexity O(1). */
17
+ export function rowFormStateFor(states, providerId) {
18
+ return states[providerId] ?? blankRowFormState();
19
+ }
20
+ // Every write below goes through this, so a row never touched before starts from a blank state.
21
+ export function patchRow({ providerId, patch, setFormStates }, _options = {}) {
22
+ setFormStates((prev) => ({ ...prev, [providerId]: patch(rowFormStateFor(prev, providerId)) }));
23
+ }
24
+ export function setField({ providerId, fieldName, value, targets, deps, locale, setFormStates }, _options = {}) {
25
+ const spec = targets?.find(target => target.id === providerId)?.credential;
26
+ const secret = fieldName === spec?.tokenField || spec?.fields.some(field => field.name === fieldName && field.secret);
27
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...current, values: { ...current.values, [fieldName]: value }, ...(secret ? { error: deps.credentialDraftError({ value }, { locale }) } : {}) }) });
28
+ }
29
+ export function rows({ credentials, targets, formStates, selections }, _optional = {}) {
30
+ return credentials === undefined || targets === undefined
31
+ ? undefined
32
+ : targets.flatMap((target) => {
33
+ if (target.credential === undefined)
34
+ return [];
35
+ const formState = rowFormStateFor(formStates, target.id);
36
+ const saved = defaultCredentialForProvider({ credentials, providerId: target.id });
37
+ const verdictIsForSaved = saved !== undefined && formState.verifiedCredentialId === saved.id;
38
+ return {
39
+ providerId: target.id,
40
+ label: target.label,
41
+ credential: target.credential,
42
+ saved,
43
+ values: formState.values,
44
+ saving: formState.saving,
45
+ error: formState.error,
46
+ verifying: formState.verifying,
47
+ verification: verdictIsForSaved ? formState.verification : undefined,
48
+ verifyError: verdictIsForSaved ? formState.verifyError : null,
49
+ selectingCredentialId: selections[target.id]?.pendingId ?? null,
50
+ selectError: selections[target.id]?.error ?? null,
51
+ };
52
+ });
53
+ }
54
+ //# sourceMappingURL=publish-credential-draft.js.map
@@ -0,0 +1,13 @@
1
+ import type { Dispatch, SetStateAction, RefObject } from "react";
2
+ import type { AdminPublishCredentialProviderId, AdminPublishCredentialSummary } from "@jini-ai/core/contracts/site/api-security-api-types";
3
+ import type { usePublishCredentials, SelectionState } from "./use-publish-credentials.hooks.js";
4
+ export declare function selectCredential({ providerId, credentialId, credentials, selectingRef, setSelections, port, setCredentials, locale, deps }: Pick<Parameters<typeof usePublishCredentials>[0], "port" | "locale" | "deps"> & {
5
+ credentials: AdminPublishCredentialSummary[] | undefined;
6
+ setCredentials: Dispatch<SetStateAction<AdminPublishCredentialSummary[] | undefined>>;
7
+ setSelections: Dispatch<SetStateAction<Partial<Record<AdminPublishCredentialProviderId, SelectionState>>>>;
8
+ selectingRef: RefObject<Set<AdminPublishCredentialProviderId>>;
9
+ } & {
10
+ providerId: AdminPublishCredentialProviderId;
11
+ credentialId: string;
12
+ }, _options?: {}): Promise<void>;
13
+ //# sourceMappingURL=publish-credential-selection.d.ts.map
@@ -0,0 +1,34 @@
1
+ import { defaultCredentialForProvider, withPromotedDefault } from "../rules.js";
2
+ export async function selectCredential({ providerId, credentialId, credentials, selectingRef, setSelections, port, setCredentials, locale, deps }, _options = {}) {
3
+ const current = defaultCredentialForProvider({ credentials: credentials ?? [], providerId });
4
+ if (current?.id === credentialId || selectingRef.current.has(providerId))
5
+ return;
6
+ selectingRef.current.add(providerId);
7
+ setSelections((prev) => ({ ...prev, [providerId]: { pendingId: credentialId, error: null } }));
8
+ let error = null;
9
+ try {
10
+ const promoted = await port.updateCredential({ id: credentialId, input: { isDefault: true } });
11
+ setCredentials((prev) => withPromotedDefault({ credentials: prev ?? [], promoted }));
12
+ await reconcileCredentials({ port, setCredentials });
13
+ }
14
+ catch (err) {
15
+ error = deps.publishCredentialSelectErrorMessage({ locale, error: deps.describeApiError({ e: err, fallback: "unknown error" }) });
16
+ }
17
+ finally {
18
+ selectingRef.current.delete(providerId);
19
+ setSelections((prev) => ({ ...prev, [providerId]: { pendingId: null, error } }));
20
+ }
21
+ }
22
+ /** Best-effort re-read after a promotion the server already confirmed. A failure is deliberately
23
+ * swallowed: the local list was already updated from the server's own response, so it is correct —
24
+ * surfacing an error here would tell the operator the switch failed when it did not. */
25
+ async function reconcileCredentials({ port, setCredentials }, _optional = {}) {
26
+ try {
27
+ const refreshed = await port.listCredentials();
28
+ setCredentials(refreshed.credentials);
29
+ }
30
+ catch {
31
+ // See this function's doc — the confirmed local promotion stands.
32
+ }
33
+ }
34
+ //# sourceMappingURL=publish-credential-selection.js.map
@@ -0,0 +1,20 @@
1
+ import type { Dispatch, SetStateAction, RefObject } from "react";
2
+ import type { AdminPublishCredentialProviderId, AdminPublishCredentialSummary } from "@jini-ai/core/contracts/site/api-security-api-types";
3
+ import type { usePublishCredentials, RowFormState } from "./use-publish-credentials.hooks.js";
4
+ export declare function save(state: Pick<Parameters<typeof usePublishCredentials>[0], "port" | "t" | "locale" | "targets" | "deps"> & {
5
+ credentials: AdminPublishCredentialSummary[] | undefined;
6
+ setCredentials: Dispatch<SetStateAction<AdminPublishCredentialSummary[] | undefined>>;
7
+ formStates: Record<AdminPublishCredentialProviderId, RowFormState>;
8
+ setFormStates: Dispatch<SetStateAction<Record<AdminPublishCredentialProviderId, RowFormState>>>;
9
+ savingRef: RefObject<Set<AdminPublishCredentialProviderId>>;
10
+ } & {
11
+ providerId: AdminPublishCredentialProviderId;
12
+ }, _optional?: {}): Promise<void>;
13
+ export declare function verify({ providerId, credentials, port, setCredentials, setFormStates, locale, deps }: Pick<Parameters<typeof usePublishCredentials>[0], "port" | "locale" | "deps"> & {
14
+ credentials: AdminPublishCredentialSummary[] | undefined;
15
+ setCredentials: Dispatch<SetStateAction<AdminPublishCredentialSummary[] | undefined>>;
16
+ setFormStates: Dispatch<SetStateAction<Record<AdminPublishCredentialProviderId, RowFormState>>>;
17
+ } & {
18
+ providerId: AdminPublishCredentialProviderId;
19
+ }, _optional?: {}): Promise<void>;
20
+ //# sourceMappingURL=publish-credential-writes.d.ts.map
@@ -0,0 +1,99 @@
1
+ import { defaultCredentialForProvider, credentialFormReadyToSave, buildCredentialConnectionInput, PUBLISH_CREDENTIAL_ROW_LABEL } from "../rules.js";
2
+ import { patchRow, rowFormStateFor, rowFormStateAfterSave } from "./publish-credential-draft.js";
3
+ /** Translates a rejected create/update into the exact string {@link usePublishCredentials}'s `save`
4
+ * stores as that row's `error` — pulled out of `save` for the same complexity-budget reason
5
+ * `StaticSiteTab.tsx`'s per-provider field split documents one file over. Layers
6
+ * `classifyCredentialSubmitError`'s (`@jini-ai/admin/shell/lib/credential-submit-error`) specific cases over the shared
7
+ * `describeApiError` base case, same "check specific codes first, fall through to the shared base"
8
+ * convention `lib/api.ts`'s own `describeApiError` doc recommends every screen follow. The
9
+ * duplicate-label case reads oddly translated verbatim from the server ("a credential labeled...")
10
+ * since this UI no longer shows labels at all, so it gets its own row-shaped sentence instead of the
11
+ * server's own wording — this case should be unreachable in normal use (save always targets an
12
+ * existing row's id once one exists) and can only fire on a genuine write race.
13
+ * @complexity O(1). */
14
+ function publishCredentialSubmitErrorMessage({ err, t, locale, deps }, _options = {}) {
15
+ const classified = deps.classifyCredentialSubmitError({ error: err });
16
+ if (classified.kind === "duplicate-label")
17
+ return t("This connection was already saved — reload the page and try again.");
18
+ if (classified.kind === "validation")
19
+ return deps.publishCredentialSaveErrorMessage({ locale, error: deps.translateCredentialMessage({ message: classified.detail, locale }) });
20
+ return deps.publishCredentialSaveErrorMessage({ locale, error: deps.describeApiError({ e: err, fallback: t("Unknown error") }) });
21
+ }
22
+ /** Validate the draft before checking the in-flight guard, so even a duplicate click reports
23
+ * invalid edits made while the original request is pending. */
24
+ function canSaveCredential({ providerId, spec, values, credentials, savingRef, deps, locale, setFormStates }, _options = {}) {
25
+ if (spec) {
26
+ const error = deps.credentialDraftError({ value: values[spec.tokenField] ?? '' }, { locale, required: !defaultCredentialForProvider({ credentials: credentials ?? [], providerId }) });
27
+ if (error) {
28
+ patchRow({ setFormStates, providerId, patch: current => ({ ...current, error }) });
29
+ return false;
30
+ }
31
+ }
32
+ return spec !== undefined && credentialFormReadyToSave({ spec: spec, values: values }) && !savingRef.current.has(providerId);
33
+ }
34
+ export async function save(state, _optional = {}) {
35
+ const { providerId, targets, formStates, credentials, savingRef, port, setCredentials, setFormStates, t, locale, deps } = state;
36
+ const spec = targets?.find((target) => target.id === providerId)?.credential;
37
+ const values = rowFormStateFor(formStates, providerId).values;
38
+ if (!canSaveCredential({ ...state, providerId, spec, values }) || spec === undefined)
39
+ return;
40
+ savingRef.current.add(providerId);
41
+ const existing = defaultCredentialForProvider({ credentials: credentials ?? [], providerId });
42
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...current, saving: true, error: null }) });
43
+ try {
44
+ const connection = buildCredentialConnectionInput({ providerId, spec, values });
45
+ const { verification, ...saved } = existing
46
+ ? await port.updateCredential({ id: existing.id, input: { connection } })
47
+ : await port.createCredential({ label: PUBLISH_CREDENTIAL_ROW_LABEL, connection });
48
+ // The response's summary predates the server's own `healAccountLabel` write in the same request.
49
+ const result = verifiedCredentialSummary({ saved, verification });
50
+ setCredentials((prev) => {
51
+ const base = prev ?? [];
52
+ return existing ? base.map((current) => (current.id === result.id ? result : current)) : [...base, result];
53
+ });
54
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...rowFormStateAfterSave(current, values), verification, verifiedCredentialId: verification ? result.id : null }) });
55
+ }
56
+ catch (err) {
57
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...current, saving: false, error: publishCredentialSubmitErrorMessage({ err, t, locale, deps }) }) });
58
+ }
59
+ finally {
60
+ savingRef.current.delete(providerId);
61
+ }
62
+ }
63
+ export async function verify({ providerId, credentials, port, setCredentials, setFormStates, locale, deps }, _optional = {}) {
64
+ const connected = defaultCredentialForProvider({ credentials: credentials ?? [], providerId });
65
+ if (!connected)
66
+ return; // Nothing saved for this provider yet — no row for `verify`'s button to have come from.
67
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...current, verifying: true, verifyError: null, verifiedCredentialId: connected.id }) });
68
+ try {
69
+ const result = await port.verifyCredential({ id: connected.id });
70
+ // Mirrors the server's own `healAccountLabel` write (`publish-credentials.ts`'s route doc) —
71
+ // a `"valid"` result carrying an `accountLabel` updates this row's SAVED summary immediately,
72
+ // rather than waiting on a refetch this hook has no other reason to trigger. `undefined` (no
73
+ // account label on this result) leaves whatever the row already had alone, same "only a truthy
74
+ // finding heals forward" rule the server side follows.
75
+ const accountLabel = result.accountLabel;
76
+ if (accountLabel !== undefined) {
77
+ // `connected` came from a loaded list, and nothing sets the list back to `undefined` once
78
+ // loaded, so `prev` is defined here (the old `prev ?? []` could not fire).
79
+ setCredentials((prev) => {
80
+ if (!prev)
81
+ throw new Error("publish credentials disappeared during verification");
82
+ return prev.map((c) => (c.id === connected.id ? { ...c, accountLabel } : c));
83
+ });
84
+ }
85
+ patchRow({ setFormStates, providerId, patch: (current) => ({ ...current, verifying: false, verification: result, verifyError: null }) });
86
+ }
87
+ catch (err) {
88
+ patchRow({ setFormStates, providerId, patch: (current) => ({
89
+ ...current,
90
+ verifying: false,
91
+ verifyError: deps.publishCredentialVerifyErrorMessage({ locale, error: deps.describeApiError({ e: err, fallback: "unknown error" }) }),
92
+ }) });
93
+ }
94
+ }
95
+ /** Verification may heal the saved account label without erasing an absent finding. */
96
+ function verifiedCredentialSummary({ saved, verification }) {
97
+ return verification?.accountLabel !== undefined ? { ...saved, accountLabel: verification.accountLabel } : saved;
98
+ }
99
+ //# sourceMappingURL=publish-credential-writes.js.map
@@ -0,0 +1,10 @@
1
+ import type { useStaticPublish, StaticPublishOptions } from "./use-static-publish.hooks.js";
2
+ import type { useStaticPublishForm } from "./static-publish-form.hooks.js";
3
+ import type { useStaticPublishRun } from "./static-publish-run.hooks.js";
4
+ export declare const UNKNOWN_ERROR = "The publish service returned no explanation. Check publish status before trying again, and report this message if the problem continues.";
5
+ export declare function publish({ options, form, state, port, locale, t, deps }: {
6
+ options: StaticPublishOptions;
7
+ form: ReturnType<typeof useStaticPublishForm>;
8
+ state: ReturnType<typeof useStaticPublishRun>;
9
+ } & Pick<Parameters<typeof useStaticPublish>[0], "port" | "locale" | "t" | "deps">, _optional?: {}): Promise<void>;
10
+ //# sourceMappingURL=static-publish-actions.d.ts.map
@@ -0,0 +1,62 @@
1
+ import { formatUserFacingError } from "@jini-ai/core";
2
+ import { buildStaticPublishConfig, staticPublishProjectNameToSend } from "../rules.js";
3
+ export const UNKNOWN_ERROR = "The publish service returned no explanation. Check publish status before trying again, and report this message if the problem continues.";
4
+ export async function publish({ options, form, state, port, locale, t, deps }, _optional = {}) {
5
+ const { selectedTarget, configValues, projectName } = form;
6
+ const { publishingRef, seededRef, pollFailuresRef, setPollError, setPublishError, setPublishFailure, setPublishing, setRun } = state;
7
+ const { publishTriggerErrorMessage, describeApiError, errorRedactionOptions } = deps;
8
+ // A second call while the first is still in flight is a duplicate submit (e.g. a double-click
9
+ // landing before React re-renders with the button disabled) — ignore it here too, not just via
10
+ // the UI's `publishing`-gated disabled state, so the race can't still send two POSTs (C4 fix).
11
+ // This check-then-set is safe against a same-tick double call specifically BECAUSE it is
12
+ // synchronous: nothing yields between the read and the write below, so a second synchronous call
13
+ // always observes this call's write.
14
+ const request = publishRequestFor({ options, selectedTarget, configValues, projectName });
15
+ if (publishingRef.current || request === undefined)
16
+ return;
17
+ publishingRef.current = true;
18
+ // Local action supersedes any still-pending bootstrap read — same C1 fix and same reasoning
19
+ // `use-static-export.hooks.ts`'s own `trigger()` documents: this write is synchronous and
20
+ // happens-before the `await` below, so it wins the race regardless of how late the bootstrap
21
+ // read resolves.
22
+ seededRef.current = true;
23
+ // A fresh publish also clears any earlier poll-failure standoff (C2) — the operator retrying via
24
+ // this same button is exactly the recovery path a stalled `pollError` is meant to unblock.
25
+ pollFailuresRef.current = 0;
26
+ setPollError(null);
27
+ setPublishError(null);
28
+ setPublishFailure(null);
29
+ setPublishing(true);
30
+ try {
31
+ const started = await port.triggerPublish({
32
+ ...request,
33
+ // Conditional spread, never `credentialId: options.credentialId` — an absent choice must not
34
+ // reach the wire as an explicit `undefined` key.
35
+ ...(options.credentialId !== undefined ? { credentialId: options.credentialId } : {}),
36
+ });
37
+ setRun(started);
38
+ }
39
+ catch (err) {
40
+ const failure = formatUserFacingError({ message: publishTriggerErrorMessage({ locale, error: describeApiError({ e: err, fallback: UNKNOWN_ERROR }) }),
41
+ action: t("Check publish status before starting another publish. Copy details and report this problem."), step: "static.publish.start", cause: err }, errorRedactionOptions);
42
+ setPublishError(failure.message);
43
+ setPublishFailure(failure);
44
+ }
45
+ finally {
46
+ publishingRef.current = false;
47
+ setPublishing(false);
48
+ }
49
+ }
50
+ /** The target config and project name a publish sends: a replayed destination as saved, else the
51
+ * form's current fields. `undefined` while the form has no target loaded yet. @complexity O(f). */
52
+ function publishRequestFor(input) {
53
+ if (input.options.destination)
54
+ return input.options.destination;
55
+ if (input.selectedTarget === undefined)
56
+ return undefined;
57
+ return {
58
+ config: buildStaticPublishConfig({ target: input.selectedTarget, values: input.configValues }),
59
+ projectName: staticPublishProjectNameToSend({ target: input.selectedTarget, projectName: input.projectName }),
60
+ };
61
+ }
62
+ //# sourceMappingURL=static-publish-actions.js.map
@@ -0,0 +1,38 @@
1
+ import type { useStaticPublish, StaticPublishController } from "./use-static-publish.hooks.js";
2
+ type AdminStaticPublishTargetId = StaticPublishController["target"];
3
+ export declare function useStaticPublishForm({ port, locale, hooks, deps }: Parameters<typeof useStaticPublish>[0], _optional?: {}): {
4
+ targets: import("../rules.js").AdminPublishTargetDescriptor[] | undefined;
5
+ targetsError: string | null;
6
+ target: string;
7
+ selectedTarget: import("../rules.js").AdminPublishTargetDescriptor | undefined;
8
+ setTarget: (value: AdminStaticPublishTargetId) => void;
9
+ configValues: Record<string, string>;
10
+ setConfigField: ({ name, value }: {
11
+ name: string;
12
+ value: string;
13
+ }, _options?: {}) => void;
14
+ projectName: string;
15
+ setProjectName: import("react").Dispatch<import("react").SetStateAction<string>>;
16
+ preview: import("./use-static-publish.hooks.js").AdminStaticPublishPreview | undefined;
17
+ previewLoading: boolean;
18
+ previewError: string | null;
19
+ checkPreview: () => Promise<void>;
20
+ };
21
+ export declare function checkPreview({ selectedTarget, port, configValues, previewCallRef, previewGenerationRef, setPreviewError, setPreviewLoading, setPreview, locale, deps }: {
22
+ selectedTarget: StaticPublishController["selectedTarget"];
23
+ port: Parameters<typeof useStaticPublish>[0]["port"];
24
+ configValues: StaticPublishController["configValues"];
25
+ previewCallRef: {
26
+ current: boolean;
27
+ };
28
+ previewGenerationRef: {
29
+ current: number;
30
+ };
31
+ setPreviewError: (value: string | null) => void;
32
+ setPreviewLoading: (value: boolean) => void;
33
+ setPreview: (value: StaticPublishController["preview"]) => void;
34
+ locale: string;
35
+ deps: Parameters<typeof useStaticPublish>[0]["deps"];
36
+ }, _optional?: {}): Promise<void>;
37
+ export {};
38
+ //# sourceMappingURL=static-publish-form.hooks.d.ts.map
@@ -0,0 +1,103 @@
1
+ import { useMemo, useRef, useState } from "react";
2
+ import { buildStaticPublishConfig, publishTargetById } from "../rules.js";
3
+ import { UNKNOWN_ERROR } from "./static-publish-actions.js";
4
+ export function useStaticPublishForm({ port, locale, hooks, deps }, _optional = {}) {
5
+ const { useFetchQuery } = hooks;
6
+ const { localizePublishTargets, publishLoadErrorMessage, describeApiError } = deps;
7
+ const targetsQuery = useFetchQuery({ key: ["deployment", "publish-targets"], fetch: () => port.listPublishTargets() });
8
+ // The host's own text in the viewer's locale, once, so every consumer (this form, the credential
9
+ // rows built from these targets) renders it translated.
10
+ const targets = useMemo(() => localizePublishTargets({ targets: targetsQuery.data, locale }), [targetsQuery.data, locale]);
11
+ const targetsError = targetsQuery.error ? publishLoadErrorMessage({ locale, error: describeApiError({ e: targetsQuery.error, fallback: UNKNOWN_ERROR }) }) : null;
12
+ const [chosenTarget, setChosenTarget] = useState(null);
13
+ const target = selectedPublishTargetId({ chosenTarget, targets });
14
+ const selectedTarget = publishTargetById({ targets, id: target });
15
+ const [valuesByTarget, setValuesByTarget] = useState({});
16
+ const configValues = valuesByTarget[target] ?? {};
17
+ const [projectName, setProjectName] = useState("");
18
+ const [preview, setPreview] = useState(undefined);
19
+ const [previewLoading, setPreviewLoading] = useState(false);
20
+ const [previewError, setPreviewError] = useState(null);
21
+ // Bumped by every field edit (via `invalidatePreview` below) so `checkPreview` can tell whether
22
+ // the fields it was called against are still the CURRENT fields once its request resolves — see
23
+ // that function's own note (C3 fix).
24
+ const previewGenerationRef = useRef(0);
25
+ // Synchronous duplicate-submit guard for `checkPreview()` (2026-09-05 stale-settlement sweep, C5
26
+ // fix) — same reasoning `publishingRef` documents for `publish()` below, PLUS a second failure mode
27
+ // specific to `checkPreview`: with no guard, two overlapping calls share the one `previewLoading`
28
+ // flag, so whichever call's own `finally` fires FIRST clears it while the OTHER is still in flight —
29
+ // the Preview button (and any caller depending on `previewLoading`) would read "not loading" with a
30
+ // request still outstanding. A ref, not `previewLoading` (state) itself: a same-tick double call
31
+ // (or any caller reaching `checkPreview()` directly, not just through the disabled button) must see
32
+ // the other call's claim synchronously, before either has re-rendered.
33
+ const previewCallRef = useRef(false);
34
+ // Every setter below clears the (now stale) preview as a side effect — see this file's header.
35
+ function invalidatePreview() {
36
+ previewGenerationRef.current += 1;
37
+ setPreview(undefined);
38
+ setPreviewError(null);
39
+ }
40
+ function setTarget(value) {
41
+ if (publishTargetById({ targets, id: value }) === undefined)
42
+ return;
43
+ setChosenTarget(value);
44
+ invalidatePreview();
45
+ }
46
+ function setConfigField({ name, value }, _options = {}) {
47
+ setValuesByTarget((prev) => ({ ...prev, [target]: { ...prev[target], [name]: value } }));
48
+ invalidatePreview();
49
+ }
50
+ return {
51
+ targets, targetsError, target, selectedTarget, setTarget, configValues, setConfigField,
52
+ projectName, setProjectName, preview, previewLoading, previewError,
53
+ checkPreview: () => checkPreview({ selectedTarget, port, configValues, previewCallRef, previewGenerationRef, setPreviewError, setPreviewLoading, setPreview, locale, deps }),
54
+ };
55
+ }
56
+ export async function checkPreview({ selectedTarget, port, configValues, previewCallRef, previewGenerationRef, setPreviewError, setPreviewLoading, setPreview, locale, deps }, _optional = {}) {
57
+ const { publishPreviewErrorMessage, describeApiError } = deps;
58
+ // A second call while the first is still in flight is a duplicate submit — ignore it here too,
59
+ // not just via the UI's `previewLoading`-gated disabled state, so the race can't still send two
60
+ // requests or tear down `previewLoading` out from under the call that's still running (C5 fix,
61
+ // same "ignored outright" idiom `publish()`'s `publishingRef` uses below). Safe against a
62
+ // same-tick double call specifically because it is synchronous: nothing yields between the read
63
+ // and the write, so a second synchronous call always observes this call's claim.
64
+ if (previewCallRef.current || selectedTarget === undefined)
65
+ return;
66
+ previewCallRef.current = true;
67
+ // Captured BEFORE the request starts — if a field edit bumps `previewGenerationRef` while this
68
+ // request is in flight, the comparison below after `await` tells us this result is now stale
69
+ // (C3 fix: without it, a slow preview response for `acme/old` could resolve AFTER the operator
70
+ // had already changed the field to `acme/new` and repopulate the form with the wrong target).
71
+ const requestGeneration = previewGenerationRef.current;
72
+ setPreviewError(null);
73
+ setPreviewLoading(true);
74
+ try {
75
+ const result = await port.getPublishPreview(buildStaticPublishConfig({ target: selectedTarget, values: configValues }));
76
+ // A field edited after this request started already invalidated the preview and moved the
77
+ // generation forward — applying this now-stale result would repopulate the OLD fields over a
78
+ // form the operator has since changed. Discard it silently; the edit's own `invalidatePreview()`
79
+ // already left `preview`/`previewError` in the right (empty) state.
80
+ if (previewGenerationRef.current !== requestGeneration)
81
+ return;
82
+ setPreview(result);
83
+ }
84
+ catch (err) {
85
+ if (previewGenerationRef.current !== requestGeneration)
86
+ return;
87
+ setPreviewError(publishPreviewErrorMessage({ locale, error: describeApiError({ e: err, fallback: UNKNOWN_ERROR }) }));
88
+ }
89
+ finally {
90
+ // Unconditional, unlike the two branches above: this request's own spinner must stop once ITS
91
+ // OWN network call settles regardless of generation, or a discarded stale response would leave
92
+ // `previewLoading` stuck true forever with nothing left in flight to ever clear it. Safe to
93
+ // always release `previewCallRef` here too now that duplicates are refused at entry, above —
94
+ // there is never a second, still-running call left whose own flag this could clobber.
95
+ previewCallRef.current = false;
96
+ setPreviewLoading(false);
97
+ }
98
+ }
99
+ /** A chosen target wins; the initial target follows the provider's published ordering. */
100
+ function selectedPublishTargetId({ chosenTarget, targets }) {
101
+ return chosenTarget ?? targets?.[0]?.id ?? "";
102
+ }
103
+ //# sourceMappingURL=static-publish-form.hooks.js.map