shipit-cli 0.17.8__tar.gz → 0.17.9__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 (41) hide show
  1. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/PKG-INFO +1 -1
  2. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/pyproject.toml +1 -1
  3. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/assets/php/php.ini +2 -2
  4. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/runners/wasmer.py +17 -16
  5. shipit_cli-0.17.9/src/shipit/version.py +5 -0
  6. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/tests/test_e2e.py +67 -0
  7. shipit_cli-0.17.8/src/shipit/version.py +0 -5
  8. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/.gitignore +0 -0
  9. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/README.md +0 -0
  10. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/__init__.py +0 -0
  11. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/assets/wordpress/.htaccess +0 -0
  12. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/assets/wordpress/install.sh +0 -0
  13. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/assets/wordpress/start.sh +0 -0
  14. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/assets/wordpress/wp-config.php +0 -0
  15. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/builders/__init__.py +0 -0
  16. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/builders/base.py +0 -0
  17. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/builders/docker.py +0 -0
  18. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/builders/local.py +0 -0
  19. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/cli.py +0 -0
  20. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/generator.py +0 -0
  21. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/procfile.py +0 -0
  22. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/base.py +0 -0
  23. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/go.py +0 -0
  24. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/hugo.py +0 -0
  25. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/jekyll.py +0 -0
  26. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/laravel.py +0 -0
  27. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/mkdocs.py +0 -0
  28. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/node_static.py +0 -0
  29. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/php.py +0 -0
  30. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/python.py +0 -0
  31. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/registry.py +0 -0
  32. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/staticfile.py +0 -0
  33. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/providers/wordpress.py +0 -0
  34. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/runners/__init__.py +0 -0
  35. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/runners/base.py +0 -0
  36. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/runners/local.py +0 -0
  37. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/shipit_types.py +0 -0
  38. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/ui.py +0 -0
  39. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/src/shipit/utils.py +0 -0
  40. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/tests/test_generate_shipit_examples.py +0 -0
  41. {shipit_cli-0.17.8 → shipit_cli-0.17.9}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shipit-cli
3
- Version: 0.17.8
3
+ Version: 0.17.9
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.17.8"
3
+ version = "0.17.9"
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"
@@ -26,7 +26,7 @@ access_log = /dev/stdout
26
26
  error_log = /dev/stderr
27
27
  ignore_repeated_errors = Off
28
28
  ignore_repeated_source = Off
29
- report_memleaks = On
29
+ report_memleaks = Off
30
30
  variables_order = "GPCS"
31
31
  request_order = "GP"
32
32
  register_argc_argv = Off
@@ -103,4 +103,4 @@ soap.wsdl_cache_limit = 5
103
103
  ldap.max_links = -1
104
104
 
105
105
  [Pdo_mysql]
106
- pdo_mysql.default_socket =
106
+ pdo_mysql.default_socket =
@@ -105,26 +105,26 @@ class WasmerRunner:
105
105
  },
