shipit-cli 0.22.0__tar.gz → 0.22.2__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 (174) hide show
  1. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/PKG-INFO +1 -1
  2. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/pyproject.toml +1 -1
  3. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/wordpress/install.sh +5 -1
  4. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/runners/wasmer.py +50 -19
  5. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/version.py +1 -1
  6. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_e2e.py +7 -7
  7. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_wasmer_annotations.py +69 -11
  8. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_wordpress_phpix.py +18 -0
  9. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/.gitignore +0 -0
  10. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/README.md +0 -0
  11. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/__init__.py +0 -0
  12. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/node/optimize-node-modules.sh +0 -0
  13. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/php/php.ini +0 -0
  14. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/wordpress/.htaccess +0 -0
  15. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/wordpress/start.php +0 -0
  16. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/assets/wordpress/wp-config.php +0 -0
  17. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/builders/__init__.py +0 -0
  18. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/builders/base.py +0 -0
  19. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/builders/docker.py +0 -0
  20. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/builders/local.py +0 -0
  21. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/cli.py +0 -0
  22. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/evaluator.py +0 -0
  23. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/generator.py +0 -0
  24. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/procfile.py +0 -0
  25. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/base.py +0 -0
  26. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/go.py +0 -0
  27. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/hugo.py +0 -0
  28. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/install_context.py +0 -0
  29. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/jekyll.py +0 -0
  30. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/laravel.py +0 -0
  31. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/mkdocs.py +0 -0
  32. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/node.py +0 -0
  33. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/node_static.py +0 -0
  34. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/php.py +0 -0
  35. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/python.py +0 -0
  36. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/registry.py +0 -0
  37. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/staticfile.py +0 -0
  38. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/providers/wordpress.py +0 -0
  39. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/runners/__init__.py +0 -0
  40. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/runners/base.py +0 -0
  41. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/runners/local.py +0 -0
  42. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/shipit_types.py +0 -0
  43. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlark_loader.py +0 -0
  44. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/prelude.shipit +0 -0
  45. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/serve.shipit +0 -0
  46. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/go.shipit +0 -0
  47. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/hugo.shipit +0 -0
  48. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/jekyll.shipit +0 -0
  49. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/laravel.shipit +0 -0
  50. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/mkdocs.shipit +0 -0
  51. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/node.shipit +0 -0
  52. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/node_static.shipit +0 -0
  53. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/php.shipit +0 -0
  54. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/python.shipit +0 -0
  55. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/staticfile.shipit +0 -0
  56. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/starlib/tools/wordpress.shipit +0 -0
  57. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/ui.py +0 -0
  58. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/utils.py +0 -0
  59. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/src/shipit/volumes.py +0 -0
  60. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_helpers.py +0 -0
  61. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/go-graphql.json +0 -0
  62. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/go-simple.json +0 -0
  63. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/hugo.json +0 -0
  64. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/mkdocs-with-plugins.json +0 -0
  65. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/mkdocs-with-plugins__cross.json +0 -0
  66. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/mkdocs.json +0 -0
  67. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/mkdocs__cross.json +0 -0
  68. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-astro.json +0 -0
  69. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-elysia.json +0 -0
  70. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-express.json +0 -0
  71. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-fastify.json +0 -0
  72. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-h3.json +0 -0
  73. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-hono.json +0 -0
  74. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-hydrogen.json +0 -0
  75. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-koa.json +0 -0
  76. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-mastra.json +0 -0
  77. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-mcp.json +0 -0
  78. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-nestjs.json +0 -0
  79. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-next.json +0 -0
  80. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-nitro.json +0 -0
  81. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-npm-file-subdir.json +0 -0
  82. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-pnpm-workspace-subdir.json +0 -0
  83. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-react-router.json +0 -0
  84. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-remix.json +0 -0
  85. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-solidstart.json +0 -0
  86. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-tanstack-start.json +0 -0
  87. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node-xmcp.json +0 -0
  88. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/node.json +0 -0
  89. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-angular.json +0 -0
  90. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-assemble.json +0 -0
  91. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-astro.json +0 -0
  92. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-brunch.json +0 -0
  93. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-create-react-app.json +0 -0
  94. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-docusaurus-old.json +0 -0
  95. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-docusaurus.json +0 -0
  96. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-eleventy.json +0 -0
  97. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-ember.json +0 -0
  98. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-gatsby.json +0 -0
  99. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-harp.json +0 -0
  100. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-hexo.json +0 -0
  101. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-ionic-angular.json +0 -0
  102. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-ionic-react.json +0 -0
  103. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-metalsmith.json +0 -0
  104. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-next.json +0 -0
  105. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-nuxt.json +0 -0
  106. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-parcel.json +0 -0
  107. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-polymer.json +0 -0
  108. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-preact.json +0 -0
  109. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-remix.json +0 -0
  110. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-sanity.json +0 -0
  111. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-stencil.json +0 -0
  112. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-storybook.json +0 -0
  113. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-svelte.json +0 -0
  114. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-sveltekit.json +0 -0
  115. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-umijs.json +0 -0
  116. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-vite-react.json +0 -0
  117. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-vite.json +0 -0
  118. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-vitepress.json +0 -0
  119. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-vue.json +0 -0
  120. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/nodestatic-vuepress.json +0 -0
  121. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-api.json +0 -0
  122. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-laravel-react.json +0 -0
  123. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-nobuild.json +0 -0
  124. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-wordpress-empty.json +0 -0
  125. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-wordpress-plugin.json +0 -0
  126. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-wordpress-theme.json +0 -0
  127. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/php-wordpress.json +0 -0
  128. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-django.json +0 -0
  129. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-django__cross.json +0 -0
  130. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-fastapi.json +0 -0
  131. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-fastapi__cross.json +0 -0
  132. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-fasthtml.json +0 -0
  133. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-fasthtml__cross.json +0 -0
  134. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-ffmpeg.json +0 -0
  135. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-ffmpeg__cross.json +0 -0
  136. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-flask.json +0 -0
  137. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-flask__cross.json +0 -0
  138. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-mcp-chatgpt.json +0 -0
  139. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-mcp-chatgpt__cross.json +0 -0
  140. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-mcp.json +0 -0
  141. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-mcp__cross.json +0 -0
  142. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-pandoc.json +0 -0
  143. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-pandoc__cross.json +0 -0
  144. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-pillow.json +0 -0
  145. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-pillow__cross.json +0 -0
  146. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-procfile.json +0 -0
  147. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-procfile__cross.json +0 -0
  148. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-streamlit.json +0 -0
  149. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/python-streamlit__cross.json +0 -0
  150. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/static-htmlwithjs.json +0 -0
  151. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/static-nobuild.json +0 -0
  152. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/staticfile-redirects.json +0 -0
  153. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/staticfile.json +0 -0
  154. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/synthetic__go_subdir.json +0 -0
  155. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/synthetic__jekyll_bare.json +0 -0
  156. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/synthetic__jekyll_gemfile.json +0 -0
  157. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/synthetic__python_subdir.json +0 -0
  158. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/plan_snapshots/synthetic__static_subdir.json +0 -0
  159. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_cli_after_deploy.py +0 -0
  160. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_command_overrides.py +0 -0
  161. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_evaluator.py +0 -0
  162. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_generate_shipit_examples.py +0 -0
  163. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_install_context.py +0 -0
  164. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_node_provider.py +0 -0
  165. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_node_static_provider.py +0 -0
  166. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_php_provider.py +0 -0
  167. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_plan_snapshots.py +0 -0
  168. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_project_context.py +0 -0
  169. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_python_detection.py +0 -0
  170. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_starlark_loader.py +0 -0
  171. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_staticfile_provider.py +0 -0
  172. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_subdir.py +0 -0
  173. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_version.py +0 -0
  174. {shipit_cli-0.22.0 → shipit_cli-0.22.2}/tests/test_volumes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shipit-cli
