shipit-cli 0.17.1__tar.gz → 0.17.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.
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/PKG-INFO +1 -1
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/pyproject.toml +1 -1
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/assets/wordpress/wp-config.php +1 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/python.py +32 -9
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/runners/wasmer.py +4 -2
- shipit_cli-0.17.2/src/shipit/version.py +5 -0
- shipit_cli-0.17.1/src/shipit/version.py +0 -5
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/.gitignore +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/README.md +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/__init__.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/assets/php/php.ini +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/assets/wordpress/install.sh +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/builders/__init__.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/builders/base.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/builders/docker.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/builders/local.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/cli.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/generator.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/procfile.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/base.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/go.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/hugo.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/jekyll.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/laravel.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/mkdocs.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/node_static.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/php.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/registry.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/staticfile.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/providers/wordpress.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/runners/__init__.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/runners/base.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/runners/local.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/shipit_types.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/ui.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/src/shipit/utils.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/tests/test_e2e.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/tests/test_generate_shipit_examples.py +0 -0
- {shipit_cli-0.17.1 → shipit_cli-0.17.2}/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.
|
|
3
|
+
Version: 0.17.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
|
|
@@ -145,6 +145,7 @@ define( 'WP_SITEURL', get_env_var('WP_SITEURL', WP_HOME . '/') );
|
|
|
145
145
|
define( 'WP_MEMORY_LIMIT', get_env_var('WP_MEMORY_LIMIT', '256M') );
|
|
146
146
|
define( 'WP_MAX_MEMORY_LIMIT', get_env_var('WP_MAX_MEMORY_LIMIT', '256M') );
|
|
147
147
|
define( 'WP_POST_REVISIONS', get_env_var('WP_POST_REVISIONS', false));
|
|
148
|
+
define( 'DISABLE_WP_CRON', true );
|
|
148
149
|
|
|
149
150
|
/**#@-*/
|
|
150
151
|
|
|
@@ -34,6 +34,17 @@ class PythonServer(Enum):
|
|
|
34
34
|
Daphne = "daphne"
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
class MigrationStrategy(Enum):
|
|
38
|
+
Django = "django"
|
|
39
|
+
Alembic = "alembic"
|
|
40
|
+
|
|
41
|
+
def get_migration_command(self) -> str:
|
|
42
|
+
if self == MigrationStrategy.Django:
|
|
43
|
+
return 'f"python manage.py migrate"'
|
|
44
|
+
elif self == MigrationStrategy.Alembic:
|
|
45
|
+
return 'f"alembic upgrade head"'
|
|
46
|
+
|
|
47
|
+
|
|
37
48
|
class DatabaseType(Enum):
|
|
38
49
|
MySQL = "mysql"
|
|
39
50
|
PostgreSQL = "postgresql"
|
|
@@ -46,6 +57,7 @@ class PythonConfig(Config):
|
|
|
46
57
|
|
|
47
58
|
framework: Optional[PythonFramework] = None
|
|
48
59
|
server: Optional[PythonServer] = None
|
|
60
|
+
migration_strategy: Optional[MigrationStrategy] = None
|
|
49
61
|
database: Optional[DatabaseType] = None
|
|
50
62
|
extra_dependencies: Set[str] = Field(default_factory=set)
|
|
51
63
|
asgi_application: Optional[str] = None
|
|
@@ -109,12 +121,14 @@ class PythonProvider:
|
|
|
109
121
|
"mysql-connector-python",
|
|
110
122
|
"aiomysql",
|
|
111
123
|
"asyncmy",
|
|
124
|
+
"mariadb",
|
|
112
125
|
}
|
|
113
126
|
must_have_deps = must_have_deps or set()
|
|
114
127
|
found_deps = cls.check_deps(
|
|
115
128
|
path,
|
|
116
129
|
"file://", # This is not really a dependency, but as a way to check if the install script requires all files
|
|
117
130
|
"streamlit",
|
|
131
|
+
"alembic",
|
|
118
132
|
"django",
|
|
119
133
|
"mcp",
|
|
120
134
|
"mcp[cli]",
|
|
@@ -159,6 +173,7 @@ class PythonProvider:
|
|
|
159
173
|
# Set framework
|
|
160
174
|
if _exists(path, "manage.py") and ("django" in found_deps):
|
|
161
175
|
framework = PythonFramework.Django
|
|
176
|
+
config.migration_strategy = MigrationStrategy.Django
|
|
162
177
|
elif "streamlit" in found_deps:
|
|
163
178
|
framework = PythonFramework.Streamlit
|
|
164
179
|
elif "mcp" in found_deps:
|
|
@@ -173,6 +188,12 @@ class PythonProvider:
|
|
|
173
188
|
framework = None
|
|
174
189
|
config.framework = framework
|
|
175
190
|
|
|
191
|
+
if not config.migration_strategy:
|
|
192
|
+
if config.framework == PythonFramework.Django:
|
|
193
|
+
config.migration_strategy = MigrationStrategy.Django
|
|
194
|
+
elif "alembic" in found_deps or _exists(path, "alembic.ini"):
|
|
195
|
+
config.migration_strategy = MigrationStrategy.Alembic
|
|
196
|
+
|
|
176
197
|
if not config.server and config.framework:
|
|
177
198
|
if config.framework == PythonFramework.Django:
|
|
178
199
|
config.server = PythonServer.Uvicorn
|
|
@@ -465,6 +486,7 @@ class PythonProvider:
|
|
|
465
486
|
return {}
|
|
466
487
|
|
|
467
488
|
start_cmd = None
|
|
489
|
+
migrate_cmd = None
|
|
468
490
|
if self.config.server == PythonServer.Daphne:
|
|
469
491
|
assert self.config.asgi_application, (
|
|
470
492
|
"No ASGI application found for Daphne"
|
|
@@ -503,21 +525,22 @@ class PythonProvider:
|
|
|
503
525
|
start_cmd = f'"python {main_file}"'
|
|
504
526
|
else:
|
|
505
527
|
start_cmd = f'"python {{}}/bin/mcp run {main_file} --transport=streamable-http".format(venv.serve_path)'
|
|
528
|
+
elif self.config.framework == PythonFramework.Django:
|
|
529
|
+
start_cmd = 'f"python manage.py runserver 0.0.0.0:{PORT}"'
|
|
506
530
|
|
|
507
531
|
if not start_cmd:
|
|
508
532
|
if self.config.main_file:
|
|
509
533
|
start_cmd = f'"python {self.config.main_file}"'
|
|
534
|
+
|
|
535
|
+
if self.config.migration_strategy:
|
|
536
|
+
migrate_cmd = self.config.migration_strategy.get_migration_command()
|
|
510
537
|
|
|
511
|
-
|
|
512
|
-
if not start_cmd:
|
|
513
|
-
start_cmd = 'f"python manage.py runserver 0.0.0.0:{PORT}"'
|
|
514
|
-
migrate_cmd = '"python manage.py migrate"'
|
|
515
|
-
return {"start": start_cmd, "after_deploy": migrate_cmd}
|
|
516
|
-
|
|
538
|
+
commands = {}
|
|
517
539
|
if start_cmd:
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
540
|
+
commands["start"] = start_cmd
|
|
541
|
+
if migrate_cmd:
|
|
542
|
+
commands["after_deploy"] = migrate_cmd
|
|
543
|
+
return commands
|
|
521
544
|
|
|
522
545
|
def mounts(self) -> list[MountSpec]:
|
|
523
546
|
if self.only_build:
|
|
@@ -41,6 +41,7 @@ class WasmerRunner:
|
|
|
41
41
|
"daphne": "python -m daphne",
|
|
42
42
|
"gunicorn": "python -m gunicorn",
|
|
43
43
|
"uvicorn": "python -m uvicorn",
|
|
44
|
+
"alembic": "python -m alembic",
|
|
44
45
|
"hypercorn": "python -m hypercorn",
|
|
45
46
|
"fastapi": "python -m fastapi",
|
|
46
47
|
"streamlit": "python -m streamlit",
|
|
@@ -51,8 +52,8 @@ class WasmerRunner:
|
|
|
51
52
|
mapper: Dict[str, MapperItem] = {
|
|
52
53
|
"python": {
|
|
53
54
|
"dependencies": {
|
|
54
|
-
"latest": "python/python@=3.13.
|
|
55
|
-
"3.13": "python/python@=3.13.
|
|
55
|
+
"latest": "python/python@=3.13.5",
|
|
56
|
+
"3.13": "python/python@=3.13.5",
|
|
56
57
|
},
|
|
57
58
|
"scripts": {"python"},
|
|
58
59
|
"aliases": {},
|
|
@@ -499,6 +500,7 @@ class WasmerRunner:
|
|
|
499
500
|
"run",
|
|
500
501
|
str(self.wasmer_dir_path.absolute()),
|
|
501
502
|
"--net",
|
|
503
|
+
"--forward-host-env",
|
|
502
504
|
f"--command={command}",
|
|
503
505
|
*extra_args,
|
|
504
506
|
],
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|