docker-stack 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- {docker_stack-0.3.0 → docker_stack-0.3.1}/PKG-INFO +1 -1
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/helpers.py +13 -2
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/PKG-INFO +1 -1
- {docker_stack-0.3.0 → docker_stack-0.3.1}/setup.py +1 -1
- {docker_stack-0.3.0 → docker_stack-0.3.1}/README.md +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/__init__.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/cli.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/compose.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/docker_objects.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/envsubst.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/envsubst_merge.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/markers.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/merge_conf.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/registry.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack/url_parser.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/SOURCES.txt +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/dependency_links.txt +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/entry_points.txt +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/requires.txt +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/docker_stack.egg-info/top_level.txt +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/pyproject.toml +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/setup.cfg +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/tests/test_docker_objects.py +0 -0
- {docker_stack-0.3.0 → docker_stack-0.3.1}/tests/test_docker_stack.py +0 -0
|
@@ -26,18 +26,29 @@ def generate_secret(
|
|
|
26
26
|
if length is None:
|
|
27
27
|
length = random.randint(12, 20)
|
|
28
28
|
|
|
29
|
+
# Always start with a letter (uppercase or lowercase)
|
|
30
|
+
first_char_pool = string.ascii_lowercase + string.ascii_uppercase
|
|
31
|
+
first_char = random.choice(first_char_pool)
|
|
32
|
+
|
|
33
|
+
# Prepare the character pool for the rest of the secret
|
|
29
34
|
characters = string.ascii_lowercase
|
|
30
35
|
if uppercase:
|
|
31
36
|
characters += string.ascii_uppercase
|
|
32
37
|
if numbers:
|
|
33
38
|
characters += string.digits
|
|
34
39
|
if special:
|
|
35
|
-
|
|
40
|
+
# Exclude '$', single quote, and double quote characters
|
|
41
|
+
excluded_chars = "$'\"\\"
|
|
42
|
+
allowed_punctuation = "".join(c for c in string.punctuation if c not in excluded_chars)
|
|
43
|
+
characters += allowed_punctuation
|
|
36
44
|
|
|
37
45
|
if not characters:
|
|
38
46
|
raise ValueError("No character types selected for secret generation.")
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
# Generate the rest of the string
|
|
49
|
+
secret = [first_char] + [random.choice(characters) for _ in range(length - 1)]
|
|
50
|
+
|
|
51
|
+
return "".join(secret)
|
|
41
52
|
|
|
42
53
|
|
|
43
54
|
def run_cli_command(
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="docker-stack",
|
|
5
|
-
version="0.3.
|
|
5
|
+
version="0.3.1",
|
|
6
6
|
description="CLI for deploying and managing Docker stacks.",
|
|
7
7
|
long_description=open("README.md").read(), # You can include a README file to describe your package
|
|
8
8
|
long_description_content_type="text/markdown",
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|