3
- Version: 0.22.0
3
+ Version: 0.22.2
4
4
  Summary: Shipit CLI is the best way to build, serve and deploy your projects anywhere.
5
5
  Project-URL: homepage, https://wasmer.io
6
6
  Project-URL: repository, https://github.com/wasmerio/shipit
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "shipit-cli"
3
- version = "0.22.0"
3
+ version = "0.22.2"
4
4
  description = "Shipit CLI is the best way to build, serve and deploy your projects anywhere."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -54,7 +54,11 @@ else
54
54
  --locale="$WP_LOCALE"
55
55
 
56
56
  echo "🔄 Setting permalinks"
57
- wp rewrite structure '/%year%/%monthnum%/%day%/%postname%/'
57
+ # Avoid `wp rewrite structure`: it relaunches wp-cli in a subprocess to flush
58
+ # rewrites, which fails under WASIX (PHP_BINARY is empty) and aborts this
59
+ # script via `set -e`. Setting the option directly is equivalent, since we
60
+ # flush rewrites with `wp rewrite flush --hard` at the end of this script.
61
+ wp option update permalink_structure '/%year%/%monthnum%/%day%/%postname%/'
58
62
  fi
59
63
 
60
64
  # Install plugins from WP_PLUGINS environment variable
@@ -29,7 +29,9 @@ SHIPIT_CONFIG_ANNOTATION = "shipitcli.com/config"
29
29
  SHIPIT_PROVIDER_ANNOTATION = "shipitcli.com/provider"
