feat(extensions): add update command to extensions cli (#38651)

This commit is contained in:
Ville Brofeldt
2026-03-16 07:02:42 -07:00
committed by GitHub
parent afe093f1ca
commit dcb414aa06
10 changed files with 514 additions and 4 deletions

View File

@@ -21,6 +21,8 @@ import sys
from pathlib import Path
from typing import Any
import tomli_w
from superset_core.extensions.constants import (
DISPLAY_NAME_PATTERN,
PUBLISHER_PATTERN,
@@ -109,6 +111,14 @@ def read_json(path: Path) -> dict[str, Any] | None:
return json.loads(path.read_text())
def write_json(path: Path, data: dict[str, Any]) -> None:
path.write_text(json.dumps(data, indent=2) + "\n")
def write_toml(path: Path, data: dict[str, Any]) -> None:
path.write_text(tomli_w.dumps(data))
def _normalize_for_identifiers(name: str) -> str:
"""
Normalize display name to clean lowercase words.