mirror of
https://github.com/hanzoai/frames.git
synced 2026-10-30 14:44:26 +00:00
Forked from HyperFrames (Apache-2.0), full history preserved. Hosts are mapped explicitly and BEFORE the identifier rename, because hyperframes.heygen.com is not decoration: 175 of its occurrences are $schema identifiers that a validator dereferences. A blind rename would have left them naming a host that never serves them. The schema files are in this repo under docs/schema, so the mapped host is one we can actually serve -- that is the condition that makes the rewrite safe, and serving them is a deploy task, not an edit. docs/schema/hyperframes.json is renamed to frames.json to match the identifier it is now published under. api.heygen.com and the CLI auth against heygen.com are left UNRENAMED on purpose. They are a dependency on HeyGen's SaaS, not a name of ours to take, and the right move is to remove that integration rather than rebrand it. LICENSE and CREDITS.md are untouched; NOTICE records the lineage. Co-authored-by: Hanzo Dev <[email protected]>
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
import {
|
|
listWorkspaceContractIssues,
|
|
REQUIRED_WORKSPACE_SCRIPTS,
|
|
} from "./check-workspace-contracts.mjs";
|
|
|
|
describe("workspace contract checker", () => {
|
|
it("accepts workspaces with all executable lifecycle scripts", () => {
|
|
const scripts = Object.fromEntries(REQUIRED_WORKSPACE_SCRIPTS.map((name) => [name, "echo ok"]));
|
|
assert.deepEqual(listWorkspaceContractIssues("packages/example", { scripts }), []);
|
|
});
|
|
|
|
it("reports every missing or empty lifecycle script", () => {
|
|
assert.deepEqual(
|
|
listWorkspaceContractIssues("packages/example", { scripts: { build: " " } }),
|
|
REQUIRED_WORKSPACE_SCRIPTS.map(
|
|
(script) =>
|
|
`packages/example: missing executable \`${script}\` script or ` +
|
|
`framesWorkspaceContract.${script} opt-out with a specific reason`,
|
|
),
|
|
);
|
|
});
|
|
|
|
it("accepts an explicit opt-out only when it has a specific reason", () => {
|
|
const pkg = {
|
|
scripts: { build: "build", typecheck: "typecheck" },
|
|
framesWorkspaceContract: {
|
|
test: {
|
|
optOut: true,
|
|
reason: "Generated fixture validated by the owning package integration suite.",
|
|
},
|
|
},
|
|
};
|
|
assert.deepEqual(listWorkspaceContractIssues("packages/example", pkg), []);
|
|
|
|
pkg.framesWorkspaceContract.test.reason = "no tests";
|
|
assert.equal(listWorkspaceContractIssues("packages/example", pkg).length, 1);
|
|
});
|
|
});
|