30
30
  SHIPIT_VERSION_ANNOTATION = "shipitcli.com/version"
31
31
  WASMER_APP_KIND_ANNOTATION = "wasmer.io/app-kind"
32
- EDGEJS_QUICKJS_DEPENDENCY = "wasmer/edgejs-quickjs@=0.0.7"
32
+ WASMER_VERSION_ANNOTATION = "wasmer.io/version"
33
+ BUILD_ANNOTATIONS_FILENAME = "build-annotations.yaml"
34
+ EDGEJS_QUICKJS_DEPENDENCY = "wasmer/edgejs-quickjs@=0.1.0"
33
35
  PHPIX_VERSION = "0.3.0-rc.2"
34
36
 
35
37
 
@@ -41,7 +43,10 @@ def serialize_provider_config(provider_config: Any) -> Dict[str, Any]:
41
43
  if provider_config is None:
42
44
  return {}
43
45
  if hasattr(provider_config, "model_dump"):
44
- return provider_config.model_dump(mode="json", exclude_none=True)
46
+ return provider_config.model_dump(
47
+ mode="json",
48
+ exclude_defaults=True,
49
+ )
45
50
  if isinstance(provider_config, dict):
46
51
  return provider_config
47
52
  return {}
@@ -255,9 +260,9 @@ class WasmerRunner:
255
260
  return Path("/opt") / name
256
261
 
257
262
  def prepare_config(self, provider_config: Any) -> Any:
258
- from shipit.providers.python import PythonConfig
259
- from shipit.providers.php import PhpConfig
260
263
  from shipit.providers.node import NodeConfig
264
+ from shipit.providers.php import PhpConfig
265
+ from shipit.providers.python import PythonConfig
261
266
 
262
267
  # Plan-visible overrides: the Shipit plan intentionally reacts to
263
268
  # these at evaluation time (cross-platform wheel builds etc.).
@@ -267,21 +272,15 @@ class WasmerRunner:
267
272
  )
268
273
  provider_config.cross_platform = "wasix_wasm32"
269
274
  provider_config.precompile_python = True
270
-
271
- # Runner-only overrides: these feed app.yaml/wasmer.toml metadata
272
- # (app kind, memory caps, runtime selection) but must NOT change the
273
- # evaluated plan — with providers evaluated from config, a shared
274
- # mutation here would silently flip e.g. php serving to phpix.
275
- # phpix stays opt-in via project config/SHIPIT_PHPIX.
276
- runner_config = provider_config.model_copy(deep=True)
277
- if isinstance(runner_config, PhpConfig):
278
- runner_config.phpix = True
279
- if isinstance(runner_config, NodeConfig):
280
- runner_config.use_edgejs = True
281
- if runner_config.precompile_edgejs is None:
282
- runner_config.precompile_edgejs = True
283
- runner_config.remove_native_binaries = True
284
- self.provider_config = runner_config
275
+ if isinstance(provider_config, PhpConfig):
276
+ provider_config.phpix = True
277
+ if isinstance(provider_config, NodeConfig):
278
+ provider_config.use_edgejs = True
279
+ if provider_config.precompile_edgejs is None:
280
+ provider_config.precompile_edgejs = True
281
+ provider_config.remove_native_binaries = True
282
+
283
+ self.provider_config = provider_config.model_copy(deep=True)
285
284
  return provider_config
286
285
 
287
286
  def prepare_build_steps(self, build_steps: List["Step"]) -> List["Step"]:
@@ -313,6 +312,7 @@ class WasmerRunner:
313
312
  return new_build_steps
314
313
 
315
314
  def build(self, serve: Serve) -> None:
315
+ self._write_build_annotations()
316
316
  self.build_prepare(serve)
317
317
  self.build_serve(serve)
318
318
 
@@ -635,6 +635,7 @@ class WasmerRunner:
635
635
 
636
636
  annotations = yaml_config.get("annotations", {})
637
637
  assert isinstance(annotations, dict), "annotations must be a dictionary"
