litestar-vite 0.13.1__py3-none-any.whl → 0.13.2__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.
Potentially problematic release.
This version of litestar-vite might be problematic. Click here for more details.
- litestar_vite/cli.py +0 -2
- litestar_vite/commands.py +5 -5
- litestar_vite/inertia/config.py +2 -2
- litestar_vite/loader.py +3 -1
- litestar_vite/plugin.py +2 -6
- {litestar_vite-0.13.1.dist-info → litestar_vite-0.13.2.dist-info}/METADATA +1 -1
- {litestar_vite-0.13.1.dist-info → litestar_vite-0.13.2.dist-info}/RECORD +9 -9
- {litestar_vite-0.13.1.dist-info → litestar_vite-0.13.2.dist-info}/WHEEL +0 -0
- {litestar_vite-0.13.1.dist-info → litestar_vite-0.13.2.dist-info}/licenses/LICENSE +0 -0
litestar_vite/cli.py
CHANGED
|
@@ -168,7 +168,6 @@ def vite_init(
|
|
|
168
168
|
)
|
|
169
169
|
install_dir = os.environ.get("VIRTUAL_ENV", sys.prefix)
|
|
170
170
|
console.rule("[yellow]Starting Nodeenv installation process[/]", align="left")
|
|
171
|
-
console.print(f"Installing Node environment into {install_dir}")
|
|
172
171
|
execute_command(command_to_run=[nodeenv_command, install_dir, "--force", "--quiet"], cwd=root_path)
|
|
173
172
|
|
|
174
173
|
console.rule("[yellow]Starting package installation process[/]", align="left")
|
|
@@ -206,7 +205,6 @@ def vite_install(app: "Litestar", verbose: "bool") -> None:
|
|
|
206
205
|
)
|
|
207
206
|
install_dir = os.environ.get("VIRTUAL_ENV", sys.prefix)
|
|
208
207
|
console.rule("[yellow]Starting Nodeenv installation process[/]", align="left")
|
|
209
|
-
console.print("Installing Node environment to %s:", install_dir)
|
|
210
208
|
execute_command(command_to_run=[nodeenv_command, install_dir, "--force", "--quiet"], cwd=plugin.config.root_dir)
|
|
211
209
|
|
|
212
210
|
console.rule("[yellow]Starting package installation process[/]", align="left")
|
litestar_vite/commands.py
CHANGED
|
@@ -13,12 +13,12 @@ if TYPE_CHECKING:
|
|
|
13
13
|
VITE_INIT_TEMPLATES: "set[str]" = {"package.json.j2", "tsconfig.json.j2", "vite.config.ts.j2"}
|
|
14
14
|
DEFAULT_RESOURCES: "set[str]" = {"styles.css.j2", "main.ts.j2"}
|
|
15
15
|
DEFAULT_DEV_DEPENDENCIES: "dict[str, str]" = {
|
|
16
|
-
"typescript": "^5.
|
|
17
|
-
"vite": "^6.
|
|
18
|
-
"litestar-vite-plugin": "^0.13.
|
|
19
|
-
"@types/node": "^22.
|
|
16
|
+
"typescript": "^5.8.3",
|
|
17
|
+
"vite": "^6.3.5",
|
|
18
|
+
"litestar-vite-plugin": "^0.13.2",
|
|
19
|
+
"@types/node": "^22.15.3",
|
|
20
20
|
}
|
|
21
|
-
DEFAULT_DEPENDENCIES: "dict[str, str]" = {"axios": "^1.
|
|
21
|
+
DEFAULT_DEPENDENCIES: "dict[str, str]" = {"axios": "^1.9.0"}
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def to_json(value: "Any") -> str:
|
litestar_vite/inertia/config.py
CHANGED
|
@@ -21,7 +21,7 @@ class InertiaConfig:
|
|
|
21
21
|
"""Optionally supply a path where unauthorized requests should redirect."""
|
|
22
22
|
redirect_404: "Optional[str]" = None
|
|
23
23
|
"""Optionally supply a path where 404 requests should redirect."""
|
|
24
|
-
extra_static_page_props: "dict[str, Any]" = field(default_factory=dict)
|
|
24
|
+
extra_static_page_props: "dict[str, Any]" = field(default_factory=dict) # pyright: ignore
|
|
25
25
|
"""A dictionary of values to automatically add in to page props on every response."""
|
|
26
|
-
extra_session_page_props: "set[str]" = field(default_factory=set)
|
|
26
|
+
extra_session_page_props: "set[str]" = field(default_factory=set) # pyright: ignore
|
|
27
27
|
"""A set of session keys for which the value automatically be added (if it exists) to the response."""
|
litestar_vite/loader.py
CHANGED
|
@@ -104,7 +104,9 @@ class ViteAssetLoader(metaclass=SingletonMeta):
|
|
|
104
104
|
Returns:
|
|
105
105
|
The manifest loader.
|
|
106
106
|
"""
|
|
107
|
-
|
|
107
|
+
loader = cls(config=config)
|
|
108
|
+
loader.parse_manifest()
|
|
109
|
+
return loader
|
|
108
110
|
|
|
109
111
|
@cached_property
|
|
110
112
|
def version_id(self) -> str:
|
litestar_vite/plugin.py
CHANGED
|
@@ -78,7 +78,6 @@ class ViteProcess:
|
|
|
78
78
|
if self.process and self.process.poll() is None: # pyright: ignore[reportUnknownMemberType]
|
|
79
79
|
return
|
|
80
80
|
|
|
81
|
-
console.print(f"Starting Vite process with command: {command}")
|
|
82
81
|
self.process = subprocess.Popen(
|
|
83
82
|
command,
|
|
84
83
|
cwd=cwd,
|
|
@@ -104,7 +103,6 @@ class ViteProcess:
|
|
|
104
103
|
if hasattr(signal, "SIGKILL"):
|
|
105
104
|
self.process.kill() # pyright: ignore[reportUnknownMemberType]
|
|
106
105
|
self.process.wait(timeout=1.0) # pyright: ignore[reportUnknownMemberType]
|
|
107
|
-
console.print("Stopping Vite process")
|
|
108
106
|
except Exception as e:
|
|
109
107
|
console.print(f"[red]Failed to stop Vite process: {e!s}[/]")
|
|
110
108
|
raise
|
|
@@ -200,7 +198,8 @@ class VitePlugin(InitPluginProtocol, CLIPlugin):
|
|
|
200
198
|
Yields:
|
|
201
199
|
An iterator of None.
|
|
202
200
|
"""
|
|
203
|
-
|
|
201
|
+
if self._config.set_environment:
|
|
202
|
+
set_environment(config=self._config)
|
|
204
203
|
if self._config.use_server_lifespan and self._config.dev_mode:
|
|
205
204
|
command_to_run = self._config.run_command if self._config.hot_reload else self._config.build_watch_command
|
|
206
205
|
|
|
@@ -209,9 +208,6 @@ class VitePlugin(InitPluginProtocol, CLIPlugin):
|
|
|
209
208
|
else:
|
|
210
209
|
console.rule("[yellow]Starting Vite watch and build process[/]", align="left")
|
|
211
210
|
|
|
212
|
-
if self._config.set_environment:
|
|
213
|
-
set_environment(config=self._config)
|
|
214
|
-
|
|
215
211
|
try:
|
|
216
212
|
self._vite_process.start(command_to_run, self._config.root_dir)
|
|
217
213
|
yield
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
litestar_vite/__init__.py,sha256=QykOZjCNHyDZJNIF84fa-6ze-lajDAGcoi18LxeV-0E,241
|
|
2
2
|
litestar_vite/__metadata__.py,sha256=dMGIPS6M11LcmiEfnMJJrbSPH8Lf00pU8crIIUsIBPw,478
|
|
3
|
-
litestar_vite/cli.py,sha256=
|
|
4
|
-
litestar_vite/commands.py,sha256=
|
|
3
|
+
litestar_vite/cli.py,sha256=W3bpXZSt_ne0pdDZQCGi_naMEakp7MA-oD_r1BJI0cQ,11058
|
|
4
|
+
litestar_vite/commands.py,sha256=XrQ6vIbcJYEANrO1nJwawb3DYOXt-1GGVYfJYWsYc6c,5385
|
|
5
5
|
litestar_vite/config.py,sha256=K3C3uhfcllINGAkOUS4tTah-mhhx74GYwNF4ME92eOA,4592
|
|
6
|
-
litestar_vite/loader.py,sha256=
|
|
7
|
-
litestar_vite/plugin.py,sha256=
|
|
6
|
+
litestar_vite/loader.py,sha256=opF-YJh0fnu1cpH2uJ4aLmK9PZpsREa4yEEajYV9yVs,11802
|
|
7
|
+
litestar_vite/plugin.py,sha256=uyGlJZBl46DpKoHmxkdkNUvZ2SyYI0Q3MXcDwYytweo,9132
|
|
8
8
|
litestar_vite/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
litestar_vite/inertia/__init__.py,sha256=KGvxCZhnOw06Pqx5_qjUxj0WWsCR3BR0cVnuNMT7sKQ,1136
|
|
10
10
|
litestar_vite/inertia/_utils.py,sha256=HZOedWduCu3fCMniuFvstEcXzP2FA1IBwPZ3E2XNBEo,2529
|
|
11
|
-
litestar_vite/inertia/config.py,sha256=
|
|
11
|
+
litestar_vite/inertia/config.py,sha256=i_Ji1SnWVt2hNClpAvIVTw-vb3L8TLPW_1f27QG5OEc,1258
|
|
12
12
|
litestar_vite/inertia/exception_handler.py,sha256=FfaPp7eiU_yo6sNU6WVRpKTkn6Npti7lFp1Rg-94Tqs,5576
|
|
13
13
|
litestar_vite/inertia/helpers.py,sha256=rk8P7Gh705JPaKLh9LONr-hDHrMBOEdUn-89NMEu_Bg,10876
|
|
14
14
|
litestar_vite/inertia/middleware.py,sha256=gyKZIOtsQmEq0nPjr2CJ-_qddZ1JsepROLO-CDSNEZM,1621
|
|
@@ -24,7 +24,7 @@ litestar_vite/templates/package.json.j2,sha256=0JWgdTuaSZ25EmCltF_zbqDdpxfvCLeYu
|
|
|
24
24
|
litestar_vite/templates/styles.css.j2,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
litestar_vite/templates/tsconfig.json.j2,sha256=q1REIuVyXUHCy4Zi2kgTkmrhdT98vyY89k-WTrImOj8,843
|
|
26
26
|
litestar_vite/templates/vite.config.ts.j2,sha256=bF5kOPFafYMkhhV0VkIwetN-_zoVMGVM1jEMX_wKoNc,1037
|
|
27
|
-
litestar_vite-0.13.
|
|
28
|
-
litestar_vite-0.13.
|
|
29
|
-
litestar_vite-0.13.
|
|
30
|
-
litestar_vite-0.13.
|
|
27
|
+
litestar_vite-0.13.2.dist-info/METADATA,sha256=jeyo7erxAdorX651z6CrIaFTF5xwRiCwvVM8Gx5HgjU,6245
|
|
28
|
+
litestar_vite-0.13.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
29
|
+
litestar_vite-0.13.2.dist-info/licenses/LICENSE,sha256=HeTiEfEgvroUXZe_xAmYHxtTBgw--mbXyZLsWDYabHc,1069
|
|
30
|
+
litestar_vite-0.13.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|