effectual 0.7.1__tar.gz → 0.7.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {effectual-0.7.1 → effectual-0.7.3}/PKG-INFO +1 -1
- {effectual-0.7.1 → effectual-0.7.3}/pyproject.toml +1 -1
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/build.py +15 -2
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/developer.py +8 -7
- {effectual-0.7.1 → effectual-0.7.3}/uv.lock +1 -1
- {effectual-0.7.1 → effectual-0.7.3}/.gitignore +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/.python-version +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/LICENSE +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/README.md +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/__init__.py +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/colors.py +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/config.py +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/src/effectual/transformations.py +0 -0
- {effectual-0.7.1 → effectual-0.7.3}/taskfile.yml +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import hashlib
|
1
2
|
import os
|
2
3
|
import shutil
|
3
4
|
import zipfile
|
@@ -5,8 +6,6 @@ from pathlib import Path
|
|
5
6
|
from time import perf_counter
|
6
7
|
from typing import Any
|
7
8
|
|
8
|
-
from watch_lite import getHash
|
9
|
-
|
10
9
|
from .colors import completeColor, fileColor, folderColor, tagColor
|
11
10
|
from .config import dumpHashes, loadConfig, loadToml
|
12
11
|
from .transformations import minifyFile, minifyToString
|
@@ -99,6 +98,20 @@ def dependencies() -> None:
|
|
99
98
|
)
|
100
99
|
|
101
100
|
|
101
|
+
def getHash(filePath: Path) -> str:
|
102
|
+
"""Gets the hash of a single file
|
103
|
+
|
104
|
+
Args:
|
105
|
+
filePath (Path): Path to the file
|
106
|
+
|
107
|
+
Returns:
|
108
|
+
str: String of the hash
|
109
|
+
"""
|
110
|
+
with open(filePath, "rb") as file:
|
111
|
+
fileHash = hashlib.sha1(file.read()).hexdigest()
|
112
|
+
return fileHash
|
113
|
+
|
114
|
+
|
102
115
|
def main() -> None:
|
103
116
|
"""Entrypoint
|
104
117
|
|
@@ -4,7 +4,7 @@ import zipfile
|
|
4
4
|
from pathlib import Path
|
5
5
|
from typing import Any
|
6
6
|
|
7
|
-
from watchfiles import
|
7
|
+
from watchfiles import watch
|
8
8
|
|
9
9
|
from .colors import completeColor, fileColor, tagColor
|
10
10
|
from .config import loadConfig
|
@@ -38,13 +38,14 @@ def main() -> None:
|
|
38
38
|
|
39
39
|
outputFile: Path = devBundlePath / outputFileName
|
40
40
|
|
41
|
-
|
41
|
+
runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
for change in watch(sourceDirectory):
|
44
|
+
print(f"{tagColor('reloaded')} || file change detected")
|
45
|
+
runCommand.kill()
|
46
|
+
runCommand.wait()
|
47
|
+
bundle(sourceDirectory, outputFile)
|
48
|
+
runCommand = subprocess.Popen(["uv", "run", outputFile], shell=True)
|
48
49
|
|
49
50
|
|
50
51
|
if __name__ == "__main__":
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|