streamtex 0.7.85__tar.gz → 0.7.87__tar.gz

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 (198) hide show
  1. {streamtex-0.7.85/streamtex.egg-info → streamtex-0.7.87}/PKG-INFO +1 -1
  2. {streamtex-0.7.85 → streamtex-0.7.87}/pyproject.toml +1 -1
  3. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/release_cmd.py +2 -2
  4. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/deploy/stx_auth.py +1 -1
  5. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/coolify.py +81 -7
  6. {streamtex-0.7.85 → streamtex-0.7.87/streamtex.egg-info}/PKG-INFO +1 -1
  7. {streamtex-0.7.85 → streamtex-0.7.87}/LICENSE +0 -0
  8. {streamtex-0.7.85 → streamtex-0.7.87}/MANIFEST.in +0 -0
  9. {streamtex-0.7.85 → streamtex-0.7.87}/README.md +0 -0
  10. {streamtex-0.7.85 → streamtex-0.7.87}/setup.cfg +0 -0
  11. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/__init__.py +0 -0
  12. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/__main__.py +0 -0
  13. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/__init__.py +0 -0
  14. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/config.py +0 -0
  15. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/generate.py +0 -0
  16. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/history.py +0 -0
  17. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/metadata.py +0 -0
  18. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/__init__.py +0 -0
  19. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/base.py +0 -0
  20. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/fal.py +0 -0
  21. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/google.py +0 -0
  22. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/openai.py +0 -0
  23. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/ai/providers/registry.py +0 -0
  24. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/auth.py +0 -0
  25. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/banner.py +0 -0
  26. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/bib.py +0 -0
  27. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/bib_preview.py +0 -0
  28. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/block_helpers.py +0 -0
  29. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/blocks.py +0 -0
  30. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/book.py +0 -0
  31. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/browser.py +0 -0
  32. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/__init__.py +0 -0
  33. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_claude_files.py +0 -0
  34. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_divergence.py +0 -0
  35. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_install_local_packs.py +0 -0
  36. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_shared.py +0 -0
  37. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_stx_toml.py +0 -0
  38. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/_toml_helpers.py +0 -0
  39. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/artifact_cmd.py +0 -0
  40. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/bib_cmd.py +0 -0
  41. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/build_check.py +0 -0
  42. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/cache_cmd.py +0 -0
  43. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/claude_cmd.py +0 -0
  44. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/claude_global.py +0 -0
  45. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/claude_project.py +0 -0
  46. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/commands.py +0 -0
  47. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/component_cmd.py +0 -0
  48. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/console.py +0 -0
  49. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/coolify.py +0 -0
  50. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/deploy_auth_cmd.py +0 -0
  51. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/deploy_cmd.py +0 -0
  52. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/dev_cmd.py +0 -0
  53. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/dev_config.py +0 -0
  54. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/ds_cmd.py +0 -0
  55. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/export_cmd.py +0 -0
  56. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/install_cmd.py +0 -0
  57. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/kit_cmd.py +0 -0
  58. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/main.py +0 -0
  59. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/__init__.py +0 -0
  60. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/base.py +0 -0
  61. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/compat.py +0 -0
  62. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/registry.py +0 -0
  63. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/v0_4_0.py +0 -0
  64. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/migrations/v0_4_6.py +0 -0
  65. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/pack_cmd.py +0 -0
  66. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/project_cmd.py +0 -0
  67. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/project_rules.py +0 -0
  68. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/publish_cmd.py +0 -0
  69. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/published_check.py +0 -0
  70. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/run_cmd.py +0 -0
  71. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/run_set.py +0 -0
  72. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/screenshot_cmd.py +0 -0
  73. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/shortcuts.py +0 -0
  74. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/status_cmd.py +0 -0
  75. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/styles_cmd.py +0 -0
  76. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/sync_cmd.py +0 -0
  77. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/upgrade_cmd.py +0 -0
  78. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/validate_cmd.py +0 -0
  79. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/cli/workspace_cmd.py +0 -0
  80. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/code.py +0 -0
  81. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/collection.py +0 -0
  82. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/constants.py +0 -0
  83. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/container.py +0 -0
  84. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/__init__.py +0 -0
  85. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/__init__.py +0 -0
  86. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/_frontmatter.py +0 -0
  87. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/agent.py +0 -0
  88. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/ai_prompt.py +0 -0
  89. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/archetype.py +0 -0
  90. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/asset.py +0 -0
  91. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/discovery.py +0 -0
  92. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/guideline.py +0 -0
  93. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/install.py +0 -0
  94. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/integration.py +0 -0
  95. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/loaders.py +0 -0
  96. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/palette.py +0 -0
  97. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/skill.py +0 -0
  98. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/spec.py +0 -0
  99. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/artifacts/validation.py +0 -0
  100. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/contracts.py +0 -0
  101. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/discovery.py +0 -0
  102. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/core/validation.py +0 -0
  103. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/countdown.py +0 -0
  104. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/deeplink.py +0 -0
  105. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/deploy/__init__.py +0 -0
  106. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/enums.py +0 -0
  107. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/export.py +0 -0
  108. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/export_enrich.py +0 -0
  109. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/export_paginate.py +0 -0
  110. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/export_widgets.py +0 -0
  111. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/facts.py +0 -0
  112. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/glossary.py +0 -0
  113. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/grid.py +0 -0
  114. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/gsheet.py +0 -0
  115. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/hover_tooltip.py +0 -0
  116. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/i18n.py +0 -0
  117. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/image.py +0 -0
  118. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/image_crop.py +0 -0
  119. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/image_editor.py +0 -0
  120. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/image_utils.py +0 -0
  121. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/inspector.py +0 -0
  122. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/kept.py +0 -0
  123. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/latex.py +0 -0
  124. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/latex_utils.py +0 -0
  125. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/link_config.py +0 -0
  126. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/link_preview.py +0 -0
  127. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/list.py +0 -0
  128. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/loading.py +0 -0
  129. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/markdown.py +0 -0
  130. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/marker.py +0 -0
  131. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/marker_runtime.py +0 -0
  132. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/media_overlay.py +0 -0
  133. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/mermaid.py +0 -0
  134. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/overlay.py +0 -0
  135. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/pagewalk.py +0 -0
  136. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/pdf_export.py +0 -0
  137. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/plantuml.py +0 -0
  138. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/presentation.py +0 -0
  139. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/presentation_profile.py +0 -0
  140. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/printing.py +0 -0
  141. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/__init__.py +0 -0
  142. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/build.py +0 -0
  143. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/config.py +0 -0
  144. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/levels.py +0 -0
  145. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/media.py +0 -0
  146. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/ops.py +0 -0
  147. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/passwords.py +0 -0
  148. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/state.py +0 -0
  149. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/target.py +0 -0
  150. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/live/Dockerfile +0 -0
  151. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/live/entrypoint.sh +0 -0
  152. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/live/nginx.conf +0 -0
  153. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/live/stx-http.conf +0 -0
  154. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/live/supervisord.conf +0 -0
  155. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/10-stx-init.sh +0 -0
  156. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/20-stx-auth.sh +0 -0
  157. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/Dockerfile +0 -0
  158. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/closed.html +0 -0
  159. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/nginx.conf +0 -0
  160. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/stx-http.conf +0 -0
  161. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/release/templates/static/stx_auth.py +0 -0
  162. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/runtime_flags.py +0 -0
  163. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/scripts/__init__.py +0 -0
  164. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/scripts/migrate_curves_to_relative.py +0 -0
  165. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/search.py +0 -0
  166. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/slide.py +0 -0
  167. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/slide_note.py +0 -0
  168. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/source.py +0 -0
  169. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/space.py +0 -0
  170. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/spacing.py +0 -0
  171. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/stage.py +0 -0
  172. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/css/stx_global.css +0 -0
  173. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/default.css +0 -0
  174. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/js/stx_countdown.js +0 -0
  175. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/js/stx_marker_observer.js +0 -0
  176. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/js/stx_scroll_spy.js +0 -0
  177. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/js/stx_video.js +0 -0
  178. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/logo-stx-tiny.png +0 -0
  179. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/static/logo-stx.png +0 -0
  180. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/__init__.py +0 -0
  181. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/base.py +0 -0
  182. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/container.py +0 -0
  183. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/core.py +0 -0
  184. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/scale.py +0 -0
  185. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/scale_curves.toml +0 -0
  186. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/text.py +0 -0
  187. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/styles/visibility.py +0 -0
  188. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/tikz.py +0 -0
  189. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/toc.py +0 -0
  190. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/utils.py +0 -0
  191. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/watch.py +0 -0
  192. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/write.py +0 -0
  193. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex/zoom.py +0 -0
  194. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex.egg-info/SOURCES.txt +0 -0
  195. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex.egg-info/dependency_links.txt +0 -0
  196. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex.egg-info/entry_points.txt +0 -0
  197. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex.egg-info/requires.txt +0 -0
  198. {streamtex-0.7.85 → streamtex-0.7.87}/streamtex.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamtex
