@powerhousedao/vetra 6.0.0-dev.4 → 6.0.0-dev.40

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.
Files changed (113) hide show
  1. package/dist/document-models/app-module/actions.d.ts +1 -1
  2. package/dist/document-models/app-module/actions.d.ts.map +1 -1
  3. package/dist/document-models/app-module/src/tests/base-operations.test.js +2 -2
  4. package/dist/document-models/app-module/src/tests/dnd-operations.test.js +1 -1
  5. package/dist/document-models/document-editor/actions.d.ts +1 -1
  6. package/dist/document-models/document-editor/actions.d.ts.map +1 -1
  7. package/dist/document-models/document-editor/src/tests/base-operations.test.js +2 -2
  8. package/dist/document-models/processor-module/actions.d.ts +1 -1
  9. package/dist/document-models/processor-module/actions.d.ts.map +1 -1
  10. package/dist/document-models/processor-module/src/tests/base-operations.test.js +2 -2
  11. package/dist/document-models/subgraph-module/actions.d.ts +1 -1
  12. package/dist/document-models/subgraph-module/actions.d.ts.map +1 -1
  13. package/dist/document-models/subgraph-module/src/tests/base-operations.test.js +2 -2
  14. package/dist/document-models/vetra-package/actions.d.ts +1 -1
  15. package/dist/document-models/vetra-package/actions.d.ts.map +1 -1
  16. package/dist/document-models/vetra-package/src/tests/base-operations.test.js +1 -1
  17. package/dist/editors/app-editor/components/AppEditorForm.js +1 -1
  18. package/dist/editors/app-editor/editor.js +1 -1
  19. package/dist/editors/app-editor/editor.test.js +8 -1
  20. package/dist/editors/document-editor/components/DocumentEditorForm.js +1 -1
  21. package/dist/editors/document-editor/editor.js +1 -1
  22. package/dist/editors/processor-editor/components/ProcessorEditorForm.js +1 -1
  23. package/dist/editors/processor-editor/editor.js +1 -1
  24. package/dist/editors/subgraph-editor/components/SubgraphEditorForm.js +1 -1
  25. package/dist/editors/subgraph-editor/editor.js +1 -1
  26. package/dist/editors/vetra-drive-app/DriveExplorer.js +1 -1
  27. package/dist/editors/vetra-drive-app/components/DriveHeader.js +1 -1
  28. package/dist/editors/vetra-drive-app/editor.js +1 -1
  29. package/dist/editors/vetra-package/components/MetaForm.js +1 -1
  30. package/dist/editors/vetra-package/editor.js +1 -1
  31. package/dist/processors/codegen/__tests__/codegen-processor-e2e.test.js +42 -22
  32. package/dist/processors/codegen/document-handlers/generators/app-generator.d.ts.map +1 -1
  33. package/dist/processors/codegen/document-handlers/generators/app-generator.js +12 -6
  34. package/dist/processors/codegen/document-handlers/generators/constants.d.ts +1 -0
  35. package/dist/processors/codegen/document-handlers/generators/constants.d.ts.map +1 -1
  36. package/dist/processors/codegen/document-handlers/generators/constants.js +2 -0
  37. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts.map +1 -1
  38. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js +10 -4
  39. package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts +4 -0
  40. package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts.map +1 -1
  41. package/dist/processors/codegen/document-handlers/generators/document-model-generator.js +42 -20
  42. package/dist/processors/codegen/document-handlers/generators/package-generator.d.ts.map +1 -1
  43. package/dist/processors/codegen/document-handlers/generators/package-generator.js +8 -2
  44. package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts.map +1 -1
  45. package/dist/processors/codegen/document-handlers/generators/processor-generator.js +17 -3
  46. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.d.ts.map +1 -1
  47. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.js +8 -2
  48. package/dist/processors/codegen/document-handlers/generators/utils.d.ts +7 -0
  49. package/dist/processors/codegen/document-handlers/generators/utils.d.ts.map +1 -1
  50. package/dist/processors/codegen/document-handlers/generators/utils.js +18 -1
  51. package/dist/processors/codegen/factory.d.ts +1 -1
  52. package/dist/processors/codegen/factory.d.ts.map +1 -1
  53. package/dist/processors/codegen/factory.legacy.d.ts +4 -0
  54. package/dist/processors/codegen/factory.legacy.d.ts.map +1 -0
  55. package/dist/processors/codegen/factory.legacy.js +53 -0
  56. package/dist/processors/codegen/index.d.ts +2 -2
  57. package/dist/processors/codegen/index.d.ts.map +1 -1
  58. package/dist/processors/codegen/index.js +22 -21
  59. package/dist/processors/codegen/index.legacy.d.ts +11 -0
  60. package/dist/processors/codegen/index.legacy.d.ts.map +1 -0
  61. package/dist/processors/codegen/index.legacy.js +57 -0
  62. package/dist/processors/factory.d.ts +3 -4
  63. package/dist/processors/factory.d.ts.map +1 -1
  64. package/dist/processors/factory.js +5 -4
  65. package/dist/processors/factory.legacy.d.ts +7 -0
  66. package/dist/processors/factory.legacy.d.ts.map +1 -0
  67. package/dist/processors/factory.legacy.js +19 -0
  68. package/dist/processors/index.d.ts +8 -2
  69. package/dist/processors/index.d.ts.map +1 -1
  70. package/dist/processors/index.js +10 -2
  71. package/dist/processors/vetra-read-model/factory.d.ts +2 -2
  72. package/dist/processors/vetra-read-model/factory.d.ts.map +1 -1
  73. package/dist/processors/vetra-read-model/factory.js +13 -16
  74. package/dist/processors/vetra-read-model/factory.legacy.d.ts +5 -0
  75. package/dist/processors/vetra-read-model/factory.legacy.d.ts.map +1 -0
  76. package/dist/processors/vetra-read-model/factory.legacy.js +24 -0
  77. package/dist/processors/vetra-read-model/index.d.ts +6 -5
  78. package/dist/processors/vetra-read-model/index.d.ts.map +1 -1
  79. package/dist/processors/vetra-read-model/index.js +20 -37
  80. package/dist/processors/vetra-read-model/index.legacy.d.ts +9 -0
  81. package/dist/processors/vetra-read-model/index.legacy.d.ts.map +1 -0
  82. package/dist/processors/vetra-read-model/index.legacy.js +75 -0
  83. package/dist/processors/vetra-read-model/migrations.d.ts +3 -3
  84. package/dist/processors/vetra-read-model/migrations.d.ts.map +1 -1
  85. package/dist/subgraphs/__tests__/app-module-permissions.test.d.ts +2 -0
  86. package/dist/subgraphs/__tests__/app-module-permissions.test.d.ts.map +1 -0
  87. package/dist/subgraphs/__tests__/app-module-permissions.test.js +436 -0
  88. package/dist/subgraphs/__tests__/permission-utils.test.d.ts +2 -0
  89. package/dist/subgraphs/__tests__/permission-utils.test.d.ts.map +1 -0
  90. package/dist/subgraphs/__tests__/permission-utils.test.js +505 -0
  91. package/dist/subgraphs/__tests__/vetra-read-model-permissions.test.d.ts +2 -0
  92. package/dist/subgraphs/__tests__/vetra-read-model-permissions.test.d.ts.map +1 -0
  93. package/dist/subgraphs/__tests__/vetra-read-model-permissions.test.js +319 -0
  94. package/dist/subgraphs/app-module/resolvers.d.ts.map +1 -1
  95. package/dist/subgraphs/app-module/resolvers.js +53 -9
  96. package/dist/subgraphs/document-editor/resolvers.d.ts.map +1 -1
  97. package/dist/subgraphs/document-editor/resolvers.js +45 -7
  98. package/dist/subgraphs/permission-utils.d.ts +31 -0
  99. package/dist/subgraphs/permission-utils.d.ts.map +1 -0
  100. package/dist/subgraphs/permission-utils.js +101 -0
  101. package/dist/subgraphs/processor-module/resolvers.d.ts.map +1 -1
  102. package/dist/subgraphs/processor-module/resolvers.js +49 -8
  103. package/dist/subgraphs/subgraph-module/resolvers.d.ts.map +1 -1
  104. package/dist/subgraphs/subgraph-module/resolvers.js +37 -5
  105. package/dist/subgraphs/vetra-package/resolvers.d.ts.map +1 -1
  106. package/dist/subgraphs/vetra-package/resolvers.js +69 -13
  107. package/dist/subgraphs/vetra-read-model/resolvers.d.ts +2 -2
  108. package/dist/subgraphs/vetra-read-model/resolvers.d.ts.map +1 -1
  109. package/dist/subgraphs/vetra-read-model/resolvers.js +18 -5
  110. package/dist/tsconfig.tsbuildinfo +1 -1
  111. package/dist/vitest.config.d.ts.map +1 -1
  112. package/dist/vitest.config.js +1 -0
  113. package/package.json +17 -15
