datasecops-cli 0.3.3__tar.gz → 0.3.4__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.
Files changed (49) hide show
  1. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/CHANGELOG.md +6 -0
  2. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/PKG-INFO +2 -2
  3. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/README.md +1 -1
  4. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/pyproject.toml +1 -1
  5. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/main.py +6 -3
  6. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/download_service.py +30 -1
  7. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/.github/workflows/publish-cli.yml +0 -0
  8. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/.gitignore +0 -0
  9. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/DEVELOPMENT.md +0 -0
  10. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/LICENSE +0 -0
  11. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/docs/getting-started.md +0 -0
  12. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/docs/legacy.md +0 -0
  13. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/docs/legacy_plan_of_action.md +0 -0
  14. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/docs/mcp-server.md +0 -0
  15. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/mcp-servers.json +0 -0
  16. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/setup.ps1 +0 -0
  17. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/setup.sh +0 -0
  18. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/__init__.py +0 -0
  19. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/config.py +0 -0
  20. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/menus/__init__.py +0 -0
  21. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/menus/development.py +0 -0
  22. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/menus/downloads.py +0 -0
  23. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/menus/git_operations.py +0 -0
  24. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/models/__init__.py +0 -0
  25. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/models/git_helpers.py +0 -0
  26. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/models/project_config.py +0 -0
  27. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/__init__.py +0 -0
  28. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/bootstrap_service.py +0 -0
  29. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/dbt_runner.py +0 -0
  30. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/git_service.py +0 -0
  31. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/linting_service.py +0 -0
  32. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/skill_service.py +0 -0
  33. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/snowflake_service.py +0 -0
  34. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/services/upstream_service.py +0 -0
  35. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/utilities/__init__.py +0 -0
  36. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/utilities/display.py +0 -0
  37. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/utilities/file_utils.py +0 -0
  38. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
  39. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_mcp/__init__.py +0 -0
  40. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_mcp/__main__.py +0 -0
  41. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_mcp/connection.py +0 -0
  42. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/src/datasecops_mcp/server.py +0 -0
  43. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/__init__.py +0 -0
  44. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_config.py +0 -0
  45. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_file_utils.py +0 -0
  46. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_main.py +0 -0
  47. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_models.py +0 -0
  48. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_version.py +0 -0
  49. {datasecops_cli-0.3.3 → datasecops_cli-0.3.4}/tests/test_yaml_utils.py +0 -0
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to the DataSecOps CLI are documented in this file.
4
4
 
5
+ ## [0.3.4] - 2026-05-15
6
+
7
+ ### Added
8
+
9
+ - **`scripts` download item** — `datasecops download scripts` downloads pipeline scripts from the native app to `.datasecops/scripts/`. Included in `datasecops download all`.
10
+
5
11
  ## [0.3.3] - 2026-05-15
6
12
 
7
13
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasecops-cli
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: DataSecOps Framework CLI for Snowflake Native App
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -105,7 +105,7 @@ datasecops download sqlfluff install-sqlfluff
105
105
  datasecops download all
106
106
  ```
107
107
 
108
- Available items: `sqlfluff`, `pipelines`, `packages`, `macros`, `install-sqlfluff`, `install-dbt`, `all`
108
+ Available items: `sqlfluff`, `pipelines`, `packages`, `macros`, `scripts`, `install-sqlfluff`, `install-dbt`, `all`
109
109
 
110
110
  The pipeline platform (GitHub / Azure DevOps) is auto-detected from the native app's source control configuration.
111
111
 
@@ -86,7 +86,7 @@ datasecops download sqlfluff install-sqlfluff
86
86
  datasecops download all
87
87
  ```
88
88
 
89
- Available items: `sqlfluff`, `pipelines`, `packages`, `macros`, `install-sqlfluff`, `install-dbt`, `all`
89
+ Available items: `sqlfluff`, `pipelines`, `packages`, `macros`, `scripts`, `install-sqlfluff`, `install-dbt`, `all`
90
90
 
