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 CHANGED
@@ -10,6 +10,7 @@ from . import lib
10
10
  from . import math
11
11
  from . import mirror
12
12
  from . import pdf
13
+ from . import project
13
14
  from . import proxy
14
15
  from . import time
15
16
  from . import upgrade
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bcmd
3
- Version: 0.6.17
3
+ Version: 0.6.18
4
4
  Summary: Commands for Beni
5
5
  Author-email: Beni Mang <benimang@126.com>
6
6
  Maintainer-email: Beni Mang <benimang@126.com>
@@ -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=aP4bOLeBoVWbG7zihc5lRh980ILLqH5PUkGe8MULGCE,312
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.17.dist-info/METADATA,sha256=gzmWaAkKMUA-RBVPTkUWfWuWkRWJA-ApuxT_aBDRL4Y,845
30
- bcmd-0.6.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- bcmd-0.6.17.dist-info/entry_points.txt,sha256=mriCeYh3wksKcqq3-LtzyFkSCIdN1uZc1IJwom-SW1s,34
32
- bcmd-0.6.17.dist-info/top_level.txt,sha256=fYY6tRrJ_G7tn24RXAG0M5ZKbcuaQznodfX1toFPSKs,10
33
- bcmd-0.6.17.dist-info/RECORD,,
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