shipit-cli 0.9.0__py3-none-any.whl → 0.9.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.
- shipit/providers/node_static.py +47 -12
- shipit/version.py +2 -2
- {shipit_cli-0.9.0.dist-info → shipit_cli-0.9.1.dist-info}/METADATA +1 -1
- {shipit_cli-0.9.0.dist-info → shipit_cli-0.9.1.dist-info}/RECORD +6 -6
- {shipit_cli-0.9.0.dist-info → shipit_cli-0.9.1.dist-info}/WHEEL +0 -0
- {shipit_cli-0.9.0.dist-info → shipit_cli-0.9.1.dist-info}/entry_points.txt +0 -0
shipit/providers/node_static.py
CHANGED
|
@@ -31,7 +31,7 @@ class PackageManager(Enum):
|
|
|
31
31
|
dep_name = {
|
|
32
32
|
PackageManager.NPM: "npm",
|
|
33
33
|
PackageManager.PNPM: "pnpm",
|
|
34
|
-
PackageManager.YARN:
|
|
34
|
+
PackageManager.YARN: "yarn",
|
|
35
35
|
PackageManager.BUN: "bun",
|
|
36
36
|
}[self]
|
|
37
37
|
|
|
@@ -51,16 +51,18 @@ class PackageManager(Enum):
|
|
|
51
51
|
default_version=default_version,
|
|
52
52
|
)
|
|
53
53
|
|
|
54
|
-
def lockfile(self) ->
|
|
54
|
+
def lockfile(self) -> str:
|
|
55
55
|
return {
|
|
56
56
|
PackageManager.NPM: "package-lock.json",
|
|
57
57
|
PackageManager.PNPM: "pnpm-lock.yaml",
|
|
58
58
|
PackageManager.YARN: "yarn.lock",
|
|
59
59
|
PackageManager.BUN: "bun.lockb",
|
|
60
60
|
}[self]
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
@classmethod
|
|
63
63
|
def pnpm_lockfile_version(cls, lockfile: Path) -> Optional[str]:
|
|
64
|
+
if not lockfile.exists():
|
|
65
|
+
return None
|
|
64
66
|
# Read line by line and return the lockfileVersion
|
|
65
67
|
with open(lockfile, "r") as f:
|
|
66
68
|
for line in f:
|
|
@@ -109,6 +111,8 @@ class StaticGenerator(Enum):
|
|
|
109
111
|
REMIX = "remix"
|
|
110
112
|
NUXT_OLD = "nuxt"
|
|
111
113
|
NUXT_V3 = "nuxt3"
|
|
114
|
+
REMIX_OLD = "remix-old"
|
|
115
|
+
REMIX_V2 = "remix-v2"
|
|
112
116
|
|
|
113
117
|
|
|
114
118
|
class NodeStaticProvider(StaticFileProvider):
|
|
@@ -139,8 +143,12 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
139
143
|
self.static_generator = StaticGenerator.DOCUSAURUS
|
|
140
144
|
elif self.has_dependency(self.package_json, "svelte"):
|
|
141
145
|
self.static_generator = StaticGenerator.SVELTE
|
|
146
|
+
elif self.has_dependency(
|
|
147
|
+
self.package_json, "@remix-run/dev", "1"
|
|
148
|
+
) or self.has_dependency(self.package_json, "@remix-run/dev", "0"):
|
|
149
|
+
self.static_generator = StaticGenerator.REMIX_OLD
|
|
142
150
|
elif self.has_dependency(self.package_json, "@remix-run/dev"):
|
|
143
|
-
self.static_generator = StaticGenerator.
|
|
151
|
+
self.static_generator = StaticGenerator.REMIX_V2
|
|
144
152
|
elif self.has_dependency(self.package_json, "vite"):
|
|
145
153
|
self.static_generator = StaticGenerator.VITE
|
|
146
154
|
elif self.has_dependency(self.package_json, "next"):
|
|
@@ -151,7 +159,7 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
151
159
|
self.static_generator = StaticGenerator.NUXT_OLD
|
|
152
160
|
elif self.has_dependency(self.package_json, "nuxt"):
|
|
153
161
|
self.static_generator = StaticGenerator.NUXT_V3
|
|
154
|
-
|
|
162
|
+
|
|
155
163
|
# if self.has_dependency(self.package_json, "sharp"):
|
|
156
164
|
# self.extra_dependencies.add("libvips")
|
|
157
165
|
|
|
@@ -171,7 +179,10 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
171
179
|
|
|
172
180
|
@classmethod
|
|
173
181
|
def has_dependency(
|
|
174
|
-
cls,
|
|
182
|
+
cls,
|
|
183
|
+
package_json: Optional[Dict[str, Any]],
|
|
184
|
+
dep: str,
|
|
185
|
+
version: Optional[str] = None,
|
|
175
186
|
) -> bool:
|
|
176
187
|
if not package_json:
|
|
177
188
|
return False
|
|
@@ -199,7 +210,16 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
199
210
|
package_json = cls.parse_package_json(path)
|
|
200
211
|
if not package_json:
|
|
201
212
|
return None
|
|
202
|
-
static_generators = [
|
|
213
|
+
static_generators = [
|
|
214
|
+
"astro",
|
|
215
|
+
"vite",
|
|
216
|
+
"next",
|
|
217
|
+
"nuxt",
|
|
218
|
+
"gatsby",
|
|
219
|
+
"svelte",
|
|
220
|
+
"@docusaurus/core",
|
|
221
|
+
"@remix-run/dev",
|
|
222
|
+
]
|
|
203
223
|
if any(cls.has_dependency(package_json, dep) for dep in static_generators):
|
|
204
224
|
return DetectResult(cls.name(), 40)
|
|
205
225
|
return None
|
|
@@ -233,11 +253,22 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
233
253
|
def get_output_dir(self) -> str:
|
|
234
254
|
if self.static_generator == StaticGenerator.NEXT:
|
|
235
255
|
return "out"
|
|
236
|
-
elif self.static_generator in [
|
|
256
|
+
elif self.static_generator in [
|
|
257
|
+
StaticGenerator.ASTRO,
|
|
258
|
+
StaticGenerator.VITE,
|
|
259
|
+
StaticGenerator.NUXT_OLD,
|
|
260
|
+
StaticGenerator.NUXT_V3,
|
|
261
|
+
StaticGenerator.REMIX_V2,
|
|
262
|
+
]:
|
|
237
263
|
return "dist"
|
|
238
|
-
elif self.static_generator
|
|
264
|
+
elif self.static_generator == StaticGenerator.GATSBY:
|
|
239
265
|
return "public"
|
|
240
|
-
elif self.static_generator
|
|
266
|
+
elif self.static_generator == StaticGenerator.REMIX_OLD:
|
|
267
|
+
return "build/client"
|
|
268
|
+
elif self.static_generator in [
|
|
269
|
+
StaticGenerator.DOCUSAURUS,
|
|
270
|
+
StaticGenerator.SVELTE,
|
|
271
|
+
]:
|
|
241
272
|
return "build"
|
|
242
273
|
else:
|
|
243
274
|
return "dist"
|
|
@@ -252,8 +283,10 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
252
283
|
return self.package_manager.run_execute_command("gatsby build")
|
|
253
284
|
if self.static_generator == StaticGenerator.ASTRO:
|
|
254
285
|
return self.package_manager.run_execute_command("astro build")
|
|
255
|
-
elif self.static_generator == StaticGenerator.
|
|
286
|
+
elif self.static_generator == StaticGenerator.REMIX_OLD:
|
|
256
287
|
return self.package_manager.run_execute_command("remix-ssg build")
|
|
288
|
+
elif self.static_generator == StaticGenerator.REMIX_V2:
|
|
289
|
+
return self.package_manager.run_execute_command("vite build")
|
|
257
290
|
elif self.static_generator == StaticGenerator.DOCUSAURUS:
|
|
258
291
|
return self.package_manager.run_execute_command("docusaurus build")
|
|
259
292
|
elif self.static_generator == StaticGenerator.SVELTE:
|
|
@@ -273,7 +306,9 @@ class NodeStaticProvider(StaticFileProvider):
|
|
|
273
306
|
get_build_command = self.get_build_command()
|
|
274
307
|
lockfile = self.package_manager.lockfile()
|
|
275
308
|
has_lockfile = (self.path / lockfile).exists()
|
|
276
|
-
install_command = self.package_manager.install_command(
|
|
309
|
+
install_command = self.package_manager.install_command(
|
|
310
|
+
has_lockfile=has_lockfile
|
|
311
|
+
)
|
|
277
312
|
input_files = ["package.json"]
|
|
278
313
|
if has_lockfile:
|
|
279
314
|
input_files.append(lockfile)
|
shipit/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shipit-cli
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.1
|
|
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
|
|
@@ -2,7 +2,7 @@ shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
shipit/cli.py,sha256=NMZ6xSLq8MlV9yT3FLi9XZ5IBw2IMppoPna_vl9LK1Y,59170
|
|
3
3
|
shipit/generator.py,sha256=W4MynSFwId4PRWWrF0R3NsANye_Zv8TwXCUXai94pW0,6553
|
|
4
4
|
shipit/procfile.py,sha256=GlfdwzFUr0GWGKaaiXlLKNFInWaRNMy_wN14UEyU_5Q,2974
|
|
5
|
-
shipit/version.py,sha256=
|
|
5
|
+
shipit/version.py,sha256=lVDUJez84exvM3cupsLPLkgwODb6keB_FDCxjb0ObkA,95
|
|
6
6
|
shipit/assets/php/php.ini,sha256=f4irndAjB4GuuouEImRkNV22Q-yw1KqR-43jAMDw730,2531
|
|
7
7
|
shipit/assets/wordpress/install.sh,sha256=fJkVeGAw_dj-ywmQipAWRjaz57sayD6F0OFvZKMIKug,669
|
|
8
8
|
shipit/assets/wordpress/wp-config.php,sha256=IdGQoeg8E89JiqwxO2i8WnGMzmhNWgRz80X6lbU5GXc,4134
|
|
@@ -11,13 +11,13 @@ shipit/providers/gatsby.py,sha256=kzfS-z040GaJ0a9u2_6S6K-ykGSX2yPG17VpjUWBOBA,23
|
|
|
11
11
|
shipit/providers/hugo.py,sha256=l3IZ14LGYc3wQ7Uk0iQMDNN9Syd1G4HPzm0ePCGFyzE,1808
|
|
12
12
|
shipit/providers/laravel.py,sha256=2rCuOi2kC5OYQfAG7C0NMhG7KEgzfudwUT_CvVFz4hM,3031
|
|
13
13
|
shipit/providers/mkdocs.py,sha256=mDJpT3rzYAr5Vw-yt5fCpV0QgBZyksn9MrkPd4nzROU,2200
|
|
14
|
-
shipit/providers/node_static.py,sha256=
|
|
14
|
+
shipit/providers/node_static.py,sha256=1eWjhcrKZF8DE9EwlEXwFYrbD2AkeabZjIo1_BocWJk,12335
|
|
15
15
|
shipit/providers/php.py,sha256=BSOqS3UhABoe_ued8aXtyn0KdqWbOCq6VV2ehtoBlmk,3547
|
|
16
16
|
shipit/providers/python.py,sha256=kQpaaQi8ajHM_SFk2xI5lRIeOc6PXSKumb-Tv_5n6m0,20954
|
|
17
17
|
shipit/providers/registry.py,sha256=JCuQaYTvJcWK1nS-om9TIQgGW6pT5BuNLIRzChLLFWE,731
|
|
18
18
|
shipit/providers/staticfile.py,sha256=F4thEuihDW-h5DO-lotrjSdHYWzoXofQPpsAgWonvpY,2677
|
|
19
19
|
shipit/providers/wordpress.py,sha256=Wjc1fgFburewlf4hQ2ZmxTQko_SHQW-8jrDukzKx0Gs,3019
|
|
20
|
-
shipit_cli-0.9.
|
|
21
|
-
shipit_cli-0.9.
|
|
22
|
-
shipit_cli-0.9.
|
|
23
|
-
shipit_cli-0.9.
|
|
20
|
+
shipit_cli-0.9.1.dist-info/METADATA,sha256=i8nzdCcT8qJFNNazduiVP1afqfxv1g2rlyCpDfCTcXQ,615
|
|
21
|
+
shipit_cli-0.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
22
|
+
shipit_cli-0.9.1.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
|
|
23
|
+
shipit_cli-0.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|