3
- Version: 0.7.85
3
+ Version: 0.7.87
4
4
  Summary: AI-powered content framework for Streamlit — create presentations, courses, and web-books with Claude or Cursor, no coding required.
5
5
  Author-email: Nicolas Guelfi <nicolas.guelfi@laposte.net>
6
6
  License-Expression: BUSL-1.1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "streamtex"
7
- version = "0.7.85"
7
+ version = "0.7.87"
8
8
  description = "AI-powered content framework for Streamlit — create presentations, courses, and web-books with Claude or Cursor, no coding required."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -455,14 +455,14 @@ def setup_cmd(target, apply_, show, domains, deploy, dry_run, migrate):
455
455
  f"$(docker ps -q --filter name={uuid} | head -1)", check=False)
456
456
  return f"/srv/{migrate}" in r.stdout.split()
457
457
  try:
458
- done = coolify.migrate(cfg, t.cfg, migrate, mounted, click.echo)
458
+ done = coolify.migrate(cfg, t.cfg, migrate, mounted, click.echo, t)
459
459
  finally:
460
460
  save_state(cfg.root, state)
461
461
  click.echo(f"{migrate}: built from the repository from now on — `stx release rebuild` after each lock"
462
462
  if done else f"{STATE_FILE}: the new application recorded")