91
91
  The pipeline platform (GitHub / Azure DevOps) is auto-detected from the native app's source control configuration.
92
92
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "datasecops-cli"
7
- version = "0.3.3"
7
+ version = "0.3.4"
8
8
  description = "DataSecOps Framework CLI for Snowflake Native App"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,7 +24,7 @@ from datasecops_cli.utilities.yaml_utils import write_datasecops_config
24
24
 
25
25
 
26
26
  DOWNLOAD_ITEMS = [
27
- "sqlfluff", "pipelines", "packages", "macros",
27
+ "sqlfluff", "pipelines", "packages", "macros", "scripts",
28
28
  "install-sqlfluff", "install-dbt", "all",
29
29
  ]
30
30
 
@@ -44,7 +44,7 @@ def _build_parser() -> argparse.ArgumentParser:
44
44
  "items",
45
45
  nargs="+",
46
46
  choices=DOWNLOAD_ITEMS,
47
- help="Item(s) to download/install: sqlfluff, pipelines, packages, macros, install-sqlfluff, install-dbt, or all",
47
+ help="Item(s) to download/install: sqlfluff, pipelines, packages, macros, scripts, install-sqlfluff, install-dbt, or all",
48
48
  )
49
49
  dl.add_argument(
50
50
  "--connection", "-c",
@@ -309,7 +309,7 @@ def _run_download(config: Config, items: list[str],
309
309
  profiles_dir = str(config.get_dbt_profiles_dir())
310
310
 
311
311
  if "all" in items:
312
- items = ["sqlfluff", "pipelines", "packages", "macros",
312
+ items = ["sqlfluff", "pipelines", "packages", "macros", "scripts",
313
313
  "install-sqlfluff", "install-dbt"]
314
314
 
315
315
  failed = False
@@ -331,6 +331,9 @@ def _run_download(config: Config, items: list[str],
331
331
  elif item == "macros":
332
332
  if not download_service.download_macros(config.profile_name, config.dbt_project_dir):
333
333
  failed = True
334
+ elif item == "scripts":
335
+ if not download_service.download_scripts():
336
+ failed = True
334
337
  elif item == "install-sqlfluff":
335
338
  packages = download_service.get_sqlfluff_requirements()
336
339
  if packages:
@@ -249,7 +249,36 @@ class DownloadService:
249
249
 
250
250
  success_line(f"Downloaded {count} pipeline file(s)")
251
251
  return True
252
-
252
+
253
+ def download_scripts(self) -> bool:
254
+ """Download pipeline scripts from the framework to .datasecops/scripts/."""
255
+ info_line("Downloading pipeline scripts...")
256
+ raw = self.sf.get_framework_config("PIPELINES")
257
+ if not raw:
258
+ error_line("No pipeline configuration found in native app")
259
+ return False
260
+
261
+ scripts = raw.get("pipeline_scripts", [])
262
+ if not scripts:
263
+ info_line("No pipeline scripts configured in native app")
264
+ return True
265
+
266
+ scripts_dir = self.project_dir / ".datasecops" / "scripts"
267
+ ensure_dir(scripts_dir)
268
+
269
+ count = 0
270
+ for script in scripts:
271
+ filename = script.get("filename", "")
272
+ content = script.get("content", "")
273
+ if filename and content:
274
+ dest = scripts_dir / filename
275
+ write_file(dest, content)
276
+ info_line(f" Written: {dest}")
277
+ count += 1
278
+
279
+ success_line(f"Downloaded {count} script(s) to {scripts_dir}")
280
+ return True
281
+
253
282
  def download_dbt_packages(self, dbt_project_dir: Path) -> bool:
254
283
  info_line("Downloading dbt package versions...")
255
284
  raw = self.sf.get_framework_config("DBT_PACKAGES")
File without changes
File without changes
File without changes