638
+ annotations.update(self._load_build_annotations())
638
639
  annotations[SHIPIT_CONFIG_ANNOTATION] = serialize_provider_config(
639
640
  self.provider_config
640
641
  )
@@ -759,6 +760,36 @@ class WasmerRunner:
759
760
  env=env or os.environ,
760
761
  )
761
762
 
763
+ def _get_wasmer_version(self) -> str:
764
+ result = subprocess.run(
765
+ [self.bin, "--version"],
766
+ check=True,
767
+ capture_output=True,
768
+ text=True,
769
+ )
770
+ output = result.stdout.strip()
771
+ name, separator, version = output.partition(" ")
772
+ if name.lower() != "wasmer" or not separator or not version:
773
+ raise ValueError(f"Unexpected Wasmer version output: {output!r}")
774
+ return version
775
+
776
+ def _write_build_annotations(self) -> None:
777
+ self.wasmer_dir_path.mkdir(parents=True, exist_ok=True)
778
+ annotations_path = self.wasmer_dir_path / BUILD_ANNOTATIONS_FILENAME
779
+ annotations_path.write_text(
780
+ yaml.dump({WASMER_VERSION_ANNOTATION: self._get_wasmer_version()})
781
+ )
782
+
783
+ def _load_build_annotations(self) -> Dict[str, Any]:
784
+ annotations_path = self.wasmer_dir_path / BUILD_ANNOTATIONS_FILENAME
785
+ if not annotations_path.exists():
786
+ return {}
787
+ annotations = yaml.safe_load(annotations_path.read_text()) or {}
788
+ assert isinstance(annotations, dict), (
789
+ f"{BUILD_ANNOTATIONS_FILENAME} must contain a dictionary"
790
+ )
791
+ return annotations
792
+
762
793
  def _update_app_yaml(
763
794
  self, app_owner: Optional[str] = None, app_name: Optional[str] = None
764
795
  ) -> None:
@@ -1,7 +1,7 @@
1
1
  __all__ = ["version", "version_info"]
2
2
 
3
3
 
4
- version = "0.22.0" # x-release-please-version
4
+ version = "0.22.2" # x-release-please-version
5
5
  _version_parts = version.split(".")
