@powerhousedao/vetra 6.0.0-dev.33 → 6.0.0-dev.35
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/document-models/app-module/src/tests/base-operations.test.js +2 -2
- package/dist/document-models/app-module/src/tests/dnd-operations.test.js +1 -1
- package/dist/document-models/document-editor/src/tests/base-operations.test.js +2 -2
- package/dist/document-models/processor-module/src/tests/base-operations.test.js +2 -2
- package/dist/document-models/subgraph-module/src/tests/base-operations.test.js +2 -2
- package/dist/document-models/vetra-package/src/tests/base-operations.test.js +1 -1
- package/dist/processors/codegen/__tests__/codegen-processor-e2e.test.js +2 -2
- package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts.map +1 -1
- package/dist/processors/codegen/document-handlers/generators/processor-generator.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
|
+
import { addDocumentType, AddDocumentTypeInputSchema, isAppModuleDocument, reducer, removeDocumentType, RemoveDocumentTypeInputSchema, setAppName, SetAppNameInputSchema, setAppStatus, SetAppStatusInputSchema, setDocumentTypes, SetDocumentTypesInputSchema, utils, } from "@powerhousedao/vetra/document-models/app-module";
|
|
6
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { generateMock } from "@powerhousedao/codegen";
|
|
8
8
|
describe("BaseOperations Operations", () => {
|
|
9
9
|
let document;
|
|
10
10
|
beforeEach(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import { generateMock } from "@powerhousedao/
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
6
|
import { reducer, setDragAndDropEnabled, SetDragAndDropEnabledInputSchema, utils, } from "@powerhousedao/vetra/document-models/app-module";
|
|
7
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
8
8
|
describe("DndOperations Operations", () => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
|
+
import { addDocumentType, AddDocumentTypeInputSchema, isDocumentEditorDocument, reducer, removeDocumentType, RemoveDocumentTypeInputSchema, setEditorName, SetEditorNameInputSchema, setEditorStatus, SetEditorStatusInputSchema, utils, } from "@powerhousedao/vetra/document-models/document-editor";
|
|
6
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { generateMock } from "@powerhousedao/codegen";
|
|
8
8
|
describe("BaseOperations Operations", () => {
|
|
9
9
|
let document;
|
|
10
10
|
beforeEach(() => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
|
+
import { addDocumentType, AddDocumentTypeInputSchema, isProcessorModuleDocument, reducer, removeDocumentType, RemoveDocumentTypeInputSchema, setProcessorName, SetProcessorNameInputSchema, setProcessorStatus, SetProcessorStatusInputSchema, setProcessorType, SetProcessorTypeInputSchema, utils, } from "@powerhousedao/vetra/document-models/processor-module";
|
|
6
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { generateMock } from "@powerhousedao/codegen";
|
|
8
8
|
describe("BaseOperations Operations", () => {
|
|
9
9
|
let document;
|
|
10
10
|
beforeEach(() => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
|
+
import { isSubgraphModuleDocument, reducer, setSubgraphName, SetSubgraphNameInputSchema, setSubgraphStatus, SetSubgraphStatusInputSchema, utils, } from "@powerhousedao/vetra/document-models/subgraph-module";
|
|
6
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { generateMock } from "@powerhousedao/codegen";
|
|
8
8
|
describe("BaseOperations Operations", () => {
|
|
9
9
|
let document;
|
|
10
10
|
beforeEach(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This is a scaffold file meant for customization:
|
|
3
3
|
* - change it by adding new tests or modifying the existing ones
|
|
4
4
|
*/
|
|
5
|
-
import { generateMock } from "@powerhousedao/
|
|
5
|
+
import { generateMock } from "@powerhousedao/common/utils";
|
|
6
6
|
import { addPackageKeyword, AddPackageKeywordInputSchema, isVetraPackageDocument, reducer, removePackageKeyword, RemovePackageKeywordInputSchema, setPackageAuthor, SetPackageAuthorInputSchema, setPackageAuthorName, SetPackageAuthorNameInputSchema, setPackageAuthorWebsite, SetPackageAuthorWebsiteInputSchema, setPackageCategory, SetPackageCategoryInputSchema, setPackageDescription, SetPackageDescriptionInputSchema, setPackageGithubUrl, SetPackageGithubUrlInputSchema, setPackageName, SetPackageNameInputSchema, setPackageNpmUrl, SetPackageNpmUrlInputSchema, utils, } from "@powerhousedao/vetra/document-models/vetra-package";
|
|
7
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
8
8
|
describe("BaseOperations Operations", () => {
|
|
@@ -290,7 +290,7 @@ describe("CodegenProcessorLegacy E2E Tests", () => {
|
|
|
290
290
|
};
|
|
291
291
|
await processor.onStrands([strand]);
|
|
292
292
|
await vi.runAllTimersAsync();
|
|
293
|
-
expect(generateProcessor).toHaveBeenCalledWith("Test Processor", "analytics", ["powerhouse/document-model", "powerhouse/budget-statement"], mockConfig.PH_CONFIG.skipFormat);
|
|
293
|
+
expect(generateProcessor).toHaveBeenCalledWith("Test Processor", "analytics", ["powerhouse/document-model", "powerhouse/budget-statement"], mockConfig.PH_CONFIG.skipFormat, USE_TS_MORPH);
|
|
294
294
|
});
|
|
295
295
|
it("should map relational type to relationalDb when processing processor strand", async () => {
|
|
296
296
|
const { generateProcessor } = await import("@powerhousedao/codegen");
|
|
@@ -309,7 +309,7 @@ describe("CodegenProcessorLegacy E2E Tests", () => {
|
|
|
309
309
|
};
|
|
310
310
|
await processor.onStrands([strand]);
|
|
311
311
|
await vi.runAllTimersAsync();
|
|
312
|
-
expect(generateProcessor).toHaveBeenCalledWith("Test Processor", "relationalDb", ["powerhouse/document-model"], mockConfig.PH_CONFIG.skipFormat);
|
|
312
|
+
expect(generateProcessor).toHaveBeenCalledWith("Test Processor", "relationalDb", ["powerhouse/document-model"], mockConfig.PH_CONFIG.skipFormat, USE_TS_MORPH);
|
|
313
313
|
});
|
|
314
314
|
it("should not call generateProcessor for unsupported processor type", async () => {
|
|
315
315
|
const { generateProcessor } = await import("@powerhousedao/codegen");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/processor-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAMhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"processor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/processor-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAMhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,eAAe;IACrD,QAAQ,CAAC,sBAAsB,0BAA0B;IAEzD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IAsCnD,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CAmFjE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { generateProcessor } from "@powerhousedao/codegen";
|
|
2
2
|
import { logger } from "../../logger.js";
|
|
3
3
|
import { BaseDocumentGen } from "../base-document-gen.js";
|
|
4
|
+
import { USE_TS_MORPH } from "./constants.js";
|
|
4
5
|
import { minimalBackupDocument } from "./utils.js";
|
|
5
6
|
/**
|
|
6
7
|
* Generator for processor documents
|
|
@@ -63,7 +64,7 @@ export class ProcessorGenerator extends BaseDocumentGen {
|
|
|
63
64
|
// Extract document types from the state
|
|
64
65
|
const documentTypes = state.documentTypes.map((dt) => dt.documentType);
|
|
65
66
|
// Generate the processor using the codegen function
|
|
66
|
-
await generateProcessor(state.name, processorType, documentTypes, this.config.PH_CONFIG.skipFormat);
|
|
67
|
+
await generateProcessor(state.name, processorType, documentTypes, this.config.PH_CONFIG.skipFormat, USE_TS_MORPH);
|
|
67
68
|
logger.info(`✅ Processor generation completed successfully for: ${state.name}`);
|
|
68
69
|
// Backup the document
|
|
69
70
|
await minimalBackupDocument({
|