plain.dev 0.14.0__py3-none-any.whl → 0.14.1__py3-none-any.whl
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/cli.py +14 -0
- plain/dev/requests.py +1 -1
- {plain_dev-0.14.0.dist-info → plain_dev-0.14.1.dist-info}/METADATA +1 -1
- {plain_dev-0.14.0.dist-info → plain_dev-0.14.1.dist-info}/RECORD +7 -8
- plain/dev/config.py +0 -20
- {plain_dev-0.14.0.dist-info → plain_dev-0.14.1.dist-info}/LICENSE +0 -0
- {plain_dev-0.14.0.dist-info → plain_dev-0.14.1.dist-info}/WHEEL +0 -0
- {plain_dev-0.14.0.dist-info → plain_dev-0.14.1.dist-info}/entry_points.txt +0 -0
plain/dev/cli.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import importlib
|
1
2
|
import json
|
2
3
|
import os
|
3
4
|
import platform
|
@@ -120,6 +121,8 @@ class Dev:
|
|
120
121
|
domain=self.hostname,
|
121
122
|
storage_path=Path(settings.PLAIN_TEMP_PATH) / "dev" / "certs",
|
122
123
|
)
|
124
|
+
|
125
|
+
self.symlink_plain_src()
|
123
126
|
self.modify_hosts_file()
|
124
127
|
self.set_csrf_and_allowed_hosts()
|
125
128
|
self.run_preflight()
|
@@ -144,6 +147,17 @@ class Dev:
|
|
144
147
|
finally:
|
145
148
|
pid.rm()
|
146
149
|
|
150
|
+
def symlink_plain_src(self):
|
151
|
+
"""Symlink the plain package into .plain so we can look at it easily"""
|
152
|
+
plain_path = Path(
|
153
|
+
importlib.util.find_spec("plain.runtime").origin
|
154
|
+
).parent.parent
|
155
|
+
if not settings.PLAIN_TEMP_PATH.exists():
|
156
|
+
settings.PLAIN_TEMP_PATH.mkdir()
|
157
|
+
src_path = settings.PLAIN_TEMP_PATH / "src"
|
158
|
+
if plain_path.exists() and not src_path.exists():
|
159
|
+
src_path.symlink_to(plain_path)
|
160
|
+
|
147
161
|
def modify_hosts_file(self):
|
148
162
|
"""Modify the hosts file to map the custom domain to 127.0.0.1."""
|
149
163
|
entry_identifier = "# Added by plain"
|
plain/dev/requests.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
plain/dev/README.md,sha256=BQDaRKfsafIPzx7vtVt-zS-a8l6sxbQThhQTvu7tp3Y,3699
|
2
2
|
plain/dev/__init__.py,sha256=C1JrkNE5XX2DLgBXXLAV_UyhofwVd0ZPL59fPUMbOKo,139
|
3
|
-
plain/dev/cli.py,sha256=
|
4
|
-
plain/dev/config.py,sha256=h6o5YZtJhg-cFIWoqIDWuMCC5T09cxEsBaa3BP4Nii0,632
|
3
|
+
plain/dev/cli.py,sha256=4JHTRxMvUcpoZNBah2ZEWTZF6KarEi6M51kSBdw-BMQ,10612
|
5
4
|
plain/dev/contribute/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
6
5
|
plain/dev/contribute/cli.py,sha256=vrHSYM0Y2XtIUbxmNcJqssoPN-ZbkH4T_p65NVkYrV4,2339
|
7
6
|
plain/dev/db/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
@@ -21,14 +20,14 @@ plain/dev/poncho/printer.py,sha256=KSkSXx6KiejekJ9e4bzutIAIL8oZPDGimtVHNRJyFbQ,2
|
|
21
20
|
plain/dev/poncho/process.py,sha256=JJOKy-C6vMCg7-6JMCtu6C649h7HmOBSJqDP_hnX49I,2637
|
22
21
|
plain/dev/precommit/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
|
23
22
|
plain/dev/precommit/cli.py,sha256=UNrQmWRKrkZ6WbzrrcnjZl8VHwNorOVTHGoRQsR4jp8,3422
|
24
|
-
plain/dev/requests.py,sha256=
|
23
|
+
plain/dev/requests.py,sha256=v4ucDL8d6I0s5kF8O8HRvSc6Snq1Z_SMQv7wGGAI_Us,6847
|
25
24
|
plain/dev/services.py,sha256=XwtMpTjyZzEB8RVgjRuW9PRMQSTuhUAN-zY4Kl_kSZY,2059
|
26
25
|
plain/dev/templates/dev/requests.html,sha256=kQKJZq5L77juuL_t8UjcAehEU61U4RXNnKaAET-wAm8,7627
|
27
26
|
plain/dev/urls.py,sha256=b4NL2I6Ok-t7nTPjRnKoz_LQRttE3_mp8l2NlmeYQ9I,146
|
28
27
|
plain/dev/utils.py,sha256=4wMzpvj1Is_c0QxhsTu34_P9wAYlzw4glNPfVtZr_0A,123
|
29
28
|
plain/dev/views.py,sha256=r2Ivk7OXytpRhXq4DZpsb7FXNP9vzmEE3D5kLajYG4w,1073
|
30
|
-
plain_dev-0.14.
|
31
|
-
plain_dev-0.14.
|
32
|
-
plain_dev-0.14.
|
33
|
-
plain_dev-0.14.
|
34
|
-
plain_dev-0.14.
|
29
|
+
plain_dev-0.14.1.dist-info/LICENSE,sha256=YDg-l_Rj7LVP5uDXy04eQPGb_DYVXAHAHYd9r3pU1Cg,2713
|
30
|
+
plain_dev-0.14.1.dist-info/METADATA,sha256=3O2OFs2HpjrG8Iv3U6CAJYJAR9yCk7Q2j6-lcRvp7gw,4722
|
31
|
+
plain_dev-0.14.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
32
|
+
plain_dev-0.14.1.dist-info/entry_points.txt,sha256=1FaE_73k95WYOJrmB0hcHBnEIFQa-Cfl56Z1LGxyvak,164
|
33
|
+
plain_dev-0.14.1.dist-info/RECORD,,
|
plain/dev/config.py
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
import importlib
|
2
|
-
from pathlib import Path
|
3
|
-
|
4
|
-
from plain.packages import PackageConfig
|
5
|
-
from plain.runtime import settings
|
6
|
-
|
7
|
-
|
8
|
-
class Config(PackageConfig):
|
9
|
-
name = "plain.dev"
|
10
|
-
|
11
|
-
def ready(self):
|
12
|
-
# Symlink the plain package into .plain so we can look at it easily
|
13
|
-
plain_path = Path(
|
14
|
-
importlib.util.find_spec("plain.runtime").origin
|
15
|
-
).parent.parent
|
16
|
-
if not settings.PLAIN_TEMP_PATH.exists():
|
17
|
-
settings.PLAIN_TEMP_PATH.mkdir()
|
18
|
-
src_path = settings.PLAIN_TEMP_PATH / "src"
|
19
|
-
if plain_path.exists() and not src_path.exists():
|
20
|
-
src_path.symlink_to(plain_path)
|
File without changes
|
File without changes
|
File without changes
|