shipit-cli 0.19.6.dev1__tar.gz → 0.19.8__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 (49) hide show
  1. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/PKG-INFO +1 -1
  2. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/pyproject.toml +1 -1
  3. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/assets/wordpress/install.sh +36 -32
  4. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/node_static.py +338 -39
  5. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/php.py +10 -2
  6. shipit_cli-0.19.8/src/shipit/providers/wordpress.py +305 -0
  7. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/runners/wasmer.py +20 -18
  8. shipit_cli-0.19.8/src/shipit/version.py +5 -0
  9. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_e2e.py +84 -0
  10. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_generate_shipit_examples.py +8 -1
  11. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_wordpress_phpix.py +84 -2
  12. shipit_cli-0.19.6.dev1/src/shipit/providers/wordpress.py +0 -122
  13. shipit_cli-0.19.6.dev1/src/shipit/version.py +0 -5
  14. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/.gitignore +0 -0
  15. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/README.md +0 -0
  16. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/__init__.py +0 -0
  17. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/assets/php/php.ini +0 -0
  18. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/assets/wordpress/.htaccess +0 -0
  19. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/assets/wordpress/start.php +0 -0
  20. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/assets/wordpress/wp-config.php +0 -0
  21. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/builders/__init__.py +0 -0
  22. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/builders/base.py +0 -0
  23. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/builders/docker.py +0 -0
  24. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/builders/local.py +0 -0
  25. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/cli.py +0 -0
  26. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/generator.py +0 -0
  27. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/procfile.py +0 -0
  28. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/base.py +0 -0
  29. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/go.py +0 -0
  30. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/hugo.py +0 -0
  31. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/jekyll.py +0 -0
  32. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/laravel.py +0 -0
  33. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/mkdocs.py +0 -0
  34. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/python.py +0 -0
  35. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/registry.py +0 -0
  36. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/providers/staticfile.py +0 -0
  37. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/runners/__init__.py +0 -0
  38. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/runners/base.py +0 -0
  39. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/runners/local.py +0 -0
  40. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/shipit_types.py +0 -0
  41. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/ui.py +0 -0
  42. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/utils.py +0 -0
  43. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/src/shipit/volumes.py +0 -0
  44. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_cli_after_deploy.py +0 -0
  45. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_php_provider.py +0 -0
  46. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_staticfile_provider.py +0 -0
  47. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_version.py +0 -0
  48. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_volumes.py +0 -0
  49. {shipit_cli-0.19.6.dev1 → shipit_cli-0.19.8}/tests/test_wasmer_annotations.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shipit-cli
3
- Version: 0.19.6.dev1
3
+ Version: 0.19.8
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.19.6.dev1"
3
+ version = "0.19.8"
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"
@@ -7,15 +7,23 @@ export PAGER="cat"
7
7
  WP_ADMIN_EMAIL=${WP_ADMIN_EMAIL:-"admin@example.com"}
8
8
  WP_ADMIN_USERNAME=${WP_ADMIN_USERNAME:-"admin"}
9
9
  WP_ADMIN_PASSWORD=${WP_ADMIN_PASSWORD:-"admin"}
10
- WP_LOCALE=${WP_LOCALE:-"en_US"}
10
+ WP_DEFAULT_LOCALE=${WP_DEFAULT_LOCALE:-"en_US"}
11
+ WP_LOCALE=${WP_LOCALE:-"$WP_DEFAULT_LOCALE"}
11
12
  WP_SITEURL=${WP_SITEURL:-"http://localhost"}
12
13
  WP_SITE_TITLE=${WP_SITE_TITLE:-"WordPress"}
13
14
 
14
- wp() {
15
- php /opt/assets/wp-cli.phar --allow-root --path=/app "$@"
16
- }
15
+ echo "📁 Initializing wp-content..."
16
+ mkdir -p wp-content/plugins
17
+ mkdir -p wp-content/themes
18
+ mkdir -p wp-content/upgrade
17
19
 
