@powerhousedao/vetra 5.0.1-staging.13 → 5.0.1-staging.14
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.
|
@@ -78,7 +78,15 @@ describe("CodegenProcessor E2E Tests", () => {
|
|
|
78
78
|
await processor.onStrands([strand]);
|
|
79
79
|
// Advance timers to trigger debounced generation
|
|
80
80
|
await vi.runAllTimersAsync();
|
|
81
|
-
expect(generateEditor).toHaveBeenCalledWith(
|
|
81
|
+
expect(generateEditor).toHaveBeenCalledWith({
|
|
82
|
+
name: "Test Editor",
|
|
83
|
+
documentTypes: [
|
|
84
|
+
"powerhouse/document-model",
|
|
85
|
+
"powerhouse/budget-statement",
|
|
86
|
+
],
|
|
87
|
+
config: mockConfig.PH_CONFIG,
|
|
88
|
+
editorId: "test-editor",
|
|
89
|
+
});
|
|
82
90
|
expect(generateManifest).toHaveBeenCalledWith({
|
|
83
91
|
editors: [
|
|
84
92
|
{
|
|
@@ -493,7 +501,12 @@ describe("CodegenProcessor E2E Tests", () => {
|
|
|
493
501
|
];
|
|
494
502
|
await processor.onStrands(strands);
|
|
495
503
|
await vi.runAllTimersAsync();
|
|
496
|
-
expect(generateEditor).toHaveBeenCalledWith(
|
|
504
|
+
expect(generateEditor).toHaveBeenCalledWith({
|
|
505
|
+
name: "Test Editor",
|
|
506
|
+
documentTypes: ["powerhouse/document-model"],
|
|
507
|
+
config: mockConfig.PH_CONFIG,
|
|
508
|
+
editorId: "test-editor",
|
|
509
|
+
});
|
|
497
510
|
expect(generateSubgraph).toHaveBeenCalledWith("Test Subgraph", null, mockConfig.PH_CONFIG);
|
|
498
511
|
// generateManifest should be called twice (once for each strand)
|
|
499
512
|
expect(generateManifest).toHaveBeenCalledTimes(2);
|
|
@@ -526,7 +539,12 @@ describe("CodegenProcessor E2E Tests", () => {
|
|
|
526
539
|
await processor.onStrands(strands);
|
|
527
540
|
await vi.runAllTimersAsync();
|
|
528
541
|
// Valid strand should be processed
|
|
529
|
-
expect(generateEditor).toHaveBeenCalledWith(
|
|
542
|
+
expect(generateEditor).toHaveBeenCalledWith({
|
|
543
|
+
name: "Test Editor",
|
|
544
|
+
documentTypes: ["powerhouse/document-model"],
|
|
545
|
+
config: mockConfig.PH_CONFIG,
|
|
546
|
+
editorId: "test-editor",
|
|
547
|
+
});
|
|
530
548
|
// Invalid strand should NOT be processed
|
|
531
549
|
expect(generateSubgraph).not.toHaveBeenCalled();
|
|
532
550
|
});
|
|
@@ -46,7 +46,12 @@ export class DocumentEditorGenerator extends BaseDocumentGen {
|
|
|
46
46
|
// Generate editor ID using kebabCase
|
|
47
47
|
const editorId = kebabCase(state.name);
|
|
48
48
|
// Generate the editor using the codegen function
|
|
49
|
-
await generateEditor(
|
|
49
|
+
await generateEditor({
|
|
50
|
+
name: state.name,
|
|
51
|
+
documentTypes: documentTypes,
|
|
52
|
+
config: this.config.PH_CONFIG,
|
|
53
|
+
editorId: editorId,
|
|
54
|
+
});
|
|
50
55
|
logger.info(`✅ Editor generation completed successfully for: ${state.name}`);
|
|
51
56
|
// Update the manifest with the new editor
|
|
52
57
|
try {
|