bcmd 0.6.17__py3-none-any.whl → 0.6.18__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 bcmd might be problematic. Click here for more details.
- bcmd/tasks/__init__.py +1 -0
- bcmd/tasks/project.py +34 -0
- {bcmd-0.6.17.dist-info → bcmd-0.6.18.dist-info}/METADATA +1 -1
- {bcmd-0.6.17.dist-info → bcmd-0.6.18.dist-info}/RECORD +7 -6
- {bcmd-0.6.17.dist-info → bcmd-0.6.18.dist-info}/WHEEL +0 -0
- {bcmd-0.6.17.dist-info → bcmd-0.6.18.dist-info}/entry_points.txt +0 -0
- {bcmd-0.6.17.dist-info → bcmd-0.6.18.dist-info}/top_level.txt +0 -0
bcmd/tasks/__init__.py
CHANGED
bcmd/tasks/project.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Final
|
|
4
|
+
|
|
5
|
+
from beni import btask, bpath
|
|
6
|
+
from beni.bfunc import syncCall
|
|
7
|
+
from typer import Argument, Option
|
|
8
|
+
|
|
9
|
+
app: Final = btask.newSubApp('项目相关')
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@app.command()
|
|
13
|
+
@syncCall
|
|
14
|
+
async def init(
|
|
15
|
+
path: Path = Argument(Path.cwd(), help='workspace 路径'),
|
|
16
|
+
deep: int = Option(3, '--deep', '-d', help='探索深度'),
|
|
17
|
+
):
|
|
18
|
+
'找出项目执行初始化 pnpm install 和 uv sync --all-extras'
|
|
19
|
+
|
|
20
|
+
initSubFolder(path, deep)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def initSubFolder(path: Path, deep: int):
|
|
24
|
+
uvLockFile = path / 'uv.lock'
|
|
25
|
+
pnpmLockFile = path / 'pnpm-lock.yaml'
|
|
26
|
+
if uvLockFile.exists():
|
|
27
|
+
with bpath.changePath(path):
|
|
28
|
+
os.system('uv sync --all-extras')
|
|
29
|
+
elif pnpmLockFile.exists():
|
|
30
|
+
with bpath.changePath(path):
|
|
31
|
+
os.system('pnpm install')
|
|
32
|
+
elif deep > 1:
|
|
33
|
+
for subPath in bpath.listDir(path):
|
|
34
|
+
initSubFolder(subPath, deep - 1)
|
|
@@ -3,7 +3,7 @@ bcmd/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
3
3
|
bcmd/common/func.py,sha256=MehbfuWFHTOsihhYxVFj0_U6-hjMTfLh3n-oMrpyyKo,508
|
|
4
4
|
bcmd/common/secret.py,sha256=oHZCNnpAjrS3ztuTUy24IwSGeA_3Z8KfgnNP48ZVjrQ,2285
|
|
5
5
|
bcmd/resources/project/main.py,sha256=xdskz_sf05fYA1SRMFCIxDjx8SnegxTbCmHpW86ItLs,11
|
|
6
|
-
bcmd/tasks/__init__.py,sha256=
|
|
6
|
+
bcmd/tasks/__init__.py,sha256=shEJe1E9NlJhVWF0GpRLNDqdCVyJ91WYVKTGc1hrgkw,334
|
|
7
7
|
bcmd/tasks/bin.py,sha256=DufZGRX7b2zclSaZM-zUPGwOiycN9RsV8KxF8tfSyqs,3240
|
|
8
8
|
bcmd/tasks/code.py,sha256=IUs_ClZuSsBk2gavlitC8mkRrQQX9rvNDgR8cFxduBA,3992
|
|
9
9
|
bcmd/tasks/crypto.py,sha256=LKvgsMPLvsi1wlt66TinYiN-oV2IPAfaN9y7hWaVpHs,2951
|
|
@@ -15,6 +15,7 @@ bcmd/tasks/lib.py,sha256=AjB_Qx_eZakJQNpo_OQ796RKVNyUAR0m3S-fF9DXF-k,3070
|
|
|
15
15
|
bcmd/tasks/math.py,sha256=xbl5UdaDMyAjiLodDPleP4Cutrk2S3NOAgurzAgOEAE,2862
|
|
16
16
|
bcmd/tasks/mirror.py,sha256=nAe8NYftMKzht16MFBj7RqXwvVhR6Jh2uuAyJLh87og,1098
|
|
17
17
|
bcmd/tasks/pdf.py,sha256=fkHRgxqzrRxdb4_-9pL9wp2roqAHJPS_dVqAGJvRUsM,1504
|
|
18
|
+
bcmd/tasks/project.py,sha256=q3bK8depPwZoEGqe9fX2ol-DGsLNZgUxrwhVp4PEF68,928
|
|
18
19
|
bcmd/tasks/proxy.py,sha256=B85ebW_XPo_21j0YKf3oOK-8Crr85ezaPeZZnbnvO4E,1896
|
|
19
20
|
bcmd/tasks/time.py,sha256=ZiqA1jdgl-TBtFSOxxP51nwv4g9iZItmkFKpf9MKelk,2453
|
|
20
21
|
bcmd/tasks/upgrade.py,sha256=nyhcl5oGAUnOOR8JJZW2jfepcVJ6O9gufK8VgxUeil0,543
|
|
@@ -26,8 +27,8 @@ test/conftest.py,sha256=grlPunlsvrkt_8QPckmF4POiKUPVxIxm2TPAh_ZB-zs,405
|
|
|
26
27
|
test/test_pdf.py,sha256=7yYlfydyhy2dmVYdTA5Vir2AI8TUdzEi55fL-AqJmio,1533
|
|
27
28
|
test/test_proxy.py,sha256=UMF2hFFGUEbJR1jT2mO_wdo-7Rfp0NDqIdTRnOmwtjY,164
|
|
28
29
|
test/test_wasabi.py,sha256=qqXG1Kb9hKH6t624R173j6LagkgmejN0CFYt7kL0nNs,1066
|
|
29
|
-
bcmd-0.6.
|
|
30
|
-
bcmd-0.6.
|
|
31
|
-
bcmd-0.6.
|
|
32
|
-
bcmd-0.6.
|
|
33
|
-
bcmd-0.6.
|
|
30
|
+
bcmd-0.6.18.dist-info/METADATA,sha256=fvKAuVIOdn77O6R1oPtoimzdcQARuiz2uan0SXfITFk,845
|
|
31
|
+
bcmd-0.6.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
32
|
+
bcmd-0.6.18.dist-info/entry_points.txt,sha256=mriCeYh3wksKcqq3-LtzyFkSCIdN1uZc1IJwom-SW1s,34
|
|
33
|
+
bcmd-0.6.18.dist-info/top_level.txt,sha256=fYY6tRrJ_G7tn24RXAG0M5ZKbcuaQznodfX1toFPSKs,10
|
|
34
|
+
bcmd-0.6.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|