463
463
  return
464
464
  if domains:
465
- coolify.apply_domains(cfg, t.cfg, click.echo, deploy, dry_run)
465
+ coolify.apply_domains(cfg, t.cfg, click.echo, deploy, dry_run, t)
466
466
  if dry_run:
467
467
  click.echo("dry run: nothing written (drop --dry-run to write the domains)")
468
468
  return
@@ -107,7 +107,7 @@ from pathlib import Path
107
107
  from urllib.parse import parse_qs, urlsplit
108
108
 
109
109
  #: The library release this file ships with, and its interface number (#135).
110
- STX_VERSION = "0.7.85"
110
+ STX_VERSION = "0.7.87"
111
111
  AUTH_INTERFACE = 3
112
112
 
113
113
  DEFAULT_ROOT = "/var/lib/stx-auth"
@@ -243,13 +243,82 @@ def _create_from_repo(co: Coolify, cfg: ReleaseConfig, tcfg: dict, face: str, pr
243
243
  return created["uuid"]
244
244
 
245
245
 
246
+ API_DOMAINS_MAX = 2048 # Coolify's API (and its interface) refuse a longer list (#164)
247
+ _DOMAIN = re.compile(r"https://[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+(/[a-z0-9._~-]+)*")
248
+
249
+
250
+ def set_domains(co: Coolify, t, tcfg: dict, face: str, uuid: str, value: str, echo) -> None:
251
+ """Through the API when Coolify accepts the list; longer, written in Coolify's database (#164)."""
252
+ if len(value) <= API_DOMAINS_MAX:
253
+ co.call("PATCH", f"/applications/{uuid}", {"domains": value})
254
+ return
255
+ if t is None or t.kind != "ssh":
256
+ raise ReleaseError(f"{tcfg[f'{face}_app']}: {len(value)} characters of domains, over the "
257
+ f"{API_DOMAINS_MAX} of Coolify's API — only an ssh target writes them in its database")
258
+ echo(f" {tcfg[f'{face}_app']}: {len(value)} characters of domains, over the {API_DOMAINS_MAX} of "
259
+ "Coolify's API: written in its database")
260
+ write_domains(t, _uuid(tcfg, face), value, echo)
261
+
262
+
263
+ def write_domains(t, uuid: str, value: str, echo) -> None:
264
+ """Write the domains in Coolify's database, with the checks its API would make, then read them back.
265
+
266
+ Coolify reuses the labels it keeps for the application (``custom_labels``) at each deployment: they
267
+ are emptied, so that the next deployment makes them again from the new domains — Coolify's own
268
+ labels, which needs Coolify to manage them (``is_container_label_readonly_enabled``). The domains and
269
+ labels in place are kept first under ``<root>/domains/``."""
270
+ names = _split_domains(value)
271
+ bad = [d for d in names if not _DOMAIN.fullmatch(d)]
272
+ if bad:
273
+ raise ReleaseError(f"not a domain Coolify would accept: {', '.join(bad[:5])}")
274
+ if len(set(names)) != len(names) or ",".join(names) != value:
275
+ raise ReleaseError("domains: one listed twice, or not a plain comma-separated list")
276
+ rows = _psql(t, "SELECT a.uuid || chr(9) || coalesce(a.fqdn, '') || chr(9) || "
277
+ "coalesce(s.is_container_label_readonly_enabled::text, '') || chr(9) || "
278
+ "coalesce(encode(convert_to(a.custom_labels, 'UTF8'), 'base64'), '') "
279
+ "FROM applications a LEFT JOIN application_settings s ON s.application_id = a.id "
280
+ "WHERE a.deleted_at IS NULL;\n")
281
+ apps = {}
282
+ for row in rows.splitlines():
283
+ if row.count("\t") >= 3:
284
+ u, fqdn, managed, labels = row.split("\t", 3)
285
+ apps[u] = (fqdn, managed, labels)
286
+ if uuid not in apps:
287
+ raise ReleaseError(f"no application {uuid} in Coolify's database: nothing written")
288
+ fqdn, managed, labels = apps[uuid]
289
+ if managed != "true":
290
+ raise ReleaseError(f"Coolify does not manage the labels of {uuid} (Container Labels: Readonly off) — "
291
+ "its labels would keep the old domains: nothing written")
292
+ held = {d: u for u, (f, _, _) in apps.items() if u != uuid for d in _split_domains(f)}
293
+ taken = [f"{d} ({held[d]})" for d in names if d in held]
294
+ if taken:
295
+ raise ReleaseError(f"domain(s) held by another application: {', '.join(taken[:5])}")
296
+ stamp = dt.datetime.now().strftime("%Y%m%d-%H%M%S-%f")
297
+ backup = t.path(DOMAINS, f"{uuid}.{stamp}.json")
298
+ t.write(backup, json.dumps({"uuid": uuid, "fqdn": fqdn, "custom_labels_base64": "".join(labels.split())},
299
+ indent=1) + "\n")
300
+ echo(f" domains and labels in place kept: {backup}")
301
+ out = _psql(t, f"UPDATE applications SET fqdn = '{value}', custom_labels = NULL, updated_at = now() "
302
+ f"WHERE uuid = '{uuid}' RETURNING length(fqdn);\n")
303
+ if not out.strip():
304
+ raise ReleaseError(f"no application {uuid} in Coolify's database: nothing written")
305
+ back = _psql(t, f"SELECT coalesce(fqdn, '') FROM applications WHERE uuid = '{uuid}';\n").strip()
306
+ if back != value:
307
+ raise ReleaseError(f"the domains read back from Coolify ({len(back)} characters) are not the ones "
308
+ f"written ({len(value)}) — check them in Coolify; kept: {backup}")
309
+ echo(f" written in Coolify's database and read back ({len(value)} characters); its labels are made "
310
+ "again from them at the next deployment")
311
+
312
+
246
313
  def _split_domains(value) -> list[str]:
247
314
  return [d.strip() for d in str(value or "").split(",") if d.strip()]
248
315
 
249
316
 
250
- def apply_domains(cfg: ReleaseConfig, tcfg: dict, echo, deploy: bool = False, dry_run: bool = False) -> None:
317
+ def apply_domains(cfg: ReleaseConfig, tcfg: dict, echo, deploy: bool = False, dry_run: bool = False,
318
+ t=None) -> None:
251
319
  """Set both applications' domains from the site list; *dry_run* shows what each would get against
252
- what it has, and writes nothing (#145, G9)."""
320
+ what it has, and writes nothing (#145, G9). A list longer than Coolify's API accepts is written in
321
+ Coolify's database over ssh, through the target *t* (#164)."""
253
322
  co = Coolify(cfg.root, tcfg["coolify_env"])
254
323
  wanted = domains_for(cfg, tcfg)
255
324
  for face in ("static", "live"):
@@ -261,16 +330,19 @@ def apply_domains(cfg: ReleaseConfig, tcfg: dict, echo, deploy: bool = False, dr
261
330
  _split_domains(wanted[face])
262
331
  added, removed = [d for d in want if d not in now], [d for d in now if d not in want]
263
332
  echo(f" {tcfg[f'{face}_app']}: {len(want)} domain(s), {len(added)} added, {len(removed)} removed")
333
+ if len(wanted[face]) > API_DOMAINS_MAX:
334
+ echo(f" {len(wanted[face])} characters, over the {API_DOMAINS_MAX} of Coolify's API: "
335
+ "written in Coolify's database over ssh")
264
336
  for d in added:
265
337
  echo(f" + {d}")
266
338
  for d in removed:
267
339
  echo(f" - {d}")
268
340
  continue
269
341
  if wanted[face]:
270
- co.call("PATCH", f"/applications/{uuid}", {"domains": wanted[face]})
342
+ set_domains(co, t, tcfg, face, uuid, wanted[face], echo)
271
343
  echo(f" {tcfg[f'{face}_app']}: domains {wanted[face] or '—'}")
272
344
  if deploy:
273
- co.call("GET", f"/deploy?uuid={uuid}")
345
+ co.call("POST", "/deploy", {"uuid": uuid})
274
346
  echo(f" {tcfg[f'{face}_app']}: deployment queued")
275
347
 
276
348
 
@@ -318,7 +390,8 @@ def _queued(answer: dict) -> str:
318
390
 
319
391
  def deploy(co: Coolify, uuid: str, echo, restart: bool = False) -> None:
320
392
  """Build and start (or, with *restart*, start again from the same image) and wait for the end."""
321
- answer = co.call("POST", f"/applications/{uuid}/restart") if restart else co.call("GET", f"/deploy?uuid={uuid}")
393
+ # POST: a newer Coolify answers a GET /deploy with HTTP 405 (#165)
394
+ answer = co.call("POST", f"/applications/{uuid}/restart") if restart else co.call("POST", "/deploy", {"uuid": uuid})
322
395
  wait_deployment(co, _queued(answer), echo)
323
396
 
324
397
 
@@ -336,7 +409,7 @@ def rebuild(cfg: ReleaseConfig, tcfg: dict, face: str, echo) -> None:
336
409
  deploy(co, uuid, echo)
337
410
 
338
411
 
339
- def migrate(cfg: ReleaseConfig, tcfg: dict, face: str, mounted, echo) -> bool:
412
+ def migrate(cfg: ReleaseConfig, tcfg: dict, face: str, mounted, echo, t=None) -> bool:
340
413
  """Move a face from its pasted-Dockerfile application to one built from the repository, in two runs.
341
414
 
342
415
  1st run: the old application is renamed ``<name>-inline`` and the new one created (no domain), then the
@@ -370,7 +443,7 @@ def migrate(cfg: ReleaseConfig, tcfg: dict, face: str, mounted, echo) -> bool:
370
443
  f"{tcfg['root']}/{face} → /srv/{face}, then run this command again")
371
444
  wanted = domains_for(cfg, tcfg)[face]
372
445
  co.call("PATCH", f"/applications/{old}", {"domains": ""}) # Coolify refuses a domain held twice
373
- co.call("PATCH", f"/applications/{current['uuid']}", {"domains": wanted})
446
+ set_domains(co, t, {**tcfg, f"{face}_uuid": current["uuid"]}, face, current["uuid"], wanted, echo)
374
447
  echo(f" {name}: domains {wanted}")
375
448
  deploy(co, current["uuid"], echo, restart=True) # the same image, with its domains
376
449
  co.call("POST", f"/applications/{old}/stop")
@@ -384,6 +457,7 @@ def migrate(cfg: ReleaseConfig, tcfg: dict, face: str, mounted, echo) -> bool:
384
457
  _PSQL = "docker exec -i {db} psql -U coolify -d coolify -v ON_ERROR_STOP=1 -qtA"
385
458
  _TAG = "$stx_dockerfile$" # dollar quoting: the Dockerfile goes in unchanged
386
459
  BACKUPS = "dockerfiles" # under the target's root, beside static/ and live/: never served
460
+ DOMAINS = "domains" # the domains and labels in place before a database write (#164)
387
461
 
388
462
 
389
463
  def _psql(t, sql: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamtex
3
- Version: 0.7.85
3
+ Version: 0.7.87
4
4
  Summary: AI-powered content framework for Streamlit — create presentations, courses, and web-books with Claude or Cursor, no coding required.
5
5
  Author-email: Nicolas Guelfi <nicolas.guelfi@laposte.net>
6
6
  License-Expression: BUSL-1.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes