flowstash-cli 0.4.0__tar.gz → 0.4.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.
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/PKG-INFO +2 -2
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/pyproject.toml +2 -2
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/deploy.py +44 -20
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/apikey.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/auth.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/build.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/client.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/project.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/run.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/commands/webhook.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/api_client.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/auth_server.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/builder.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/config.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/docker_utils.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/core/patcher.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/main.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/AGENTS.md +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/README.md +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_.dockerignore +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_.flowstash +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_api_main.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/(backend-asyncio)/backend.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/(backend-dramatiq)/backend.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/(backend-managed)/backend.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/(observability-logfile)/observability.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/(observability-managed)/observability.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/_backend.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/shared/backend.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/shared/clients/demoClient.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/shared/clients.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_deployment/[env]/(backend-asyncio)/docker-compose.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_deployment/[env]/(backend-dramatiq)/docker-compose.yaml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_deployment/shared/api.Dockerfile +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_deployment/shared/worker.Dockerfile +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_pyproject.toml +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_api/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_api/_routes/webhooks.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_shared/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_shared/clients/client.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_shared/models/models.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_shared/tasks/sharedTasks.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_worker/__init__.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_worker/tasks/tasks.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_worker_main.py +0 -0
- {flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/ui/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: flowstash-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: CLI for the flowstash Managed Platform
|
|
5
5
|
Author: juraj.bezdek@gmail.com
|
|
6
6
|
Author-email: juraj.bezdek@gmail.com
|
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
-
Requires-Dist: flowstash-runtime (>=0.4.
|
|
12
|
+
Requires-Dist: flowstash-runtime (>=0.4.1,<0.5.0)
|
|
13
13
|
Requires-Dist: httpx (>=0.27.0)
|
|
14
14
|
Requires-Dist: keyring (>=25.0.0)
|
|
15
15
|
Requires-Dist: libcst (>=1.1.0)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "flowstash-cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.1"
|
|
4
4
|
description = "CLI for the flowstash Managed Platform"
|
|
5
5
|
authors = [{name = "juraj.bezdek@gmail.com", email = "juraj.bezdek@gmail.com"}]
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"flowstash-runtime>=0.4.
|
|
8
|
+
"flowstash-runtime>=0.4.1,<0.5.0",
|
|
9
9
|
"typer[all]>=0.12.0",
|
|
10
10
|
"httpx>=0.27.0",
|
|
11
11
|
"pyyaml>=6.0.1",
|
|
@@ -13,12 +13,12 @@ console = Console()
|
|
|
13
13
|
|
|
14
14
|
# Status labels shown to the user while polling
|
|
15
15
|
_STATUS_LABELS = {
|
|
16
|
-
"QUEUED":
|
|
17
|
-
"DEPLOYING":
|
|
18
|
-
"HEALTH_CHECK":
|
|
16
|
+
"QUEUED": "Queued, waiting for deployment to start...",
|
|
17
|
+
"DEPLOYING": "Deploying services...",
|
|
18
|
+
"HEALTH_CHECK": "Health-checking API and Worker...",
|
|
19
19
|
"SYNCING_SCHEDULES": "Fetching and syncing scheduled tasks...",
|
|
20
|
-
"DEPLOYED":
|
|
21
|
-
"FAILED":
|
|
20
|
+
"DEPLOYED": "Deployed successfully ✓",
|
|
21
|
+
"FAILED": "Deployment failed.",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
_TERMINAL_STATUSES = {"DEPLOYED", "FAILED"}
|
|
@@ -27,7 +27,9 @@ _TERMINAL_STATUSES = {"DEPLOYED", "FAILED"}
|
|
|
27
27
|
async def run_deploy_flow(env: str, artifact_id: Optional[str] = None):
|
|
28
28
|
project_config = load_project_config()
|
|
29
29
|
if not project_config:
|
|
30
|
-
console.print(
|
|
30
|
+
console.print(
|
|
31
|
+
"[red]No .flowstash found. Please run 'flowstash init' first.[/red]"
|
|
32
|
+
)
|
|
31
33
|
raise typer.Exit(code=1)
|
|
32
34
|
|
|
33
35
|
project_id = project_config.project_id
|
|
@@ -51,11 +53,14 @@ async def run_deploy_flow(env: str, artifact_id: Optional[str] = None):
|
|
|
51
53
|
) as progress:
|
|
52
54
|
# 2. Trigger deployment
|
|
53
55
|
task = progress.add_task(description="Triggering deployment...", total=None)
|
|
54
|
-
deploy_data = await api.post(
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
deploy_data = await api.post(
|
|
57
|
+
"/v1/deploy",
|
|
58
|
+
json={
|
|
59
|
+
"project_id": project_id,
|
|
60
|
+
"artifact_id": artifact_id,
|
|
61
|
+
"env_vars": {"ENVIRONMENT": env},
|
|
62
|
+
},
|
|
63
|
+
)
|
|
59
64
|
deploy_id = deploy_data["deploy_id"]
|
|
60
65
|
progress.update(task, description=f"Deployment triggered (ID: {deploy_id}).")
|
|
61
66
|
|
|
@@ -85,18 +90,25 @@ async def run_deploy_flow(env: str, artifact_id: Optional[str] = None):
|
|
|
85
90
|
@app.command()
|
|
86
91
|
def deploy(
|
|
87
92
|
env: str = typer.Argument(..., help="Environment to deploy to"),
|
|
88
|
-
artifact: Optional[str] = typer.Option(
|
|
89
|
-
|
|
93
|
+
artifact: Optional[str] = typer.Option(
|
|
94
|
+
None, "--artifact", "-a", help="Artifact ID to deploy"
|
|
95
|
+
),
|
|
96
|
+
non_interactive: bool = typer.Option(
|
|
97
|
+
False, "--non-interactive", help="Do not ask for confirmation"
|
|
98
|
+
),
|
|
90
99
|
):
|
|
91
100
|
"""Deploy an artifact to the managed platform for a specified environment."""
|
|
92
101
|
project_config = load_project_config()
|
|
93
102
|
if not project_config:
|
|
94
|
-
console.print(
|
|
103
|
+
console.print(
|
|
104
|
+
"[red]No .flowstash found. Please run 'flowstash init' first.[/red]"
|
|
105
|
+
)
|
|
95
106
|
raise typer.Exit(code=1)
|
|
96
107
|
|
|
97
108
|
# Ask for confirmation unless non-interactive is provided
|
|
98
109
|
if not non_interactive:
|
|
99
110
|
from rich.prompt import Confirm
|
|
111
|
+
|
|
100
112
|
if not Confirm.ask(f"Are you sure you want to deploy to '{env}'?"):
|
|
101
113
|
console.print("Deployment cancelled.")
|
|
102
114
|
raise typer.Exit(code=0)
|
|
@@ -109,21 +121,31 @@ def deploy(
|
|
|
109
121
|
break
|
|
110
122
|
|
|
111
123
|
if not is_managed:
|
|
112
|
-
console.print(
|
|
113
|
-
|
|
124
|
+
console.print(
|
|
125
|
+
f"[red]Environment '{env}' is not managed. Deployment is only supported for managed environments.[/red]"
|
|
126
|
+
)
|
|
127
|
+
console.print(
|
|
128
|
+
"[yellow]Update your .flowstash environments if this is incorrect.[/yellow]"
|
|
129
|
+
)
|
|
114
130
|
raise typer.Exit(code=1)
|
|
115
131
|
|
|
116
132
|
project_id = project_config.project_id
|
|
117
133
|
if not project_id:
|
|
118
134
|
if not non_interactive:
|
|
119
135
|
from rich.prompt import Confirm
|
|
120
|
-
|
|
136
|
+
|
|
137
|
+
if Confirm.ask(
|
|
138
|
+
"Project ID not found. Would you like to link to a managed project now?"
|
|
139
|
+
):
|
|
121
140
|
from .project import _link_project
|
|
141
|
+
|
|
122
142
|
_link_project(project_config)
|
|
123
143
|
project_id = project_config.project_id
|
|
124
144
|
|
|
125
145
|
if not project_id:
|
|
126
|
-
console.print(
|
|
146
|
+
console.print(
|
|
147
|
+
"[red]project_id not found in .flowstash. Use 'flowstash init' or link to a project.[/red]"
|
|
148
|
+
)
|
|
127
149
|
raise typer.Exit(code=1)
|
|
128
150
|
|
|
129
151
|
result = asyncio.run(run_deploy_flow(env, artifact))
|
|
@@ -133,11 +155,13 @@ def deploy(
|
|
|
133
155
|
console.print(f" Deployment ID : [bold]{result['deploy_id']}[/bold]")
|
|
134
156
|
if api_url:
|
|
135
157
|
console.print(f" API URL : [bold]{api_url}[/bold]")
|
|
136
|
-
|
|
158
|
+
|
|
137
159
|
scheduled_tasks = result.get("scheduled_tasks")
|
|
138
160
|
if scheduled_tasks:
|
|
139
161
|
console.print(" Scheduled Tasks:")
|
|
140
162
|
for task in scheduled_tasks:
|
|
141
|
-
console.print(
|
|
163
|
+
console.print(
|
|
164
|
+
f" - [cyan]{task['task_name']}[/cyan] : [yellow]{task['cron']}[/yellow]"
|
|
165
|
+
)
|
|
142
166
|
elif scheduled_tasks is not None:
|
|
143
167
|
console.print(" Scheduled Tasks: [dim]None[/dim]")
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/[env]/_backend.yaml
RENAMED
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/shared/backend.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_config/shared/clients.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_shared/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_worker/__init__.py
RENAMED
|
File without changes
|
{flowstash_cli-0.4.0 → flowstash_cli-0.4.1}/src/flowstash/cli/templates/_src/_worker/tasks/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|