🐛 fix(tsl-playbook): sync node formatting configs
Publish package metadata and Prettier settings through the scoped tsl-playbook bundle sync. Force-add only managed paths so the target branch ignore rules cannot drop the lockfile.
This commit is contained in:
@@ -7,6 +7,12 @@ from pathlib import Path
|
||||
|
||||
|
||||
DEFAULT_OUTPUT = Path("tmp") / "tsl-playbook"
|
||||
ROOT_CONFIG_FILES = (
|
||||
"package.json",
|
||||
"package-lock.json",
|
||||
".prettierrc.json",
|
||||
".prettierignore",
|
||||
)
|
||||
|
||||
|
||||
def copy_tree(src: Path, dst: Path) -> None:
|
||||
@@ -26,7 +32,9 @@ def ensure_sources(repo_root: Path) -> tuple[Path, Path, Path, Path, Path]:
|
||||
ruleset = repo_root / "rulesets" / "tsl" / "index.md"
|
||||
codegen_toolkit = repo_root / "tools" / "tsl-codegen"
|
||||
sources = (docs_tsl, syntax_skill, api_skill, ruleset, codegen_toolkit)
|
||||
root_configs = tuple(repo_root / filename for filename in ROOT_CONFIG_FILES)
|
||||
missing = [str(path) for path in sources if not path.exists()]
|
||||
missing.extend(str(path) for path in root_configs if not path.is_file())
|
||||
if missing:
|
||||
raise FileNotFoundError("missing source path(s): " + ", ".join(missing))
|
||||
return sources
|
||||
@@ -56,6 +64,8 @@ def build(output: Path, repo_root: Path) -> None:
|
||||
(output / "AGENTS.md").write_text(
|
||||
build_agents_text(ruleset), encoding="utf-8", newline="\n"
|
||||
)
|
||||
for filename in ROOT_CONFIG_FILES:
|
||||
shutil.copy2(repo_root / filename, output / filename)
|
||||
copy_tree(docs_tsl, output / "docs" / "tsl")
|
||||
copy_tree(syntax_skill, output / "skills" / "tsl-syntax-reference")
|
||||
copy_tree(api_skill, output / "skills" / "tsl-api-reference")
|
||||
|
||||
Reference in New Issue
Block a user