plain.dev 0.8.0__tar.gz → 0.8.1__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.
- {plain_dev-0.8.0 → plain_dev-0.8.1}/PKG-INFO +1 -1
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/cli.py +15 -10
- {plain_dev-0.8.0 → plain_dev-0.8.1}/pyproject.toml +1 -1
- {plain_dev-0.8.0 → plain_dev-0.8.1}/LICENSE +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/README.md +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/README.md +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/__init__.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/config.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/contribute/__init__.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/contribute/cli.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/db/__init__.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/db/cli.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/db/container.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/debug.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/default_settings.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/gunicorn_logging.json +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/mkcert.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/pid.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/__init__.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/color.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/compat.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/manager.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/printer.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/poncho/process.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/precommit/__init__.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/precommit/cli.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/requests.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/services.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/templates/dev/requests.html +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/urls.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/utils.py +0 -0
- {plain_dev-0.8.0 → plain_dev-0.8.1}/plain/dev/views.py +0 -0
@@ -81,22 +81,28 @@ class Dev:
|
|
81
81
|
"PYTHONPATH": os.path.join(APP_PATH.parent, "app"),
|
82
82
|
}
|
83
83
|
self.project_name = os.path.basename(os.getcwd())
|
84
|
-
self.domain = f"{self.project_name}.localhost"
|
85
84
|
self.ssl_cert_path = None
|
86
85
|
self.ssl_key_path = None
|
87
86
|
|
87
|
+
self.is_codespace = "CODESPACES" in os.environ
|
88
|
+
|
89
|
+
if self.is_codespace:
|
90
|
+
codespace_name = os.environ["CODESPACE_NAME"]
|
91
|
+
codespace_forward_domain = os.environ[
|
92
|
+
"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN"
|
93
|
+
]
|
94
|
+
self.domain = f"{codespace_name}-{self.port}.{codespace_forward_domain}"
|
95
|
+
self.url = f"https://{self.domain}/"
|
96
|
+
else:
|
97
|
+
self.domain = f"{self.project_name}.localhost"
|
98
|
+
self.url = f"https://{self.domain}:{self.port}/"
|
99
|
+
|
88
100
|
def run(self):
|
89
101
|
pid = Pid()
|
90
102
|
pid.write()
|
91
103
|
|
92
104
|
try:
|
93
|
-
if
|
94
|
-
codespace_name = os.environ["CODESPACE_NAME"]
|
95
|
-
codespace_forward_domain = os.environ[
|
96
|
-
"GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN"
|
97
|
-
]
|
98
|
-
self.domain = f"https://{codespace_name}.{codespace_forward_domain}"
|
99
|
-
else:
|
105
|
+
if not self.is_codespace:
|
100
106
|
mkcert_manager = MkcertManager()
|
101
107
|
mkcert_manager.setup_mkcert(install_path=Path.home() / ".plain" / "dev")
|
102
108
|
self.ssl_cert_path, self.ssl_key_path = mkcert_manager.generate_certs(
|
@@ -115,9 +121,8 @@ class Dev:
|
|
115
121
|
self.add_services()
|
116
122
|
|
117
123
|
# Output the clickable link before starting the manager loop
|
118
|
-
url = f"https://{self.domain}:{self.port}/"
|
119
124
|
click.secho(
|
120
|
-
f"\nYour app will run at: {click.style(url, fg='green', underline=True)}\n",
|
125
|
+
f"\nYour app will run at: {click.style(self.url, fg='green', underline=True)}\n",
|
121
126
|
bold=True,
|
122
127
|
)
|
123
128
|
|
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
|