@@ -7,7 +7,7 @@ export declare const actions: {
7
7
  removeDocumentType: (input: import("./index.js").RemoveDocumentTypeInput) => import("./index.js").RemoveDocumentTypeAction;
8
8
  setDocumentTypes: (input: import("./index.js").SetDocumentTypesInput) => import("./index.js").SetDocumentTypesAction;
9
9
  setName: (name: string) => import("document-model").SetNameAction;
10
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
10
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
11
11
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
12
12
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
13
13
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/app-module/actions.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAE/C,eAAO,MAAM,OAAO;4BAKV,sDAAiC;iBAA2P,2CAAsB;mBAAwK,6CAAwB;sBAAiL,gDAA2B;yBAA6L,mDAA8B;uBAAoM,iDAA4B;;eAAsuL,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp1O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/app-module/actions.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAE/C,eAAO,MAAM,OAAO;4BAKV,sDAAiC;iBAA2P,2CAAsB;mBAAwK,6CAAwB;sBAAiL,gDAA2B;yBAA6L,mDAA8B;uBAAoM,iDAA4B;;gBAAuuL,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADr1O,CAAC"}
@@ -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 { addDocumentType, reducer, removeDocumentType, setAppName, setAppStatus, utils, isAppModuleDocument, setDocumentTypes, SetAppNameInputSchema, SetAppStatusInputSchema, AddDocumentTypeInputSchema, RemoveDocumentTypeInputSchema, SetDocumentTypesInputSchema, } from "@powerhousedao/vetra/document-models/app-module";
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/codegen";
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", () => {
@@ -5,7 +5,7 @@ export declare const actions: {
5
5
  removeDocumentType: (input: import("./index.js").RemoveDocumentTypeInput) => import("./index.js").RemoveDocumentTypeAction;
6
6
  setEditorStatus: (input: import("./index.js").SetEditorStatusInput) => import("./index.js").SetEditorStatusAction;
7
7
  setName: (name: string) => import("document-model").SetNameAction;
8
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
8
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
9
9
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
10
10
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
11
11
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/document-editor/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AAEpD,eAAO,MAAM,OAAO;oBACsQ,8CAAyB;sBAAoL,gDAA2B;yBAA6L,mDAA8B;sBAAmM,gDAA2B;;eAA+9L,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADn0O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/document-editor/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AAEpD,eAAO,MAAM,OAAO;oBACsQ,8CAAyB;sBAAoL,gDAA2B;yBAA6L,mDAA8B;sBAAmM,gDAA2B;;gBAAg+L,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp0O,CAAC"}
@@ -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 { addDocumentType, reducer, removeDocumentType, setEditorName, setEditorStatus, utils, isDocumentEditorDocument, SetEditorNameInputSchema, AddDocumentTypeInputSchema, RemoveDocumentTypeInputSchema, SetEditorStatusInputSchema, } from "@powerhousedao/vetra/document-models/document-editor";
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(() => {
@@ -6,7 +6,7 @@ export declare const actions: {
6
6
  removeDocumentType: (input: import("./index.js").RemoveDocumentTypeInput) => import("./index.js").RemoveDocumentTypeAction;
7
7
  setProcessorStatus: (input: import("./index.js").SetProcessorStatusInput) => import("./index.js").SetProcessorStatusAction;
8
8
  setName: (name: string) => import("document-model").SetNameAction;
9
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
9
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
10
10
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
11
11
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
12
12
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/processor-module/actions.ts"],"names":[],"mappings":"AAGA,qDAAqD;AAErD,eAAO,MAAM,OAAO;uBAC4W,iDAA4B;uBAA8L,iDAA4B;sBAA6L,gDAA2B;yBAA6L,mDAA8B;yBAAsM,mDAA8B;;eAA4oL,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADl0O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/processor-module/actions.ts"],"names":[],"mappings":"AAGA,qDAAqD;AAErD,eAAO,MAAM,OAAO;uBAC4W,iDAA4B;uBAA8L,iDAA4B;sBAA6L,gDAA2B;yBAA6L,mDAA8B;yBAAsM,mDAA8B;;gBAA6oL,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADn0O,CAAC"}
@@ -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 { addDocumentType, reducer, removeDocumentType, setProcessorName, setProcessorStatus, setProcessorType, utils, isProcessorModuleDocument, SetProcessorNameInputSchema, SetProcessorTypeInputSchema, AddDocumentTypeInputSchema, RemoveDocumentTypeInputSchema, SetProcessorStatusInputSchema, } from "@powerhousedao/vetra/document-models/processor-module";
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(() => {
@@ -3,7 +3,7 @@ export declare const actions: {
3
3
  setSubgraphName: (input: import("./index.js").SetSubgraphNameInput) => import("./index.js").SetSubgraphNameAction;
4
4
  setSubgraphStatus: (input: import("./index.js").SetSubgraphStatusInput) => import("./index.js").SetSubgraphStatusAction;
5
5
  setName: (name: string) => import("document-model").SetNameAction;
6
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
6
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
7
7
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
8
8
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
9
9
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/subgraph-module/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AAEpD,eAAO,MAAM,OAAO;sBACwG,gDAA2B;wBAA4L,kDAA6B;;eAA0iN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADn0O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/subgraph-module/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AAEpD,eAAO,MAAM,OAAO;sBACwG,gDAA2B;wBAA4L,kDAA6B;;gBAA2iN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp0O,CAAC"}
@@ -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 { reducer, setSubgraphName, setSubgraphStatus, utils, isSubgraphModuleDocument, SetSubgraphNameInputSchema, SetSubgraphStatusInputSchema, } from "@powerhousedao/vetra/document-models/subgraph-module";
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(() => {
@@ -11,7 +11,7 @@ export declare const actions: {
11
11
  setPackageGithubUrl: (input: import("./index.js").SetPackageGithubUrlInput) => import("./index.js").SetPackageGithubUrlAction;
12
12
  setPackageNpmUrl: (input: import("./index.js").SetPackageNpmUrlInput) => import("./index.js").SetPackageNpmUrlAction;
13
13
  setName: (name: string) => import("document-model").SetNameAction;
14
- undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
14
+ undo: (count?: number, scope?: string) => import("document-model").UndoAction;
15
15
  redo: (count?: number, scope?: string) => import("document-model").RedoAction;
16
16
  prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
17
17
  loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/vetra-package/actions.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAElD,eAAO,MAAM,OAAO;qBACs0B,+CAA0B;4BAA6L,sDAAiC;yBAA+M,mDAA8B;uBAAoM,iDAA4B;2BAAkM,qDAAgC;8BAAkN,wDAAmC;wBAAqN,kDAA6B;2BAAqM,qDAAgC;0BAA6M,oDAA+B;uBAAwM,iDAA4B;;eAA+/H,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADr0O,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/vetra-package/actions.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAElD,eAAO,MAAM,OAAO;qBACs0B,+CAA0B;4BAA6L,sDAAiC;yBAA+M,mDAA8B;uBAAoM,iDAA4B;2BAAkM,qDAAgC;8BAAkN,wDAAmC;wBAAqN,kDAA6B;2BAAqM,qDAAgC;0BAA6M,oDAA+B;uBAAwM,iDAA4B;;gBAAggI,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADt0O,CAAC"}
@@ -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/codegen";
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", () => {
@@ -97,7 +97,7 @@ export const AppEditorForm = () => {
97
97
  handleAddDocumentType(selectedValue);
98
98
  }
99
99
  };
100
- return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "App Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "app-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "App Name" }), _jsx("input", { id: "app-name", type: "text", value: appName, onChange: (e) => setAppName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter app name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && (_jsxs("select", { onChange: (e) => handleDocumentTypeSelection(e.target.value), className: "w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { children: "Select a document type to add" }), _jsx("option", { children: "--- Vetra drive document types ---" }), _jsx("option", { value: ALL_IN_DRIVE, children: "Add all document types in Vetra drive" }), documentTypesInSelectedDrive
100
+ return (_jsxs("div", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "App Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "app-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "App Name" }), _jsx("input", { id: "app-name", type: "text", value: appName, onChange: (e) => setAppName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter app name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && (_jsxs("select", { onChange: (e) => handleDocumentTypeSelection(e.target.value), className: "w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { children: "Select a document type to add" }), _jsx("option", { children: "--- Vetra drive document types ---" }), _jsx("option", { value: ALL_IN_DRIVE, children: "Add all document types in Vetra drive" }), documentTypesInSelectedDrive
101
101
  ?.filter((dt) => !selectedDocumentTypes.includes(dt))
102
102
  .map((docType) => (_jsx("option", { value: docType, children: docType }, docType))), _jsx("option", { children: "--- Reactor document types ---" }), _jsx("option", { value: ALL_IN_REACTOR, children: "Add all document types in Reactor" }), supportedDocumentTypesInReactor
103
103
  ?.filter((dt) => !selectedDocumentTypes.includes(dt))
@@ -5,5 +5,5 @@ import { AppEditorForm } from "./components/AppEditorForm.js";
5
5
  import { editorConfig } from "./config.js";
6
6
  export default function Editor() {
7
7
  useSetPHDocumentEditorConfig(editorConfig);
8
- return (_jsxs("div", { children: [_jsx(DocumentToolbar, {}), _jsx(AppEditorForm, {})] }));
8
+ return (_jsxs("div", { className: "bg-gray-50 p-6", children: [_jsx(DocumentToolbar, {}), _jsx(AppEditorForm, {})] }));
9
9
  }
@@ -1,12 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { render, screen, waitFor } from "@testing-library/react";
3
3
  import { userEvent } from "@testing-library/user-event";
4
- import { beforeEach, describe, expect, it, vi } from "vitest";
4
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
5
5
  import { useSelectedAppModuleDocument } from "../../document-models/app-module/hooks.js";
6
6
  import Editor from "./editor.js";
7
7
  vi.mock("../../document-models/app-module/hooks.js", () => ({
8
8
  useSelectedAppModuleDocument: vi.fn(),
9
9
  }));
10
+ vi.mock("@powerhousedao/design-system/connect", () => ({
11
+ DocumentToolbar: () => null,
12
+ }));
10
13
  vi.mock("@powerhousedao/reactor-browser", async (importOriginal) => {
11
14
  const actual = await importOriginal();
12
15
  return {
@@ -34,6 +37,7 @@ vi.mock("@powerhousedao/reactor-browser", async (importOriginal) => {
34
37
  describe("AppModule Editor", () => {
35
38
  let mockDispatch;
36
39
  beforeEach(() => {
40
+ window.ph = {};
37
41
  mockDispatch = vi.fn();
38
42
  vi.mocked(useSelectedAppModuleDocument).mockReturnValue([
39
43
  {
@@ -49,6 +53,9 @@ describe("AppModule Editor", () => {
49
53
  mockDispatch,
50
54
  ]);
51
55
  });
56
+ afterEach(() => {
57
+ delete window.ph;
58
+ });
52
59
  describe("Core Rendering", () => {
53
60
  it("should render all main form sections and labels", () => {
54
61
  render(_jsx(Editor, {}));
@@ -59,7 +59,7 @@ export const DocumentEditorForm = ({ editorName: initialEditorName = "", documen
59
59
  onConfirm?.();
60
60
  }
61
61
  };
62
- return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Editor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "editor-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Editor Name" }), _jsx("input", { id: "editor-name", type: "text", value: editorName, onChange: (e) => setEditorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}` })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "supported-document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Supported Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && (_jsx(Suspense, { fallback: _jsx(DocumentTypeSelectUI, {}), children: _jsx(DocumentTypeSelect, { documentTypes: documentTypes, setDocumentTypes: setDocumentTypes, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType }) })), _jsx("div", { className: "space-y-1", children: documentTypes.map((type) => (_jsxs("div", { className: "flex items-center py-1", children: [_jsx("span", { className: "text-sm text-gray-700", children: type.documentType }), !isReadOnly && (_jsx("button", { onClick: () => {
62
+ return (_jsxs("div", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Editor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "editor-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Editor Name" }), _jsx("input", { id: "editor-name", type: "text", value: editorName, onChange: (e) => setEditorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}` })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "supported-document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Supported Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && (_jsx(Suspense, { fallback: _jsx(DocumentTypeSelectUI, {}), children: _jsx(DocumentTypeSelect, { documentTypes: documentTypes, setDocumentTypes: setDocumentTypes, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType }) })), _jsx("div", { className: "space-y-1", children: documentTypes.map((type) => (_jsxs("div", { className: "flex items-center py-1", children: [_jsx("span", { className: "text-sm text-gray-700", children: type.documentType }), !isReadOnly && (_jsx("button", { onClick: () => {
63
63
  setDocumentTypes([]);
64
64
  onRemoveDocumentType?.({ id: type.id });
65
65
  }, className: "ml-2 text-gray-400 hover:text-gray-600 focus:outline-none", children: "\u00D7" }))] }, type.id))) })] })] }), !isReadOnly && (_jsx("div", { children: _jsx("button", { onClick: handleConfirm, disabled: !editorName.trim() || documentTypes.length === 0, className: "rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-300", children: "Confirm" }) }))] }));
@@ -25,5 +25,5 @@ export default function Editor() {
25
25
  const onConfirm = useCallback(() => {
26
26
  dispatch(actions.setEditorStatus({ status: "CONFIRMED" }));
27
27
  }, [dispatch]);
28
- return (_jsxs("div", { children: [_jsx(DocumentToolbar, {}), _jsx(DocumentEditorForm, { status: document.state.global.status, editorName: document.state.global.name ?? "", documentTypes: document.state.global.documentTypes, onEditorNameChange: onEditorNameChange, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType, onConfirm: onConfirm })] }));
28
+ return (_jsxs("div", { className: "bg-gray-50 p-6", children: [_jsx(DocumentToolbar, {}), _jsx(DocumentEditorForm, { status: document.state.global.status, editorName: document.state.global.name ?? "", documentTypes: document.state.global.documentTypes, onEditorNameChange: onEditorNameChange, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType, onConfirm: onConfirm })] }));
29
29
  }
@@ -42,7 +42,7 @@ export const ProcessorEditorForm = ({ processorName: initialProcessorName = "",
42
42
  onRemoveDocumentType?.(id);
43
43
  };
44
44
  const canConfirm = processorName.trim() && processorType && documentTypes.length > 0;
45
- return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Processor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "processor-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Processor Name" }), _jsx("input", { id: "processor-name", type: "text", value: processorName, onChange: (e) => setProcessorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter processor name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "processor-type", className: "mb-2 block text-sm font-medium text-gray-700", children: "Type" }), _jsxs("select", { id: "processor-type", value: processorType, onChange: (e) => setProcessorType(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, children: [_jsx("option", { value: "", children: "Select type..." }), _jsx("option", { value: "analytics", children: "Analytics" }), _jsx("option", { value: "relational", children: "Relational Database" })] })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && availableDocumentTypes.length > 0 && (_jsxs("select", { id: "document-types", value: selectedDocumentType, onChange: (e) => {
45
+ return (_jsxs("div", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Processor Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "processor-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Processor Name" }), _jsx("input", { id: "processor-name", type: "text", value: processorName, onChange: (e) => setProcessorName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter processor name" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "processor-type", className: "mb-2 block text-sm font-medium text-gray-700", children: "Type" }), _jsxs("select", { id: "processor-type", value: processorType, onChange: (e) => setProcessorType(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, children: [_jsx("option", { value: "", children: "Select type..." }), _jsx("option", { value: "analytics", children: "Analytics" }), _jsx("option", { value: "relational", children: "Relational Database" })] })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "document-types", className: "mb-2 block text-sm font-medium text-gray-700", children: "Document Types" }), _jsxs("div", { className: "space-y-2", children: [!isReadOnly && availableDocumentTypes.length > 0 && (_jsxs("select", { id: "document-types", value: selectedDocumentType, onChange: (e) => {
46
46
  const selectedValue = e.target.value;
47
47
  if (selectedValue &&
48
48
  !documentTypes.some((dt) => dt.documentType === selectedValue)) {
@@ -29,5 +29,5 @@ export default function Editor() {
29
29
  const onRemoveDocumentType = useCallback((id) => {
30
30
  dispatch(actions.removeDocumentType({ id }));
31
31
  }, [dispatch]);
32
- return (_jsxs("div", { children: [_jsx(DocumentToolbar, {}), _jsx(ProcessorEditorForm, { onNameChange: onNameChange, onTypeChange: onTypeChange, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType, status: document.state.global.status, processorName: document.state.global.name ?? "", processorType: document.state.global.type ?? "", documentTypes: document.state.global.documentTypes ?? [], onConfirm: onConfirm })] }));
32
+ return (_jsxs("div", { className: "bg-gray-50 p-6", children: [_jsx(DocumentToolbar, {}), _jsx(ProcessorEditorForm, { onNameChange: onNameChange, onTypeChange: onTypeChange, onAddDocumentType: onAddDocumentType, onRemoveDocumentType: onRemoveDocumentType, status: document.state.global.status, processorName: document.state.global.name ?? "", processorType: document.state.global.type ?? "", documentTypes: document.state.global.documentTypes ?? [], onConfirm: onConfirm })] }));
33
33
  }
@@ -25,5 +25,5 @@ export const SubgraphEditorForm = ({ subgraphName: initialSubgraphName = "", sta
25
25
  onConfirm?.();
26
26
  }
27
27
  };
28
- return (_jsxs("div", { className: "space-y-6 bg-white p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Subgraph Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "subgraph-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Subgraph Name" }), _jsx("input", { id: "subgraph-name", type: "text", value: subgraphName, onChange: (e) => setSubgraphName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter subgraph name" })] }), !isReadOnly && (_jsx("div", { children: _jsx("button", { onClick: handleConfirm, disabled: !subgraphName.trim(), className: "rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-300", children: "Confirm" }) }))] }));
28
+ return (_jsxs("div", { className: "space-y-6 p-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("h2", { className: "text-lg font-medium text-gray-900", children: "Subgraph Configuration" }), _jsx(StatusPill, { status: status === "CONFIRMED" ? "confirmed" : "draft", label: status === "CONFIRMED" ? "Confirmed" : "Draft" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "subgraph-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Subgraph Name" }), _jsx("input", { id: "subgraph-name", type: "text", value: subgraphName, onChange: (e) => setSubgraphName(e.target.value), disabled: isReadOnly, className: `w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500 ${isReadOnly ? "cursor-not-allowed bg-gray-100" : ""}`, placeholder: "Enter subgraph name" })] }), !isReadOnly && (_jsx("div", { children: _jsx("button", { onClick: handleConfirm, disabled: !subgraphName.trim(), className: "rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-300", children: "Confirm" }) }))] }));
29
29
  };
@@ -17,5 +17,5 @@ export default function Editor() {
17
17
  const onConfirm = useCallback(() => {
18
18
  dispatch(actions.setSubgraphStatus({ status: "CONFIRMED" }));
19
19
  }, [dispatch]);
20
- return (_jsxs("div", { children: [_jsx(DocumentToolbar, {}), _jsx(SubgraphEditorForm, { subgraphName: document.state.global.name ?? "", status: document.state.global.status, onNameChange: onNameChange, onConfirm: onConfirm })] }));
20
+ return (_jsxs("div", { className: "bg-gray-50 p-6", children: [_jsx(DocumentToolbar, {}), _jsx(SubgraphEditorForm, { subgraphName: document.state.global.name ?? "", status: document.state.global.status, onNameChange: onNameChange, onConfirm: onConfirm })] }));
21
21
  }
@@ -3,5 +3,5 @@ import { DriveHeader } from "./components/DriveHeader.js";
3
3
  import { ModuleSpecificationsSection } from "./components/ModuleSpecificationsSection.js";
4
4
  import { PackageInformationSection } from "./components/PackageInformationSection.js";
5
5
  export const DriveExplorer = ({ driveId, driveName, driveUrl, documentModels = [], editors = [], apps = [], subgraphs = [], processors = [], codegenProcessors = [], onAddDocumentModel, onAddEditor, onAddApp, onAddSubgraph, onAddProcessor, onAddCodegenProcessor, packageDocumentId, onAddPackageDocument, onOpenPackageDocument, onOpenDocument, onDelete, }) => {
6
- return (_jsxs("div", { className: "min-h-screen bg-white", children: [_jsx(DriveHeader, { driveId: driveId, driveName: driveName, driveUrl: driveUrl }), _jsxs("div", { className: "mx-6 mt-6 bg-white", children: [_jsx(PackageInformationSection, { className: "mb-6", packageDocumentId: packageDocumentId, onAddPackageDocument: onAddPackageDocument, onOpenPackageDocument: onOpenPackageDocument }), _jsx(ModuleSpecificationsSection, { documentModels: documentModels, editors: editors, apps: apps, subgraphs: subgraphs, processors: processors, codegenProcessors: codegenProcessors, onAddDocumentModel: onAddDocumentModel, onAddEditor: onAddEditor, onAddApp: onAddApp, onAddSubgraph: onAddSubgraph, onAddProcessor: onAddProcessor, onAddCodegenProcessor: onAddCodegenProcessor, onOpenDocument: onOpenDocument, onDelete: onDelete })] })] }));
6
+ return (_jsxs("div", { className: "min-h-screen", children: [_jsx(DriveHeader, { driveId: driveId, driveName: driveName, driveUrl: driveUrl }), _jsxs("div", { className: "mx-6 mt-6", children: [_jsx(PackageInformationSection, { className: "mb-6", packageDocumentId: packageDocumentId, onAddPackageDocument: onAddPackageDocument, onOpenPackageDocument: onOpenPackageDocument }), _jsx(ModuleSpecificationsSection, { documentModels: documentModels, editors: editors, apps: apps, subgraphs: subgraphs, processors: processors, codegenProcessors: codegenProcessors, onAddDocumentModel: onAddDocumentModel, onAddEditor: onAddEditor, onAddApp: onAddApp, onAddSubgraph: onAddSubgraph, onAddProcessor: onAddProcessor, onAddCodegenProcessor: onAddCodegenProcessor, onOpenDocument: onOpenDocument, onDelete: onDelete })] })] }));
7
7
  };
@@ -56,5 +56,5 @@ export const DriveHeader = ({ driveId, driveName, driveUrl, }) => {
56
56
  return "";
57
57
  }
58
58
  }, [driveUrl]);
59
- return (_jsx("div", { className: "bg-white px-6 py-4", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(VetraIcon, { width: 20, height: 20 }), _jsx("h1", { className: "text-lg font-semibold text-gray-900", children: "Vetra Studio Drive" }), _jsxs("div", { className: "relative", ref: infoMenuRef, children: [_jsx("button", { "aria-label": "Drive information", "aria-expanded": isInfoMenuOpen, className: "rounded-full p-1 transition-colors hover:bg-gray-100", onClick: toggleInfoMenu, children: _jsx(InfoIcon, { className: "text-gray-500" }) }), isInfoMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-10 mt-2 flex flex-col items-start gap-2 rounded-lg bg-white p-3 shadow-lg", children: [_jsx(DriveInfoItem, { label: "Name", value: driveName }), _jsx(DriveInfoItem, { label: "Drive ID", value: driveId })] }))] }), driveUrl && (_jsxs("div", { className: "relative", ref: shareMenuRef, children: [_jsx("button", { "aria-label": "Share drive", "aria-expanded": isShareMenuOpen, className: "rounded-full p-1 transition-colors hover:bg-gray-100", onClick: toggleShareMenu, children: _jsx(ShareIcon, { width: 16, height: 16, stroke: "#343839" }) }), isShareMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-10 mt-2 flex w-max flex-col gap-4 rounded-lg bg-white p-4 shadow-lg", children: [_jsx(ShareMenuItem, { label: "Copy the Drive URL", url: driveUrl }), _jsx(ShareMenuItem, { label: "Share this Drive directly in Connect", url: shareUrl })] }))] }))] }), _jsxs("a", { href: "https://academy.vetra.io/", target: "_blank", rel: "noopener noreferrer", className: "flex items-center gap-2 text-sm text-gray-900 underline transition-colors hover:text-gray-700", children: [_jsx(ExternalLinkIcon, { fill: "#111827" }), "Vetra Academy"] })] }) }));
59
+ return (_jsx("div", { className: "bg-gray-50 px-6 py-4", children: _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(VetraIcon, { width: 20, height: 20 }), _jsx("h1", { className: "text-lg font-semibold text-gray-900", children: "Vetra Studio Drive" }), _jsxs("div", { className: "relative", ref: infoMenuRef, children: [_jsx("button", { "aria-label": "Drive information", "aria-expanded": isInfoMenuOpen, className: "rounded-full p-1 transition-colors hover:bg-gray-100", onClick: toggleInfoMenu, children: _jsx(InfoIcon, { className: "text-gray-500" }) }), isInfoMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-10 mt-2 flex flex-col items-start gap-2 rounded-lg bg-white p-3 shadow-lg", children: [_jsx(DriveInfoItem, { label: "Name", value: driveName }), _jsx(DriveInfoItem, { label: "Drive ID", value: driveId })] }))] }), driveUrl && (_jsxs("div", { className: "relative", ref: shareMenuRef, children: [_jsx("button", { "aria-label": "Share drive", "aria-expanded": isShareMenuOpen, className: "rounded-full p-1 transition-colors hover:bg-gray-100", onClick: toggleShareMenu, children: _jsx(ShareIcon, { width: 16, height: 16, stroke: "#343839" }) }), isShareMenuOpen && (_jsxs("div", { role: "menu", className: "absolute left-0 top-full z-10 mt-2 flex w-max flex-col gap-4 rounded-lg bg-white p-4 shadow-lg", children: [_jsx(ShareMenuItem, { label: "Copy the Drive URL", url: driveUrl }), _jsx(ShareMenuItem, { label: "Share this Drive directly in Connect", url: shareUrl })] }))] }))] }), _jsxs("a", { href: "https://academy.vetra.io/", target: "_blank", rel: "noopener noreferrer", className: "flex items-center gap-2 text-sm text-gray-900 underline transition-colors hover:text-gray-700", children: [_jsx(ExternalLinkIcon, { fill: "#111827" }), "Vetra Academy"] })] }) }));
60
60
  };
@@ -41,7 +41,7 @@ export function BaseEditor(props) {
41
41
  }
42
42
  }, [packageNode]);
43
43
  const showDocumentEditor = !!children;
44
- return showDocumentEditor ? (children) : (_jsx("div", { style: { height: "100%" }, className: "bg-white after:pointer-events-none after:absolute after:inset-0 after:bg-blue-500 after:opacity-0 after:transition after:content-['']", children: _jsx(DriveExplorer, { driveId: driveId, driveName: driveName, driveUrl: driveUrl, documentModels: docModelsNodes, editors: docEditorsNodes, apps: docAppsNodes, subgraphs: docSubgraphsNodes, processors: docProcessorsNodes, codegenProcessors: [], onAddDocumentModel: () => onCreateDocument(DOCUMENT_TYPES.documentModel), onAddEditor: () => onCreateDocument(DOCUMENT_TYPES.documentEditor), onAddApp: () => onCreateDocument(DOCUMENT_TYPES.documentApp), onAddSubgraph: () => onCreateDocument(DOCUMENT_TYPES.documentSubgraph), onAddProcessor: () => onCreateDocument(DOCUMENT_TYPES.documentProcessor), onAddCodegenProcessor: () => console.log("add codegen processor"), packageDocumentId: packageDocumentId, onAddPackageDocument: onCreatePackageFile, onOpenPackageDocument: onOpenPackageDocument, onOpenDocument: (node) => setSelectedNode(node), onDelete: onDeleteDocument }) }));
44
+ return showDocumentEditor ? (children) : (_jsx("div", { style: { height: "100%" }, className: "bg-gray-50 p-6 after:pointer-events-none after:absolute after:inset-0 after:bg-blue-500 after:opacity-0 after:transition after:content-['']", children: _jsx(DriveExplorer, { driveId: driveId, driveName: driveName, driveUrl: driveUrl, documentModels: docModelsNodes, editors: docEditorsNodes, apps: docAppsNodes, subgraphs: docSubgraphsNodes, processors: docProcessorsNodes, codegenProcessors: [], onAddDocumentModel: () => onCreateDocument(DOCUMENT_TYPES.documentModel), onAddEditor: () => onCreateDocument(DOCUMENT_TYPES.documentEditor), onAddApp: () => onCreateDocument(DOCUMENT_TYPES.documentApp), onAddSubgraph: () => onCreateDocument(DOCUMENT_TYPES.documentSubgraph), onAddProcessor: () => onCreateDocument(DOCUMENT_TYPES.documentProcessor), onAddCodegenProcessor: () => console.log("add codegen processor"), packageDocumentId: packageDocumentId, onAddPackageDocument: onCreatePackageFile, onOpenPackageDocument: onOpenPackageDocument, onOpenDocument: (node) => setSelectedNode(node), onDelete: onDeleteDocument }) }));
45
45
  }
46
46
  export default function Editor(props) {
47
47
  useSetPHDriveEditorConfig(editorConfig);
@@ -20,7 +20,7 @@ export const MetaForm = (props) => {
20
20
  useDebounce(publisherUrl, onPublisherUrlChange, 300);
21
21
  useDebounce(githubRepository, onGithubRepositoryChange, 300);
22
22
  useDebounce(npmPackage, onNpmPackageChange, 300);
23
- return (_jsxs("div", { className: "grid grid-cols-1 gap-6 bg-white p-6 lg:grid-cols-3", children: [_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "package-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Name" }), _jsx("input", { id: "package-name", type: "text", value: name, onChange: (e) => setName(e.target.value), className: "w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "package-description", className: "mb-2 block text-sm font-medium text-gray-700", children: "Description" }), _jsx("textarea", { id: "package-description", rows: 6, value: description, onChange: (e) => setDescription(e.target.value), className: "w-full resize-none rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" })] })] }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "package-category", className: "mb-2 block text-sm font-medium text-gray-700", children: "Category" }), _jsxs("select", { id: "package-category", value: category, onChange: (e) => {
23
+ return (_jsxs("div", { className: "grid grid-cols-1 gap-6 p-6 lg:grid-cols-3", children: [_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "package-name", className: "mb-2 block text-sm font-medium text-gray-700", children: "Name" }), _jsx("input", { id: "package-name", type: "text", value: name, onChange: (e) => setName(e.target.value), className: "w-full rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "package-description", className: "mb-2 block text-sm font-medium text-gray-700", children: "Description" }), _jsx("textarea", { id: "package-description", rows: 6, value: description, onChange: (e) => setDescription(e.target.value), className: "w-full resize-none rounded-md border border-gray-300 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" })] })] }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "package-category", className: "mb-2 block text-sm font-medium text-gray-700", children: "Category" }), _jsxs("select", { id: "package-category", value: category, onChange: (e) => {
24
24
  const newValue = e.target.value;
25
25
  setCategory(newValue);
26
26
  onCategoryChange?.(newValue);
@@ -65,5 +65,5 @@ export default function Editor(props) {
65
65
  const onRemoveKeyword = useCallback((id) => {
66
66
  dispatch(actions.removePackageKeyword({ id }));
67
67
  }, []);
68
- return (_jsxs("div", { children: [displayToolbar && _jsx(DocumentToolbar, {}), _jsx(MetaForm, { name: document.state.global.name ?? "", description: document.state.global.description ?? "", category: document.state.global.category ?? "", publisher: document.state.global.author.name ?? "", publisherUrl: document.state.global.author.website ?? "", githubRepository: document.state.global.githubUrl ?? "", npmPackage: document.state.global.npmUrl ?? "", keywords: document.state.global.keywords, onNameChange: onNameChange, onDescriptionChange: onDescriptionChange, onCategoryChange: onCategoryChange, onPublisherChange: onPublisherChange, onPublisherUrlChange: onPublisherUrlChange, onGithubRepositoryChange: onGithubRepositoryChange, onNpmPackageChange: onNpmPackageChange, onAddKeyword: onAddKeyword, onRemoveKeyword: onRemoveKeyword })] }));
68
+ return (_jsxs("div", { className: "bg-gray-50 p-6", children: [displayToolbar && _jsx(DocumentToolbar, {}), _jsx(MetaForm, { name: document.state.global.name ?? "", description: document.state.global.description ?? "", category: document.state.global.category ?? "", publisher: document.state.global.author.name ?? "", publisherUrl: document.state.global.author.website ?? "", githubRepository: document.state.global.githubUrl ?? "", npmPackage: document.state.global.npmUrl ?? "", keywords: document.state.global.keywords, onNameChange: onNameChange, onDescriptionChange: onDescriptionChange, onCategoryChange: onCategoryChange, onPublisherChange: onPublisherChange, onPublisherUrlChange: onPublisherUrlChange, onGithubRepositoryChange: onGithubRepositoryChange, onNpmPackageChange: onNpmPackageChange, onAddKeyword: onAddKeyword, onRemoveKeyword: onRemoveKeyword })] }));
69
69
  }
@@ -1,7 +1,7 @@
1
1
  import path from "path";
2
2
  import { beforeEach, describe, expect, it, vi } from "vitest";
3
3
  import { USE_TS_MORPH, USE_VERSIONING, } from "../document-handlers/generators/constants.js";
4
- import { CodegenProcessor } from "../index.js";
4
+ import { CodegenProcessorLegacy } from "../index.legacy.js";
5
5
  const defaultManifest = {
6
6
  name: "",
7
7
  description: "",
@@ -55,7 +55,7 @@ vi.mock("../logger.js", () => ({
55
55
  error: vi.fn(),
56
56
  },
57
57
  }));
58
- describe("CodegenProcessor E2E Tests", () => {
58
+ describe("CodegenProcessorLegacy E2E Tests", () => {
59
59
  let processor;
60
60
  let mockConfig;
61
61
  beforeEach(async () => {
@@ -68,7 +68,7 @@ describe("CodegenProcessor E2E Tests", () => {
68
68
  CURRENT_WORKING_DIR: process.cwd(),
69
69
  };
70
70
  // Create a REAL processor instance (not mocked)
71
- processor = new CodegenProcessor();
71
+ processor = new CodegenProcessorLegacy();
72
72
  // Reset all codegen function mocks to resolve successfully
73
73
  const codegen = await import("@powerhousedao/codegen");
74
74
  vi.mocked(codegen.generateEditor).mockResolvedValue();
@@ -108,12 +108,12 @@ describe("CodegenProcessor E2E Tests", () => {
108
108
  await vi.runAllTimersAsync();
109
109
  const generateEditorArgs = [
110
110
  {
111
- name: "Test Editor",
111
+ ...mockConfig.PH_CONFIG,
112
+ editorName: "Test Editor",
112
113
  documentTypes: [
113
114
  "powerhouse/document-model",
114
115
  "powerhouse/budget-statement",
115
116
  ],
116
- config: mockConfig.PH_CONFIG,
117
117
  editorId: "test-editor",
118
118
  useTsMorph: USE_TS_MORPH,
119
119
  },
@@ -202,7 +202,7 @@ describe("CodegenProcessor E2E Tests", () => {
202
202
  const strand = {
203
203
  documentId: "test-doc-1",
204
204
  documentType: "powerhouse/document-model",
205
- state: validState,
205
+ state: { global: validState },
206
206
  };
207
207
  await processor.onStrands([strand]);
208
208
  await vi.runAllTimersAsync();
@@ -236,7 +236,7 @@ describe("CodegenProcessor E2E Tests", () => {
236
236
  const strand = {
237
237
  documentId: "test-doc-1",
238
238
  documentType: "powerhouse/document-model",
239
- state: invalidState,
239
+ state: { global: invalidState },
240
240
  };
241
241
  await processor.onStrands([strand]);
242
242
  await vi.runAllTimersAsync();
@@ -261,7 +261,7 @@ describe("CodegenProcessor E2E Tests", () => {
261
261
  const strand = {
262
262
  documentId: "test-doc-1",
263
263
  documentType: "powerhouse/document-model",
264
- state: validState,
264
+ state: { global: validState },
265
265
  };
266
266
  await processor.onStrands([strand]);
267
267
  await vi.runAllTimersAsync();
@@ -290,7 +290,17 @@ describe("CodegenProcessor 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);
293
+ expect(generateProcessor).toHaveBeenCalledWith({
294
+ processorName: "Test Processor",
295
+ processorType: "analytics",
296
+ documentTypes: [
297
+ "powerhouse/document-model",
298
+ "powerhouse/budget-statement",
299
+ ],
300
+ skipFormat: mockConfig.PH_CONFIG.skipFormat,
301
+ processorApps: ["connect", "switchboard"],
302
+ useTsMorph: USE_TS_MORPH,
303
+ });
294
304
  });
295
305
  it("should map relational type to relationalDb when processing processor strand", async () => {
296
306
  const { generateProcessor } = await import("@powerhousedao/codegen");
@@ -309,7 +319,14 @@ describe("CodegenProcessor E2E Tests", () => {
309
319
  };
310
320
  await processor.onStrands([strand]);
311
321
  await vi.runAllTimersAsync();
312
- expect(generateProcessor).toHaveBeenCalledWith("Test Processor", "relationalDb", ["powerhouse/document-model"], mockConfig.PH_CONFIG);
322
+ expect(generateProcessor).toHaveBeenCalledWith({
323
+ processorName: "Test Processor",
324
+ processorType: "relationalDb",
325
+ documentTypes: ["powerhouse/document-model"],
326
+ skipFormat: mockConfig.PH_CONFIG.skipFormat,
327
+ useTsMorph: USE_TS_MORPH,
328
+ processorApps: ["connect", "switchboard"],
329
+ });
313
330
  });
314
331
  it("should not call generateProcessor for unsupported processor type", async () => {
315
332
  const { generateProcessor } = await import("@powerhousedao/codegen");
@@ -366,10 +383,10 @@ describe("CodegenProcessor E2E Tests", () => {
366
383
  await vi.runAllTimersAsync();
367
384
  const generateDriveEditorArgs = [
368
385
  {
369
- name: "Test App",
370
- config: mockConfig.PH_CONFIG,
371
- appId: "test-app",
372
- allowedDocumentTypes: "",
386
+ driveEditorName: "Test App",
387
+ ...mockConfig.PH_CONFIG,
388
+ driveEditorId: "test-app",
389
+ allowedDocumentTypes: [],
373
390
  isDragAndDropEnabled: false,
374
391
  useTsMorph: USE_TS_MORPH,
375
392
  },
@@ -404,10 +421,13 @@ describe("CodegenProcessor E2E Tests", () => {
404
421
  await processor.onStrands([strand]);
405
422
  await vi.runAllTimersAsync();
406
423
  expect(generateDriveEditor).toHaveBeenCalledWith({
407
- name: "Test App",
408
- config: mockConfig.PH_CONFIG,
409
- appId: "test-app",
410
- allowedDocumentTypes: "powerhouse/document-model,powerhouse/budget-statement",
424
+ driveEditorName: "Test App",
425
+ ...mockConfig.PH_CONFIG,
426
+ driveEditorId: "test-app",
427
+ allowedDocumentTypes: [
428
+ "powerhouse/document-model",
429
+ "powerhouse/budget-statement",
430
+ ],
411
431
  isDragAndDropEnabled: true,
412
432
  useTsMorph: USE_TS_MORPH,
413
433
  });
@@ -557,9 +577,9 @@ describe("CodegenProcessor E2E Tests", () => {
557
577
  await processor.onStrands(strands);
558
578
  await vi.runAllTimersAsync();
559
579
  expect(generateEditor).toHaveBeenCalledWith({
560
- name: "Test Editor",
580
+ editorName: "Test Editor",
561
581
  documentTypes: ["powerhouse/document-model"],
562
- config: mockConfig.PH_CONFIG,
582
+ ...mockConfig.PH_CONFIG,
563
583
  editorId: "test-editor",
564
584
  useTsMorph: USE_TS_MORPH,
565
585
  });
@@ -596,9 +616,9 @@ describe("CodegenProcessor E2E Tests", () => {
596
616
  await vi.runAllTimersAsync();
597
617
  // Valid strand should be processed
598
618
  expect(generateEditor).toHaveBeenCalledWith({
599
- name: "Test Editor",
619
+ editorName: "Test Editor",
600
620
  documentTypes: ["powerhouse/document-model"],
601
- config: mockConfig.PH_CONFIG,
621
+ ...mockConfig.PH_CONFIG,
602
622
  editorId: "test-editor",
603
623
  useTsMorph: USE_TS_MORPH,
604
624
  });
@@ -1 +1 @@
1
- {"version":3,"file":"app-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe;IAC/C,QAAQ,CAAC,sBAAsB,oBAAoB;IAEnD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IA4BnD,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CA8EjE"}
1
+ {"version":3,"file":"app-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/app-generator.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe;IAC/C,QAAQ,CAAC,sBAAsB,oBAAoB;IAEnD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IA4BnD,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CAuFjE"}
@@ -3,7 +3,7 @@ import { kebabCase } from "change-case";
3
3
  import { logger } from "../../logger.js";
4
4
  import { BaseDocumentGen } from "../base-document-gen.js";
5
5
  import { USE_TS_MORPH } from "./constants.js";
6
- import { backupDocument } from "./utils.js";
6
+ import { minimalBackupDocument } from "./utils.js";
7
7
  /**
8
8
  * Generator for app documents
9
9
  */
@@ -43,10 +43,10 @@ export class AppGenerator extends BaseDocumentGen {
43
43
  const appId = kebabCase(state.name);
44
44
  // Generate the drive editor using the codegen function
45
45
  await generateDriveEditor({
46
- name: state.name,
47
- config: this.config.PH_CONFIG,
48
- appId: appId,
49
- allowedDocumentTypes: state.allowedDocumentTypes?.join(","),
46
+ ...this.config.PH_CONFIG,
47
+ driveEditorName: state.name,
48
+ driveEditorId: appId,
49
+ allowedDocumentTypes: state.allowedDocumentTypes ?? [],
50
50
  isDragAndDropEnabled: state.isDragAndDropEnabled,
51
51
  useTsMorph: USE_TS_MORPH,
52
52
  });
@@ -70,7 +70,13 @@ export class AppGenerator extends BaseDocumentGen {
70
70
  // Don't throw here - drive editor generation was successful
71
71
  }
72
72
  // Backup the document
73
- await backupDocument(strand.document, this.config.CURRENT_WORKING_DIR);
73
+ await minimalBackupDocument({
74
+ documentId: strand.documentId,
75
+ documentType: strand.documentType,
76
+ branch: strand.branch,
77
+ state: strand.state,
78
+ name: state.name,
79
+ }, this.config.CURRENT_WORKING_DIR);
74
80
  }
75
81
  catch (error) {
76
82
  logger.error(`❌ Error during drive editor generation for app ${state.name}:`, error);
@@ -1,3 +1,4 @@
1
1
  export declare const USE_TS_MORPH = true;
2
2
  export declare const USE_VERSIONING = false;
3
+ export declare const TEMP_HARDCODED_PROCESSOR_APPS: readonly ["connect", "switchboard"];
3
4
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,6BAA6B,qCAAiB,CAAC"}
@@ -1,2 +1,4 @@
1
+ import { PROCESSOR_APPS } from "shared";
1
2
  export const USE_TS_MORPH = true;
2
3
  export const USE_VERSIONING = false;
4
+ export const TEMP_HARDCODED_PROCESSOR_APPS = PROCESSOR_APPS;
@@ -1 +1 @@
1
- {"version":3,"file":"document-editor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,sBAAsB,gCAAgC;IAE/D;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IAuCnD,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CA0EjE"}
1
+ {"version":3,"file":"document-editor-generator.d.ts","sourceRoot":"","sources":["../../../../../processors/codegen/document-handlers/generators/document-editor-generator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAMhE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,QAAQ,CAAC,sBAAsB,gCAAgC;IAE/D;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO;IAuCnD,QAAQ,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CA8EjE"}