@x12i/graphenix-plan-format 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/test/golden-fixtures.test.d.ts +2 -0
- package/dist/test/golden-fixtures.test.d.ts.map +1 -0
- package/dist/test/golden-fixtures.test.js +31 -0
- package/dist/test/golden-fixtures.test.js.map +1 -0
- package/fixtures/content-pipeline.plan.json +1292 -0
- package/fixtures/nodes/node-audience-insights.plan.json +1 -1
- package/fixtures/nodes/node-execution-strategies.plan.json +1 -1
- package/fixtures/nodes/node-hand-authored-units.plan.json +1 -1
- package/fixtures/nodes/node-input-synthesis-profile.plan.json +105 -0
- package/fixtures/nodes/node-narrative-preprocessor.plan.json +1 -1
- package/fixtures/nodes/node-post-audit.plan.json +106 -0
- package/fixtures/nodes/node-professional-answer-plain.plan.json +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"golden-fixtures.test.d.ts","sourceRoot":"","sources":["../../src/test/golden-fixtures.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { describe, it } from "node:test";
|
|
6
|
+
import { createContentPipelineReferencePlan } from "@x12i/graphenix-plan-compiler";
|
|
7
|
+
import { validateExecutablePlanV2 } from "../validators/validate-executable-plan-v2.js";
|
|
8
|
+
const FIXTURE_DIR = join(dirname(fileURLToPath(import.meta.url)), "../../fixtures");
|
|
9
|
+
const PROFILE_REGISTRY = {
|
|
10
|
+
version: "3.2.0",
|
|
11
|
+
registryHash: "sha256:profiles-content-pipeline-reference"
|
|
12
|
+
};
|
|
13
|
+
describe("plan-format golden fixtures", () => {
|
|
14
|
+
it("content-pipeline.plan.json validates as v2 executable plan", () => {
|
|
15
|
+
const golden = JSON.parse(readFileSync(join(FIXTURE_DIR, "content-pipeline.plan.json"), "utf8"));
|
|
16
|
+
assert.equal(validateExecutablePlanV2(golden).valid, true);
|
|
17
|
+
assert.equal(golden.source.graphId, "graph:content-pipeline");
|
|
18
|
+
assert.ok(golden.nodePlans["node:audience-insights"]);
|
|
19
|
+
});
|
|
20
|
+
it("golden plan matches createContentPipelineReferencePlan", () => {
|
|
21
|
+
const golden = JSON.parse(readFileSync(join(FIXTURE_DIR, "content-pipeline.plan.json"), "utf8"));
|
|
22
|
+
const generated = createContentPipelineReferencePlan({
|
|
23
|
+
jobId: "job-content-pipeline-reference",
|
|
24
|
+
profileRegistry: PROFILE_REGISTRY
|
|
25
|
+
});
|
|
26
|
+
assert.equal(golden.planId, generated.planId);
|
|
27
|
+
assert.equal(golden.source.graphId, generated.source.graphId);
|
|
28
|
+
assert.deepEqual(Object.keys(golden.nodePlans).sort(), Object.keys(generated.nodePlans).sort());
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=golden-fixtures.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"golden-fixtures.test.js","sourceRoot":"","sources":["../../src/test/golden-fixtures.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,G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