@powerhousedao/vetra 6.0.0-dev.255 → 6.0.0-dev.257
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/app-module-D_cAVvt0.js +48 -0
- package/dist/app-module-D_cAVvt0.js.map +1 -0
- package/dist/codegen/index.d.ts +117 -0
- package/dist/codegen/index.d.ts.map +1 -0
- package/dist/codegen/index.js +793 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/{connect-CTIucT0o.js → connect-BRlVKs1s.js} +1 -1
- package/dist/{connect-CTIucT0o.js.map → connect-BRlVKs1s.js.map} +1 -1
- package/dist/document-editor-1NFr9t3a.js +48 -0
- package/dist/document-editor-1NFr9t3a.js.map +1 -0
- package/dist/document-models/app-module/index.d.ts +1 -1
- package/dist/document-models/app-module/index.js +4 -2
- package/dist/document-models/document-editor/index.d.ts +1 -1
- package/dist/document-models/document-editor/index.js +4 -2
- package/dist/document-models/index.d.ts +5 -5
- package/dist/document-models/index.js +5 -5
- package/dist/document-models/processor-module/index.d.ts +1 -1
- package/dist/document-models/processor-module/index.js +4 -2
- package/dist/document-models/subgraph-module/index.d.ts +1 -1
- package/dist/document-models/subgraph-module/index.js +4 -2
- package/dist/document-models/vetra-package/index.d.ts +1 -1
- package/dist/document-models/vetra-package/index.js +2 -2
- package/dist/{editor-CbtrPBTP.js → editor-BwbJ65NZ.js} +4 -4
- package/dist/{editor-CbtrPBTP.js.map → editor-BwbJ65NZ.js.map} +1 -1
- package/dist/{editor-BSQfwcdz.js → editor-CJAn9WTA.js} +4 -4
- package/dist/{editor-BSQfwcdz.js.map → editor-CJAn9WTA.js.map} +1 -1
- package/dist/{editor-D70FYIwV.js → editor-CLERZjRS.js} +1 -1
- package/dist/{editor-D70FYIwV.js.map → editor-CLERZjRS.js.map} +1 -1
- package/dist/{editor-Dtg8STyT.js → editor-DWufJcmG.js} +4 -4
- package/dist/{editor-Dtg8STyT.js.map → editor-DWufJcmG.js.map} +1 -1
- package/dist/{editor-SfVorwsP.js → editor-DabfMxkF.js} +4 -4
- package/dist/{editor-SfVorwsP.js.map → editor-DabfMxkF.js.map} +1 -1
- package/dist/{editor-Bku8e2dr.js → editor-WWMGVelM.js} +4 -4
- package/dist/{editor-Bku8e2dr.js.map → editor-WWMGVelM.js.map} +1 -1
- package/dist/editors/hooks/index.js +1 -1
- package/dist/editors/index.js +1 -1
- package/dist/{factory-D8ZDOMP3.js → factory-Bd_0OaF8.js} +2 -2
- package/dist/{factory-D8ZDOMP3.js.map → factory-Bd_0OaF8.js.map} +1 -1
- package/dist/{factory-BBzu0pRO.js → factory-CEzh-u5J.js} +5 -5
- package/dist/{factory-BBzu0pRO.js.map → factory-CEzh-u5J.js.map} +1 -1
- package/dist/{hooks-Xexr33XS.js → hooks-Btogj1f0.js} +1 -1
- package/dist/{hooks-Xexr33XS.js.map → hooks-Btogj1f0.js.map} +1 -1
- package/dist/{module-BYEvqA47.d.ts → index-BPoF8P3O.d.ts} +57 -57
- package/dist/index-BPoF8P3O.d.ts.map +1 -0
- package/dist/{module-CpP8D2Hl.d.ts → index-BoGed4Fa.d.ts} +88 -88
- package/dist/index-BoGed4Fa.d.ts.map +1 -0
- package/dist/{index-BfK0fsx4.d.ts → index-C4s0aLv3.d.ts} +49 -49
- package/dist/index-C4s0aLv3.d.ts.map +1 -0
- package/dist/{index-BdmD5tsW.d.ts → index-ClaOdn_F.d.ts} +46 -46
- package/dist/index-ClaOdn_F.d.ts.map +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/{logger-BLNtquAC.js → logger-CYkStoEb.js} +1 -1
- package/dist/{logger-BLNtquAC.js.map → logger-CYkStoEb.js.map} +1 -1
- package/dist/module-DPyV2vUY.js +138 -0
- package/dist/module-DPyV2vUY.js.map +1 -0
- package/dist/{module-CCqD26Hf.d.ts → module-Drla4Vmn.d.ts} +1 -1
- package/dist/{module-CCqD26Hf.d.ts.map → module-Drla4Vmn.d.ts.map} +1 -1
- package/dist/{module-CZLiUtDI.js → module-dDKBr6QY.js} +1 -1
- package/dist/{module-CZLiUtDI.js.map → module-dDKBr6QY.js.map} +1 -1
- package/dist/{module-CXIFrq-R.js → module-jWN6gsmi.js} +7 -7
- package/dist/{module-CXIFrq-R.js.map → module-jWN6gsmi.js.map} +1 -1
- package/dist/module-pK0hpO6c.js +131 -0
- package/dist/module-pK0hpO6c.js.map +1 -0
- package/dist/module-ryHOwQp-.js +105 -0
- package/dist/module-ryHOwQp-.js.map +1 -0
- package/dist/module-x2Liyk0-.js +80 -0
- package/dist/module-x2Liyk0-.js.map +1 -0
- package/dist/ph-factories-B0_E6LY6.js +53 -0
- package/dist/ph-factories-B0_E6LY6.js.map +1 -0
- package/dist/ph-factories-B6PSPkPQ.js +52 -0
- package/dist/ph-factories-B6PSPkPQ.js.map +1 -0
- package/dist/ph-factories-Bn_HTUfT.js +50 -0
- package/dist/ph-factories-Bn_HTUfT.js.map +1 -0
- package/dist/ph-factories-CJXfT_Z1.js +51 -0
- package/dist/ph-factories-CJXfT_Z1.js.map +1 -0
- package/dist/processor-module-B7IAItXQ.js +48 -0
- package/dist/processor-module-B7IAItXQ.js.map +1 -0
- package/dist/processors/codegen/index.d.ts +3 -21305
- package/dist/processors/codegen/index.d.ts.map +1 -1
- package/dist/processors/codegen/index.js +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/vetra-read-model/index.js +1 -1
- package/dist/subgraph-module-CfzSZTNC.js +48 -0
- package/dist/subgraph-module-CfzSZTNC.js.map +1 -0
- package/dist/switchboard-CIUZkhea.js +8 -0
- package/dist/{switchboard-D69j45OO.js.map → switchboard-CIUZkhea.js.map} +1 -1
- package/dist/{useVetraDocument-DoAwvHVi.js → useVetraDocument-BQKyels4.js} +1 -1
- package/dist/{useVetraDocument-DoAwvHVi.js.map → useVetraDocument-BQKyels4.js.map} +1 -1
- package/dist/{module-CTPfENDU.js → utils-BRx88WW3.js} +5 -130
- package/dist/utils-BRx88WW3.js.map +1 -0
- package/dist/{module-BWlCj_0C.js → utils-Byjf33qt.js} +5 -137
- package/dist/utils-Byjf33qt.js.map +1 -0
- package/dist/{module-BoGgbKmO.js → utils-CWO5kDus.js} +5 -79
- package/dist/utils-CWO5kDus.js.map +1 -0
- package/dist/{module-D0SK3Nds.js → utils-CnZc-0E4.js} +5 -104
- package/dist/utils-CnZc-0E4.js.map +1 -0
- package/dist/{vetra-package-YNLxEA-U.js → vetra-package-BgTjv343.js} +2 -2
- package/dist/{vetra-package-YNLxEA-U.js.map → vetra-package-BgTjv343.js.map} +1 -1
- package/package.json +12 -8
- package/dist/app-module-Bbj7PI-S.js +0 -94
- package/dist/app-module-Bbj7PI-S.js.map +0 -1
- package/dist/document-editor-DS-bZMKx.js +0 -93
- package/dist/document-editor-DS-bZMKx.js.map +0 -1
- package/dist/index-BdmD5tsW.d.ts.map +0 -1
- package/dist/index-BfK0fsx4.d.ts.map +0 -1
- package/dist/module-BWlCj_0C.js.map +0 -1
- package/dist/module-BYEvqA47.d.ts.map +0 -1
- package/dist/module-BoGgbKmO.js.map +0 -1
- package/dist/module-CTPfENDU.js.map +0 -1
- package/dist/module-CpP8D2Hl.d.ts.map +0 -1
- package/dist/module-D0SK3Nds.js.map +0 -1
- package/dist/processor-module-D0lRrrpW.js +0 -95
- package/dist/processor-module-D0lRrrpW.js.map +0 -1
- package/dist/subgraph-module-B3ipwOza.js +0 -92
- package/dist/subgraph-module-B3ipwOza.js.map +0 -1
- package/dist/switchboard-D69j45OO.js +0 -8
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-pbuEa-1d.js";
|
|
2
|
+
import { f as reducer, p as actions, r as utils$1 } from "./utils-Byjf33qt.js";
|
|
3
|
+
import { createState, defaultBaseState } from "document-model";
|
|
4
|
+
//#region document-models/processor-module/v1/gen/document-model.ts
|
|
5
|
+
const documentModel = {
|
|
6
|
+
id: "powerhouse/processor",
|
|
7
|
+
name: "Processor Module",
|
|
8
|
+
author: {
|
|
9
|
+
name: "Powerhouse",
|
|
10
|
+
website: "https://powerhouse.inc"
|
|
11
|
+
},
|
|
12
|
+
extension: ".processor",
|
|
13
|
+
description: "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/`.",
|
|
14
|
+
specifications: [{
|
|
15
|
+
state: {
|
|
16
|
+
local: {
|
|
17
|
+
schema: "",
|
|
18
|
+
examples: [],
|
|
19
|
+
initialValue: ""
|
|
20
|
+
},
|
|
21
|
+
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 (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\"\"\"\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
|
+
examples: [],
|
|
24
|
+
initialValue: "{\n \"name\": \"\",\n \"type\": \"\",\n \"documentTypes\": [],\n \"status\": \"DRAFT\",\n \"processorApps\": []\n}"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
modules: [{
|
|
28
|
+
id: "91ad39c1-4e8b-4127-b3c8-e835b85e6360",
|
|
29
|
+
name: "base_operations",
|
|
30
|
+
description: "Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.",
|
|
31
|
+
operations: [
|
|
32
|
+
{
|
|
33
|
+
id: "6f3a5c90-39f2-4302-a073-6195a71c5054",
|
|
34
|
+
name: "SET_PROCESSOR_NAME",
|
|
35
|
+
description: "Set the display name of the processor. Also determines the generated folder name under `processors/`.",
|
|
36
|
+
schema: "input SetProcessorNameInput {\n name: String!\n}",
|
|
37
|
+
template: "",
|
|
38
|
+
reducer: "",
|
|
39
|
+
errors: [],
|
|
40
|
+
examples: [],
|
|
41
|
+
scope: "global"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "b8f28bb4-c6ae-40e6-86fa-29ef14ff8667",
|
|
45
|
+
name: "SET_PROCESSOR_TYPE",
|
|
46
|
+
description: "Set the processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.",
|
|
47
|
+
schema: "input SetProcessorTypeInput {\n type: String!\n}",
|
|
48
|
+
template: "",
|
|
49
|
+
reducer: "",
|
|
50
|
+
errors: [],
|
|
51
|
+
examples: [],
|
|
52
|
+
scope: "global"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "fbbd7a71-c495-4efc-b8f6-1e57798dbbb4",
|
|
56
|
+
name: "ADD_DOCUMENT_TYPE",
|
|
57
|
+
description: "Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.",
|
|
58
|
+
schema: "input AddDocumentTypeInput {\n id: OID!\n documentType: String!\n}",
|
|
59
|
+
template: "",
|
|
60
|
+
reducer: "",
|
|
61
|
+
errors: [],
|
|
62
|
+
examples: [],
|
|
63
|
+
scope: "global"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "544d413f-423c-4d97-9570-84a19bffeab9",
|
|
67
|
+
name: "REMOVE_DOCUMENT_TYPE",
|
|
68
|
+
description: "Unsubscribe the processor from a document type by removing its entry id.",
|
|
69
|
+
schema: "input RemoveDocumentTypeInput {\n id: OID!\n}",
|
|
70
|
+
template: "",
|
|
71
|
+
reducer: "",
|
|
72
|
+
errors: [],
|
|
73
|
+
examples: [],
|
|
74
|
+
scope: "global"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "df5eb500-7308-498c-9b80-028878ee198b",
|
|
78
|
+
name: "ADD_PROCESSOR_APP",
|
|
79
|
+
description: "Attach the processor to a drive app by name. The processor will run in the context of that app.",
|
|
80
|
+
schema: "input AddProcessorAppInput {\n processorApp: String!\n}",
|
|
81
|
+
template: "",
|
|
82
|
+
reducer: "",
|
|
83
|
+
errors: [],
|
|
84
|
+
examples: [],
|
|
85
|
+
scope: "global"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "07e4168f-1a7b-41ef-953d-219028be7bb9",
|
|
89
|
+
name: "REMOVE_PROCESSOR_APP",
|
|
90
|
+
description: "Detach the processor from a drive app by name. No-op if the app is not currently attached.",
|
|
91
|
+
schema: "input RemoveProcessorAppInput {\n processorApp: String!\n}",
|
|
92
|
+
template: "",
|
|
93
|
+
reducer: "",
|
|
94
|
+
errors: [],
|
|
95
|
+
examples: [],
|
|
96
|
+
scope: "global"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: "7b6706eb-5e25-4d64-829a-e3a251380fd1",
|
|
100
|
+
name: "SET_PROCESSOR_STATUS",
|
|
101
|
+
description: "Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.",
|
|
102
|
+
schema: "input SetProcessorStatusInput {\n status: StatusType!\n}",
|
|
103
|
+
template: "",
|
|
104
|
+
reducer: "",
|
|
105
|
+
errors: [],
|
|
106
|
+
examples: [],
|
|
107
|
+
scope: "global"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}],
|
|
111
|
+
version: 1,
|
|
112
|
+
changeLog: []
|
|
113
|
+
}]
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region document-models/processor-module/v1/src/utils.ts
|
|
117
|
+
var utils_exports = /* @__PURE__ */ __exportAll({});
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region document-models/processor-module/v1/utils.ts
|
|
120
|
+
/** Utils for the ProcessorModule document model */
|
|
121
|
+
const utils = {
|
|
122
|
+
...utils$1,
|
|
123
|
+
...utils_exports
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region document-models/processor-module/v1/module.ts
|
|
127
|
+
/** Document model module for the ProcessorModule document type */
|
|
128
|
+
const ProcessorModule = {
|
|
129
|
+
version: 1,
|
|
130
|
+
reducer,
|
|
131
|
+
actions,
|
|
132
|
+
utils,
|
|
133
|
+
documentModel: createState(defaultBaseState(), documentModel)
|
|
134
|
+
};
|
|
135
|
+
//#endregion
|
|
136
|
+
export { utils as n, documentModel as r, ProcessorModule as t };
|
|
137
|
+
|
|
138
|
+
//# sourceMappingURL=module-DPyV2vUY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-DPyV2vUY.js","names":["genUtils","customUtils"],"sources":["../document-models/processor-module/v1/gen/document-model.ts","../document-models/processor-module/v1/src/utils.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 (e.g. \\'read-model\\', \\'relational-db\\'). Determines which scaffold codegen emits.\"\"\"\\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 (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\",\n schema: \"input SetProcessorTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\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","export {};\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;EACV;CACD,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,EAAE;IACZ,cAAc;IACf;GACD,QAAQ;IACN,QACE;IACF,UAAU,EAAE;IACZ,cACE;IACH;GACF;EACD,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,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACF;GACF,CACF;EACD,SAAS;EACT,WAAW,EAAE;EACd,CACF;CACF;;;;;;;AExHD,MAAa,QAAoD;CAC/D,GAAGA;CACH,GAAGC;CACJ;;;;ACAD,MAAa,kBAAkB;CAC7B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
|
|
@@ -475,4 +475,4 @@ declare const VetraPackage: {
|
|
|
475
475
|
};
|
|
476
476
|
//#endregion
|
|
477
477
|
export { VetraPackageDocument as $, vetraPackageDocumentType as A, SetPackageDescriptionAction as At, creators_d_exports as B, isDefinedNonNullAny as C, VetraPackageAction as Ct, defaultGlobalState as D, SetPackageAuthorNameAction as Dt, createVetraPackageDocument as E, SetPackageAuthorAction as Et, assertIsVetraPackageState as F, setPackageCategory as G, setPackageAuthor as H, isVetraPackageDocument as I, setPackageName as J, setPackageDescription as K, isVetraPackageState as L, VetraPackageDocumentSchema as M, SetPackageNameAction as Mt, VetraPackagePHStateSchema as N, SetPackageNpmUrlAction as Nt, defaultLocalState as O, SetPackageAuthorWebsiteAction as Ot, assertIsVetraPackageDocument as P, VetraPackageBaseOperationsAction as Pt, actions as Q, documentModel as R, definedNonNullAnySchema as S, VetraPackageState as St, createState$1 as T, RemovePackageKeywordAction as Tt, setPackageAuthorName as U, removePackageKeyword as V, setPackageAuthorWebsite as W, VetraPackageController as X, setPackageNpmUrl as Y, VetraPackageBaseOperationsOperations as Z, SetPackageDescriptionInputSchema as _, SetPackageCategoryInput as _t, useVetraPackageDocumentsInSelectedDrive as a, Incremental as at, SetPackageNpmUrlInputSchema as b, SetPackageNameInput as bt, initialLocalState as c, MakeEmpty as ct, KeywordSchema as d, Maybe as dt, VetraPackageLocalState as et, RemovePackageKeywordInputSchema as f, RemovePackageKeywordInput as ft, SetPackageCategoryInputSchema as g, SetPackageAuthorWebsiteInput as gt, SetPackageAuthorWebsiteInputSchema as h, SetPackageAuthorNameInput as ht, useVetraPackageDocumentById as i, Exact as it, VetraPackageDocumentHeaderSchema as j, SetPackageGithubUrlAction as jt, defaultPHState as k, SetPackageCategoryAction as kt, AddPackageKeywordInputSchema as l, MakeMaybe as lt, SetPackageAuthorNameInputSchema as m, SetPackageAuthorInput as mt, utils as n, AddPackageKeywordInput as nt, useVetraPackageDocumentsInSelectedFolder as o, InputMaybe as ot, SetPackageAuthorInputSchema as p, Scalars as pt, setPackageGithubUrl as q, useSelectedVetraPackageDocument as r, Author as rt, initialGlobalState as s, Keyword as st, VetraPackage as t, VetraPackagePHState as tt, AuthorSchema as u, MakeOptional as ut, SetPackageGithubUrlInputSchema as v, SetPackageDescriptionInput as vt, reducer as w, AddPackageKeywordAction as wt, VetraPackageStateSchema as x, SetPackageNpmUrlInput as xt, SetPackageNameInputSchema as y, SetPackageGithubUrlInput as yt, addPackageKeyword as z };
|
|
478
|
-
//# sourceMappingURL=module-
|
|
478
|
+
//# sourceMappingURL=module-Drla4Vmn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-
|
|
1
|
+
{"version":3,"file":"module-Drla4Vmn.d.ts","names":[],"sources":["../document-models/vetra-package/v1/gen/base-operations/actions.ts","../document-models/vetra-package/v1/gen/actions.ts","../document-models/vetra-package/v1/gen/schema/types.ts","../document-models/vetra-package/v1/gen/types.ts","../document-models/vetra-package/v1/actions.ts","../document-models/vetra-package/v1/gen/base-operations/operations.ts","../document-models/vetra-package/v1/gen/controller.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/document-type.ts","../document-models/vetra-package/v1/gen/ph-factories.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/hooks.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"mappings":";;;;;;;KAkBY,oBAAA,GAAuB,MAAA;EACjC,IAAA;EACA,KAAA,EAAO,mBAAA;AAAA;AAAA,KAEG,2BAAA,GAA8B,MAAA;EACxC,IAAA;EACA,KAAA,EAAO,0BAAA;AAAA;AAAA,KAEG,wBAAA,GAA2B,MAAA;EACrC,IAAA;EACA,KAAA,EAAO,uBAAA;AAAA;AAAA,KAEG,sBAAA,GAAyB,MAAA;EACnC,IAAA;EACA,KAAA,EAAO,qBAAA;AAAA;AAAA,KAEG,0BAAA,GAA6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;cCvC3C,KAAA,EAAO,kBAAA,CAAmB,mBAAA;;;;cCG1B,YAAA;EAAA;;;qBAOwb,KAAA,0BAA0B,oBAAA;4BAA6L,KAAA,EAA7L,0BAAA,KAA8N,2BAAA;yBAA+M,KAAA,EAA/M,uBAAA,KAA6O,wBAAA;uBAAoM,KAAA,EAApM,qBAAA,KAAgO,sBAAA;2BAAkM,KAAA,EAAlM,yBAAA,KAAkO,0BAAA;8BAAkN,KAAA,EAAlN,4BAAA,KAAqP,6BAAA;wBAAqN,KAAA,EAArN,sBAAA,KAAkP,uBAAA;2BAAqM,KAAA,EAArM,yBAAA,KAAqO,0BAAA;0BAA6M,KAAA,EAA7M,wBAAA,KAA4O,yBAAA;uBAAwM,KAAA,EAAxM,qBAAA,KAAoO,sBAAA;;;UAAA,eAAA,CAAA,aAAA;;;;2BAAsgR,KAAA,8BAAgB,UAAA;2BAA0C,KAAA,cAA1C,eAAA,CAA0D,UAAA;4BAA2C,GAAA,WAAc,KAAA,cAAzD,eAAA,CAAyE,iBAAA;+BAAA,eAAA,CAAA,WAAA;;;8CAAkM,UAAA;EAAA;EAAA"}
|
|
@@ -454,4 +454,4 @@ const VetraPackage = {
|
|
|
454
454
|
//#endregion
|
|
455
455
|
export { KeywordSchema as A, VetraPackageStateSchema as B, setPackageCategory as C, setPackageNpmUrl as D, setPackageName as E, SetPackageCategoryInputSchema as F, isDefinedNonNullAny as H, SetPackageDescriptionInputSchema as I, SetPackageGithubUrlInputSchema as L, SetPackageAuthorInputSchema as M, SetPackageAuthorNameInputSchema as N, AddPackageKeywordInputSchema as O, SetPackageAuthorWebsiteInputSchema as P, SetPackageNameInputSchema as R, setPackageAuthorWebsite as S, setPackageGithubUrl as T, definedNonNullAnySchema as V, addPackageKeyword as _, utils$1 as a, setPackageAuthor as b, VetraPackagePHStateSchema as c, isVetraPackageDocument as d, isVetraPackageState as f, actions as g, documentModel as h, initialLocalState as i, RemovePackageKeywordInputSchema as j, AuthorSchema as k, assertIsVetraPackageDocument as l, reducer as m, utils as n, VetraPackageDocumentHeaderSchema as o, vetraPackageDocumentType as p, initialGlobalState as r, VetraPackageDocumentSchema as s, VetraPackage as t, assertIsVetraPackageState as u, creators_exports as v, setPackageDescription as w, setPackageAuthorName as x, removePackageKeyword as y, SetPackageNpmUrlInputSchema as z };
|
|
456
456
|
|
|
457
|
-
//# sourceMappingURL=module-
|
|
457
|
+
//# sourceMappingURL=module-dDKBr6QY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-CZLiUtDI.js","names":["z","vetraPackageBaseOperationsActions","utils","genUtils","customUtils"],"sources":["../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/actions.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/src/reducers/base-operations.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/document-type.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/src/utils.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddPackageKeywordInput,\n Author,\n Keyword,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n VetraPackageState,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddPackageKeywordInputSchema(): z.ZodObject<\n Properties<AddPackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function KeywordSchema(): z.ZodObject<Properties<Keyword>> {\n return z.object({\n __typename: z.literal(\"Keyword\").optional(),\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function RemovePackageKeywordInputSchema(): z.ZodObject<\n Properties<RemovePackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetPackageAuthorInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorInput>\n> {\n return z.object({\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function SetPackageAuthorNameInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorWebsiteInput>\n> {\n return z.object({\n website: z.url(),\n });\n}\n\nexport function SetPackageCategoryInputSchema(): z.ZodObject<\n Properties<SetPackageCategoryInput>\n> {\n return z.object({\n category: z.string(),\n });\n}\n\nexport function SetPackageDescriptionInputSchema(): z.ZodObject<\n Properties<SetPackageDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetPackageGithubUrlInputSchema(): z.ZodObject<\n Properties<SetPackageGithubUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function SetPackageNameInputSchema(): z.ZodObject<\n Properties<SetPackageNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageNpmUrlInputSchema(): z.ZodObject<\n Properties<SetPackageNpmUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function VetraPackageStateSchema(): z.ZodObject<\n Properties<VetraPackageState>\n> {\n return z.object({\n __typename: z.literal(\"VetraPackageState\").optional(),\n author: z.lazy(() => AuthorSchema()),\n category: z.string().nullish(),\n description: z.string().nullish(),\n githubUrl: z.url().nullish(),\n keywords: z.array(z.lazy(() => KeywordSchema())),\n name: z.string().nullish(),\n npmUrl: z.url().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddPackageKeywordInput,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n} from \"../types.js\";\nimport type {\n AddPackageKeywordAction,\n RemovePackageKeywordAction,\n SetPackageAuthorAction,\n SetPackageAuthorNameAction,\n SetPackageAuthorWebsiteAction,\n SetPackageCategoryAction,\n SetPackageDescriptionAction,\n SetPackageGithubUrlAction,\n SetPackageNameAction,\n SetPackageNpmUrlAction,\n} from \"./actions.js\";\n\nexport const setPackageName = (input: SetPackageNameInput) =>\n createAction<SetPackageNameAction>(\n \"SET_PACKAGE_NAME\",\n { ...input },\n undefined,\n SetPackageNameInputSchema,\n \"global\",\n );\n\nexport const setPackageDescription = (input: SetPackageDescriptionInput) =>\n createAction<SetPackageDescriptionAction>(\n \"SET_PACKAGE_DESCRIPTION\",\n { ...input },\n undefined,\n SetPackageDescriptionInputSchema,\n \"global\",\n );\n\nexport const setPackageCategory = (input: SetPackageCategoryInput) =>\n createAction<SetPackageCategoryAction>(\n \"SET_PACKAGE_CATEGORY\",\n { ...input },\n undefined,\n SetPackageCategoryInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthor = (input: SetPackageAuthorInput) =>\n createAction<SetPackageAuthorAction>(\n \"SET_PACKAGE_AUTHOR\",\n { ...input },\n undefined,\n SetPackageAuthorInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorName = (input: SetPackageAuthorNameInput) =>\n createAction<SetPackageAuthorNameAction>(\n \"SET_PACKAGE_AUTHOR_NAME\",\n { ...input },\n undefined,\n SetPackageAuthorNameInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorWebsite = (input: SetPackageAuthorWebsiteInput) =>\n createAction<SetPackageAuthorWebsiteAction>(\n \"SET_PACKAGE_AUTHOR_WEBSITE\",\n { ...input },\n undefined,\n SetPackageAuthorWebsiteInputSchema,\n \"global\",\n );\n\nexport const addPackageKeyword = (input: AddPackageKeywordInput) =>\n createAction<AddPackageKeywordAction>(\n \"ADD_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n AddPackageKeywordInputSchema,\n \"global\",\n );\n\nexport const removePackageKeyword = (input: RemovePackageKeywordInput) =>\n createAction<RemovePackageKeywordAction>(\n \"REMOVE_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n RemovePackageKeywordInputSchema,\n \"global\",\n );\n\nexport const setPackageGithubUrl = (input: SetPackageGithubUrlInput) =>\n createAction<SetPackageGithubUrlAction>(\n \"SET_PACKAGE_GITHUB_URL\",\n { ...input },\n undefined,\n SetPackageGithubUrlInputSchema,\n \"global\",\n );\n\nexport const setPackageNpmUrl = (input: SetPackageNpmUrlInput) =>\n createAction<SetPackageNpmUrlAction>(\n \"SET_PACKAGE_NPM_URL\",\n { ...input },\n undefined,\n SetPackageNpmUrlInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport { vetraPackageBaseOperationsActions } from \"./gen/creators.js\";\n\n/** Actions for the VetraPackage document model */\n\nexport const actions = { ...baseActions, ...vetraPackageBaseOperationsActions };\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/package\",\n name: \"Vetra Package\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".pkg\",\n description:\n \"Manifest for a Vetra Reactor Package: bundles the metadata (name, description, category, author, keywords, source links) used to publish and discover the package in the Powerhouse ecosystem. Create one Vetra Package document per project; the document models, editors, processors, and subgraphs you add to the project are registered against this package at build time.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nPackage metadata used to publish a Vetra Reactor Package to npm and surface\\nit inside Connect/Switchboard. All fields are optional so a package can be\\ncreated empty and filled in incrementally during development.\\n\"\"\"\\ntype VetraPackageState {\\n \"\"\"Human-readable package name (e.g. \\'Pizza Plaza\\'). Distinct from the npm package id.\"\"\"\\n name: String\\n \"\"\"One-paragraph summary of what the package provides. Shown on package listing pages.\"\"\"\\n description: String\\n \"\"\"Free-form category label used to group packages in directories (e.g. \\'Finance\\', \\'Productivity\\').\"\"\"\\n category: String\\n \"\"\"Author/maintainer information surfaced in the published package metadata.\"\"\"\\n author: Author!\\n \"\"\"Search keywords associated with the package. Each keyword has a stable id so it can be removed individually.\"\"\"\\n keywords: [Keyword!]!\\n \"\"\"Public source code URL (typically a GitHub repository).\"\"\"\\n githubUrl: URL\\n \"\"\"Published npm package URL. Set once the package has been released.\"\"\"\\n npmUrl: URL\\n}\\n\\n\"\"\"Author/maintainer of the Vetra Package.\"\"\"\\ntype Author {\\n \"\"\"Display name of the author or organization.\"\"\"\\n name: String\\n \"\"\"Author\\'s website URL.\"\"\"\\n website: URL\\n}\\n\\n\"\"\"A single search keyword attached to the package.\"\"\"\\ntype Keyword {\\n \"\"\"Stable identifier for the keyword entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Display label for the keyword (e.g. \\'invoicing\\', \\'defi\\').\"\"\"\\n label: String!\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": null,\\n \"description\": null,\\n \"category\": null,\\n \"author\": {\\n \"name\": null,\\n \"website\": null\\n },\\n \"keywords\": [],\\n \"githubUrl\": null,\\n \"npmUrl\": null\\n}',\n },\n },\n modules: [\n {\n id: \"a6156f32-8120-43a5-be8b-51c7feaa3460\",\n name: \"base_operations\",\n description:\n \"Setters for the package's identity, author, keywords, and source/distribution links.\",\n operations: [\n {\n id: \"33f2eab7-9e07-497f-a4e6-53e50968c3c9\",\n name: \"SET_PACKAGE_NAME\",\n description:\n \"Set the human-readable package name shown in listings and the Connect UI.\",\n schema: \"input SetPackageNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"a07bee80-c2a8-40d7-891b-822ee298d7d9\",\n name: \"SET_PACKAGE_DESCRIPTION\",\n description:\n \"Set the one-paragraph summary describing what the package does.\",\n schema:\n \"input SetPackageDescriptionInput {\\n description: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"f3ad82f8-580a-4c6e-b930-e203cda998bb\",\n name: \"SET_PACKAGE_CATEGORY\",\n description:\n 'Set the category label used to group the package in directories (e.g. \"Finance\", \"Productivity\").',\n schema: \"input SetPackageCategoryInput {\\n category: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"67f43579-ce98-47e6-bf48-27c0f44818b9\",\n name: \"SET_PACKAGE_AUTHOR\",\n description:\n \"Replace the author block in a single call. Either field may be omitted to clear it.\",\n schema:\n \"input SetPackageAuthorInput {\\n name: OID\\n website: URL\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"94ba44c4-9627-405e-9ea2-34e9da1c283a\",\n name: \"SET_PACKAGE_AUTHOR_NAME\",\n description:\n \"Set only the author's display name without touching the website field.\",\n schema: \"input SetPackageAuthorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"3d5c08df-6c14-480b-915b-875941979fd0\",\n name: \"SET_PACKAGE_AUTHOR_WEBSITE\",\n description:\n \"Set only the author's website URL without touching the name field.\",\n schema:\n \"input SetPackageAuthorWebsiteInput {\\n website: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"ed95f841-6fd0-4552-898d-e915599b7495\",\n name: \"ADD_PACKAGE_KEYWORD\",\n description:\n \"Append a search keyword. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddPackageKeywordInput {\\n id: String!\\n label: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83c4db24-bd2f-424d-9e26-751580d6307b\",\n name: \"REMOVE_PACKAGE_KEYWORD\",\n description:\n \"Remove a keyword by its id. No-op if the id does not exist.\",\n schema: \"input RemovePackageKeywordInput {\\n id: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83a90530-8535-4ea7-ab53-7865532398f7\",\n name: \"SET_PACKAGE_GITHUB_URL\",\n description:\n \"Set the public source code URL (typically a GitHub repository).\",\n schema: \"input SetPackageGithubUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"e789859a-01ee-4b60-8e7e-a3ad928a26d1\",\n name: \"SET_PACKAGE_NPM_URL\",\n description:\n \"Set the published npm package URL once the package has been released.\",\n schema: \"input SetPackageNpmUrlInput {\\n url: URL!\\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","import type { VetraPackageBaseOperationsOperations } from \"document-models/vetra-package/v1\";\n\nexport const vetraPackageBaseOperationsOperations: VetraPackageBaseOperationsOperations =\n {\n setPackageNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setPackageDescriptionOperation(state, action, dispatch) {\n state.description = action.input.description;\n },\n setPackageCategoryOperation(state, action, dispatch) {\n state.category = action.input.category;\n },\n setPackageAuthorOperation(state, action, dispatch) {\n state.author = {\n name: action.input.name ?? null,\n website: action.input.website ?? null,\n };\n },\n setPackageAuthorNameOperation(state, action, dispatch) {\n state.author.name = action.input.name;\n },\n setPackageAuthorWebsiteOperation(state, action, dispatch) {\n state.author.website = action.input.website;\n },\n addPackageKeywordOperation(state, action, dispatch) {\n // Check for duplicate ID\n const existingId = state.keywords.find(\n (keyword) => keyword.id === action.input.id,\n );\n if (existingId) {\n throw new Error(`Keyword with id \"${action.input.id}\" already exists`);\n }\n\n state.keywords.push(action.input);\n },\n removePackageKeywordOperation(state, action, dispatch) {\n state.keywords = state.keywords.filter(\n (keyword) => keyword.id !== action.input.id,\n );\n },\n setPackageGithubUrlOperation(state, action, dispatch) {\n state.githubUrl = action.input.url;\n },\n setPackageNpmUrlOperation(state, action, dispatch) {\n state.npmUrl = action.input.url;\n },\n };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { VetraPackagePHState } from \"document-models/vetra-package/v1\";\n\nimport { vetraPackageBaseOperationsOperations } from \"../src/reducers/base-operations.js\";\n\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"./schema/zod.js\";\n\nconst stateReducer: StateReducer<VetraPackagePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_PACKAGE_NAME\": {\n SetPackageNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_DESCRIPTION\": {\n SetPackageDescriptionInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageDescriptionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_CATEGORY\": {\n SetPackageCategoryInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageCategoryOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR\": {\n SetPackageAuthorInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_NAME\": {\n SetPackageAuthorNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_WEBSITE\": {\n SetPackageAuthorWebsiteInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorWebsiteOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_PACKAGE_KEYWORD\": {\n AddPackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.addPackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_PACKAGE_KEYWORD\": {\n RemovePackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.removePackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_GITHUB_URL\": {\n SetPackageGithubUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageGithubUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_NPM_URL\": {\n SetPackageNpmUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNpmUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<VetraPackagePHState> =\n createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const vetraPackageDocumentType = \"powerhouse/package\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { VetraPackageStateSchema } from \"./schema/zod.js\";\nimport type { VetraPackageDocument, VetraPackagePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a VetraPackage document */\nexport const VetraPackageDocumentHeaderSchema = BaseDocumentHeaderSchema.extend(\n {\n documentType: z.literal(vetraPackageDocumentType),\n },\n);\n\n/** Schema for validating the state object of a VetraPackage document */\nexport const VetraPackagePHStateSchema = BaseDocumentStateSchema.extend({\n global: VetraPackageStateSchema(),\n});\n\nexport const VetraPackageDocumentSchema = z.object({\n header: VetraPackageDocumentHeaderSchema,\n state: VetraPackagePHStateSchema,\n initialState: VetraPackagePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a VetraPackage document state object */\nexport function isVetraPackageState(\n state: unknown,\n): state is VetraPackagePHState {\n return VetraPackagePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a VetraPackage document state object */\nexport function assertIsVetraPackageState(\n state: unknown,\n): asserts state is VetraPackagePHState {\n VetraPackagePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a VetraPackage document */\nexport function isVetraPackageDocument(\n document: unknown,\n): document is VetraPackageDocument {\n return VetraPackageDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a VetraPackage document */\nexport function assertIsVetraPackageDocument(\n document: unknown,\n): asserts document is VetraPackageDocument {\n VetraPackageDocumentSchema.parse(document);\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 {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n generateId,\n} from \"document-model\";\nimport {\n assertIsVetraPackageDocument,\n assertIsVetraPackageState,\n isVetraPackageDocument,\n isVetraPackageState,\n} from \"./document-schema.js\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n VetraPackageGlobalState,\n VetraPackageLocalState,\n VetraPackagePHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: VetraPackageGlobalState = {\n name: null,\n description: null,\n category: null,\n author: {\n name: null,\n website: null,\n },\n keywords: [],\n githubUrl: null,\n npmUrl: null,\n};\nexport const initialLocalState: VetraPackageLocalState = {};\n\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n fileExtension: \".pkg\",\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n const document = baseCreateDocument(utils.createState, state);\n\n document.header.documentType = vetraPackageDocumentType;\n\n // for backwards compatibility, but this is NOT a valid signed document id\n document.header.id = generateId();\n\n return document;\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isVetraPackageState(state);\n },\n assertIsStateOfType(state) {\n return assertIsVetraPackageState(state);\n },\n isDocumentOfType(document) {\n return isVetraPackageDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsVetraPackageDocument(document);\n },\n};\n","export {};\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 { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the VetraPackage document model */\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\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 { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the VetraPackage document type */\nexport const VetraPackage = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<VetraPackagePHState>;\n"],"mappings":";;;;;AAyBA,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0BA,IACpC,KAAK,CACL,QAAQ,MAAM,oBAAoB,EAAE,CAAC;AAExC,SAAgB,+BAEd;AACA,QAAOA,IAAE,OAAO;EACd,IAAIA,IAAE,QAAQ;EACd,OAAOA,IAAE,QAAQ;EAClB,CAAC;;AAGJ,SAAgB,eAAgD;AAC9D,QAAOA,IAAE,OAAO;EACd,YAAYA,IAAE,QAAQ,SAAS,CAAC,UAAU;EAC1C,MAAMA,IAAE,QAAQ,CAAC,SAAS;EAC1B,SAASA,IAAE,KAAK,CAAC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ACAD,MAAa,eAAe;CAC1B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
|
|
1
|
+
{"version":3,"file":"module-dDKBr6QY.js","names":["z","vetraPackageBaseOperationsActions","utils","genUtils","customUtils"],"sources":["../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/actions.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/src/reducers/base-operations.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/document-type.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/src/utils.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddPackageKeywordInput,\n Author,\n Keyword,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n VetraPackageState,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddPackageKeywordInputSchema(): z.ZodObject<\n Properties<AddPackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function KeywordSchema(): z.ZodObject<Properties<Keyword>> {\n return z.object({\n __typename: z.literal(\"Keyword\").optional(),\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function RemovePackageKeywordInputSchema(): z.ZodObject<\n Properties<RemovePackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetPackageAuthorInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorInput>\n> {\n return z.object({\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function SetPackageAuthorNameInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorWebsiteInput>\n> {\n return z.object({\n website: z.url(),\n });\n}\n\nexport function SetPackageCategoryInputSchema(): z.ZodObject<\n Properties<SetPackageCategoryInput>\n> {\n return z.object({\n category: z.string(),\n });\n}\n\nexport function SetPackageDescriptionInputSchema(): z.ZodObject<\n Properties<SetPackageDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetPackageGithubUrlInputSchema(): z.ZodObject<\n Properties<SetPackageGithubUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function SetPackageNameInputSchema(): z.ZodObject<\n Properties<SetPackageNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageNpmUrlInputSchema(): z.ZodObject<\n Properties<SetPackageNpmUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function VetraPackageStateSchema(): z.ZodObject<\n Properties<VetraPackageState>\n> {\n return z.object({\n __typename: z.literal(\"VetraPackageState\").optional(),\n author: z.lazy(() => AuthorSchema()),\n category: z.string().nullish(),\n description: z.string().nullish(),\n githubUrl: z.url().nullish(),\n keywords: z.array(z.lazy(() => KeywordSchema())),\n name: z.string().nullish(),\n npmUrl: z.url().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddPackageKeywordInput,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n} from \"../types.js\";\nimport type {\n AddPackageKeywordAction,\n RemovePackageKeywordAction,\n SetPackageAuthorAction,\n SetPackageAuthorNameAction,\n SetPackageAuthorWebsiteAction,\n SetPackageCategoryAction,\n SetPackageDescriptionAction,\n SetPackageGithubUrlAction,\n SetPackageNameAction,\n SetPackageNpmUrlAction,\n} from \"./actions.js\";\n\nexport const setPackageName = (input: SetPackageNameInput) =>\n createAction<SetPackageNameAction>(\n \"SET_PACKAGE_NAME\",\n { ...input },\n undefined,\n SetPackageNameInputSchema,\n \"global\",\n );\n\nexport const setPackageDescription = (input: SetPackageDescriptionInput) =>\n createAction<SetPackageDescriptionAction>(\n \"SET_PACKAGE_DESCRIPTION\",\n { ...input },\n undefined,\n SetPackageDescriptionInputSchema,\n \"global\",\n );\n\nexport const setPackageCategory = (input: SetPackageCategoryInput) =>\n createAction<SetPackageCategoryAction>(\n \"SET_PACKAGE_CATEGORY\",\n { ...input },\n undefined,\n SetPackageCategoryInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthor = (input: SetPackageAuthorInput) =>\n createAction<SetPackageAuthorAction>(\n \"SET_PACKAGE_AUTHOR\",\n { ...input },\n undefined,\n SetPackageAuthorInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorName = (input: SetPackageAuthorNameInput) =>\n createAction<SetPackageAuthorNameAction>(\n \"SET_PACKAGE_AUTHOR_NAME\",\n { ...input },\n undefined,\n SetPackageAuthorNameInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorWebsite = (input: SetPackageAuthorWebsiteInput) =>\n createAction<SetPackageAuthorWebsiteAction>(\n \"SET_PACKAGE_AUTHOR_WEBSITE\",\n { ...input },\n undefined,\n SetPackageAuthorWebsiteInputSchema,\n \"global\",\n );\n\nexport const addPackageKeyword = (input: AddPackageKeywordInput) =>\n createAction<AddPackageKeywordAction>(\n \"ADD_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n AddPackageKeywordInputSchema,\n \"global\",\n );\n\nexport const removePackageKeyword = (input: RemovePackageKeywordInput) =>\n createAction<RemovePackageKeywordAction>(\n \"REMOVE_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n RemovePackageKeywordInputSchema,\n \"global\",\n );\n\nexport const setPackageGithubUrl = (input: SetPackageGithubUrlInput) =>\n createAction<SetPackageGithubUrlAction>(\n \"SET_PACKAGE_GITHUB_URL\",\n { ...input },\n undefined,\n SetPackageGithubUrlInputSchema,\n \"global\",\n );\n\nexport const setPackageNpmUrl = (input: SetPackageNpmUrlInput) =>\n createAction<SetPackageNpmUrlAction>(\n \"SET_PACKAGE_NPM_URL\",\n { ...input },\n undefined,\n SetPackageNpmUrlInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport { vetraPackageBaseOperationsActions } from \"./gen/creators.js\";\n\n/** Actions for the VetraPackage document model */\n\nexport const actions = { ...baseActions, ...vetraPackageBaseOperationsActions };\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/package\",\n name: \"Vetra Package\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".pkg\",\n description:\n \"Manifest for a Vetra Reactor Package: bundles the metadata (name, description, category, author, keywords, source links) used to publish and discover the package in the Powerhouse ecosystem. Create one Vetra Package document per project; the document models, editors, processors, and subgraphs you add to the project are registered against this package at build time.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nPackage metadata used to publish a Vetra Reactor Package to npm and surface\\nit inside Connect/Switchboard. All fields are optional so a package can be\\ncreated empty and filled in incrementally during development.\\n\"\"\"\\ntype VetraPackageState {\\n \"\"\"Human-readable package name (e.g. \\'Pizza Plaza\\'). Distinct from the npm package id.\"\"\"\\n name: String\\n \"\"\"One-paragraph summary of what the package provides. Shown on package listing pages.\"\"\"\\n description: String\\n \"\"\"Free-form category label used to group packages in directories (e.g. \\'Finance\\', \\'Productivity\\').\"\"\"\\n category: String\\n \"\"\"Author/maintainer information surfaced in the published package metadata.\"\"\"\\n author: Author!\\n \"\"\"Search keywords associated with the package. Each keyword has a stable id so it can be removed individually.\"\"\"\\n keywords: [Keyword!]!\\n \"\"\"Public source code URL (typically a GitHub repository).\"\"\"\\n githubUrl: URL\\n \"\"\"Published npm package URL. Set once the package has been released.\"\"\"\\n npmUrl: URL\\n}\\n\\n\"\"\"Author/maintainer of the Vetra Package.\"\"\"\\ntype Author {\\n \"\"\"Display name of the author or organization.\"\"\"\\n name: String\\n \"\"\"Author\\'s website URL.\"\"\"\\n website: URL\\n}\\n\\n\"\"\"A single search keyword attached to the package.\"\"\"\\ntype Keyword {\\n \"\"\"Stable identifier for the keyword entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Display label for the keyword (e.g. \\'invoicing\\', \\'defi\\').\"\"\"\\n label: String!\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": null,\\n \"description\": null,\\n \"category\": null,\\n \"author\": {\\n \"name\": null,\\n \"website\": null\\n },\\n \"keywords\": [],\\n \"githubUrl\": null,\\n \"npmUrl\": null\\n}',\n },\n },\n modules: [\n {\n id: \"a6156f32-8120-43a5-be8b-51c7feaa3460\",\n name: \"base_operations\",\n description:\n \"Setters for the package's identity, author, keywords, and source/distribution links.\",\n operations: [\n {\n id: \"33f2eab7-9e07-497f-a4e6-53e50968c3c9\",\n name: \"SET_PACKAGE_NAME\",\n description:\n \"Set the human-readable package name shown in listings and the Connect UI.\",\n schema: \"input SetPackageNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"a07bee80-c2a8-40d7-891b-822ee298d7d9\",\n name: \"SET_PACKAGE_DESCRIPTION\",\n description:\n \"Set the one-paragraph summary describing what the package does.\",\n schema:\n \"input SetPackageDescriptionInput {\\n description: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"f3ad82f8-580a-4c6e-b930-e203cda998bb\",\n name: \"SET_PACKAGE_CATEGORY\",\n description:\n 'Set the category label used to group the package in directories (e.g. \"Finance\", \"Productivity\").',\n schema: \"input SetPackageCategoryInput {\\n category: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"67f43579-ce98-47e6-bf48-27c0f44818b9\",\n name: \"SET_PACKAGE_AUTHOR\",\n description:\n \"Replace the author block in a single call. Either field may be omitted to clear it.\",\n schema:\n \"input SetPackageAuthorInput {\\n name: OID\\n website: URL\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"94ba44c4-9627-405e-9ea2-34e9da1c283a\",\n name: \"SET_PACKAGE_AUTHOR_NAME\",\n description:\n \"Set only the author's display name without touching the website field.\",\n schema: \"input SetPackageAuthorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"3d5c08df-6c14-480b-915b-875941979fd0\",\n name: \"SET_PACKAGE_AUTHOR_WEBSITE\",\n description:\n \"Set only the author's website URL without touching the name field.\",\n schema:\n \"input SetPackageAuthorWebsiteInput {\\n website: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"ed95f841-6fd0-4552-898d-e915599b7495\",\n name: \"ADD_PACKAGE_KEYWORD\",\n description:\n \"Append a search keyword. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddPackageKeywordInput {\\n id: String!\\n label: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83c4db24-bd2f-424d-9e26-751580d6307b\",\n name: \"REMOVE_PACKAGE_KEYWORD\",\n description:\n \"Remove a keyword by its id. No-op if the id does not exist.\",\n schema: \"input RemovePackageKeywordInput {\\n id: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83a90530-8535-4ea7-ab53-7865532398f7\",\n name: \"SET_PACKAGE_GITHUB_URL\",\n description:\n \"Set the public source code URL (typically a GitHub repository).\",\n schema: \"input SetPackageGithubUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"e789859a-01ee-4b60-8e7e-a3ad928a26d1\",\n name: \"SET_PACKAGE_NPM_URL\",\n description:\n \"Set the published npm package URL once the package has been released.\",\n schema: \"input SetPackageNpmUrlInput {\\n url: URL!\\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","import type { VetraPackageBaseOperationsOperations } from \"document-models/vetra-package/v1\";\n\nexport const vetraPackageBaseOperationsOperations: VetraPackageBaseOperationsOperations =\n {\n setPackageNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setPackageDescriptionOperation(state, action, dispatch) {\n state.description = action.input.description;\n },\n setPackageCategoryOperation(state, action, dispatch) {\n state.category = action.input.category;\n },\n setPackageAuthorOperation(state, action, dispatch) {\n state.author = {\n name: action.input.name ?? null,\n website: action.input.website ?? null,\n };\n },\n setPackageAuthorNameOperation(state, action, dispatch) {\n state.author.name = action.input.name;\n },\n setPackageAuthorWebsiteOperation(state, action, dispatch) {\n state.author.website = action.input.website;\n },\n addPackageKeywordOperation(state, action, dispatch) {\n // Check for duplicate ID\n const existingId = state.keywords.find(\n (keyword) => keyword.id === action.input.id,\n );\n if (existingId) {\n throw new Error(`Keyword with id \"${action.input.id}\" already exists`);\n }\n\n state.keywords.push(action.input);\n },\n removePackageKeywordOperation(state, action, dispatch) {\n state.keywords = state.keywords.filter(\n (keyword) => keyword.id !== action.input.id,\n );\n },\n setPackageGithubUrlOperation(state, action, dispatch) {\n state.githubUrl = action.input.url;\n },\n setPackageNpmUrlOperation(state, action, dispatch) {\n state.npmUrl = action.input.url;\n },\n };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { VetraPackagePHState } from \"document-models/vetra-package/v1\";\n\nimport { vetraPackageBaseOperationsOperations } from \"../src/reducers/base-operations.js\";\n\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"./schema/zod.js\";\n\nconst stateReducer: StateReducer<VetraPackagePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_PACKAGE_NAME\": {\n SetPackageNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_DESCRIPTION\": {\n SetPackageDescriptionInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageDescriptionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_CATEGORY\": {\n SetPackageCategoryInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageCategoryOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR\": {\n SetPackageAuthorInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_NAME\": {\n SetPackageAuthorNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_WEBSITE\": {\n SetPackageAuthorWebsiteInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorWebsiteOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_PACKAGE_KEYWORD\": {\n AddPackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.addPackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_PACKAGE_KEYWORD\": {\n RemovePackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.removePackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_GITHUB_URL\": {\n SetPackageGithubUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageGithubUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_NPM_URL\": {\n SetPackageNpmUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNpmUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<VetraPackagePHState> =\n createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const vetraPackageDocumentType = \"powerhouse/package\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { VetraPackageStateSchema } from \"./schema/zod.js\";\nimport type { VetraPackageDocument, VetraPackagePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a VetraPackage document */\nexport const VetraPackageDocumentHeaderSchema = BaseDocumentHeaderSchema.extend(\n {\n documentType: z.literal(vetraPackageDocumentType),\n },\n);\n\n/** Schema for validating the state object of a VetraPackage document */\nexport const VetraPackagePHStateSchema = BaseDocumentStateSchema.extend({\n global: VetraPackageStateSchema(),\n});\n\nexport const VetraPackageDocumentSchema = z.object({\n header: VetraPackageDocumentHeaderSchema,\n state: VetraPackagePHStateSchema,\n initialState: VetraPackagePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a VetraPackage document state object */\nexport function isVetraPackageState(\n state: unknown,\n): state is VetraPackagePHState {\n return VetraPackagePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a VetraPackage document state object */\nexport function assertIsVetraPackageState(\n state: unknown,\n): asserts state is VetraPackagePHState {\n VetraPackagePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a VetraPackage document */\nexport function isVetraPackageDocument(\n document: unknown,\n): document is VetraPackageDocument {\n return VetraPackageDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a VetraPackage document */\nexport function assertIsVetraPackageDocument(\n document: unknown,\n): asserts document is VetraPackageDocument {\n VetraPackageDocumentSchema.parse(document);\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 {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n generateId,\n} from \"document-model\";\nimport {\n assertIsVetraPackageDocument,\n assertIsVetraPackageState,\n isVetraPackageDocument,\n isVetraPackageState,\n} from \"./document-schema.js\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n VetraPackageGlobalState,\n VetraPackageLocalState,\n VetraPackagePHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: VetraPackageGlobalState = {\n name: null,\n description: null,\n category: null,\n author: {\n name: null,\n website: null,\n },\n keywords: [],\n githubUrl: null,\n npmUrl: null,\n};\nexport const initialLocalState: VetraPackageLocalState = {};\n\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n fileExtension: \".pkg\",\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n const document = baseCreateDocument(utils.createState, state);\n\n document.header.documentType = vetraPackageDocumentType;\n\n // for backwards compatibility, but this is NOT a valid signed document id\n document.header.id = generateId();\n\n return document;\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isVetraPackageState(state);\n },\n assertIsStateOfType(state) {\n return assertIsVetraPackageState(state);\n },\n isDocumentOfType(document) {\n return isVetraPackageDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsVetraPackageDocument(document);\n },\n};\n","export {};\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 { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the VetraPackage document model */\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\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 { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the VetraPackage document type */\nexport const VetraPackage = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<VetraPackagePHState>;\n"],"mappings":";;;;;AAyBA,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0BA,IACpC,KAAK,CACL,QAAQ,MAAM,oBAAoB,EAAE,CAAC;AAExC,SAAgB,+BAEd;AACA,QAAOA,IAAE,OAAO;EACd,IAAIA,IAAE,QAAQ;EACd,OAAOA,IAAE,QAAQ;EAClB,CAAC;;AAGJ,SAAgB,eAAgD;AAC9D,QAAOA,IAAE,OAAO;EACd,YAAYA,IAAE,QAAQ,SAAS,CAAC,UAAU;EAC1C,MAAMA,IAAE,QAAQ,CAAC,SAAS;EAC1B,SAASA,IAAE,KAAK,CAAC,SAAS;EAC3B,CAAC;;AAGJ,SAAgB,gBAAkD;AAChE,QAAOA,IAAE,OAAO;EACd,YAAYA,IAAE,QAAQ,UAAU,CAAC,UAAU;EAC3C,IAAIA,IAAE,QAAQ;EACd,OAAOA,IAAE,QAAQ;EAClB,CAAC;;AAGJ,SAAgB,kCAEd;AACA,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AACtC,2BAA0B,MAAM,MAAM;;;AAIxC,SAAgB,uBACd,UACkC;AAClC,QAAO,2BAA2B,UAAU,SAAS,CAAC;;;AAIxD,SAAgB,6BACd,UAC0C;AAC1C,4BAA2B,MAAM,SAAS;;;;AC9B5C,MAAa,qBAA8C;CACzD,MAAM;CACN,aAAa;CACb,UAAU;CACV,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,UAAU,EAAE;CACZ,WAAW;CACX,QAAQ;CACT;AACD,MAAa,oBAA4C,EAAE;AAE3D,MAAaC,UAAiD;CAC5D,eAAe;CACf,YAAY,OAAO;AACjB,SAAO;GACL,GAAG,kBAAkB;GACrB,QAAQ;IAAE,GAAG;IAAoB,GAAG,OAAO;IAAQ;GACnD,OAAO;IAAE,GAAG;IAAmB,GAAG,OAAO;IAAO;GACjD;;CAEH,eAAe,OAAO;EACpB,MAAM,WAAW,mBAAmBA,QAAM,aAAa,MAAM;AAE7D,WAAS,OAAO,eAAe;AAG/B,WAAS,OAAO,KAAK,YAAY;AAEjC,SAAO;;CAET,iBAAiB,UAAU,OAAO;AAChC,SAAO,qBAAqB,UAAU,MAAM;;CAE9C,cAAc,OAAO;AACnB,SAAO,kBAAkB,OAAO,QAAQ;;CAE1C,cAAc,OAAO;AACnB,SAAO,oBAAoB,MAAM;;CAEnC,oBAAoB,OAAO;AACzB,SAAO,0BAA0B,MAAM;;CAEzC,iBAAiB,UAAU;AACzB,SAAO,uBAAuB,SAAS;;CAEzC,uBAAuB,UAAU;AAC/B,SAAO,6BAA6B,SAAS;;CAEhD;;;;;;;AEnED,MAAa,QAAiD;CAC5D,GAAGC;CACH,GAAGC;CACJ;;;;ACAD,MAAa,eAAe;CAC1B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
|
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/app-editor/module.ts
|
|
3
3
|
/** Document editor module for the "powerhouse/app" document type */
|
|
4
4
|
const AppEditor = {
|
|
5
|
-
Component: lazy(() => import("./editor-
|
|
5
|
+
Component: lazy(() => import("./editor-BwbJ65NZ.js")),
|
|
6
6
|
documentTypes: ["powerhouse/app"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "app-editor",
|
|
@@ -13,7 +13,7 @@ const AppEditor = {
|
|
|
13
13
|
//#region editors/document-editor/module.ts
|
|
14
14
|
/** Document editor module for the "powerhouse/document-editor" document type */
|
|
15
15
|
const DocumentEditorEditor = {
|
|
16
|
-
Component: lazy(() => import("./editor-
|
|
16
|
+
Component: lazy(() => import("./editor-CJAn9WTA.js")),
|
|
17
17
|
documentTypes: ["powerhouse/document-editor"],
|
|
18
18
|
config: {
|
|
19
19
|
id: "document-editor-editor",
|
|
@@ -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-WWMGVelM.js")),
|
|
28
28
|
documentTypes: ["powerhouse/processor"],
|
|
29
29
|
config: {
|
|
30
30
|
id: "processor-module-editor",
|
|
@@ -35,7 +35,7 @@ const ProcessorModuleEditor = {
|
|
|
35
35
|
//#region editors/subgraph-editor/module.ts
|
|
36
36
|
/** Document editor module for the "powerhouse/subgraph" document type */
|
|
37
37
|
const SubgraphModuleEditor = {
|
|
38
|
-
Component: lazy(() => import("./editor-
|
|
38
|
+
Component: lazy(() => import("./editor-DWufJcmG.js")),
|
|
39
39
|
documentTypes: ["powerhouse/subgraph"],
|
|
40
40
|
config: {
|
|
41
41
|
id: "subgraph-module-editor",
|
|
@@ -45,7 +45,7 @@ const SubgraphModuleEditor = {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region editors/vetra-drive-app/module.ts
|
|
47
47
|
const VetraDriveApp = {
|
|
48
|
-
Component: lazy(() => import("./editor-
|
|
48
|
+
Component: lazy(() => import("./editor-CLERZjRS.js")),
|
|
49
49
|
documentTypes: ["powerhouse/document-drive"],
|
|
50
50
|
config: {
|
|
51
51
|
id: "vetra-drive-app",
|
|
@@ -56,7 +56,7 @@ const VetraDriveApp = {
|
|
|
56
56
|
//#region editors/vetra-package/module.ts
|
|
57
57
|
/** Document editor module for the "powerhouse/package" document type */
|
|
58
58
|
const VetraPackageEditor = {
|
|
59
|
-
Component: lazy(() => import("./editor-
|
|
59
|
+
Component: lazy(() => import("./editor-DabfMxkF.js")),
|
|
60
60
|
documentTypes: ["powerhouse/package"],
|
|
61
61
|
config: {
|
|
62
62
|
id: "vetra-package-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-jWN6gsmi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-
|
|
1
|
+
{"version":3,"file":"module-jWN6gsmi.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 { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/app\" document type */\nexport const AppEditor: EditorModule = {\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 { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-editor\" document type */\nexport const DocumentEditorEditor: EditorModule = {\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 { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/processor\" document type */\nexport const ProcessorModuleEditor: EditorModule = {\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 { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/subgraph\" document type */\nexport const SubgraphModuleEditor: EditorModule = {\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 { EditorModule } from \"@powerhousedao/shared/document-model\";\nimport { lazy } from \"react\";\n\nexport const VetraDriveApp: EditorModule = {\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 { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/package\" document type */\nexport const VetraPackageEditor: EditorModule = {\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":";;;AAQA,MAAa,YAA0B;CACrC,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,iBAAiB;CACjC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,6BAA6B;CAC7C,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,wBAAsC;CACjD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,uBAAuB;CACvC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;ACZD,MAAa,gBAA8B;CACzC,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACFD,MAAa,qBAAmC;CAC9C,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-pbuEa-1d.js";
|
|
2
|
+
import { f as reducer, p as actions, r as utils$1 } from "./utils-BRx88WW3.js";
|
|
3
|
+
import { createState, defaultBaseState } from "document-model";
|
|
4
|
+
//#region document-models/app-module/v1/gen/document-model.ts
|
|
5
|
+
const documentModel = {
|
|
6
|
+
id: "powerhouse/app",
|
|
7
|
+
name: "App Module",
|
|
8
|
+
author: {
|
|
9
|
+
name: "Powerhouse",
|
|
10
|
+
website: "https://powerhouse.inc"
|
|
11
|
+
},
|
|
12
|
+
extension: ".app",
|
|
13
|
+
description: "Declares a custom Drive App (a drive-level UI surface) shipped by a Vetra Reactor Package. Use one App Module document per drive app: configure which document types it handles, whether it accepts drag-and-drop, and mark it CONFIRMED to trigger codegen of the corresponding app scaffold under `apps/`.",
|
|
14
|
+
specifications: [{
|
|
15
|
+
state: {
|
|
16
|
+
local: {
|
|
17
|
+
schema: "",
|
|
18
|
+
examples: [],
|
|
19
|
+
initialValue: ""
|
|
20
|
+
},
|
|
21
|
+
global: {
|
|
22
|
+
schema: "\"\"\"\nConfiguration for a Drive App contributed by the package. Drive apps render a\ncustom view at the drive level (instead of, or alongside, the document file\ntree) and can opt into which document types they accept.\n\"\"\"\ntype AppModuleState {\n \"\"\"Display name of the drive app. Also used as the source for the generated folder name under `apps/`.\"\"\"\n name: String!\n \"\"\"Lifecycle status. While DRAFT the app definition is editable and codegen is skipped; switching to CONFIRMED triggers app scaffold generation.\"\"\"\n status: StatusType!\n \"\"\"Document type ids this app handles. `null` means the app accepts any document type; an empty list means it accepts none.\"\"\"\n allowedDocumentTypes: [String!]\n \"\"\"Whether the app surface accepts dropped files from the user. Defaults to true.\"\"\"\n isDragAndDropEnabled: Boolean!\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
|
+
examples: [],
|
|
24
|
+
initialValue: "{\n \"name\": \"\",\n \"status\": \"DRAFT\",\n \"allowedDocumentTypes\": null,\n \"isDragAndDropEnabled\": true\n}"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
modules: [{
|
|
28
|
+
id: "d274599a-ceb5-4f2b-8651-b25787306734",
|
|
29
|
+
name: "base_operations",
|
|
30
|
+
description: "Set the app's identity, lifecycle status, and the document types it handles.",
|
|
31
|
+
operations: [
|
|
32
|
+
{
|
|
33
|
+
id: "f2ba2ddc-8527-4162-93bd-e045e9932013",
|
|
34
|
+
name: "SET_APP_NAME",
|
|
35
|
+
description: "Set the display name of the drive app. Also determines the generated folder name under `apps/`.",
|
|
36
|
+
schema: "input SetAppNameInput {\n name: String!\n}",
|
|
37
|
+
template: "",
|
|
38
|
+
reducer: "",
|
|
39
|
+
errors: [],
|
|
40
|
+
examples: [],
|
|
41
|
+
scope: "global"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "c842efa4-154c-4fd9-9d12-42bec51af4e9",
|
|
45
|
+
name: "SET_APP_STATUS",
|
|
46
|
+
description: "Move the app between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.",
|
|
47
|
+
schema: "input SetAppStatusInput {\n status: StatusType!\n}",
|
|
48
|
+
template: "",
|
|
49
|
+
reducer: "",
|
|
50
|
+
errors: [],
|
|
51
|
+
examples: [],
|
|
52
|
+
scope: "global"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "7376f168-695f-4aef-94d0-6e381666358c",
|
|
56
|
+
name: "ADD_DOCUMENT_TYPE",
|
|
57
|
+
description: "Append a document type id to the list of types this app handles. Initializes the list if it was `null` (accept-any).",
|
|
58
|
+
schema: "input AddDocumentTypeInput {\n documentType: String!\n}",
|
|
59
|
+
template: "",
|
|
60
|
+
reducer: "",
|
|
61
|
+
errors: [],
|
|
62
|
+
examples: [],
|
|
63
|
+
scope: "global"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "310e4e5b-3f14-4e9a-8e09-5583c7698a65",
|
|
67
|
+
name: "REMOVE_DOCUMENT_TYPE",
|
|
68
|
+
description: "Remove a document type id from the handled list. No-op if the type is not present.",
|
|
69
|
+
schema: "input RemoveDocumentTypeInput {\n documentType: String!\n}",
|
|
70
|
+
template: "",
|
|
71
|
+
reducer: "",
|
|
72
|
+
errors: [],
|
|
73
|
+
examples: [],
|
|
74
|
+
scope: "global"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "b365727a-7df3-48f0-a4f8-02362f02ad1d",
|
|
78
|
+
name: "SET_DOCUMENT_TYPES",
|
|
79
|
+
description: "Replace the entire allowed-document-types list in one call. Pass an empty list to accept none.",
|
|
80
|
+
schema: "input SetDocumentTypesInput {\n documentTypes: [String!]!\n}",
|
|
81
|
+
template: "",
|
|
82
|
+
reducer: "",
|
|
83
|
+
errors: [],
|
|
84
|
+
examples: [],
|
|
85
|
+
scope: "global"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}, {
|
|
89
|
+
id: "270faa10-92e9-40d0-b128-2de32704bcb5",
|
|
90
|
+
name: "dnd_operations",
|
|
91
|
+
description: "Toggle drag-and-drop file handling for the app surface.",
|
|
92
|
+
operations: [{
|
|
93
|
+
id: "077b1ab8-cb32-4b4e-a1fa-76178188c6a1",
|
|
94
|
+
name: "SET_DRAG_AND_DROP_ENABLED",
|
|
95
|
+
description: "Enable or disable drag-and-drop file handling on the app surface.",
|
|
96
|
+
schema: "input SetDragAndDropEnabledInput {\n enabled: Boolean!\n}",
|
|
97
|
+
template: "",
|
|
98
|
+
reducer: "",
|
|
99
|
+
errors: [],
|
|
100
|
+
examples: [],
|
|
101
|
+
scope: "global"
|
|
102
|
+
}]
|
|
103
|
+
}],
|
|
104
|
+
version: 1,
|
|
105
|
+
changeLog: []
|
|
106
|
+
}]
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region document-models/app-module/v1/src/utils.ts
|
|
110
|
+
var utils_exports = /* @__PURE__ */ __exportAll({});
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region document-models/app-module/v1/utils.ts
|
|
113
|
+
/** Utils for the AppModule document model */
|
|
114
|
+
const utils = {
|
|
115
|
+
...utils$1,
|
|
116
|
+
...utils_exports
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region document-models/app-module/v1/module.ts
|
|
120
|
+
/** Document model module for the AppModule document type */
|
|
121
|
+
const AppModule = {
|
|
122
|
+
version: 1,
|
|
123
|
+
reducer,
|
|
124
|
+
actions,
|
|
125
|
+
utils,
|
|
126
|
+
documentModel: createState(defaultBaseState(), documentModel)
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { utils as n, documentModel as r, AppModule as t };
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=module-pK0hpO6c.js.map
|