106
106
  "phpix": {
107
107
  "dependencies": {
108
- "latest": "wasmer/phpix-32@=0.1.1080321-alpha.7",
109
- "8.3": "wasmer/phpix-32@=0.1.1080321-alpha.7",
110
- "8.2": "wasmer/phpix-32@=0.1.1080321-alpha.7",
111
- "8.1": "wasmer/phpix-32@=0.1.1080321-alpha.7",
112
- "7.4": "wasmer/phpix-32@=0.1.1080321-alpha.7",
108
+ "latest": "wasmer/phpix-32@=0.1.1080321-alpha.8",
109
+ "8.3": "wasmer/phpix-32@=0.1.1080321-alpha.8",
110
+ "8.2": "wasmer/phpix-32@=0.1.1080321-alpha.8",
111
+ "8.1": "wasmer/phpix-32@=0.1.1080321-alpha.8",
112
+ "7.4": "wasmer/phpix-32@=0.1.1080321-alpha.8",
113
113
  },
114
114
  "architecture_dependencies": {
115
115
  "64-bit": {
116
- "latest": "wasmer/phpix-64@=0.1.1080321-alpha.7",
117
- "8.3": "wasmer/phpix-64@=0.1.1080321-alpha.7",
118
- "8.2": "wasmer/phpix-64@=0.1.1080321-alpha.7",
119
- "8.1": "wasmer/phpix-64@=0.1.1080321-alpha.7",
120
- "7.4": "wasmer/phpix-64@=0.1.1080321-alpha.7",
116
+ "latest": "wasmer/phpix-64@=0.1.1080321-alpha.8",
117
+ "8.3": "wasmer/phpix-64@=0.1.1080321-alpha.8",
118
+ "8.2": "wasmer/phpix-64@=0.1.1080321-alpha.8",
119
+ "8.1": "wasmer/phpix-64@=0.1.1080321-alpha.8",
120
+ "7.4": "wasmer/phpix-64@=0.1.1080321-alpha.8",
121
121
  },
122
122
  "32-bit": {
123
- "latest": "wasmer/phpix-32@=0.1.1080321-alpha.7",
124
- "8.3": "wasmer/phpix-32@=0.1.1080321-alpha.7",
125
- "8.2": "wasmer/phpix-32@=0.1.1080321-alpha.7",
126
- "8.1": "wasmer/phpix-32@=0.1.1080321-alpha.7",
127
- "7.4": "wasmer/phpix-32@=0.1.1080321-alpha.7",
123
+ "latest": "wasmer/phpix-32@=0.1.1080321-alpha.8",
124
+ "8.3": "wasmer/phpix-32@=0.1.1080321-alpha.8",
125
+ "8.2": "wasmer/phpix-32@=0.1.1080321-alpha.8",
126
+ "8.1": "wasmer/phpix-32@=0.1.1080321-alpha.8",
127
+ "7.4": "wasmer/phpix-32@=0.1.1080321-alpha.8",
128
128
  },
129
129
  },
130
130
  "scripts": {"php", "phpix"},
@@ -490,12 +490,13 @@ class WasmerRunner:
490
490
  scaling["mode"] = "single_concurrency"
491
491
  yaml_config["scaling"] = scaling
492
492
 
493
- if has_phpix:
493
+ if has_phpix and serve.provider == "wordpress":
494
494
  capabilities = yaml_config.get("capabilities", {})
495
495
  assert isinstance(capabilities, dict), "capabilities must be a dictionary"
496
496
  memory = capabilities.get("memory", {})
497
497
  assert isinstance(memory, dict), "memory must be a dictionary"
498
498
  memory["limit"] = "2Gb"
499
+ capabilities["memory"] = memory
499
500
  yaml_config["capabilities"] = capabilities
500
501
 
501
502
  if "after_deploy" in serve.commands:
@@ -0,0 +1,5 @@
1
+ __all__ = ["version", "version_info"]
2
+
3
+
4
+ version = "0.17.9"
5
+ version_info = (0, 17, 9, "final", 0)
@@ -14,6 +14,7 @@ import shlex
14
14
  import shutil
15
15
  import contextlib
16
16
  import aiohttp
17
+ import yaml
17
18
  from enum import Enum
18
19
 
19
20
 
@@ -35,6 +36,9 @@ class E2ECase(NamedTuple):
35
36
  serve_pattern: str
36
37
  http: List[HTTPRequest]
37
38
  use_random_port: bool = True
39
+ extra_env: dict[str, str] | None = None
40
+ expected_memory_limit: str | None = None
41
+ expect_no_memory_limit: bool = False
38
42
 
39
43
  def __str__(self):
40
44
  return self.path
@@ -89,6 +93,26 @@ class E2ECase(NamedTuple):
89
93
  ),
90
94
  http=[HTTPRequest(path="/", body_match=r"WordPress")],
91
95
  ),
