@powerhousedao/vetra 6.2.3-dev.78 → 6.2.3-dev.79
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/codegen/index.d.ts +2 -2
- package/dist/codegen/index.js +2 -2
- package/dist/codegen/spec.js +1 -1
- package/dist/document-models/app-module/index.d.ts +2 -2
- package/dist/document-models/app-module/index.js +1 -1
- package/dist/document-models/index.d.ts +2 -2
- package/dist/document-models/index.js +2 -2
- package/dist/document-models/processor-module/index.d.ts +3 -3
- package/dist/document-models/processor-module/index.js +4 -4
- package/dist/{editor-DbE7t0TU.js → editor-CbT_8Z6A.js} +2 -2
- package/dist/{editor-DbE7t0TU.js.map → editor-CbT_8Z6A.js.map} +1 -1
- package/dist/editors/index.d.ts +4 -4
- package/dist/editors/index.js +1 -1
- package/dist/{factory-BLQkEgxk.js → factory-BQp6QPQO.js} +15 -11
- package/dist/factory-BQp6QPQO.js.map +1 -0
- package/dist/{index-CKCays-S.d.ts → index-BAeTvhwh.d.ts} +2 -2
- package/dist/{index-CKCays-S.d.ts.map → index-BAeTvhwh.d.ts.map} +1 -1
- package/dist/{index-mYlWU47F.d.ts → index-CBcJ_oc6.d.ts} +2 -2
- package/dist/{index-mYlWU47F.d.ts.map → index-CBcJ_oc6.d.ts.map} +1 -1
- package/dist/{index-cdL5k2sw.d.ts → index-CScZx1m9.d.ts} +9 -3
- package/dist/index-CScZx1m9.d.ts.map +1 -0
- package/dist/{index-B52jv-LY.d.ts → index-DIpsNezM.d.ts} +2 -2
- package/dist/{index-B52jv-LY.d.ts.map → index-DIpsNezM.d.ts.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/{module-d1-9VDGb.js → module-23VayWKe.js} +5 -5
- package/dist/module-23VayWKe.js.map +1 -0
- package/dist/{module-CZLWjrD_.js → module-B6S4QGOx.js} +2 -2
- package/dist/{module-CZLWjrD_.js.map → module-B6S4QGOx.js.map} +1 -1
- package/dist/{module-Db8mmgzN.js → module-BktWa0rB.js} +11 -9
- package/dist/module-BktWa0rB.js.map +1 -0
- package/dist/{ph-factories-HuC7_vvF.js → ph-factories-fEke-Nr8.js} +2 -2
- package/dist/{ph-factories-HuC7_vvF.js.map → ph-factories-fEke-Nr8.js.map} +1 -1
- package/dist/{processor-kRJ48ypM.js → processor-C_zliXhw.js} +356 -322
- package/dist/processor-C_zliXhw.js.map +1 -0
- package/dist/processors/codegen/index.d.ts.map +1 -1
- package/dist/processors/codegen/index.js +2 -2
- package/dist/processors/index.js +1 -1
- package/dist/{spec-api-B01RpZM-.js → spec-api-BGj7gcQn.js} +16 -10
- package/dist/{spec-api-B01RpZM-.js.map → spec-api-BGj7gcQn.js.map} +1 -1
- package/dist/{switchboard-CZ87bHRJ.js → switchboard-DjCPLtMW.js} +2 -2
- package/dist/{switchboard-CZ87bHRJ.js.map → switchboard-DjCPLtMW.js.map} +1 -1
- package/dist/{utils-w_21RRK6.js → utils-BJk4_43W.js} +22 -2
- package/dist/utils-BJk4_43W.js.map +1 -0
- package/package.json +9 -9
- package/dist/factory-BLQkEgxk.js.map +0 -1
- package/dist/index-cdL5k2sw.d.ts.map +0 -1
- package/dist/module-Db8mmgzN.js.map +0 -1
- package/dist/module-d1-9VDGb.js.map +0 -1
- package/dist/processor-kRJ48ypM.js.map +0 -1
- package/dist/utils-w_21RRK6.js.map +0 -1
|
@@ -24,7 +24,7 @@ const DocumentEditorEditor = {
|
|
|
24
24
|
//#region editors/processor-editor/module.ts
|
|
25
25
|
/** Document editor module for the "powerhouse/processor" document type */
|
|
26
26
|
const ProcessorModuleEditor = {
|
|
27
|
-
Component: lazy(() => import("./editor-
|
|
27
|
+
Component: lazy(() => import("./editor-CbT_8Z6A.js")),
|
|
28
28
|
documentTypes: ["powerhouse/processor"],
|
|
29
29
|
config: {
|
|
30
30
|
id: "processor-module-editor",
|
|
@@ -66,4 +66,4 @@ const VetraPackageEditor = {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
export { DocumentEditorEditor as a, ProcessorModuleEditor as i, VetraDriveApp as n, AppEditor as o, SubgraphModuleEditor as r, VetraPackageEditor as t };
|
|
68
68
|
|
|
69
|
-
//# sourceMappingURL=module-
|
|
69
|
+
//# sourceMappingURL=module-B6S4QGOx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-
|
|
1
|
+
{"version":3,"file":"module-B6S4QGOx.js","names":[],"sources":["../editors/app-editor/module.ts","../editors/document-editor/module.ts","../editors/processor-editor/module.ts","../editors/subgraph-editor/module.ts","../editors/vetra-drive-app/module.ts","../editors/vetra-package/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"../../document-models/app-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/app\" document type */\nexport const AppEditor: EditorModule<AppModuleDocument, AppModuleAction> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/app\"],\n config: {\n id: \"app-editor\",\n name: \"AppEditor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n DocumentEditorAction,\n DocumentEditorDocument,\n} from \"../../document-models/document-editor/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-editor\" document type */\nexport const DocumentEditorEditor: EditorModule<\n DocumentEditorDocument,\n DocumentEditorAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-editor\"],\n config: {\n id: \"document-editor-editor\",\n name: \"Document Editor Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"../../document-models/processor-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/processor\" document type */\nexport const ProcessorModuleEditor: EditorModule<\n ProcessorModuleDocument,\n ProcessorModuleAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/processor\"],\n config: {\n id: \"processor-module-editor\",\n name: \"Processor Module Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n SubgraphModuleAction,\n SubgraphModuleDocument,\n} from \"../../document-models/subgraph-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/subgraph\" document type */\nexport const SubgraphModuleEditor: EditorModule<\n SubgraphModuleDocument,\n SubgraphModuleAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/subgraph\"],\n config: {\n id: \"subgraph-module-editor\",\n name: \"Subgraph Module Editor\",\n },\n};\n","import type {\n DocumentDriveAction,\n DocumentDriveDocument,\n} from \"@powerhousedao/shared/document-drive\";\nimport type { EditorModule } from \"@powerhousedao/shared/document-model\";\nimport { lazy } from \"react\";\n\nexport const VetraDriveApp: EditorModule<\n DocumentDriveDocument,\n DocumentDriveAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-drive\"],\n config: {\n id: \"vetra-drive-app\",\n name: \"Vetra Drive App\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n VetraPackageAction,\n VetraPackageDocument,\n} from \"../../document-models/vetra-package/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/package\" document type */\nexport const VetraPackageEditor: EditorModule<\n VetraPackageDocument,\n VetraPackageAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/package\"],\n config: {\n id: \"vetra-package-editor\",\n name: \"Vetra Package Editor\",\n },\n};\n"],"mappings":";;;AAYA,MAAa,YAA8D;CACzE,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,gBAAgB;CAChC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACPA,MAAa,uBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACVA,MAAa,wBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACVA,MAAa,uBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;ACfA,MAAa,gBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,2BAA2B;CAC3C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACLA,MAAa,qBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,oBAAoB;CACpC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as reducer, p as actions, r as utils$1 } from "./utils-w_21RRK6.js";
|
|
1
|
+
import { f as reducer, g as actions, h as utils_exports, r as utils$1 } from "./utils-BJk4_43W.js";
|
|
3
2
|
import { createState, defaultBaseState } from "document-model";
|
|
4
3
|
//#region document-models/processor-module/v1/gen/document-model.ts
|
|
5
4
|
const documentModel = {
|
|
@@ -19,7 +18,7 @@ const documentModel = {
|
|
|
19
18
|
initialValue: ""
|
|
20
19
|
},
|
|
21
20
|
global: {
|
|
22
|
-
schema: "\"\"\"\nConfiguration for a processor contributed by the package. A processor receives\noperations from documents of matching types and runs server-side logic (e.g.\nbuilding a read model, indexing, syncing to an external system).\n\"\"\"\ntype ProcessorModuleState {\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\n name: String!\n \"\"\"Processor implementation kind
|
|
21
|
+
schema: "\"\"\"\nConfiguration for a processor contributed by the package. A processor receives\noperations from documents of matching types and runs server-side logic (e.g.\nbuilding a read model, indexing, syncing to an external system).\n\"\"\"\ntype ProcessorModuleState {\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\n name: String!\n \"\"\"Processor implementation kind: `analytics` or `relational`. Determines which scaffold codegen emits; codegen generates nothing for any other value.\"\"\"\n type: String!\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\n documentTypes: [DocumentTypeItem!]!\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\n status: StatusType!\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\n processorApps: [String!]!\n}\n\n\"\"\"A document type id (e.g. 'my-org/invoice') attached to the processor with a stable entry id.\"\"\"\ntype DocumentTypeItem {\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\n id: OID!\n \"\"\"Document type id this processor subscribes to.\"\"\"\n documentType: String!\n}\n\n\"\"\"\nLifecycle status of a module definition.\n- DRAFT: still being edited; codegen does not run.\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\n\"\"\"\nenum StatusType {\n DRAFT\n CONFIRMED\n}",
|
|
23
22
|
examples: [],
|
|
24
23
|
initialValue: "{\n \"name\": \"\",\n \"type\": \"\",\n \"documentTypes\": [],\n \"status\": \"DRAFT\",\n \"processorApps\": []\n}"
|
|
25
24
|
}
|
|
@@ -43,11 +42,17 @@ const documentModel = {
|
|
|
43
42
|
{
|
|
44
43
|
id: "b8f28bb4-c6ae-40e6-86fa-29ef14ff8667",
|
|
45
44
|
name: "SET_PROCESSOR_TYPE",
|
|
46
|
-
description: "Set the processor implementation kind
|
|
45
|
+
description: "Set the processor implementation kind: `analytics` or `relational`. Determines which scaffold codegen emits. Any other value is rejected with UnsupportedProcessorTypeError.",
|
|
47
46
|
schema: "input SetProcessorTypeInput {\n type: String!\n}",
|
|
48
47
|
template: "",
|
|
49
48
|
reducer: "",
|
|
50
|
-
errors: [
|
|
49
|
+
errors: [{
|
|
50
|
+
id: "ac9b9586-e2d5-4676-8c06-22890adcc2fd",
|
|
51
|
+
name: "UnsupportedProcessorTypeError",
|
|
52
|
+
code: "UNSUPPORTED_PROCESSOR_TYPE",
|
|
53
|
+
description: "The processor type is not `analytics` or `relational`, the kinds codegen can generate.",
|
|
54
|
+
template: ""
|
|
55
|
+
}],
|
|
51
56
|
examples: [],
|
|
52
57
|
scope: "global"
|
|
53
58
|
},
|
|
@@ -113,9 +118,6 @@ const documentModel = {
|
|
|
113
118
|
}]
|
|
114
119
|
};
|
|
115
120
|
//#endregion
|
|
116
|
-
//#region document-models/processor-module/v1/src/utils.ts
|
|
117
|
-
var utils_exports = /* @__PURE__ */ __exportAll({});
|
|
118
|
-
//#endregion
|
|
119
121
|
//#region document-models/processor-module/v1/utils.ts
|
|
120
122
|
/** Utils for the ProcessorModule document model */
|
|
121
123
|
const utils = {
|
|
@@ -135,4 +137,4 @@ const ProcessorModule = {
|
|
|
135
137
|
//#endregion
|
|
136
138
|
export { utils as n, documentModel as r, ProcessorModule as t };
|
|
137
139
|
|
|
138
|
-
//# sourceMappingURL=module-
|
|
140
|
+
//# sourceMappingURL=module-BktWa0rB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-BktWa0rB.js","names":["genUtils","customUtils"],"sources":["../document-models/processor-module/v1/gen/document-model.ts","../document-models/processor-module/v1/utils.ts","../document-models/processor-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/processor\",\n name: \"Processor Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".processor\",\n description:\n \"Declares a processor (a server-side function that reacts to document operations to build read models, send notifications, sync to external systems, etc.) shipped by a Vetra Reactor Package. Create one Processor Module document per processor: pick the processor type, list the document types it subscribes to, attach it to any drive apps that should run it, and mark it CONFIRMED to trigger codegen of the processor scaffold under `processors/`.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a processor contributed by the package. A processor receives\\noperations from documents of matching types and runs server-side logic (e.g.\\nbuilding a read model, indexing, syncing to an external system).\\n\"\"\"\\ntype ProcessorModuleState {\\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\\n name: String!\\n \"\"\"Processor implementation kind: `analytics` or `relational`. Determines which scaffold codegen emits; codegen generates nothing for any other value.\"\"\"\\n type: String!\\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\\n documentTypes: [DocumentTypeItem!]!\\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\\n processorApps: [String!]!\\n}\\n\\n\"\"\"A document type id (e.g. \\'my-org/invoice\\') attached to the processor with a stable entry id.\"\"\"\\ntype DocumentTypeItem {\\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Document type id this processor subscribes to.\"\"\"\\n documentType: String!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"type\": \"\",\\n \"documentTypes\": [],\\n \"status\": \"DRAFT\",\\n \"processorApps\": []\\n}',\n },\n },\n modules: [\n {\n id: \"91ad39c1-4e8b-4127-b3c8-e835b85e6360\",\n name: \"base_operations\",\n description:\n \"Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.\",\n operations: [\n {\n id: \"6f3a5c90-39f2-4302-a073-6195a71c5054\",\n name: \"SET_PROCESSOR_NAME\",\n description:\n \"Set the display name of the processor. Also determines the generated folder name under `processors/`.\",\n schema: \"input SetProcessorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b8f28bb4-c6ae-40e6-86fa-29ef14ff8667\",\n name: \"SET_PROCESSOR_TYPE\",\n description:\n \"Set the processor implementation kind: `analytics` or `relational`. Determines which scaffold codegen emits. Any other value is rejected with UnsupportedProcessorTypeError.\",\n schema: \"input SetProcessorTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [\n {\n id: \"ac9b9586-e2d5-4676-8c06-22890adcc2fd\",\n name: \"UnsupportedProcessorTypeError\",\n code: \"UNSUPPORTED_PROCESSOR_TYPE\",\n description:\n \"The processor type is not `analytics` or `relational`, the kinds codegen can generate.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"fbbd7a71-c495-4efc-b8f6-1e57798dbbb4\",\n name: \"ADD_DOCUMENT_TYPE\",\n description:\n \"Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddDocumentTypeInput {\\n id: OID!\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"544d413f-423c-4d97-9570-84a19bffeab9\",\n name: \"REMOVE_DOCUMENT_TYPE\",\n description:\n \"Unsubscribe the processor from a document type by removing its entry id.\",\n schema: \"input RemoveDocumentTypeInput {\\n id: OID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"df5eb500-7308-498c-9b80-028878ee198b\",\n name: \"ADD_PROCESSOR_APP\",\n description:\n \"Attach the processor to a drive app by name. The processor will run in the context of that app.\",\n schema:\n \"input AddProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"07e4168f-1a7b-41ef-953d-219028be7bb9\",\n name: \"REMOVE_PROCESSOR_APP\",\n description:\n \"Detach the processor from a drive app by name. No-op if the app is not currently attached.\",\n schema:\n \"input RemoveProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7b6706eb-5e25-4d64-829a-e3a251380fd1\",\n name: \"SET_PROCESSOR_STATUS\",\n description:\n \"Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetProcessorStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the ProcessorModule document model */\nexport const utils: DocumentModelUtils<ProcessorModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the ProcessorModule document type */\nexport const ProcessorModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<ProcessorModulePHState>;\n"],"mappings":";;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;CACX;CACA,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,CAAC;IACX,cAAc;GAChB;GACA,QAAQ;IACN,QACE;IACF,UAAU,CAAC;IACX,cACE;GACJ;EACF;EACA,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aACE;GACF,YAAY;IACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aACE;MACF,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;GACF;EACF,CACF;EACA,SAAS;EACT,WAAW,CAAC;CACd,CACF;AACF;;;;ACjIA,MAAa,QAAoD;CAC/D,GAAGA;CACH,GAAGC;AACL;;;;ACAA,MAAa,kBAAkB;CAC7B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,iBAAiB,GAAG,aAAa;AAC9D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as utils } from "./utils-
|
|
1
|
+
import { r as utils } from "./utils-BJk4_43W.js";
|
|
2
2
|
import { createBaseState, defaultBaseState } from "document-model";
|
|
3
3
|
//#region document-models/processor-module/v1/gen/ph-factories.ts
|
|
4
4
|
function defaultGlobalState() {
|
|
@@ -50,4 +50,4 @@ function createProcessorModuleDocument(state) {
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { defaultPHState as a, defaultLocalState as i, createState$1 as n, defaultGlobalState as r, createProcessorModuleDocument as t };
|
|
52
52
|
|
|
53
|
-
//# sourceMappingURL=ph-factories-
|
|
53
|
+
//# sourceMappingURL=ph-factories-fEke-Nr8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ph-factories-
|
|
1
|
+
{"version":3,"file":"ph-factories-fEke-Nr8.js","names":["createState"],"sources":["../document-models/processor-module/v1/gen/ph-factories.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating ProcessorModuleDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from \"document-model\";\nimport { createBaseState, defaultBaseState } from \"document-model\";\nimport type {\n ProcessorModuleDocument,\n ProcessorModuleGlobalState,\n ProcessorModuleLocalState,\n ProcessorModulePHState,\n} from \"./types.js\";\nimport { utils } from \"./utils.js\";\n\nexport function defaultGlobalState(): ProcessorModuleGlobalState {\n return {\n name: \"\",\n type: \"\",\n documentTypes: [],\n status: \"DRAFT\",\n processorApps: [],\n };\n}\n\nexport function defaultLocalState(): ProcessorModuleLocalState {\n return {};\n}\n\nexport function defaultPHState(): ProcessorModulePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<ProcessorModuleGlobalState>,\n): ProcessorModuleGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(\n state?: Partial<ProcessorModuleLocalState>,\n): ProcessorModuleLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as ProcessorModuleLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<ProcessorModuleGlobalState>,\n localState?: Partial<ProcessorModuleLocalState>,\n): ProcessorModulePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a ProcessorModuleDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createProcessorModuleDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<ProcessorModuleGlobalState>;\n local?: Partial<ProcessorModuleLocalState>;\n }>,\n): ProcessorModuleDocument {\n const document = utils.createDocument(\n state\n ? createState(\n createBaseState(state.auth, state.document),\n state.global,\n state.local,\n )\n : undefined,\n );\n\n return document;\n}\n"],"mappings":";;;AAeA,SAAgB,qBAAiD;CAC/D,OAAO;EACL,MAAM;EACN,MAAM;EACN,eAAe,CAAC;EAChB,QAAQ;EACR,eAAe,CAAC;CAClB;AACF;AAEA,SAAgB,oBAA+C;CAC7D,OAAO,CAAC;AACV;AAEA,SAAgB,iBAAyC;CACvD,OAAO;EACL,GAAG,iBAAiB;EACpB,QAAQ,mBAAmB;EAC3B,OAAO,kBAAkB;CAC3B;AACF;AAEA,SAAgB,kBACd,OAC4B;CAC5B,OAAO;EACL,GAAG,mBAAmB;EACtB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgB,iBACd,OAC2B;CAC3B,OAAO;EACL,GAAG,kBAAkB;EACrB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgBA,cACd,WACA,aACA,YACwB;CACxB,OAAO;EACL,GAAG,gBAAgB,WAAW,MAAM,WAAW,QAAQ;EACvD,QAAQ,kBAAkB,WAAW;EACrC,OAAO,iBAAiB,UAAU;CACpC;AACF;;;;;;AAOA,SAAgB,8BACd,OAMyB;CAWzB,OAViB,MAAM,eACrB,QACIA,cACE,gBAAgB,MAAM,MAAM,MAAM,QAAQ,GAC1C,MAAM,QACN,MAAM,KACR,IACA,KAAA,CAGQ;AAChB"}
|