Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+42
-6
@@ -32,7 +32,7 @@ afterEach(async () => {
|
||||
await Promise.all(tempRoots.splice(0).map((root) => rm(root, { recursive: true, force: true })));
|
||||
});
|
||||
|
||||
describe("Feature Manifest core build smoke verifier helpers", () => {
|
||||
describe("core build without legacy plugins verifier helpers", () => {
|
||||
it("reports zero forbidden imports for clean app and package sources", async () => {
|
||||
const root = await createFixtureRoot();
|
||||
await writeFixtureFile(root, "app/root.tsx", "import { Link } from 'react-router';\nexport const Root = Link;\n");
|
||||
@@ -98,7 +98,7 @@ describe("Feature Manifest core build smoke verifier helpers", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("allows plugin package metadata that is not copied into runtime images", async () => {
|
||||
it("rejects legacy plugin package metadata", async () => {
|
||||
const root = await createFixtureRoot();
|
||||
await writeFixtureFile(root, "Dockerfile", "COPY packages/plugins/package.json packages/plugins/package.json\n");
|
||||
await writeFixtureFile(
|
||||
@@ -109,10 +109,39 @@ describe("Feature Manifest core build smoke verifier helpers", () => {
|
||||
|
||||
const result = await scanForbiddenPluginImports(root, ["Dockerfile", "scripts"]);
|
||||
|
||||
expect(result.diagnostics).toEqual([]);
|
||||
expect(result.diagnostics).toEqual([
|
||||
{
|
||||
file: "Dockerfile",
|
||||
line: 1,
|
||||
id: "packages-plugins-path",
|
||||
text: "COPY packages/plugins/package.json packages/plugins/package.json",
|
||||
},
|
||||
{
|
||||
file: "scripts/coverage-targets.json",
|
||||
line: 1,
|
||||
id: "packages-plugins-path",
|
||||
text: '{"name":"packages/plugins","pathPrefixes":["packages/plugins/src/"],"includeGlobs":["packages/plugins/src"]}',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("ignores tests, docs, plugin-package files, dependency folders, TC metadata, and build output", async () => {
|
||||
it("rejects plugin metadata copies in service Dockerfiles", () => {
|
||||
const diagnostics = findForbiddenPluginImports(
|
||||
"COPY packages/plugins/package.json packages/plugins/package.json\n",
|
||||
"apps/hocuspocus/Dockerfile",
|
||||
);
|
||||
|
||||
expect(diagnostics).toEqual([
|
||||
{
|
||||
file: "apps/hocuspocus/Dockerfile",
|
||||
line: 1,
|
||||
id: "packages-plugins-path",
|
||||
text: "COPY packages/plugins/package.json packages/plugins/package.json",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("ignores tests, docs, dependency folders, TC metadata, and build output", async () => {
|
||||
const root = await createFixtureRoot();
|
||||
await writeFixtureFile(root, "app/entry.ts", "export const entry = true;\n");
|
||||
await writeFixtureFile(root, "app/entry.test.ts", "import '@hivegrid/plugins';\n");
|
||||
@@ -124,8 +153,15 @@ describe("Feature Manifest core build smoke verifier helpers", () => {
|
||||
|
||||
const result = await scanForbiddenPluginImports(root, ["app", "packages"]);
|
||||
|
||||
expect(relativeFiles(root, result.files)).toEqual(["app/entry.ts"]);
|
||||
expect(result.diagnostics).toEqual([]);
|
||||
expect(relativeFiles(root, result.files)).toEqual(["app/entry.ts", "packages/plugins/index.ts"]);
|
||||
expect(result.diagnostics).toEqual([
|
||||
{
|
||||
file: "packages/plugins/index.ts",
|
||||
line: 1,
|
||||
id: "hivegrid-plugins-package",
|
||||
text: "import '@hivegrid/plugins';",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("records absent roots without failing collection", async () => {
|
||||
|
||||
Reference in new issue
Block a user