96
+ # WordPress skeleton in phpix mode (Wasmer only), validate memory cap.
97
+ E2ECase(
98
+ path="examples/php-wordpress",
99
+ serve_pattern=(
100
+ r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
101
+ ),
102
+ http=[HTTPRequest(path="/", body_match=r"WordPress")],
103
+ extra_env={"SHIPIT_PHPIX": "true"},
104
+ expected_memory_limit="2Gb",
105
+ ),
106
+ # Non-WordPress phpix mode should not force a memory capability.
107
+ E2ECase(
108
+ path="examples/php-nobuild",
109
+ serve_pattern=(
110
+ r"PHP 8\.3\.[0-9]+ Development Server \(http://localhost:[\d]+\) started"
111
+ ),
112
+ http=[HTTPRequest(path="/", body_match=r"PHP Version 8\.3\.[0-9]+")],
113
+ extra_env={"SHIPIT_PHPIX": "true"},
114
+ expect_no_memory_limit=True,
115
+ ),
92
116
  # Static site copied as-is (no build step beyond copy)
93
117
  E2ECase(
94
118
  path="examples/static-nobuild",
@@ -184,6 +208,10 @@ async def test_end_to_end(case: E2ECase, build_mode: BuildMode):
184
208
  # Skip if `uv` is not available in PATH
185
209
  if not shutil.which("uv"):
186
210
  pytest.skip("`uv` is not available in PATH")
211
+ if (case.expected_memory_limit or case.expect_no_memory_limit) and (
212
+ build_mode != BuildMode.Wasmer
213
+ ):
214
+ pytest.skip("phpix memory-cap checks run in Wasmer mode only")
187
215
 
188
216
  repo_root = Path(__file__).resolve().parents[1]
189
217
 
@@ -217,6 +245,8 @@ async def test_end_to_end(case: E2ECase, build_mode: BuildMode):
217
245
  creationflags = subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0
218
246
 
219
247
  env = os.environ.copy()
248
+ if case.extra_env:
249
+ env.update(case.extra_env)
220
250
  if case.use_random_port:
221
251
  port = get_free_port()
222
252
  else:
@@ -267,6 +297,43 @@ async def test_end_to_end(case: E2ECase, build_mode: BuildMode):
267
297
  # If we saw the serve banner, exercise the HTTP endpoint before shutting
268
298
  # down to ensure it actually serves content.
269
299
  if found_serve.is_set():
300
+ if case.expected_memory_limit or case.expect_no_memory_limit:
301
+ app_yaml_path = (
302
+ repo_root / case.path / ".shipit" / "wasmer" / "app.yaml"
303
+ )
304
+ if not app_yaml_path.is_file():
305
+ full_output = "".join(output_lines)
306
+ pytest.fail(
307
+ "Expected generated app.yaml for Wasmer run, but it "
308
+ "was not found.\n\n"
309
+ f"Path: {app_yaml_path}\n\n"
310
+ f"--- Captured output start ---\n{full_output}\n"
311
+ "--- Captured output end ---"
312
+ )
313
+ app_yaml = yaml.safe_load(app_yaml_path.read_text()) or {}
314
+ capabilities = app_yaml.get("capabilities", {})
315
+ memory = capabilities.get("memory", {})
316
+ limit = memory.get("limit")
317
+ if case.expected_memory_limit and limit != case.expected_memory_limit:
318
+ full_output = "".join(output_lines)
319
+ pytest.fail(
320
+ "Generated app.yaml has wrong phpix memory limit.\n\n"
321
+ f"Expected: {case.expected_memory_limit}\n"
322
+ f"Actual: {limit}\n"
323
+ f"Path: {app_yaml_path}\n\n"
324
+ f"--- Captured output start ---\n{full_output}\n"
325
+ "--- Captured output end ---"
326
+ )
327
+ if case.expect_no_memory_limit and limit is not None:
328
+ full_output = "".join(output_lines)
329
+ pytest.fail(
330
+ "Generated app.yaml unexpectedly sets phpix memory limit"
331
+ " for non-WordPress app.\n\n"
332
+ f"Actual: {limit}\n"
333
+ f"Path: {app_yaml_path}\n\n"
334
+ f"--- Captured output start ---\n{full_output}\n"
335
+ "--- Captured output end ---"
336
+ )
270
337
  for req in case.http:
271
338
  ok = await _wait_for_http_contains(
272
339
  host="localhost",
@@ -1,5 +0,0 @@
1
- __all__ = ["version", "version_info"]
2
-
3
-
4
- version = "0.17.8"
5
- version_info = (0, 17, 8, "final", 0)
File without changes
File without changes