mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(dify-builder): generate contract TS into @dify/contracts/dify-builder
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
9fe2e2a3fa
commit
cad5919220
4 files changed
+76
-2
No files matched your search
@@ -255,7 +255,7 @@ def test_schema_in_lockstep():
|
||||
schema, ts = contract_gen.generate()
|
||||
root = next(p for p in Path(__file__).parents if (p / "web").is_dir() and (p / "api").is_dir())
|
||||
checked_json = (root / "api/core/dify_builder/contract_schema.json").read_text()
|
||||
checked_ts = (root / "web/app/components/dify-builder/contract/types.ts").read_text()
|
||||
checked_ts = (root / "packages/contracts/generated/dify-builder/types.ts").read_text()
|
||||
regen_hint = "run: uv run --directory api python -m core.dify_builder.contract_gen"
|
||||
assert json.dumps(schema, indent=2, ensure_ascii=False) + "\n" == checked_json, regen_hint
|
||||
assert ts == checked_ts, regen_hint
|
||||
|
||||
Reference in new issue
Block a user