18
- if wp core is-installed; then
20
+ if [ -n "${WPCONTENT_BASE_PATH:-}" ] && [ -d "${WPCONTENT_BASE_PATH}" ]; then
21
+ shopt -s dotglob nullglob
22
+ cp -R "${WPCONTENT_BASE_PATH}"/* /app/wp-content || true
23
+ shopt -u dotglob nullglob
24
+ fi
25
+
26
+ if wp core is-installed && [ "${WP_FORCE_SETUP:-false}" != "true" ]; then
19
27
  echo "🚀 Setting up WordPress from an existing installation"
20
28
  if [ "${WP_UPDATE_DB:-true}" = "true" ]; then
21
29
  echo "🛠️ Activating maintenance mode..."
@@ -27,20 +35,6 @@ if wp core is-installed; then
27
35
  fi
28
36
  else
29
37
  echo "🚀 Setting up WordPress from a fresh install"
30
- echo "📁 Initializing wp-content..."
31
-
32
- mkdir -p wp-content/plugins
33
- # mkdir -p wp-content/themes
34
- mkdir -p wp-content/upgrade
35
-
36
- # if [ -n "${WPCONTENT_BASE_PATH:-}" ] && [ -d "${WPCONTENT_BASE_PATH}" ]; then
37
- # shopt -s dotglob nullglob
38
- # # Note: change this back to copy all, once using the WP Zip files
39
- # # cp -R "${WPCONTENT_BASE_PATH}"/* /app/wp-content
40
- # cp -R "${WPCONTENT_BASE_PATH}"/plugins/* /app/wp-content/plugins || true
41
- # cp -R "${WPCONTENT_BASE_PATH}"/themes/twentytwenty* /app/wp-content/themes || true
42
- # shopt -u dotglob nullglob
43
- # fi
44
38
 
45
39
  echo "⚙️ Installing WordPress core"
46
40
 
@@ -52,8 +46,8 @@ else
52
46
  --admin_email="$WP_ADMIN_EMAIL" \
53
47
  --locale="$WP_LOCALE"
54
48
 
55
- # echo "🔄 Setting permalinks"
56
- # wp rewrite structure '/%year%/%monthnum%/%day%/%postname%/'
49
+ echo "🔄 Setting permalinks"
50
+ wp rewrite structure '/%year%/%monthnum%/%day%/%postname%/'
57
51
  fi
58
52
 
59
53
  # Install plugins from WP_PLUGINS environment variable
@@ -64,7 +58,7 @@ if [ -n "${WP_PLUGINS:-}" ]; then
64
58
  for PLUGIN_ENTRY in $WP_PLUGINS; do
65
59
  if [[ "$PLUGIN_ENTRY" =~ ^https?:// ]]; then
66
60
  echo "• Installing plugin from URL: $PLUGIN_ENTRY"
67
- wp plugin install "$PLUGIN_ENTRY" --activate
61
+ wp plugin install "$PLUGIN_ENTRY" --force --activate
68
62
  else
69
63
  # Extract name and version using parameter expansion
70
64
  PLUGIN_NAME="${PLUGIN_ENTRY%%:*}"
@@ -72,15 +66,25 @@ if [ -n "${WP_PLUGINS:-}" ]; then
72
66
 
73
67
  if [[ "$PLUGIN_NAME" == "$PLUGIN_VERSION" ]]; then
74
68
  echo "• Installing plugin '${PLUGIN_NAME}' (latest version)..."
75
- wp plugin install "$PLUGIN_NAME" --activate
69
+ wp plugin install "$PLUGIN_NAME" --force --activate
76
70
  else
77
71
  echo "• Installing plugin '${PLUGIN_NAME}' (version: ${PLUGIN_VERSION})..."
78
- wp plugin install "$PLUGIN_NAME" --version="$PLUGIN_VERSION" --activate
72
+ wp plugin install "$PLUGIN_NAME" --force --version="$PLUGIN_VERSION" --activate
79
73
  fi
80
74
  fi
81
75
  done
82
76
  fi
83
77
 
78
+ if [ -n "${WP_PLUGINS_ACTIVATE:-}" ]; then
79
+ echo "✨ Activating plugins: $WP_PLUGINS_ACTIVATE"
80
+ IFS=',' # Split by commas
81
+
82
+ for PLUGIN_ENTRY in $WP_PLUGINS_ACTIVATE; do
83
+ echo "• Activating plugin: $PLUGIN_ENTRY"
84
+ wp plugin activate "$PLUGIN_ENTRY"
85
+ done
86
+ fi
87
+
84
88
  # Install themes from WP_THEMES environment variable
85
89
  if [ -n "${WP_THEMES:-}" ]; then
86
90
  echo "🎨 Installing themes from WP_THEMES: $WP_THEMES"
@@ -89,17 +93,17 @@ if [ -n "${WP_THEMES:-}" ]; then
89
93
  for THEME_ENTRY in $WP_THEMES; do
90
94
  if [[ "$THEME_ENTRY" =~ ^https?:// ]]; then
91
95
  echo "• Installing theme from URL: $THEME_ENTRY"
92
- wp theme install "$THEME_ENTRY"
96
+ wp theme install "$THEME_ENTRY" --force
93
97
  else
94
98
  THEME_NAME="${THEME_ENTRY%%:*}"
95
99
  THEME_VERSION="${THEME_ENTRY#*:}"
96
100
 
97
101
  if [[ "$THEME_NAME" == "$THEME_VERSION" ]]; then
98
102
  echo "• Installing theme '${THEME_NAME}' (latest version)..."
99
- wp theme install "$THEME_NAME"
103
+ wp theme install "$THEME_NAME" --force
100
104
  else
101
105
  echo "• Installing theme '${THEME_NAME}' (version: ${THEME_VERSION})..."
102
- wp theme install "$THEME_NAME" --version="$THEME_VERSION"
106
+ wp theme install "$THEME_NAME" --force --version="$THEME_VERSION"
103
107
  fi
104
108
  fi
105
109
  done
@@ -112,14 +116,14 @@ fi
112
116
 
113
117
  if [ -n "${WP_LOCALE:-}" ]; then
114
118
  echo "🌐 Setting locale: $WP_LOCALE"
115
- wp language core install "$WP_LOCALE"
116
- wp language theme install --all "$WP_LOCALE"
117
- wp language plugin install --all "$WP_LOCALE"
119
+ # wp language core install "$WP_LOCALE"
120
+ # wp language theme install --all "$WP_LOCALE"
121
+ # wp language plugin install --all "$WP_LOCALE"
118
122
  wp site switch-language "$WP_LOCALE"
119
123
  fi
120
124
 
121
- # echo "✍️ Rewriting permalinks structure"
122
- # wp rewrite flush --hard || true
125
+ echo "✍️ Rewriting permalinks structure"
126
+ wp rewrite flush --hard || true
123
127
 
124
128
  # if [ ! -f "/app/wp-content/wp-config.php" ]; then
125
129
  # cat > /app/wp-content/wp-config.php <<EOF