6
6
  version_info = (
7
7
  int(_version_parts[0]),
@@ -201,7 +201,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
201
201
  E2ECase(
202
202
  path="examples/php-nobuild",
203
203
  serve_pattern=(
204
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
204
+ r"listening addr"
205
205
  ),
206
206
  http=[HTTPRequest(path="/", body_match=r"PHP Version 8\.3\.[0-9]+")],
207
207
  ),
@@ -209,7 +209,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
209
209
  E2ECase(
210
210
  path="examples/php-nobuild",
211
211
  serve_pattern=(
212
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
212
+ r"listening addr"
213
213
  ),
214
214
  http=[HTTPRequest(path="/", body_match=r"PHP Version 8\.3\.[0-9]+")],
215
215
  ),
@@ -217,7 +217,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
217
217
  E2ECase(
218
218
  path="examples/php-api",
219
219
  serve_pattern=(
220
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
220
+ r"listening addr"
221
221
  ),
222
222
  http=[
223
223
  HTTPRequest(
@@ -231,7 +231,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
231
231
  E2ECase(
232
232
  path="examples/php-wordpress",
233
233
  serve_pattern=(
234
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
234
+ r"listening addr"
235
235
  ),
236
236
  http=[HTTPRequest(path="/", body_match=r"WordPress")],
237
237
  ),
@@ -342,7 +342,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
342
342
  E2ECase(
343
343
  path="examples/php-wordpress",
344
344
  serve_pattern=(
345
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
345
+ r"listening addr"
346
346
  ),
347
347
  http=[HTTPRequest(path="/", body_match=r"WordPress")],
348
348
  extra_env={"SHIPIT_PHPIX": "true"},
@@ -352,7 +352,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
352
352
  E2ECase(
353
353
  path="examples/php-nobuild",
354
354
  serve_pattern=(
355
- r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
355
+ r"listening addr"
356
356
  ),
357
357
  http=[HTTPRequest(path="/", body_match=r"PHP Version 8\.3\.[0-9]+")],
358
358
  extra_env={"SHIPIT_PHPIX": "true"},
@@ -534,7 +534,7 @@ def _e2e_case_params(cases: list[E2ECase]) -> list[object]:
534
534
  path="examples/node-astro",
535
535
  serve_pattern=r"Node|Astro|Listening|ready",
536
536
  http=[HTTPRequest(path="/", body_match=r"Astro Node Example")],
537
- build_modes=(BuildMode.Local,),
537
+ build_modes=(BuildMode.Local, BuildMode.Wasmer),
538
538
  ),
539
539
  # Hugo static site (built via Hugo, served with static-web-server)
540
540
  E2ECase(
@@ -1,3 +1,4 @@
1
+ import subprocess
1
2
  import tomllib
2
3
  from pathlib import Path
3
4
 
@@ -5,9 +6,14 @@ import pytest
5
6
  import yaml
6
7
 
7
8
  from shipit.providers.node import NodeConfig
8
- from shipit.providers.php import PhpFramework
9
+ from shipit.providers.php import PhpConfig, PhpFramework
9
10
  from shipit.providers.python import PythonConfig, PythonFramework
10
- from shipit.runners.wasmer import WasmerRunner, resolve_app_kind
11
+ from shipit.runners.wasmer import (
12
+ BUILD_ANNOTATIONS_FILENAME,
13
+ WasmerRunner,
14
+ resolve_app_kind,
15
+ serialize_provider_config,
16
+ )
11
17
  from shipit.shipit_types import Package, Serve, Volume
12
18
  from shipit.version import version as shipit_version
13
19
 
@@ -54,7 +60,32 @@ def test_resolve_app_kind(
54
60
  assert resolve_app_kind(provider, framework) == expected
55
61
 
56
62
 
57
- def test_wasmer_app_yaml_adds_python_annotations(tmp_path: Path) -> None:
63
+ def test_serialize_provider_config_excludes_defaults() -> None:
64
+ assert serialize_provider_config(PythonConfig()) == {}
65
+ assert serialize_provider_config(
66
+ PythonConfig(framework=PythonFramework.Django)
67
+ ) == {"framework": "django"}
68
+
69
+
70
+ @pytest.mark.parametrize("phpix", [False, True])
71
+ def test_wasmer_prepare_config_enables_phpix(
72
+ tmp_path: Path,
73
+ phpix: bool,
74
+ ) -> None:
75
+ src_dir = tmp_path / "src"
76
+ src_dir.mkdir()
77
+ runner = WasmerRunner(DummyBuildBackend(tmp_path), src_dir)
78
+
79
+ config = runner.prepare_config(PhpConfig(phpix=phpix))
80
+
81
+ assert config.phpix is True
82
+ assert runner.provider_config.phpix is True
83
+
84
+
85
+ def test_wasmer_app_yaml_adds_python_annotations(
86
+ tmp_path: Path,
87
+ monkeypatch: pytest.MonkeyPatch,
88
+ ) -> None:
58
89
  src_dir = tmp_path / "src"
59
90
  src_dir.mkdir()
60
91
  (src_dir / "app.yaml").write_text(
@@ -63,6 +94,7 @@ def test_wasmer_app_yaml_adds_python_annotations(tmp_path: Path) -> None:
63
94
 
64
95
  runner = WasmerRunner(DummyBuildBackend(tmp_path), src_dir)
65
96
  runner.prepare_config(PythonConfig(framework=PythonFramework.Django))
97
+ monkeypatch.setattr(runner, "_get_wasmer_version", lambda: "7.2.0")
66
98
 
67
99
  serve = Serve(
68
100
  name="django",
@@ -76,16 +108,23 @@ def test_wasmer_app_yaml_adds_python_annotations(tmp_path: Path) -> None:
76
108
  },
77
109
  )
78
110
 
79
- runner.build_serve(serve)
111
+ runner.build(serve)
80
112
 
81
113
  app_yaml = yaml.safe_load((runner.wasmer_dir_path / "app.yaml").read_text())
82
114
  annotations = app_yaml["annotations"]
115
+ build_annotations = yaml.safe_load(
116
+ (runner.wasmer_dir_path / BUILD_ANNOTATIONS_FILENAME).read_text()
117
+ )
83
118
 
119
+ assert build_annotations == {"wasmer.io/version": "7.2.0"}
84
120
  assert annotations["example.com/existing"] == "keep"
85
121
  assert annotations["shipitcli.com/provider"] == "python"
86
122
  assert annotations["shipitcli.com/version"] == shipit_version
87
123
  assert annotations["wasmer.io/app-kind"] == "django"
124
+ assert annotations["wasmer.io/version"] == "7.2.0"
88
125
  assert annotations["shipitcli.com/config"]["framework"] == "django"
126
+ assert "python_version" not in annotations["shipitcli.com/config"]
127
+ assert "precompile_python" not in annotations["shipitcli.com/config"]
89
128
  assert (
90
129
  annotations["shipitcli.com/config"]["cross_platform"]
91
130
  == "wasix_wasm32"
@@ -184,6 +223,28 @@ def test_wasmer_run_command_inherits_stdio(
184
223
  }
185
224
 
186
225
 
226
+ def test_get_wasmer_version(
227
+ tmp_path: Path,
228
+ monkeypatch: pytest.MonkeyPatch,
229
+ ) -> None:
230
+ src_dir = tmp_path / "src"
231
+ src_dir.mkdir()
232
+ runner = WasmerRunner(DummyBuildBackend(tmp_path), src_dir, bin="wasmer")
233
+
234
+ def fake_run(*args, **kwargs):
235
+ assert args == (["wasmer", "--version"],)
236
+ assert kwargs == {
237
+ "check": True,
238
+ "capture_output": True,
239
+ "text": True,
240
+ }
241
+ return subprocess.CompletedProcess(args[0], 0, stdout="wasmer 7.2.0\n")
242
+
243
+ monkeypatch.setattr("shipit.runners.wasmer.subprocess.run", fake_run)
244
+
245
+ assert runner._get_wasmer_version() == "7.2.0"
246
+
247
+
187
248
  def test_wasmer_node_manifest_maps_to_edgejs(tmp_path: Path) -> None:
188
249
  src_dir = tmp_path / "src"
189
250
  src_dir.mkdir()
@@ -201,7 +262,7 @@ def test_wasmer_node_manifest_maps_to_edgejs(tmp_path: Path) -> None:
201
262
  runner.build_serve(serve)
202
263
 
203
264
  manifest = tomllib.loads((runner.wasmer_dir_path / "wasmer.toml").read_text())
204
- assert manifest["dependencies"]["wasmer/edgejs-quickjs"] == "=0.0.7"
265
+ assert manifest["dependencies"]["wasmer/edgejs-quickjs"] == "=0.1.0"
205
266
  assert manifest["command"][0]["module"] == "wasmer/edgejs-quickjs:edge"
206
267
  wasi = manifest["command"][0]["annotations"]["wasi"]
207
268
  assert wasi["main-args"] == ["--bytecode-cache", "server.js"]
@@ -277,15 +338,12 @@ def test_wasmer_prepare_config_enables_node_edge_optimizations(
277
338
 
278
339
  config = runner.prepare_config(NodeConfig())
279
340
 
280
- # Runner metadata (app.yaml/wasmer.toml) sees the edge optimizations...
281
341
  assert runner.provider_config.use_edgejs is True
282
342
  assert runner.provider_config.precompile_edgejs is True
283
343
  assert runner.provider_config.remove_native_binaries is True
284
- # ...but the plan config the Shipit file is evaluated with is untouched,
285
- # so per-run runner flags cannot silently change the build plan.
286
- assert config.use_edgejs is False
287
- assert config.precompile_edgejs is None
288
- assert config.remove_native_binaries is False
344
+ assert config.use_edgejs is True
345
+ assert config.precompile_edgejs is True
346
+ assert config.remove_native_binaries is True
289
347
 
290
348
 
291
349
  def test_wasmer_prepare_config_preserves_node_precompile_override(
@@ -190,6 +190,24 @@ def test_generate_shipit_wordpress_phpix_mode(tmp_path: Path) -> None:
190
190
  )
191
191
 
192
192
 
193
+ def test_wasmer_enables_phpix_before_evaluating_plan(tmp_path: Path) -> None:
194
+ project_dir = tmp_path / "my-plugin"
195
+ _write_plugin(project_dir)
196
+
197
+ _provider_cls, provider_config, generated = _generate_for_path(project_dir)
198
+ assert provider_config.phpix is False
199
+
200
+ runner = WasmerRunner(DummyBuildBackend(tmp_path), project_dir)
201
+ provider_config = runner.prepare_config(provider_config)
202
+ _backend, _ctx, serve = _evaluate_generated(
203
+ project_dir, provider_config, generated, tmp_path
204
+ )
205
+
206
+ assert any(pkg.name == "phpix" for pkg in serve.deps)
207
+ assert not any(pkg.name == "php" for pkg in serve.deps)
208
+ assert serve.commands["start"].startswith("phpix ")
209
+
210
+
193
211
  def test_wasmer_app_yaml_sets_memory_limit_for_wordpress_phpix(
194
212
  tmp_path: Path,
195
213
  ) -> None:
File without changes
File without changes