@lace-cloud/proto 0.16.1 → 0.17.0
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/index.cjs +447 -2931
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +217 -550
- package/dist/index.d.ts +217 -550
- package/dist/index.mjs +437 -2916
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -20,251 +20,69 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
BRIDGE_METHODS: () => BRIDGE_METHODS,
|
|
23
24
|
Bundle: () => Bundle,
|
|
24
25
|
CanvasViewProto: () => CanvasViewProto,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
convertCanvasView: () => convertCanvasView,
|
|
26
|
+
EMPTY_BUNDLE: () => EMPTY_BUNDLE,
|
|
27
|
+
ENGINE_METHODS: () => ENGINE_METHODS,
|
|
28
|
+
ENGINE_STREAM_METHODS: () => ENGINE_STREAM_METHODS,
|
|
29
29
|
convertDiagnostic: () => convertDiagnostic,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
convertNodeKind: () => convertNodeKind,
|
|
35
|
-
convertRenderError: () => convertRenderError,
|
|
36
|
-
convertRenderInput: () => convertRenderInput,
|
|
37
|
-
convertRenderNode: () => convertRenderNode,
|
|
38
|
-
convertSettingsConfig: () => convertSettingsConfig,
|
|
39
|
-
modeToInputMode: () => modeToInputMode,
|
|
30
|
+
deriveNodeConfig: () => deriveNodeConfig,
|
|
31
|
+
deriveSettingsConfig: () => deriveSettingsConfig,
|
|
32
|
+
nodeIdForAddress: () => nodeIdForAddress,
|
|
33
|
+
nodeIdForDiagnostic: () => nodeIdForDiagnostic,
|
|
40
34
|
parseModuleKey: () => parseModuleKey,
|
|
41
35
|
projectCanvasView: () => projectCanvasView,
|
|
42
36
|
resolveScopePath: () => resolveScopePath,
|
|
43
|
-
resolveScopePositions: () => resolveScopePositions
|
|
37
|
+
resolveScopePositions: () => resolveScopePositions,
|
|
38
|
+
resolveScopePositionsByDepth: () => resolveScopePositionsByDepth
|
|
44
39
|
});
|
|
45
40
|
module.exports = __toCommonJS(index_exports);
|
|
46
41
|
|
|
47
42
|
// src/converters.ts
|
|
48
|
-
var NODE_KIND_MODULE = 1;
|
|
49
|
-
var NODE_KIND_RESOURCE = 2;
|
|
50
|
-
var NODE_KIND_DATA = 3;
|
|
51
|
-
var INPUT_MODE_EMPTY = 1;
|
|
52
|
-
var INPUT_MODE_LITERAL = 2;
|
|
53
|
-
var INPUT_MODE_VARIABLE = 3;
|
|
54
|
-
var INPUT_MODE_EXPRESSION = 4;
|
|
55
|
-
var INPUT_MODE_WIRED = 5;
|
|
56
43
|
var DIAGNOSTIC_SEVERITY_WARNING = 2;
|
|
57
44
|
var DIAGNOSTIC_SEVERITY_INFO = 3;
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return "module";
|
|
62
|
-
case NODE_KIND_RESOURCE:
|
|
63
|
-
return "resource";
|
|
64
|
-
case NODE_KIND_DATA:
|
|
65
|
-
return "data";
|
|
66
|
-
default:
|
|
67
|
-
return "module";
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function convertInputMode(value) {
|
|
71
|
-
switch (value) {
|
|
72
|
-
case INPUT_MODE_LITERAL:
|
|
73
|
-
return "literal";
|
|
74
|
-
case INPUT_MODE_VARIABLE:
|
|
75
|
-
return "variable";
|
|
76
|
-
case INPUT_MODE_EXPRESSION:
|
|
77
|
-
return "expression";
|
|
78
|
-
case INPUT_MODE_WIRED:
|
|
79
|
-
return "wired";
|
|
80
|
-
default:
|
|
81
|
-
return "empty";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function convertDiagnosticSeverity(value) {
|
|
85
|
-
switch (value) {
|
|
45
|
+
function convertDiagnostic(d) {
|
|
46
|
+
let severity;
|
|
47
|
+
switch (d.severity) {
|
|
86
48
|
case DIAGNOSTIC_SEVERITY_WARNING:
|
|
87
|
-
|
|
49
|
+
severity = "warning";
|
|
50
|
+
break;
|
|
88
51
|
case DIAGNOSTIC_SEVERITY_INFO:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return "error";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function modeToInputMode(mode) {
|
|
95
|
-
switch (mode) {
|
|
96
|
-
case "literal":
|
|
97
|
-
return INPUT_MODE_LITERAL;
|
|
98
|
-
case "variable":
|
|
99
|
-
return INPUT_MODE_VARIABLE;
|
|
100
|
-
case "expression":
|
|
101
|
-
return INPUT_MODE_EXPRESSION;
|
|
102
|
-
case "wired":
|
|
103
|
-
return INPUT_MODE_WIRED;
|
|
52
|
+
severity = "info";
|
|
53
|
+
break;
|
|
104
54
|
default:
|
|
105
|
-
|
|
55
|
+
severity = "error";
|
|
106
56
|
}
|
|
107
|
-
}
|
|
108
|
-
function convertRenderInput(input) {
|
|
109
|
-
return {
|
|
110
|
-
name: input.name,
|
|
111
|
-
type: input.type,
|
|
112
|
-
required: input.required,
|
|
113
|
-
description: input.description || void 0,
|
|
114
|
-
default_value: input.default_value ?? void 0,
|
|
115
|
-
validation: input.validation ? { condition: input.validation.condition, error_message: input.validation.error_message } : void 0,
|
|
116
|
-
mode: convertInputMode(input.mode),
|
|
117
|
-
value: input.value ?? void 0,
|
|
118
|
-
variable: input.variable || void 0,
|
|
119
|
-
expression: input.expression || void 0,
|
|
120
|
-
wired_source: input.wired_source || void 0
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function convertRenderNode(node) {
|
|
124
|
-
return {
|
|
125
|
-
id: node.id,
|
|
126
|
-
label: node.label,
|
|
127
|
-
kind: convertNodeKind(node.kind),
|
|
128
|
-
module_key: node.module_key || void 0,
|
|
129
|
-
position: node.position ?? { x: 0, y: 0 },
|
|
130
|
-
has_errors: node.has_errors,
|
|
131
|
-
error_messages: node.error_messages,
|
|
132
|
-
inputs: node.inputs.map((p) => ({
|
|
133
|
-
name: p.name,
|
|
134
|
-
type: p.type,
|
|
135
|
-
required: p.required || void 0,
|
|
136
|
-
wired: p.wired || void 0,
|
|
137
|
-
description: p.description || void 0
|
|
138
|
-
})),
|
|
139
|
-
outputs: node.outputs.map((p) => ({
|
|
140
|
-
name: p.name,
|
|
141
|
-
type: p.type,
|
|
142
|
-
wired: p.wired || void 0,
|
|
143
|
-
description: p.description || void 0,
|
|
144
|
-
sensitive: p.sensitive || void 0
|
|
145
|
-
}))
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function convertRenderError(error) {
|
|
149
|
-
return {
|
|
150
|
-
instance_id: error.instance_id || void 0,
|
|
151
|
-
input_name: error.input_name || void 0,
|
|
152
|
-
message: error.message
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function convertCanvasView(proto) {
|
|
156
|
-
return {
|
|
157
|
-
module_name: proto.module_name,
|
|
158
|
-
nodes: proto.nodes.map(convertRenderNode),
|
|
159
|
-
edges: proto.edges.map((e) => ({
|
|
160
|
-
id: e.id,
|
|
161
|
-
source: e.source,
|
|
162
|
-
target: e.target,
|
|
163
|
-
source_output: e.source_output,
|
|
164
|
-
target_input: e.target_input
|
|
165
|
-
})),
|
|
166
|
-
errors: proto.errors.map(convertRenderError),
|
|
167
|
-
can_undo: proto.can_undo,
|
|
168
|
-
can_redo: proto.can_redo,
|
|
169
|
-
is_dirty: proto.is_dirty,
|
|
170
|
-
groups: proto.groups.map((g) => ({
|
|
171
|
-
id: g.id,
|
|
172
|
-
label: g.label,
|
|
173
|
-
node_ids: g.node_ids,
|
|
174
|
-
collapsed: g.collapsed,
|
|
175
|
-
module_key: g.module_key || void 0,
|
|
176
|
-
inputs: g.inputs && g.inputs.length > 0 ? g.inputs : void 0,
|
|
177
|
-
outputs: g.outputs && g.outputs.length > 0 ? g.outputs : void 0
|
|
178
|
-
}))
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
function convertNodeConfig(proto) {
|
|
182
|
-
return {
|
|
183
|
-
instance_id: proto.instance_id,
|
|
184
|
-
inputs: proto.inputs.map(convertRenderInput),
|
|
185
|
-
outputs: proto.outputs.map((o) => ({
|
|
186
|
-
name: o.name,
|
|
187
|
-
type: o.type,
|
|
188
|
-
description: o.description || void 0,
|
|
189
|
-
sensitive: o.sensitive
|
|
190
|
-
})),
|
|
191
|
-
sibling_ids: proto.sibling_ids,
|
|
192
|
-
depends_on: proto.depends_on,
|
|
193
|
-
providers: proto.providers ?? {},
|
|
194
|
-
available_variables: proto.available_variables.map((v) => ({ name: v.name, type: v.type }))
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
function convertEdgeConfig(proto) {
|
|
198
|
-
return {
|
|
199
|
-
source_instance: proto.source_instance,
|
|
200
|
-
target_instance: proto.target_instance,
|
|
201
|
-
source_outputs: proto.source_outputs.map((o) => ({
|
|
202
|
-
name: o.name,
|
|
203
|
-
type: o.type,
|
|
204
|
-
description: o.description || void 0,
|
|
205
|
-
sensitive: o.sensitive
|
|
206
|
-
})),
|
|
207
|
-
target_unbound_inputs: proto.target_unbound_inputs.map(convertRenderInput)
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
function convertSettingsConfig(proto) {
|
|
211
|
-
return {
|
|
212
|
-
terraform: {
|
|
213
|
-
required_version: proto.terraform?.required_version ?? "",
|
|
214
|
-
required_providers: (proto.terraform?.required_providers ?? []).map((p) => ({
|
|
215
|
-
name: p.name,
|
|
216
|
-
source: p.source,
|
|
217
|
-
version: p.version,
|
|
218
|
-
configuration_aliases: p.configuration_aliases && p.configuration_aliases.length > 0 ? p.configuration_aliases : void 0
|
|
219
|
-
}))
|
|
220
|
-
},
|
|
221
|
-
providers: proto.providers.map((p) => ({
|
|
222
|
-
name: p.name,
|
|
223
|
-
alias: p.alias,
|
|
224
|
-
config: p.config ?? {},
|
|
225
|
-
blocks: p.blocks && p.blocks.length > 0 ? p.blocks : void 0
|
|
226
|
-
})),
|
|
227
|
-
locals: proto.locals.map((l) => ({
|
|
228
|
-
name: l.name,
|
|
229
|
-
mode: l.mode,
|
|
230
|
-
value_display: l.value_display
|
|
231
|
-
})),
|
|
232
|
-
environments: proto.environments ?? {},
|
|
233
|
-
variables: (proto.variables ?? []).map((v) => ({
|
|
234
|
-
name: v.name,
|
|
235
|
-
type: v.type,
|
|
236
|
-
required: v.required,
|
|
237
|
-
description: v.description || void 0,
|
|
238
|
-
default_value: v.default_value,
|
|
239
|
-
validation: v.validation && v.validation.length > 0 ? v.validation.map((b) => ({ condition: b.condition, error_message: b.error_message })) : void 0,
|
|
240
|
-
ephemeral: v.ephemeral,
|
|
241
|
-
sensitive: v.sensitive,
|
|
242
|
-
nullable: v.nullable
|
|
243
|
-
})),
|
|
244
|
-
exports: (proto.exports ?? []).map((e) => ({
|
|
245
|
-
name: e.name,
|
|
246
|
-
source_instance: e.source_instance,
|
|
247
|
-
source_output: e.source_output
|
|
248
|
-
})),
|
|
249
|
-
output_defs: (proto.output_defs ?? []).map((d) => ({
|
|
250
|
-
name: d.name,
|
|
251
|
-
type: d.type,
|
|
252
|
-
description: d.description || void 0,
|
|
253
|
-
sensitive: d.sensitive,
|
|
254
|
-
depends_on: d.depends_on && d.depends_on.length > 0 ? d.depends_on : void 0
|
|
255
|
-
}))
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
function convertDiagnostic(d) {
|
|
259
57
|
return {
|
|
260
|
-
severity
|
|
58
|
+
severity,
|
|
261
59
|
message: d.message,
|
|
60
|
+
module_key: d.module_key || void 0,
|
|
61
|
+
instance_id: d.instance_id || void 0,
|
|
62
|
+
input_name: d.input_name || void 0,
|
|
262
63
|
file: d.file || void 0,
|
|
263
64
|
line: d.line || void 0,
|
|
264
65
|
column: d.column || void 0
|
|
265
66
|
};
|
|
266
67
|
}
|
|
267
68
|
|
|
69
|
+
// src/engine-bridge.ts
|
|
70
|
+
var ENGINE_METHODS = [
|
|
71
|
+
"Initialize",
|
|
72
|
+
"SessionOpen",
|
|
73
|
+
"TestSessionOpen",
|
|
74
|
+
"SessionSave",
|
|
75
|
+
"SessionClose",
|
|
76
|
+
"SessionGenerate",
|
|
77
|
+
"SessionResolveConflict",
|
|
78
|
+
"ApplyAction",
|
|
79
|
+
"CancelInvoke"
|
|
80
|
+
];
|
|
81
|
+
var ENGINE_STREAM_METHODS = ["Subscribe", "Invoke"];
|
|
82
|
+
var BRIDGE_METHODS = ENGINE_METHODS.filter(
|
|
83
|
+
(m) => m !== "TestSessionOpen"
|
|
84
|
+
);
|
|
85
|
+
|
|
268
86
|
// src/generated/state.ts
|
|
269
87
|
var import_wire2 = require("@bufbuild/protobuf/wire");
|
|
270
88
|
|
|
@@ -696,7 +514,7 @@ function isSet(value) {
|
|
|
696
514
|
|
|
697
515
|
// src/generated/state.ts
|
|
698
516
|
function createBaseBundle() {
|
|
699
|
-
return { schema_version: "", kind: "", entry: "", modules: {}
|
|
517
|
+
return { schema_version: "", kind: "", entry: "", modules: {} };
|
|
700
518
|
}
|
|
701
519
|
var Bundle = {
|
|
702
520
|
encode(message, writer = new import_wire2.BinaryWriter()) {
|
|
@@ -712,16 +530,6 @@ var Bundle = {
|
|
|
712
530
|
globalThis.Object.entries(message.modules).forEach(([key, value]) => {
|
|
713
531
|
Bundle_ModulesEntry.encode({ key, value }, writer.uint32(34).fork()).join();
|
|
714
532
|
});
|
|
715
|
-
globalThis.Object.entries(message.environments).forEach(
|
|
716
|
-
([key, value]) => {
|
|
717
|
-
if (value !== void 0) {
|
|
718
|
-
Bundle_EnvironmentsEntry.encode({ key, value }, writer.uint32(42).fork()).join();
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
);
|
|
722
|
-
globalThis.Object.entries(message.environment_backends).forEach(([key, value]) => {
|
|
723
|
-
Bundle_EnvironmentBackendsEntry.encode({ key, value }, writer.uint32(50).fork()).join();
|
|
724
|
-
});
|
|
725
533
|
return writer;
|
|
726
534
|
},
|
|
727
535
|
decode(input, length) {
|
|
@@ -762,26 +570,6 @@ var Bundle = {
|
|
|
762
570
|
}
|
|
763
571
|
continue;
|
|
764
572
|
}
|
|
765
|
-
case 5: {
|
|
766
|
-
if (tag !== 42) {
|
|
767
|
-
break;
|
|
768
|
-
}
|
|
769
|
-
const entry5 = Bundle_EnvironmentsEntry.decode(reader, reader.uint32());
|
|
770
|
-
if (entry5.value !== void 0) {
|
|
771
|
-
message.environments[entry5.key] = entry5.value;
|
|
772
|
-
}
|
|
773
|
-
continue;
|
|
774
|
-
}
|
|
775
|
-
case 6: {
|
|
776
|
-
if (tag !== 50) {
|
|
777
|
-
break;
|
|
778
|
-
}
|
|
779
|
-
const entry6 = Bundle_EnvironmentBackendsEntry.decode(reader, reader.uint32());
|
|
780
|
-
if (entry6.value !== void 0) {
|
|
781
|
-
message.environment_backends[entry6.key] = entry6.value;
|
|
782
|
-
}
|
|
783
|
-
continue;
|
|
784
|
-
}
|
|
785
573
|
}
|
|
786
574
|
if ((tag & 7) === 4 || tag === 0) {
|
|
787
575
|
break;
|
|
@@ -801,26 +589,6 @@ var Bundle = {
|
|
|
801
589
|
return acc;
|
|
802
590
|
},
|
|
803
591
|
{}
|
|
804
|
-
) : {},
|
|
805
|
-
environments: isObject2(object.environments) ? globalThis.Object.entries(object.environments).reduce(
|
|
806
|
-
(acc, [key, value]) => {
|
|
807
|
-
acc[key] = value;
|
|
808
|
-
return acc;
|
|
809
|
-
},
|
|
810
|
-
{}
|
|
811
|
-
) : {},
|
|
812
|
-
environment_backends: isObject2(object.environmentBackends) ? globalThis.Object.entries(object.environmentBackends).reduce(
|
|
813
|
-
(acc, [key, value]) => {
|
|
814
|
-
acc[key] = BackendConfig.fromJSON(value);
|
|
815
|
-
return acc;
|
|
816
|
-
},
|
|
817
|
-
{}
|
|
818
|
-
) : isObject2(object.environment_backends) ? globalThis.Object.entries(object.environment_backends).reduce(
|
|
819
|
-
(acc, [key, value]) => {
|
|
820
|
-
acc[key] = BackendConfig.fromJSON(value);
|
|
821
|
-
return acc;
|
|
822
|
-
},
|
|
823
|
-
{}
|
|
824
592
|
) : {}
|
|
825
593
|
};
|
|
826
594
|
},
|
|
@@ -844,24 +612,6 @@ var Bundle = {
|
|
|
844
612
|
});
|
|
845
613
|
}
|
|
846
614
|
}
|
|
847
|
-
if (message.environments) {
|
|
848
|
-
const entries = globalThis.Object.entries(message.environments);
|
|
849
|
-
if (entries.length > 0) {
|
|
850
|
-
obj.environments = {};
|
|
851
|
-
entries.forEach(([k, v]) => {
|
|
852
|
-
obj.environments[k] = v;
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
if (message.environment_backends) {
|
|
857
|
-
const entries = globalThis.Object.entries(message.environment_backends);
|
|
858
|
-
if (entries.length > 0) {
|
|
859
|
-
obj.environmentBackends = {};
|
|
860
|
-
entries.forEach(([k, v]) => {
|
|
861
|
-
obj.environmentBackends[k] = BackendConfig.toJSON(v);
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
615
|
return obj;
|
|
866
616
|
},
|
|
867
617
|
create(base) {
|
|
@@ -881,24 +631,6 @@ var Bundle = {
|
|
|
881
631
|
},
|
|
882
632
|
{}
|
|
883
633
|
);
|
|
884
|
-
message.environments = globalThis.Object.entries(object.environments ?? {}).reduce(
|
|
885
|
-
(acc, [key, value]) => {
|
|
886
|
-
if (value !== void 0) {
|
|
887
|
-
acc[key] = value;
|
|
888
|
-
}
|
|
889
|
-
return acc;
|
|
890
|
-
},
|
|
891
|
-
{}
|
|
892
|
-
);
|
|
893
|
-
message.environment_backends = globalThis.Object.entries(object.environment_backends ?? {}).reduce(
|
|
894
|
-
(acc, [key, value]) => {
|
|
895
|
-
if (value !== void 0) {
|
|
896
|
-
acc[key] = BackendConfig.fromPartial(value);
|
|
897
|
-
}
|
|
898
|
-
return acc;
|
|
899
|
-
},
|
|
900
|
-
{}
|
|
901
|
-
);
|
|
902
634
|
return message;
|
|
903
635
|
}
|
|
904
636
|
};
|
|
@@ -970,142 +702,6 @@ var Bundle_ModulesEntry = {
|
|
|
970
702
|
return message;
|
|
971
703
|
}
|
|
972
704
|
};
|
|
973
|
-
function createBaseBundle_EnvironmentsEntry() {
|
|
974
|
-
return { key: "", value: void 0 };
|
|
975
|
-
}
|
|
976
|
-
var Bundle_EnvironmentsEntry = {
|
|
977
|
-
encode(message, writer = new import_wire2.BinaryWriter()) {
|
|
978
|
-
if (message.key !== "") {
|
|
979
|
-
writer.uint32(10).string(message.key);
|
|
980
|
-
}
|
|
981
|
-
if (message.value !== void 0) {
|
|
982
|
-
Struct.encode(Struct.wrap(message.value), writer.uint32(18).fork()).join();
|
|
983
|
-
}
|
|
984
|
-
return writer;
|
|
985
|
-
},
|
|
986
|
-
decode(input, length) {
|
|
987
|
-
const reader = input instanceof import_wire2.BinaryReader ? input : new import_wire2.BinaryReader(input);
|
|
988
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
989
|
-
const message = createBaseBundle_EnvironmentsEntry();
|
|
990
|
-
while (reader.pos < end) {
|
|
991
|
-
const tag = reader.uint32();
|
|
992
|
-
switch (tag >>> 3) {
|
|
993
|
-
case 1: {
|
|
994
|
-
if (tag !== 10) {
|
|
995
|
-
break;
|
|
996
|
-
}
|
|
997
|
-
message.key = reader.string();
|
|
998
|
-
continue;
|
|
999
|
-
}
|
|
1000
|
-
case 2: {
|
|
1001
|
-
if (tag !== 18) {
|
|
1002
|
-
break;
|
|
1003
|
-
}
|
|
1004
|
-
message.value = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1005
|
-
continue;
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1009
|
-
break;
|
|
1010
|
-
}
|
|
1011
|
-
reader.skip(tag & 7);
|
|
1012
|
-
}
|
|
1013
|
-
return message;
|
|
1014
|
-
},
|
|
1015
|
-
fromJSON(object) {
|
|
1016
|
-
return {
|
|
1017
|
-
key: isSet2(object.key) ? globalThis.String(object.key) : "",
|
|
1018
|
-
value: isObject2(object.value) ? object.value : void 0
|
|
1019
|
-
};
|
|
1020
|
-
},
|
|
1021
|
-
toJSON(message) {
|
|
1022
|
-
const obj = {};
|
|
1023
|
-
if (message.key !== "") {
|
|
1024
|
-
obj.key = message.key;
|
|
1025
|
-
}
|
|
1026
|
-
if (message.value !== void 0) {
|
|
1027
|
-
obj.value = message.value;
|
|
1028
|
-
}
|
|
1029
|
-
return obj;
|
|
1030
|
-
},
|
|
1031
|
-
create(base) {
|
|
1032
|
-
return Bundle_EnvironmentsEntry.fromPartial(base ?? {});
|
|
1033
|
-
},
|
|
1034
|
-
fromPartial(object) {
|
|
1035
|
-
const message = createBaseBundle_EnvironmentsEntry();
|
|
1036
|
-
message.key = object.key ?? "";
|
|
1037
|
-
message.value = object.value ?? void 0;
|
|
1038
|
-
return message;
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
function createBaseBundle_EnvironmentBackendsEntry() {
|
|
1042
|
-
return { key: "", value: void 0 };
|
|
1043
|
-
}
|
|
1044
|
-
var Bundle_EnvironmentBackendsEntry = {
|
|
1045
|
-
encode(message, writer = new import_wire2.BinaryWriter()) {
|
|
1046
|
-
if (message.key !== "") {
|
|
1047
|
-
writer.uint32(10).string(message.key);
|
|
1048
|
-
}
|
|
1049
|
-
if (message.value !== void 0) {
|
|
1050
|
-
BackendConfig.encode(message.value, writer.uint32(18).fork()).join();
|
|
1051
|
-
}
|
|
1052
|
-
return writer;
|
|
1053
|
-
},
|
|
1054
|
-
decode(input, length) {
|
|
1055
|
-
const reader = input instanceof import_wire2.BinaryReader ? input : new import_wire2.BinaryReader(input);
|
|
1056
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1057
|
-
const message = createBaseBundle_EnvironmentBackendsEntry();
|
|
1058
|
-
while (reader.pos < end) {
|
|
1059
|
-
const tag = reader.uint32();
|
|
1060
|
-
switch (tag >>> 3) {
|
|
1061
|
-
case 1: {
|
|
1062
|
-
if (tag !== 10) {
|
|
1063
|
-
break;
|
|
1064
|
-
}
|
|
1065
|
-
message.key = reader.string();
|
|
1066
|
-
continue;
|
|
1067
|
-
}
|
|
1068
|
-
case 2: {
|
|
1069
|
-
if (tag !== 18) {
|
|
1070
|
-
break;
|
|
1071
|
-
}
|
|
1072
|
-
message.value = BackendConfig.decode(reader, reader.uint32());
|
|
1073
|
-
continue;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1077
|
-
break;
|
|
1078
|
-
}
|
|
1079
|
-
reader.skip(tag & 7);
|
|
1080
|
-
}
|
|
1081
|
-
return message;
|
|
1082
|
-
},
|
|
1083
|
-
fromJSON(object) {
|
|
1084
|
-
return {
|
|
1085
|
-
key: isSet2(object.key) ? globalThis.String(object.key) : "",
|
|
1086
|
-
value: isSet2(object.value) ? BackendConfig.fromJSON(object.value) : void 0
|
|
1087
|
-
};
|
|
1088
|
-
},
|
|
1089
|
-
toJSON(message) {
|
|
1090
|
-
const obj = {};
|
|
1091
|
-
if (message.key !== "") {
|
|
1092
|
-
obj.key = message.key;
|
|
1093
|
-
}
|
|
1094
|
-
if (message.value !== void 0) {
|
|
1095
|
-
obj.value = BackendConfig.toJSON(message.value);
|
|
1096
|
-
}
|
|
1097
|
-
return obj;
|
|
1098
|
-
},
|
|
1099
|
-
create(base) {
|
|
1100
|
-
return Bundle_EnvironmentBackendsEntry.fromPartial(base ?? {});
|
|
1101
|
-
},
|
|
1102
|
-
fromPartial(object) {
|
|
1103
|
-
const message = createBaseBundle_EnvironmentBackendsEntry();
|
|
1104
|
-
message.key = object.key ?? "";
|
|
1105
|
-
message.value = object.value !== void 0 && object.value !== null ? BackendConfig.fromPartial(object.value) : void 0;
|
|
1106
|
-
return message;
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
705
|
function createBaseModule() {
|
|
1110
706
|
return {
|
|
1111
707
|
id: "",
|
|
@@ -1754,7 +1350,7 @@ var OutputDef = {
|
|
|
1754
1350
|
}
|
|
1755
1351
|
};
|
|
1756
1352
|
function createBaseSource() {
|
|
1757
|
-
return { kind: "", repo: "", subdir: "", ref: ""
|
|
1353
|
+
return { kind: "", repo: "", subdir: "", ref: "" };
|
|
1758
1354
|
}
|
|
1759
1355
|
var Source = {
|
|
1760
1356
|
encode(message, writer = new import_wire2.BinaryWriter()) {
|
|
@@ -1770,9 +1366,6 @@ var Source = {
|
|
|
1770
1366
|
if (message.ref !== "") {
|
|
1771
1367
|
writer.uint32(34).string(message.ref);
|
|
1772
1368
|
}
|
|
1773
|
-
if (message.organization !== "") {
|
|
1774
|
-
writer.uint32(42).string(message.organization);
|
|
1775
|
-
}
|
|
1776
1369
|
return writer;
|
|
1777
1370
|
},
|
|
1778
1371
|
decode(input, length) {
|
|
@@ -1810,13 +1403,6 @@ var Source = {
|
|
|
1810
1403
|
message.ref = reader.string();
|
|
1811
1404
|
continue;
|
|
1812
1405
|
}
|
|
1813
|
-
case 5: {
|
|
1814
|
-
if (tag !== 42) {
|
|
1815
|
-
break;
|
|
1816
|
-
}
|
|
1817
|
-
message.organization = reader.string();
|
|
1818
|
-
continue;
|
|
1819
|
-
}
|
|
1820
1406
|
}
|
|
1821
1407
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1822
1408
|
break;
|
|
@@ -1830,8 +1416,7 @@ var Source = {
|
|
|
1830
1416
|
kind: isSet2(object.kind) ? globalThis.String(object.kind) : "",
|
|
1831
1417
|
repo: isSet2(object.repo) ? globalThis.String(object.repo) : "",
|
|
1832
1418
|
subdir: isSet2(object.subdir) ? globalThis.String(object.subdir) : "",
|
|
1833
|
-
ref: isSet2(object.ref) ? globalThis.String(object.ref) : ""
|
|
1834
|
-
organization: isSet2(object.organization) ? globalThis.String(object.organization) : ""
|
|
1419
|
+
ref: isSet2(object.ref) ? globalThis.String(object.ref) : ""
|
|
1835
1420
|
};
|
|
1836
1421
|
},
|
|
1837
1422
|
toJSON(message) {
|
|
@@ -1848,9 +1433,6 @@ var Source = {
|
|
|
1848
1433
|
if (message.ref !== "") {
|
|
1849
1434
|
obj.ref = message.ref;
|
|
1850
1435
|
}
|
|
1851
|
-
if (message.organization !== "") {
|
|
1852
|
-
obj.organization = message.organization;
|
|
1853
|
-
}
|
|
1854
1436
|
return obj;
|
|
1855
1437
|
},
|
|
1856
1438
|
create(base) {
|
|
@@ -1862,7 +1444,6 @@ var Source = {
|
|
|
1862
1444
|
message.repo = object.repo ?? "";
|
|
1863
1445
|
message.subdir = object.subdir ?? "";
|
|
1864
1446
|
message.ref = object.ref ?? "";
|
|
1865
|
-
message.organization = object.organization ?? "";
|
|
1866
1447
|
return message;
|
|
1867
1448
|
}
|
|
1868
1449
|
};
|
|
@@ -3795,25 +3376,270 @@ function isSet2(value) {
|
|
|
3795
3376
|
return value !== null && value !== void 0;
|
|
3796
3377
|
}
|
|
3797
3378
|
|
|
3798
|
-
// src/projection/
|
|
3799
|
-
function
|
|
3800
|
-
|
|
3801
|
-
if (
|
|
3802
|
-
|
|
3379
|
+
// src/projection/inspect.ts
|
|
3380
|
+
function hclLiteralText(lit) {
|
|
3381
|
+
if (typeof lit === "string") return quoteHclString(lit);
|
|
3382
|
+
if (typeof lit === "number" || typeof lit === "boolean") return String(lit);
|
|
3383
|
+
if (Array.isArray(lit)) return `[${lit.map(hclLiteralText).join(", ")}]`;
|
|
3384
|
+
if (lit !== null && typeof lit === "object") {
|
|
3385
|
+
return hclObjectText(lit);
|
|
3386
|
+
}
|
|
3387
|
+
return String(lit);
|
|
3803
3388
|
}
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3389
|
+
function quoteHclString(s) {
|
|
3390
|
+
let out = "";
|
|
3391
|
+
for (let i = 0; i < s.length; i++) {
|
|
3392
|
+
const c = s[i];
|
|
3393
|
+
switch (c) {
|
|
3394
|
+
case "\\":
|
|
3395
|
+
out += "\\\\";
|
|
3396
|
+
break;
|
|
3397
|
+
case '"':
|
|
3398
|
+
out += '\\"';
|
|
3399
|
+
break;
|
|
3400
|
+
case "\n":
|
|
3401
|
+
out += "\\n";
|
|
3402
|
+
break;
|
|
3403
|
+
case "\r":
|
|
3404
|
+
out += "\\r";
|
|
3405
|
+
break;
|
|
3406
|
+
case " ":
|
|
3407
|
+
out += "\\t";
|
|
3408
|
+
break;
|
|
3409
|
+
case "$":
|
|
3410
|
+
case "%":
|
|
3411
|
+
out += s[i + 1] === "{" ? c + c : c;
|
|
3412
|
+
break;
|
|
3413
|
+
default:
|
|
3414
|
+
out += c;
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
return `"${out}"`;
|
|
3810
3418
|
}
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3419
|
+
function hclObjectText(obj) {
|
|
3420
|
+
const entries = Object.entries(obj).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
3421
|
+
if (entries.length === 0) return "{}";
|
|
3422
|
+
const width = Math.max(...entries.map(([k]) => k.length)) + 1;
|
|
3423
|
+
const lines = entries.map(([k, v]) => ` ${k.padEnd(width)}= ${hclLiteralText(v)}`);
|
|
3424
|
+
return `{
|
|
3425
|
+
${lines.join("\n")}
|
|
3426
|
+
}`;
|
|
3427
|
+
}
|
|
3428
|
+
function bindingText(b) {
|
|
3429
|
+
if (!b) return "";
|
|
3430
|
+
if (b.lit !== void 0 && b.lit !== null) return hclLiteralText(b.lit);
|
|
3431
|
+
if (b.var) return `var.${b.var}`;
|
|
3432
|
+
if (b.out) return `module.${b.out.module}.${b.out.name}`;
|
|
3433
|
+
if (b.expr) return b.expr.value;
|
|
3434
|
+
return "";
|
|
3435
|
+
}
|
|
3436
|
+
function bindingMode(b) {
|
|
3437
|
+
if (!b) return { mode: "empty" };
|
|
3438
|
+
if (b.out) return { mode: "wired", wired_source: bindingText(b) };
|
|
3439
|
+
if (b.var) return { mode: "variable", variable: b.var };
|
|
3440
|
+
if (b.expr) return { mode: "expression", expression: b.expr.value };
|
|
3441
|
+
if (b.lit !== void 0 && b.lit !== null) return { mode: "literal", value: b.lit };
|
|
3442
|
+
return { mode: "empty" };
|
|
3443
|
+
}
|
|
3444
|
+
function describeBinding(b) {
|
|
3445
|
+
return { mode: bindingMode(b).mode, display: bindingText(b) };
|
|
3446
|
+
}
|
|
3447
|
+
function findChild(mod, id) {
|
|
3448
|
+
for (const use of mod.modules ?? []) {
|
|
3449
|
+
if (use.id === id) return { id, use };
|
|
3450
|
+
}
|
|
3451
|
+
for (const resource of mod.resources ?? []) {
|
|
3452
|
+
if (resource.id === id) return { id, resource };
|
|
3453
|
+
}
|
|
3454
|
+
return null;
|
|
3455
|
+
}
|
|
3456
|
+
function deriveNodeConfig(bundle, instanceId) {
|
|
3457
|
+
const entry = bundle.modules[bundle.entry];
|
|
3458
|
+
if (!entry) return null;
|
|
3459
|
+
const child = findChild(entry, instanceId);
|
|
3460
|
+
if (!child) return null;
|
|
3461
|
+
const target = child.use ? bundle.modules[child.use.module] : void 0;
|
|
3462
|
+
const schemaInputs = target?.interface?.inputs ?? [];
|
|
3463
|
+
const schemaOutputs = target?.interface?.outputs ?? [];
|
|
3464
|
+
const boundInputs = child.use?.inputs ?? child.resource?.inputs ?? {};
|
|
3465
|
+
const inputs = schemaInputs.map((def) => ({
|
|
3466
|
+
name: def.name,
|
|
3467
|
+
type: def.type,
|
|
3468
|
+
required: def.required,
|
|
3469
|
+
description: def.description || void 0,
|
|
3470
|
+
default_value: def.default_value,
|
|
3471
|
+
validation: def.validation?.[0] ? { condition: def.validation[0].condition, error_message: def.validation[0].error_message } : void 0,
|
|
3472
|
+
...bindingMode(boundInputs[def.name])
|
|
3473
|
+
}));
|
|
3474
|
+
const outputs = schemaOutputs.map((def) => ({
|
|
3475
|
+
name: def.name,
|
|
3476
|
+
type: def.type,
|
|
3477
|
+
description: def.description || void 0,
|
|
3478
|
+
sensitive: def.sensitive || void 0
|
|
3479
|
+
}));
|
|
3480
|
+
const siblingIds = [
|
|
3481
|
+
...(entry.modules ?? []).map((u) => u.id),
|
|
3482
|
+
...(entry.resources ?? []).map((r) => r.id)
|
|
3483
|
+
].filter((id) => id !== instanceId);
|
|
3484
|
+
const dependsOn = child.use?.depends_on ?? child.resource?.depends_on ?? [];
|
|
3485
|
+
const providers = child.use?.providers ?? {};
|
|
3486
|
+
const availableVariables = (entry.interface?.inputs ?? []).map((v) => ({
|
|
3487
|
+
name: v.name,
|
|
3488
|
+
type: v.type
|
|
3489
|
+
}));
|
|
3490
|
+
return {
|
|
3491
|
+
instance_id: instanceId,
|
|
3492
|
+
inputs,
|
|
3493
|
+
outputs,
|
|
3494
|
+
sibling_ids: siblingIds,
|
|
3495
|
+
depends_on: dependsOn,
|
|
3496
|
+
providers,
|
|
3497
|
+
available_variables: availableVariables
|
|
3498
|
+
};
|
|
3499
|
+
}
|
|
3500
|
+
function deriveSettingsConfig(bundle) {
|
|
3501
|
+
const entry = bundle.modules[bundle.entry];
|
|
3502
|
+
const terraform = entry?.terraform ? {
|
|
3503
|
+
required_version: entry.terraform.required_version,
|
|
3504
|
+
required_providers: Object.entries(entry.terraform.required_providers ?? {}).map(
|
|
3505
|
+
([name, req]) => ({
|
|
3506
|
+
name,
|
|
3507
|
+
source: req.source,
|
|
3508
|
+
version: req.version,
|
|
3509
|
+
configuration_aliases: req.configuration_aliases
|
|
3510
|
+
})
|
|
3511
|
+
)
|
|
3512
|
+
} : { required_version: "", required_providers: [] };
|
|
3513
|
+
const providers = (entry?.providers ?? []).map((p) => {
|
|
3514
|
+
const config = {};
|
|
3515
|
+
for (const [k, v] of Object.entries(p.config ?? {})) {
|
|
3516
|
+
config[k] = describeBinding(v).display;
|
|
3517
|
+
}
|
|
3518
|
+
return { name: p.name, alias: p.alias, config, blocks: p.blocks };
|
|
3519
|
+
});
|
|
3520
|
+
const locals = (entry?.locals ?? []).map((l) => {
|
|
3521
|
+
const { mode, display } = describeBinding(l.value);
|
|
3522
|
+
return { name: l.name, mode, value_display: display };
|
|
3523
|
+
});
|
|
3524
|
+
const variables = (entry?.interface?.inputs ?? []).map((v) => ({
|
|
3525
|
+
name: v.name,
|
|
3526
|
+
type: v.type,
|
|
3527
|
+
required: v.required,
|
|
3528
|
+
description: v.description || void 0,
|
|
3529
|
+
default_value: v.default_value,
|
|
3530
|
+
validation: v.validation?.map((b) => ({
|
|
3531
|
+
condition: b.condition,
|
|
3532
|
+
error_message: b.error_message
|
|
3533
|
+
})),
|
|
3534
|
+
ephemeral: v.ephemeral,
|
|
3535
|
+
sensitive: v.sensitive || void 0,
|
|
3536
|
+
nullable: v.nullable
|
|
3537
|
+
}));
|
|
3538
|
+
const output_defs = (entry?.interface?.outputs ?? []).map((o) => ({
|
|
3539
|
+
name: o.name,
|
|
3540
|
+
type: o.type,
|
|
3541
|
+
description: o.description || void 0,
|
|
3542
|
+
sensitive: o.sensitive || void 0,
|
|
3543
|
+
depends_on: o.depends_on
|
|
3544
|
+
}));
|
|
3545
|
+
const exports2 = Object.entries(entry?.exports?.outputs ?? {}).flatMap(([name, exp]) => {
|
|
3546
|
+
if (!exp.out) return [];
|
|
3547
|
+
return [{ name, source_instance: exp.out.module, source_output: exp.out.name }];
|
|
3548
|
+
});
|
|
3549
|
+
return { terraform, providers, locals, variables, exports: exports2, output_defs };
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3552
|
+
// src/projection/join-path.ts
|
|
3553
|
+
function joinPath(prefix, localId) {
|
|
3554
|
+
return prefix === "" ? localId : `${prefix}.${localId}`;
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
// src/projection/node-for-address.ts
|
|
3558
|
+
var INSTANCE_KEY = /\[[^\]]*\]$/;
|
|
3559
|
+
function tokenizeAddress(address) {
|
|
3560
|
+
const tokens = [];
|
|
3561
|
+
let current = "";
|
|
3562
|
+
let depth = 0;
|
|
3563
|
+
for (const ch of address) {
|
|
3564
|
+
if (ch === "[") depth++;
|
|
3565
|
+
else if (ch === "]") depth--;
|
|
3566
|
+
if (ch === "." && depth === 0) {
|
|
3567
|
+
tokens.push(current);
|
|
3568
|
+
current = "";
|
|
3569
|
+
} else {
|
|
3570
|
+
current += ch;
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
tokens.push(current);
|
|
3574
|
+
return tokens;
|
|
3575
|
+
}
|
|
3576
|
+
function nodeIdForAddress(view, address) {
|
|
3577
|
+
const tokens = tokenizeAddress(address);
|
|
3578
|
+
const moduleNames = [];
|
|
3579
|
+
let i = 0;
|
|
3580
|
+
while (i + 1 < tokens.length && tokens[i] === "module") {
|
|
3581
|
+
moduleNames.push(tokens[i + 1].replace(INSTANCE_KEY, ""));
|
|
3582
|
+
i += 2;
|
|
3583
|
+
}
|
|
3584
|
+
if (moduleNames.length === 0) return null;
|
|
3585
|
+
const known = /* @__PURE__ */ new Set();
|
|
3586
|
+
for (const n of view.nodes) known.add(n.id);
|
|
3587
|
+
for (const g of view.groups) known.add(g.id);
|
|
3588
|
+
for (let k = moduleNames.length; k >= 1; k--) {
|
|
3589
|
+
let path = "";
|
|
3590
|
+
for (let j = 0; j < k; j++) path = joinPath(path, moduleNames[j]);
|
|
3591
|
+
if (known.has(path)) return path;
|
|
3592
|
+
}
|
|
3593
|
+
return null;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
// src/projection/node-for-diagnostic.ts
|
|
3597
|
+
function buildScopeIndex(view) {
|
|
3598
|
+
const byModuleKey = /* @__PURE__ */ new Map();
|
|
3599
|
+
const known = /* @__PURE__ */ new Set();
|
|
3600
|
+
for (const n of view.nodes) known.add(n.id);
|
|
3601
|
+
for (const g of view.groups) {
|
|
3602
|
+
known.add(g.id);
|
|
3603
|
+
if (g.module_key) {
|
|
3604
|
+
const ids = byModuleKey.get(g.module_key);
|
|
3605
|
+
if (ids) ids.push(g.id);
|
|
3606
|
+
else byModuleKey.set(g.module_key, [g.id]);
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
return { byModuleKey, known };
|
|
3610
|
+
}
|
|
3611
|
+
function nodeIdForDiagnostic(view, diagnostic) {
|
|
3612
|
+
if (diagnostic.address) return nodeIdForAddress(view, diagnostic.address);
|
|
3613
|
+
if (!diagnostic.instance_id) return null;
|
|
3614
|
+
const index = buildScopeIndex(view);
|
|
3615
|
+
const scopeIds = diagnostic.module_key ? index.byModuleKey.get(diagnostic.module_key) : void 0;
|
|
3616
|
+
if (!scopeIds || scopeIds.length === 0) {
|
|
3617
|
+
return index.known.has(diagnostic.instance_id) ? diagnostic.instance_id : null;
|
|
3618
|
+
}
|
|
3619
|
+
if (scopeIds.length > 1) return null;
|
|
3620
|
+
const nodeId = `${scopeIds[0]}.${diagnostic.instance_id}`;
|
|
3621
|
+
return index.known.has(nodeId) ? nodeId : null;
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
// src/projection/parse-module-key.ts
|
|
3625
|
+
function parseModuleKey(key) {
|
|
3626
|
+
const at = key.lastIndexOf("@");
|
|
3627
|
+
if (at < 0) return { id: key, version: "" };
|
|
3628
|
+
return { id: key.slice(0, at), version: key.slice(at + 1) };
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
// src/projection/classify-child.ts
|
|
3632
|
+
function isGroupUse(bundle, use) {
|
|
3633
|
+
const target = bundle.modules[use.module];
|
|
3634
|
+
if (!target) return false;
|
|
3635
|
+
return (target.modules?.length ?? 0) > 0;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
// src/projection/compute-layout.ts
|
|
3639
|
+
var SPACING_X = 260;
|
|
3640
|
+
var SPACING_Y = 180;
|
|
3641
|
+
function gridPosition(index, n) {
|
|
3642
|
+
const cols = Math.max(2, Math.ceil(Math.sqrt(n)));
|
|
3817
3643
|
const col = index % cols;
|
|
3818
3644
|
const row = Math.floor(index / cols);
|
|
3819
3645
|
return { x: col * SPACING_X, y: row * SPACING_Y };
|
|
@@ -3823,7 +3649,7 @@ function overlapsAny(candidate, occupied) {
|
|
|
3823
3649
|
(o) => candidate.x < o.x + SPACING_X && candidate.x + SPACING_X > o.x && candidate.y < o.y + SPACING_Y && candidate.y + SPACING_Y > o.y
|
|
3824
3650
|
);
|
|
3825
3651
|
}
|
|
3826
|
-
function
|
|
3652
|
+
function partitionStored(ids, arrangementNodes) {
|
|
3827
3653
|
const positions = /* @__PURE__ */ new Map();
|
|
3828
3654
|
const occupied = [];
|
|
3829
3655
|
const unresolved = [];
|
|
@@ -3836,6 +3662,10 @@ function resolveScopePositions(ids, arrangementNodes) {
|
|
|
3836
3662
|
unresolved.push(id);
|
|
3837
3663
|
}
|
|
3838
3664
|
}
|
|
3665
|
+
return { positions, occupied, unresolved };
|
|
3666
|
+
}
|
|
3667
|
+
function resolveScopePositions(ids, arrangementNodes) {
|
|
3668
|
+
const { positions, occupied, unresolved } = partitionStored(ids, arrangementNodes);
|
|
3839
3669
|
let slot = 0;
|
|
3840
3670
|
for (const id of unresolved) {
|
|
3841
3671
|
let candidate = gridPosition(slot, ids.length);
|
|
@@ -3849,6 +3679,82 @@ function resolveScopePositions(ids, arrangementNodes) {
|
|
|
3849
3679
|
}
|
|
3850
3680
|
return positions;
|
|
3851
3681
|
}
|
|
3682
|
+
function resolveScopePositionsByDepth(ids, arrangementNodes, edges) {
|
|
3683
|
+
const { positions, occupied, unresolved } = partitionStored(ids, arrangementNodes);
|
|
3684
|
+
const columns = columnByDepth(ids, edges);
|
|
3685
|
+
const predecessors = /* @__PURE__ */ new Map();
|
|
3686
|
+
for (const edge of edges) {
|
|
3687
|
+
if (edge.source_instance === edge.target_instance) continue;
|
|
3688
|
+
predecessors.set(edge.target_instance, [
|
|
3689
|
+
...predecessors.get(edge.target_instance) ?? [],
|
|
3690
|
+
edge.source_instance
|
|
3691
|
+
]);
|
|
3692
|
+
}
|
|
3693
|
+
const rows = /* @__PURE__ */ new Map();
|
|
3694
|
+
const order = [...ids].sort((a, b) => (columns.get(a) ?? 0) - (columns.get(b) ?? 0));
|
|
3695
|
+
const seeded = /* @__PURE__ */ new Map();
|
|
3696
|
+
for (const id of order) {
|
|
3697
|
+
const column = columns.get(id) ?? 0;
|
|
3698
|
+
const stored = arrangementNodes?.[id];
|
|
3699
|
+
if (stored) {
|
|
3700
|
+
rows.set(id, stored.y);
|
|
3701
|
+
continue;
|
|
3702
|
+
}
|
|
3703
|
+
const seq = seeded.get(column) ?? 0;
|
|
3704
|
+
seeded.set(column, seq + 1);
|
|
3705
|
+
rows.set(id, seq * SPACING_Y);
|
|
3706
|
+
}
|
|
3707
|
+
for (const id of order) {
|
|
3708
|
+
if (arrangementNodes?.[id]) continue;
|
|
3709
|
+
const feeders = (predecessors.get(id) ?? []).filter((f) => rows.has(f));
|
|
3710
|
+
if (feeders.length === 0) continue;
|
|
3711
|
+
rows.set(id, feeders.reduce((sum, f) => sum + (rows.get(f) ?? 0), 0) / feeders.length);
|
|
3712
|
+
}
|
|
3713
|
+
const byColumn = /* @__PURE__ */ new Map();
|
|
3714
|
+
for (const id of ids) {
|
|
3715
|
+
const column = columns.get(id) ?? 0;
|
|
3716
|
+
byColumn.set(column, [...byColumn.get(column) ?? [], id]);
|
|
3717
|
+
}
|
|
3718
|
+
for (const [, members] of byColumn) {
|
|
3719
|
+
const movable = members.filter((id) => !arrangementNodes?.[id]);
|
|
3720
|
+
if (movable.length < 2) continue;
|
|
3721
|
+
const sorted = [...movable].sort((a, b) => (rows.get(a) ?? 0) - (rows.get(b) ?? 0));
|
|
3722
|
+
const centre = sorted.reduce((sum, id) => sum + (rows.get(id) ?? 0), 0) / sorted.length;
|
|
3723
|
+
const first = centre - (sorted.length - 1) * SPACING_Y / 2;
|
|
3724
|
+
for (const [i, id] of sorted.entries()) {
|
|
3725
|
+
rows.set(id, first + i * SPACING_Y);
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
for (const id of unresolved) {
|
|
3729
|
+
const column = columns.get(id) ?? 0;
|
|
3730
|
+
let candidate = { x: column * SPACING_X, y: rows.get(id) ?? 0 };
|
|
3731
|
+
while (overlapsAny(candidate, occupied)) {
|
|
3732
|
+
candidate = { x: candidate.x, y: candidate.y + SPACING_Y };
|
|
3733
|
+
}
|
|
3734
|
+
positions.set(id, candidate);
|
|
3735
|
+
occupied.push(candidate);
|
|
3736
|
+
}
|
|
3737
|
+
return positions;
|
|
3738
|
+
}
|
|
3739
|
+
function columnByDepth(ids, edges) {
|
|
3740
|
+
const present = new Set(ids);
|
|
3741
|
+
const real = edges.filter(
|
|
3742
|
+
(e) => e.source_instance !== e.target_instance && present.has(e.source_instance) && present.has(e.target_instance)
|
|
3743
|
+
);
|
|
3744
|
+
const depth = new Map(ids.map((id) => [id, 0]));
|
|
3745
|
+
for (let round = 0; round < ids.length; round += 1) {
|
|
3746
|
+
let moved = false;
|
|
3747
|
+
for (const e of real) {
|
|
3748
|
+
const want = (depth.get(e.source_instance) ?? 0) + 1;
|
|
3749
|
+
if (want > (depth.get(e.target_instance) ?? 0)) {
|
|
3750
|
+
depth.set(e.target_instance, want);
|
|
3751
|
+
moved = true;
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
if (!moved) break;
|
|
3755
|
+
}
|
|
3756
|
+
return depth;
|
|
3757
|
+
}
|
|
3852
3758
|
|
|
3853
3759
|
// src/projection/derive-edges.ts
|
|
3854
3760
|
var moduleDepPattern = /\bmodule\.([A-Za-z_][A-Za-z0-9_-]*)(?:\[\s*(?:\*|[0-9]+|"[^"]*")\s*\])?\.([A-Za-z_][A-Za-z0-9_-]*)/g;
|
|
@@ -3909,11 +3815,6 @@ function indexWires(edges) {
|
|
|
3909
3815
|
return { inputs, outputs };
|
|
3910
3816
|
}
|
|
3911
3817
|
|
|
3912
|
-
// src/projection/join-path.ts
|
|
3913
|
-
function joinPath(prefix, localId) {
|
|
3914
|
-
return prefix === "" ? localId : `${prefix}.${localId}`;
|
|
3915
|
-
}
|
|
3916
|
-
|
|
3917
3818
|
// src/projection/project-group.ts
|
|
3918
3819
|
function projectGroup(use, target, fullId, parentArrangement) {
|
|
3919
3820
|
const childIds = (target.modules ?? []).map((u) => joinPath(fullId, u.id));
|
|
@@ -3970,8 +3871,7 @@ function descendScope(bundle, scopeKey, segments) {
|
|
|
3970
3871
|
}
|
|
3971
3872
|
|
|
3972
3873
|
// src/projection/project-node.ts
|
|
3973
|
-
function projectNode(bundle, use, fullId, position, wiredIn, wiredOut
|
|
3974
|
-
const errorMessages = errorsByInstance.get(use.id) ?? [];
|
|
3874
|
+
function projectNode(bundle, use, fullId, position, wiredIn, wiredOut) {
|
|
3975
3875
|
const schema = resolveSchema(bundle, use);
|
|
3976
3876
|
return {
|
|
3977
3877
|
id: fullId,
|
|
@@ -3979,8 +3879,6 @@ function projectNode(bundle, use, fullId, position, wiredIn, wiredOut, errorsByI
|
|
|
3979
3879
|
kind: "module",
|
|
3980
3880
|
module_key: use.module,
|
|
3981
3881
|
position,
|
|
3982
|
-
has_errors: errorMessages.length > 0,
|
|
3983
|
-
error_messages: errorMessages,
|
|
3984
3882
|
inputs: schema.inputs.map((in_) => ({
|
|
3985
3883
|
name: in_.name,
|
|
3986
3884
|
type: in_.type,
|
|
@@ -3999,7 +3897,12 @@ function projectNode(bundle, use, fullId, position, wiredIn, wiredOut, errorsByI
|
|
|
3999
3897
|
}
|
|
4000
3898
|
|
|
4001
3899
|
// src/projection/project-scope.ts
|
|
4002
|
-
function
|
|
3900
|
+
function requirePosition(positions, id) {
|
|
3901
|
+
const pos = positions.get(id);
|
|
3902
|
+
if (!pos) throw new Error(`projectScope: no computed position for "${id}"`);
|
|
3903
|
+
return pos;
|
|
3904
|
+
}
|
|
3905
|
+
function projectScope(bundle, mod, path, arrangement) {
|
|
4003
3906
|
const uses = mod.modules ?? [];
|
|
4004
3907
|
const derived = deriveEdges(uses);
|
|
4005
3908
|
const { inputs: wiredIn, outputs: wiredOut } = indexWires(derived);
|
|
@@ -4009,7 +3912,7 @@ function projectScope(bundle, mod, path, arrangement, errorsByInstance) {
|
|
|
4009
3912
|
const groups = [];
|
|
4010
3913
|
const classified = uses.map((use) => ({ use, group: isGroupUse(bundle, use) }));
|
|
4011
3914
|
const nodeUseIds = classified.filter((c) => !c.group).map((c) => c.use.id);
|
|
4012
|
-
const positions =
|
|
3915
|
+
const positions = resolveScopePositionsByDepth(nodeUseIds, scopeArrangement?.nodes, derived);
|
|
4013
3916
|
for (const { use, group } of classified) {
|
|
4014
3917
|
const fullId = joinPath(path, use.id);
|
|
4015
3918
|
if (group) {
|
|
@@ -4022,13 +3925,12 @@ function projectScope(bundle, mod, path, arrangement, errorsByInstance) {
|
|
|
4022
3925
|
bundle,
|
|
4023
3926
|
use,
|
|
4024
3927
|
fullId,
|
|
4025
|
-
// Every non-group use is in nodeUseIds, so
|
|
4026
|
-
// always has an entry for it —
|
|
4027
|
-
//
|
|
4028
|
-
positions
|
|
3928
|
+
// Every non-group use is in nodeUseIds, so resolveScopePositionsByDepth
|
|
3929
|
+
// always has an entry for it — requirePosition turns that into a
|
|
3930
|
+
// checked invariant instead of a silent gap a fallback would mask.
|
|
3931
|
+
requirePosition(positions, use.id),
|
|
4029
3932
|
wiredIn.get(use.id) ?? /* @__PURE__ */ new Set(),
|
|
4030
|
-
wiredOut.get(use.id) ?? /* @__PURE__ */ new Set()
|
|
4031
|
-
errorsByInstance
|
|
3933
|
+
wiredOut.get(use.id) ?? /* @__PURE__ */ new Set()
|
|
4032
3934
|
)
|
|
4033
3935
|
);
|
|
4034
3936
|
}
|
|
@@ -4046,38 +3948,6 @@ function projectScope(bundle, mod, path, arrangement, errorsByInstance) {
|
|
|
4046
3948
|
return { nodes, edges, groups };
|
|
4047
3949
|
}
|
|
4048
3950
|
|
|
4049
|
-
// src/projection/view-validate.ts
|
|
4050
|
-
function missingRequiredInputErrors(nodes) {
|
|
4051
|
-
const errors = [];
|
|
4052
|
-
for (const node of nodes) {
|
|
4053
|
-
for (const pin of node.inputs ?? []) {
|
|
4054
|
-
if (pin.required && !pin.wired) {
|
|
4055
|
-
errors.push({
|
|
4056
|
-
instance_id: node.id,
|
|
4057
|
-
input_name: pin.name,
|
|
4058
|
-
message: `Required input "${pin.name}" is not set`
|
|
4059
|
-
});
|
|
4060
|
-
}
|
|
4061
|
-
}
|
|
4062
|
-
}
|
|
4063
|
-
return errors;
|
|
4064
|
-
}
|
|
4065
|
-
function danglingEdgeErrors(nodes, groups, edges) {
|
|
4066
|
-
const known = /* @__PURE__ */ new Set();
|
|
4067
|
-
for (const n of nodes) known.add(n.id);
|
|
4068
|
-
for (const g of groups) known.add(g.id);
|
|
4069
|
-
const errors = [];
|
|
4070
|
-
for (const e of edges) {
|
|
4071
|
-
if (!known.has(e.source) || !known.has(e.target)) {
|
|
4072
|
-
errors.push({
|
|
4073
|
-
instance_id: e.id,
|
|
4074
|
-
message: `Edge "${e.id}" has dangling endpoint(s): source="${e.source}" target="${e.target}"`
|
|
4075
|
-
});
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
return errors;
|
|
4079
|
-
}
|
|
4080
|
-
|
|
4081
3951
|
// src/projection/walk-modules.ts
|
|
4082
3952
|
function walk(bundle, visit) {
|
|
4083
3953
|
if (!bundle) return;
|
|
@@ -4095,39 +3965,30 @@ function walkFrom(bundle, mod, use, path, visit) {
|
|
|
4095
3965
|
}
|
|
4096
3966
|
|
|
4097
3967
|
// src/projection/project.ts
|
|
3968
|
+
var EMPTY_BUNDLE = Bundle.fromPartial({
|
|
3969
|
+
entry: "root@v1",
|
|
3970
|
+
modules: { "root@v1": { id: "root", version: "v1.0.0" } }
|
|
3971
|
+
});
|
|
4098
3972
|
function projectCanvasView(bundle, arrangement, meta) {
|
|
4099
3973
|
const nodes = [];
|
|
4100
3974
|
const edges = [];
|
|
4101
3975
|
const groups = [];
|
|
4102
|
-
const errorsByInstance = /* @__PURE__ */ new Map();
|
|
4103
3976
|
walk(bundle, (mod, _use, path) => {
|
|
4104
|
-
const scope = projectScope(bundle, mod, path, arrangement
|
|
3977
|
+
const scope = projectScope(bundle, mod, path, arrangement);
|
|
4105
3978
|
nodes.push(...scope.nodes);
|
|
4106
3979
|
edges.push(...scope.edges);
|
|
4107
3980
|
groups.push(...scope.groups);
|
|
4108
3981
|
});
|
|
4109
|
-
const errors = [
|
|
4110
|
-
...missingRequiredInputErrors(nodes),
|
|
4111
|
-
...danglingEdgeErrors(nodes, groups, edges)
|
|
4112
|
-
];
|
|
4113
|
-
errors.sort((a, b) => {
|
|
4114
|
-
const ai = a.instance_id ?? "";
|
|
4115
|
-
const bi = b.instance_id ?? "";
|
|
4116
|
-
if (ai !== bi) return ai < bi ? -1 : 1;
|
|
4117
|
-
const an = a.input_name ?? "";
|
|
4118
|
-
const bn = b.input_name ?? "";
|
|
4119
|
-
if (an !== bn) return an < bn ? -1 : 1;
|
|
4120
|
-
return a.message < b.message ? -1 : a.message > b.message ? 1 : 0;
|
|
4121
|
-
});
|
|
4122
3982
|
const moduleName = meta.moduleName ?? parseModuleKey(bundle.entry).id;
|
|
4123
3983
|
return {
|
|
4124
3984
|
module_name: moduleName,
|
|
4125
3985
|
nodes,
|
|
4126
3986
|
edges,
|
|
4127
|
-
errors,
|
|
4128
3987
|
can_undo: meta.canUndo,
|
|
4129
3988
|
can_redo: meta.canRedo,
|
|
4130
|
-
|
|
3989
|
+
unsaved: meta.unsaved,
|
|
3990
|
+
conflict: meta.conflict,
|
|
3991
|
+
ungenerated: meta.ungenerated ?? false,
|
|
4131
3992
|
// Every group is now a Use whose target has sub-Uses (CreateGroupAction
|
|
4132
3993
|
// mints a module); emission order already mirrors Use declaration order
|
|
4133
3994
|
// via the walk, so no separate user-group sort is needed.
|
|
@@ -4172,145 +4033,8 @@ function nodeKindToJSON(object) {
|
|
|
4172
4033
|
return "UNRECOGNIZED";
|
|
4173
4034
|
}
|
|
4174
4035
|
}
|
|
4175
|
-
function inputModeFromJSON(object) {
|
|
4176
|
-
switch (object) {
|
|
4177
|
-
case 0:
|
|
4178
|
-
case "INPUT_MODE_UNSPECIFIED":
|
|
4179
|
-
return 0 /* INPUT_MODE_UNSPECIFIED */;
|
|
4180
|
-
case 1:
|
|
4181
|
-
case "INPUT_MODE_EMPTY":
|
|
4182
|
-
return 1 /* INPUT_MODE_EMPTY */;
|
|
4183
|
-
case 2:
|
|
4184
|
-
case "INPUT_MODE_LITERAL":
|
|
4185
|
-
return 2 /* INPUT_MODE_LITERAL */;
|
|
4186
|
-
case 3:
|
|
4187
|
-
case "INPUT_MODE_VARIABLE":
|
|
4188
|
-
return 3 /* INPUT_MODE_VARIABLE */;
|
|
4189
|
-
case 4:
|
|
4190
|
-
case "INPUT_MODE_EXPRESSION":
|
|
4191
|
-
return 4 /* INPUT_MODE_EXPRESSION */;
|
|
4192
|
-
case 5:
|
|
4193
|
-
case "INPUT_MODE_WIRED":
|
|
4194
|
-
return 5 /* INPUT_MODE_WIRED */;
|
|
4195
|
-
case -1:
|
|
4196
|
-
case "UNRECOGNIZED":
|
|
4197
|
-
default:
|
|
4198
|
-
return -1 /* UNRECOGNIZED */;
|
|
4199
|
-
}
|
|
4200
|
-
}
|
|
4201
|
-
function inputModeToJSON(object) {
|
|
4202
|
-
switch (object) {
|
|
4203
|
-
case 0 /* INPUT_MODE_UNSPECIFIED */:
|
|
4204
|
-
return "INPUT_MODE_UNSPECIFIED";
|
|
4205
|
-
case 1 /* INPUT_MODE_EMPTY */:
|
|
4206
|
-
return "INPUT_MODE_EMPTY";
|
|
4207
|
-
case 2 /* INPUT_MODE_LITERAL */:
|
|
4208
|
-
return "INPUT_MODE_LITERAL";
|
|
4209
|
-
case 3 /* INPUT_MODE_VARIABLE */:
|
|
4210
|
-
return "INPUT_MODE_VARIABLE";
|
|
4211
|
-
case 4 /* INPUT_MODE_EXPRESSION */:
|
|
4212
|
-
return "INPUT_MODE_EXPRESSION";
|
|
4213
|
-
case 5 /* INPUT_MODE_WIRED */:
|
|
4214
|
-
return "INPUT_MODE_WIRED";
|
|
4215
|
-
case -1 /* UNRECOGNIZED */:
|
|
4216
|
-
default:
|
|
4217
|
-
return "UNRECOGNIZED";
|
|
4218
|
-
}
|
|
4219
|
-
}
|
|
4220
|
-
function createBaseOutputExportEntry() {
|
|
4221
|
-
return { name: "", source_instance: "", source_output: "" };
|
|
4222
|
-
}
|
|
4223
|
-
var OutputExportEntry = {
|
|
4224
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
4225
|
-
if (message.name !== "") {
|
|
4226
|
-
writer.uint32(10).string(message.name);
|
|
4227
|
-
}
|
|
4228
|
-
if (message.source_instance !== "") {
|
|
4229
|
-
writer.uint32(18).string(message.source_instance);
|
|
4230
|
-
}
|
|
4231
|
-
if (message.source_output !== "") {
|
|
4232
|
-
writer.uint32(26).string(message.source_output);
|
|
4233
|
-
}
|
|
4234
|
-
return writer;
|
|
4235
|
-
},
|
|
4236
|
-
decode(input, length) {
|
|
4237
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
4238
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4239
|
-
const message = createBaseOutputExportEntry();
|
|
4240
|
-
while (reader.pos < end) {
|
|
4241
|
-
const tag = reader.uint32();
|
|
4242
|
-
switch (tag >>> 3) {
|
|
4243
|
-
case 1: {
|
|
4244
|
-
if (tag !== 10) {
|
|
4245
|
-
break;
|
|
4246
|
-
}
|
|
4247
|
-
message.name = reader.string();
|
|
4248
|
-
continue;
|
|
4249
|
-
}
|
|
4250
|
-
case 2: {
|
|
4251
|
-
if (tag !== 18) {
|
|
4252
|
-
break;
|
|
4253
|
-
}
|
|
4254
|
-
message.source_instance = reader.string();
|
|
4255
|
-
continue;
|
|
4256
|
-
}
|
|
4257
|
-
case 3: {
|
|
4258
|
-
if (tag !== 26) {
|
|
4259
|
-
break;
|
|
4260
|
-
}
|
|
4261
|
-
message.source_output = reader.string();
|
|
4262
|
-
continue;
|
|
4263
|
-
}
|
|
4264
|
-
}
|
|
4265
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
4266
|
-
break;
|
|
4267
|
-
}
|
|
4268
|
-
reader.skip(tag & 7);
|
|
4269
|
-
}
|
|
4270
|
-
return message;
|
|
4271
|
-
},
|
|
4272
|
-
fromJSON(object) {
|
|
4273
|
-
return {
|
|
4274
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
4275
|
-
source_instance: isSet3(object.sourceInstance) ? globalThis.String(object.sourceInstance) : isSet3(object.source_instance) ? globalThis.String(object.source_instance) : "",
|
|
4276
|
-
source_output: isSet3(object.sourceOutput) ? globalThis.String(object.sourceOutput) : isSet3(object.source_output) ? globalThis.String(object.source_output) : ""
|
|
4277
|
-
};
|
|
4278
|
-
},
|
|
4279
|
-
toJSON(message) {
|
|
4280
|
-
const obj = {};
|
|
4281
|
-
if (message.name !== "") {
|
|
4282
|
-
obj.name = message.name;
|
|
4283
|
-
}
|
|
4284
|
-
if (message.source_instance !== "") {
|
|
4285
|
-
obj.sourceInstance = message.source_instance;
|
|
4286
|
-
}
|
|
4287
|
-
if (message.source_output !== "") {
|
|
4288
|
-
obj.sourceOutput = message.source_output;
|
|
4289
|
-
}
|
|
4290
|
-
return obj;
|
|
4291
|
-
},
|
|
4292
|
-
create(base) {
|
|
4293
|
-
return OutputExportEntry.fromPartial(base ?? {});
|
|
4294
|
-
},
|
|
4295
|
-
fromPartial(object) {
|
|
4296
|
-
const message = createBaseOutputExportEntry();
|
|
4297
|
-
message.name = object.name ?? "";
|
|
4298
|
-
message.source_instance = object.source_instance ?? "";
|
|
4299
|
-
message.source_output = object.source_output ?? "";
|
|
4300
|
-
return message;
|
|
4301
|
-
}
|
|
4302
|
-
};
|
|
4303
4036
|
function createBaseCanvasView() {
|
|
4304
|
-
return {
|
|
4305
|
-
module_name: "",
|
|
4306
|
-
nodes: [],
|
|
4307
|
-
edges: [],
|
|
4308
|
-
errors: [],
|
|
4309
|
-
can_undo: false,
|
|
4310
|
-
can_redo: false,
|
|
4311
|
-
is_dirty: false,
|
|
4312
|
-
groups: []
|
|
4313
|
-
};
|
|
4037
|
+
return { module_name: "", nodes: [], edges: [], can_undo: false, can_redo: false, unsaved: false, groups: [] };
|
|
4314
4038
|
}
|
|
4315
4039
|
var CanvasView = {
|
|
4316
4040
|
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
@@ -4323,17 +4047,14 @@ var CanvasView = {
|
|
|
4323
4047
|
for (const v of message.edges) {
|
|
4324
4048
|
RenderEdge.encode(v, writer.uint32(26).fork()).join();
|
|
4325
4049
|
}
|
|
4326
|
-
for (const v of message.errors) {
|
|
4327
|
-
RenderError.encode(v, writer.uint32(34).fork()).join();
|
|
4328
|
-
}
|
|
4329
4050
|
if (message.can_undo !== false) {
|
|
4330
4051
|
writer.uint32(40).bool(message.can_undo);
|
|
4331
4052
|
}
|
|
4332
4053
|
if (message.can_redo !== false) {
|
|
4333
4054
|
writer.uint32(48).bool(message.can_redo);
|
|
4334
4055
|
}
|
|
4335
|
-
if (message.
|
|
4336
|
-
writer.uint32(56).bool(message.
|
|
4056
|
+
if (message.unsaved !== false) {
|
|
4057
|
+
writer.uint32(56).bool(message.unsaved);
|
|
4337
4058
|
}
|
|
4338
4059
|
for (const v of message.groups) {
|
|
4339
4060
|
RenderGroup.encode(v, writer.uint32(66).fork()).join();
|
|
@@ -4368,13 +4089,6 @@ var CanvasView = {
|
|
|
4368
4089
|
message.edges.push(RenderEdge.decode(reader, reader.uint32()));
|
|
4369
4090
|
continue;
|
|
4370
4091
|
}
|
|
4371
|
-
case 4: {
|
|
4372
|
-
if (tag !== 34) {
|
|
4373
|
-
break;
|
|
4374
|
-
}
|
|
4375
|
-
message.errors.push(RenderError.decode(reader, reader.uint32()));
|
|
4376
|
-
continue;
|
|
4377
|
-
}
|
|
4378
4092
|
case 5: {
|
|
4379
4093
|
if (tag !== 40) {
|
|
4380
4094
|
break;
|
|
@@ -4393,7 +4107,7 @@ var CanvasView = {
|
|
|
4393
4107
|
if (tag !== 56) {
|
|
4394
4108
|
break;
|
|
4395
4109
|
}
|
|
4396
|
-
message.
|
|
4110
|
+
message.unsaved = reader.bool();
|
|
4397
4111
|
continue;
|
|
4398
4112
|
}
|
|
4399
4113
|
case 8: {
|
|
@@ -4416,10 +4130,9 @@ var CanvasView = {
|
|
|
4416
4130
|
module_name: isSet3(object.moduleName) ? globalThis.String(object.moduleName) : isSet3(object.module_name) ? globalThis.String(object.module_name) : "",
|
|
4417
4131
|
nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e) => RenderNode.fromJSON(e)) : [],
|
|
4418
4132
|
edges: globalThis.Array.isArray(object?.edges) ? object.edges.map((e) => RenderEdge.fromJSON(e)) : [],
|
|
4419
|
-
errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RenderError.fromJSON(e)) : [],
|
|
4420
4133
|
can_undo: isSet3(object.canUndo) ? globalThis.Boolean(object.canUndo) : isSet3(object.can_undo) ? globalThis.Boolean(object.can_undo) : false,
|
|
4421
4134
|
can_redo: isSet3(object.canRedo) ? globalThis.Boolean(object.canRedo) : isSet3(object.can_redo) ? globalThis.Boolean(object.can_redo) : false,
|
|
4422
|
-
|
|
4135
|
+
unsaved: isSet3(object.unsaved) ? globalThis.Boolean(object.unsaved) : false,
|
|
4423
4136
|
groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e) => RenderGroup.fromJSON(e)) : []
|
|
4424
4137
|
};
|
|
4425
4138
|
},
|
|
@@ -4434,17 +4147,14 @@ var CanvasView = {
|
|
|
4434
4147
|
if (message.edges?.length) {
|
|
4435
4148
|
obj.edges = message.edges.map((e) => RenderEdge.toJSON(e));
|
|
4436
4149
|
}
|
|
4437
|
-
if (message.errors?.length) {
|
|
4438
|
-
obj.errors = message.errors.map((e) => RenderError.toJSON(e));
|
|
4439
|
-
}
|
|
4440
4150
|
if (message.can_undo !== false) {
|
|
4441
4151
|
obj.canUndo = message.can_undo;
|
|
4442
4152
|
}
|
|
4443
4153
|
if (message.can_redo !== false) {
|
|
4444
4154
|
obj.canRedo = message.can_redo;
|
|
4445
4155
|
}
|
|
4446
|
-
if (message.
|
|
4447
|
-
obj.
|
|
4156
|
+
if (message.unsaved !== false) {
|
|
4157
|
+
obj.unsaved = message.unsaved;
|
|
4448
4158
|
}
|
|
4449
4159
|
if (message.groups?.length) {
|
|
4450
4160
|
obj.groups = message.groups.map((e) => RenderGroup.toJSON(e));
|
|
@@ -4459,10 +4169,9 @@ var CanvasView = {
|
|
|
4459
4169
|
message.module_name = object.module_name ?? "";
|
|
4460
4170
|
message.nodes = object.nodes?.map((e) => RenderNode.fromPartial(e)) || [];
|
|
4461
4171
|
message.edges = object.edges?.map((e) => RenderEdge.fromPartial(e)) || [];
|
|
4462
|
-
message.errors = object.errors?.map((e) => RenderError.fromPartial(e)) || [];
|
|
4463
4172
|
message.can_undo = object.can_undo ?? false;
|
|
4464
4173
|
message.can_redo = object.can_redo ?? false;
|
|
4465
|
-
message.
|
|
4174
|
+
message.unsaved = object.unsaved ?? false;
|
|
4466
4175
|
message.groups = object.groups?.map((e) => RenderGroup.fromPartial(e)) || [];
|
|
4467
4176
|
return message;
|
|
4468
4177
|
}
|
|
@@ -4611,18 +4320,7 @@ var RenderGroup = {
|
|
|
4611
4320
|
}
|
|
4612
4321
|
};
|
|
4613
4322
|
function createBaseRenderNode() {
|
|
4614
|
-
return {
|
|
4615
|
-
id: "",
|
|
4616
|
-
label: "",
|
|
4617
|
-
kind: 0,
|
|
4618
|
-
module_key: "",
|
|
4619
|
-
icon_url: "",
|
|
4620
|
-
position: void 0,
|
|
4621
|
-
has_errors: false,
|
|
4622
|
-
error_messages: [],
|
|
4623
|
-
inputs: [],
|
|
4624
|
-
outputs: []
|
|
4625
|
-
};
|
|
4323
|
+
return { id: "", label: "", kind: 0, module_key: "", icon_url: "", position: void 0, inputs: [], outputs: [] };
|
|
4626
4324
|
}
|
|
4627
4325
|
var RenderNode = {
|
|
4628
4326
|
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
@@ -4644,12 +4342,6 @@ var RenderNode = {
|
|
|
4644
4342
|
if (message.position !== void 0) {
|
|
4645
4343
|
Position.encode(message.position, writer.uint32(50).fork()).join();
|
|
4646
4344
|
}
|
|
4647
|
-
if (message.has_errors !== false) {
|
|
4648
|
-
writer.uint32(56).bool(message.has_errors);
|
|
4649
|
-
}
|
|
4650
|
-
for (const v of message.error_messages) {
|
|
4651
|
-
writer.uint32(66).string(v);
|
|
4652
|
-
}
|
|
4653
4345
|
for (const v of message.inputs) {
|
|
4654
4346
|
NodePin.encode(v, writer.uint32(74).fork()).join();
|
|
4655
4347
|
}
|
|
@@ -4707,20 +4399,6 @@ var RenderNode = {
|
|
|
4707
4399
|
message.position = Position.decode(reader, reader.uint32());
|
|
4708
4400
|
continue;
|
|
4709
4401
|
}
|
|
4710
|
-
case 7: {
|
|
4711
|
-
if (tag !== 56) {
|
|
4712
|
-
break;
|
|
4713
|
-
}
|
|
4714
|
-
message.has_errors = reader.bool();
|
|
4715
|
-
continue;
|
|
4716
|
-
}
|
|
4717
|
-
case 8: {
|
|
4718
|
-
if (tag !== 66) {
|
|
4719
|
-
break;
|
|
4720
|
-
}
|
|
4721
|
-
message.error_messages.push(reader.string());
|
|
4722
|
-
continue;
|
|
4723
|
-
}
|
|
4724
4402
|
case 9: {
|
|
4725
4403
|
if (tag !== 74) {
|
|
4726
4404
|
break;
|
|
@@ -4751,8 +4429,6 @@ var RenderNode = {
|
|
|
4751
4429
|
module_key: isSet3(object.moduleKey) ? globalThis.String(object.moduleKey) : isSet3(object.module_key) ? globalThis.String(object.module_key) : "",
|
|
4752
4430
|
icon_url: isSet3(object.iconUrl) ? globalThis.String(object.iconUrl) : isSet3(object.icon_url) ? globalThis.String(object.icon_url) : "",
|
|
4753
4431
|
position: isSet3(object.position) ? Position.fromJSON(object.position) : void 0,
|
|
4754
|
-
has_errors: isSet3(object.hasErrors) ? globalThis.Boolean(object.hasErrors) : isSet3(object.has_errors) ? globalThis.Boolean(object.has_errors) : false,
|
|
4755
|
-
error_messages: globalThis.Array.isArray(object?.errorMessages) ? object.errorMessages.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.error_messages) ? object.error_messages.map((e) => globalThis.String(e)) : [],
|
|
4756
4432
|
inputs: globalThis.Array.isArray(object?.inputs) ? object.inputs.map((e) => NodePin.fromJSON(e)) : [],
|
|
4757
4433
|
outputs: globalThis.Array.isArray(object?.outputs) ? object.outputs.map((e) => NodePin.fromJSON(e)) : []
|
|
4758
4434
|
};
|
|
@@ -4777,12 +4453,6 @@ var RenderNode = {
|
|
|
4777
4453
|
if (message.position !== void 0) {
|
|
4778
4454
|
obj.position = Position.toJSON(message.position);
|
|
4779
4455
|
}
|
|
4780
|
-
if (message.has_errors !== false) {
|
|
4781
|
-
obj.hasErrors = message.has_errors;
|
|
4782
|
-
}
|
|
4783
|
-
if (message.error_messages?.length) {
|
|
4784
|
-
obj.errorMessages = message.error_messages;
|
|
4785
|
-
}
|
|
4786
4456
|
if (message.inputs?.length) {
|
|
4787
4457
|
obj.inputs = message.inputs.map((e) => NodePin.toJSON(e));
|
|
4788
4458
|
}
|
|
@@ -4802,8 +4472,6 @@ var RenderNode = {
|
|
|
4802
4472
|
message.module_key = object.module_key ?? "";
|
|
4803
4473
|
message.icon_url = object.icon_url ?? "";
|
|
4804
4474
|
message.position = object.position !== void 0 && object.position !== null ? Position.fromPartial(object.position) : void 0;
|
|
4805
|
-
message.has_errors = object.has_errors ?? false;
|
|
4806
|
-
message.error_messages = object.error_messages?.map((e) => e) || [];
|
|
4807
4475
|
message.inputs = object.inputs?.map((e) => NodePin.fromPartial(e)) || [];
|
|
4808
4476
|
message.outputs = object.outputs?.map((e) => NodePin.fromPartial(e)) || [];
|
|
4809
4477
|
return message;
|
|
@@ -5050,2164 +4718,38 @@ var RenderEdge = {
|
|
|
5050
4718
|
return message;
|
|
5051
4719
|
}
|
|
5052
4720
|
};
|
|
5053
|
-
function
|
|
5054
|
-
return {
|
|
5055
|
-
name: "",
|
|
5056
|
-
type: "",
|
|
5057
|
-
required: false,
|
|
5058
|
-
description: "",
|
|
5059
|
-
default_value: void 0,
|
|
5060
|
-
validation: void 0,
|
|
5061
|
-
mode: 0,
|
|
5062
|
-
value: void 0,
|
|
5063
|
-
variable: "",
|
|
5064
|
-
expression: "",
|
|
5065
|
-
wired_source: ""
|
|
5066
|
-
};
|
|
4721
|
+
function createBasePosition() {
|
|
4722
|
+
return { x: 0, y: 0 };
|
|
5067
4723
|
}
|
|
5068
|
-
var
|
|
4724
|
+
var Position = {
|
|
5069
4725
|
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5070
|
-
if (message.
|
|
5071
|
-
writer.uint32(
|
|
5072
|
-
}
|
|
5073
|
-
if (message.type !== "") {
|
|
5074
|
-
writer.uint32(18).string(message.type);
|
|
5075
|
-
}
|
|
5076
|
-
if (message.required !== false) {
|
|
5077
|
-
writer.uint32(24).bool(message.required);
|
|
5078
|
-
}
|
|
5079
|
-
if (message.description !== "") {
|
|
5080
|
-
writer.uint32(34).string(message.description);
|
|
5081
|
-
}
|
|
5082
|
-
if (message.default_value !== void 0) {
|
|
5083
|
-
Value.encode(Value.wrap(message.default_value), writer.uint32(42).fork()).join();
|
|
5084
|
-
}
|
|
5085
|
-
if (message.validation !== void 0) {
|
|
5086
|
-
ValidationBlock2.encode(message.validation, writer.uint32(50).fork()).join();
|
|
4726
|
+
if (message.x !== 0) {
|
|
4727
|
+
writer.uint32(9).double(message.x);
|
|
5087
4728
|
}
|
|
5088
|
-
if (message.
|
|
5089
|
-
writer.uint32(
|
|
5090
|
-
}
|
|
5091
|
-
if (message.value !== void 0) {
|
|
5092
|
-
Value.encode(Value.wrap(message.value), writer.uint32(66).fork()).join();
|
|
5093
|
-
}
|
|
5094
|
-
if (message.variable !== "") {
|
|
5095
|
-
writer.uint32(74).string(message.variable);
|
|
5096
|
-
}
|
|
5097
|
-
if (message.expression !== "") {
|
|
5098
|
-
writer.uint32(82).string(message.expression);
|
|
5099
|
-
}
|
|
5100
|
-
if (message.wired_source !== "") {
|
|
5101
|
-
writer.uint32(90).string(message.wired_source);
|
|
5102
|
-
}
|
|
5103
|
-
return writer;
|
|
5104
|
-
},
|
|
5105
|
-
decode(input, length) {
|
|
5106
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5107
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5108
|
-
const message = createBaseRenderInput();
|
|
5109
|
-
while (reader.pos < end) {
|
|
5110
|
-
const tag = reader.uint32();
|
|
5111
|
-
switch (tag >>> 3) {
|
|
5112
|
-
case 1: {
|
|
5113
|
-
if (tag !== 10) {
|
|
5114
|
-
break;
|
|
5115
|
-
}
|
|
5116
|
-
message.name = reader.string();
|
|
5117
|
-
continue;
|
|
5118
|
-
}
|
|
5119
|
-
case 2: {
|
|
5120
|
-
if (tag !== 18) {
|
|
5121
|
-
break;
|
|
5122
|
-
}
|
|
5123
|
-
message.type = reader.string();
|
|
5124
|
-
continue;
|
|
5125
|
-
}
|
|
5126
|
-
case 3: {
|
|
5127
|
-
if (tag !== 24) {
|
|
5128
|
-
break;
|
|
5129
|
-
}
|
|
5130
|
-
message.required = reader.bool();
|
|
5131
|
-
continue;
|
|
5132
|
-
}
|
|
5133
|
-
case 4: {
|
|
5134
|
-
if (tag !== 34) {
|
|
5135
|
-
break;
|
|
5136
|
-
}
|
|
5137
|
-
message.description = reader.string();
|
|
5138
|
-
continue;
|
|
5139
|
-
}
|
|
5140
|
-
case 5: {
|
|
5141
|
-
if (tag !== 42) {
|
|
5142
|
-
break;
|
|
5143
|
-
}
|
|
5144
|
-
message.default_value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
5145
|
-
continue;
|
|
5146
|
-
}
|
|
5147
|
-
case 6: {
|
|
5148
|
-
if (tag !== 50) {
|
|
5149
|
-
break;
|
|
5150
|
-
}
|
|
5151
|
-
message.validation = ValidationBlock2.decode(reader, reader.uint32());
|
|
5152
|
-
continue;
|
|
5153
|
-
}
|
|
5154
|
-
case 7: {
|
|
5155
|
-
if (tag !== 56) {
|
|
5156
|
-
break;
|
|
5157
|
-
}
|
|
5158
|
-
message.mode = reader.int32();
|
|
5159
|
-
continue;
|
|
5160
|
-
}
|
|
5161
|
-
case 8: {
|
|
5162
|
-
if (tag !== 66) {
|
|
5163
|
-
break;
|
|
5164
|
-
}
|
|
5165
|
-
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
5166
|
-
continue;
|
|
5167
|
-
}
|
|
5168
|
-
case 9: {
|
|
5169
|
-
if (tag !== 74) {
|
|
5170
|
-
break;
|
|
5171
|
-
}
|
|
5172
|
-
message.variable = reader.string();
|
|
5173
|
-
continue;
|
|
5174
|
-
}
|
|
5175
|
-
case 10: {
|
|
5176
|
-
if (tag !== 82) {
|
|
5177
|
-
break;
|
|
5178
|
-
}
|
|
5179
|
-
message.expression = reader.string();
|
|
5180
|
-
continue;
|
|
5181
|
-
}
|
|
5182
|
-
case 11: {
|
|
5183
|
-
if (tag !== 90) {
|
|
5184
|
-
break;
|
|
5185
|
-
}
|
|
5186
|
-
message.wired_source = reader.string();
|
|
5187
|
-
continue;
|
|
5188
|
-
}
|
|
5189
|
-
}
|
|
5190
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5191
|
-
break;
|
|
5192
|
-
}
|
|
5193
|
-
reader.skip(tag & 7);
|
|
5194
|
-
}
|
|
5195
|
-
return message;
|
|
5196
|
-
},
|
|
5197
|
-
fromJSON(object) {
|
|
5198
|
-
return {
|
|
5199
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
5200
|
-
type: isSet3(object.type) ? globalThis.String(object.type) : "",
|
|
5201
|
-
required: isSet3(object.required) ? globalThis.Boolean(object.required) : false,
|
|
5202
|
-
description: isSet3(object.description) ? globalThis.String(object.description) : "",
|
|
5203
|
-
default_value: isSet3(object?.defaultValue) ? object.defaultValue : isSet3(object?.default_value) ? object.default_value : void 0,
|
|
5204
|
-
validation: isSet3(object.validation) ? ValidationBlock2.fromJSON(object.validation) : void 0,
|
|
5205
|
-
mode: isSet3(object.mode) ? inputModeFromJSON(object.mode) : 0,
|
|
5206
|
-
value: isSet3(object?.value) ? object.value : void 0,
|
|
5207
|
-
variable: isSet3(object.variable) ? globalThis.String(object.variable) : "",
|
|
5208
|
-
expression: isSet3(object.expression) ? globalThis.String(object.expression) : "",
|
|
5209
|
-
wired_source: isSet3(object.wiredSource) ? globalThis.String(object.wiredSource) : isSet3(object.wired_source) ? globalThis.String(object.wired_source) : ""
|
|
5210
|
-
};
|
|
5211
|
-
},
|
|
5212
|
-
toJSON(message) {
|
|
5213
|
-
const obj = {};
|
|
5214
|
-
if (message.name !== "") {
|
|
5215
|
-
obj.name = message.name;
|
|
5216
|
-
}
|
|
5217
|
-
if (message.type !== "") {
|
|
5218
|
-
obj.type = message.type;
|
|
5219
|
-
}
|
|
5220
|
-
if (message.required !== false) {
|
|
5221
|
-
obj.required = message.required;
|
|
5222
|
-
}
|
|
5223
|
-
if (message.description !== "") {
|
|
5224
|
-
obj.description = message.description;
|
|
5225
|
-
}
|
|
5226
|
-
if (message.default_value !== void 0) {
|
|
5227
|
-
obj.defaultValue = message.default_value;
|
|
5228
|
-
}
|
|
5229
|
-
if (message.validation !== void 0) {
|
|
5230
|
-
obj.validation = ValidationBlock2.toJSON(message.validation);
|
|
5231
|
-
}
|
|
5232
|
-
if (message.mode !== 0) {
|
|
5233
|
-
obj.mode = inputModeToJSON(message.mode);
|
|
5234
|
-
}
|
|
5235
|
-
if (message.value !== void 0) {
|
|
5236
|
-
obj.value = message.value;
|
|
5237
|
-
}
|
|
5238
|
-
if (message.variable !== "") {
|
|
5239
|
-
obj.variable = message.variable;
|
|
5240
|
-
}
|
|
5241
|
-
if (message.expression !== "") {
|
|
5242
|
-
obj.expression = message.expression;
|
|
5243
|
-
}
|
|
5244
|
-
if (message.wired_source !== "") {
|
|
5245
|
-
obj.wiredSource = message.wired_source;
|
|
5246
|
-
}
|
|
5247
|
-
return obj;
|
|
5248
|
-
},
|
|
5249
|
-
create(base) {
|
|
5250
|
-
return RenderInput.fromPartial(base ?? {});
|
|
5251
|
-
},
|
|
5252
|
-
fromPartial(object) {
|
|
5253
|
-
const message = createBaseRenderInput();
|
|
5254
|
-
message.name = object.name ?? "";
|
|
5255
|
-
message.type = object.type ?? "";
|
|
5256
|
-
message.required = object.required ?? false;
|
|
5257
|
-
message.description = object.description ?? "";
|
|
5258
|
-
message.default_value = object.default_value ?? void 0;
|
|
5259
|
-
message.validation = object.validation !== void 0 && object.validation !== null ? ValidationBlock2.fromPartial(object.validation) : void 0;
|
|
5260
|
-
message.mode = object.mode ?? 0;
|
|
5261
|
-
message.value = object.value ?? void 0;
|
|
5262
|
-
message.variable = object.variable ?? "";
|
|
5263
|
-
message.expression = object.expression ?? "";
|
|
5264
|
-
message.wired_source = object.wired_source ?? "";
|
|
5265
|
-
return message;
|
|
5266
|
-
}
|
|
5267
|
-
};
|
|
5268
|
-
function createBaseRenderOutput() {
|
|
5269
|
-
return { name: "", type: "", description: "", sensitive: false };
|
|
5270
|
-
}
|
|
5271
|
-
var RenderOutput = {
|
|
5272
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5273
|
-
if (message.name !== "") {
|
|
5274
|
-
writer.uint32(10).string(message.name);
|
|
5275
|
-
}
|
|
5276
|
-
if (message.type !== "") {
|
|
5277
|
-
writer.uint32(18).string(message.type);
|
|
5278
|
-
}
|
|
5279
|
-
if (message.description !== "") {
|
|
5280
|
-
writer.uint32(26).string(message.description);
|
|
5281
|
-
}
|
|
5282
|
-
if (message.sensitive !== false) {
|
|
5283
|
-
writer.uint32(32).bool(message.sensitive);
|
|
5284
|
-
}
|
|
5285
|
-
return writer;
|
|
5286
|
-
},
|
|
5287
|
-
decode(input, length) {
|
|
5288
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5289
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5290
|
-
const message = createBaseRenderOutput();
|
|
5291
|
-
while (reader.pos < end) {
|
|
5292
|
-
const tag = reader.uint32();
|
|
5293
|
-
switch (tag >>> 3) {
|
|
5294
|
-
case 1: {
|
|
5295
|
-
if (tag !== 10) {
|
|
5296
|
-
break;
|
|
5297
|
-
}
|
|
5298
|
-
message.name = reader.string();
|
|
5299
|
-
continue;
|
|
5300
|
-
}
|
|
5301
|
-
case 2: {
|
|
5302
|
-
if (tag !== 18) {
|
|
5303
|
-
break;
|
|
5304
|
-
}
|
|
5305
|
-
message.type = reader.string();
|
|
5306
|
-
continue;
|
|
5307
|
-
}
|
|
5308
|
-
case 3: {
|
|
5309
|
-
if (tag !== 26) {
|
|
5310
|
-
break;
|
|
5311
|
-
}
|
|
5312
|
-
message.description = reader.string();
|
|
5313
|
-
continue;
|
|
5314
|
-
}
|
|
5315
|
-
case 4: {
|
|
5316
|
-
if (tag !== 32) {
|
|
5317
|
-
break;
|
|
5318
|
-
}
|
|
5319
|
-
message.sensitive = reader.bool();
|
|
5320
|
-
continue;
|
|
5321
|
-
}
|
|
5322
|
-
}
|
|
5323
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5324
|
-
break;
|
|
5325
|
-
}
|
|
5326
|
-
reader.skip(tag & 7);
|
|
5327
|
-
}
|
|
5328
|
-
return message;
|
|
5329
|
-
},
|
|
5330
|
-
fromJSON(object) {
|
|
5331
|
-
return {
|
|
5332
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
5333
|
-
type: isSet3(object.type) ? globalThis.String(object.type) : "",
|
|
5334
|
-
description: isSet3(object.description) ? globalThis.String(object.description) : "",
|
|
5335
|
-
sensitive: isSet3(object.sensitive) ? globalThis.Boolean(object.sensitive) : false
|
|
5336
|
-
};
|
|
5337
|
-
},
|
|
5338
|
-
toJSON(message) {
|
|
5339
|
-
const obj = {};
|
|
5340
|
-
if (message.name !== "") {
|
|
5341
|
-
obj.name = message.name;
|
|
5342
|
-
}
|
|
5343
|
-
if (message.type !== "") {
|
|
5344
|
-
obj.type = message.type;
|
|
5345
|
-
}
|
|
5346
|
-
if (message.description !== "") {
|
|
5347
|
-
obj.description = message.description;
|
|
5348
|
-
}
|
|
5349
|
-
if (message.sensitive !== false) {
|
|
5350
|
-
obj.sensitive = message.sensitive;
|
|
5351
|
-
}
|
|
5352
|
-
return obj;
|
|
5353
|
-
},
|
|
5354
|
-
create(base) {
|
|
5355
|
-
return RenderOutput.fromPartial(base ?? {});
|
|
5356
|
-
},
|
|
5357
|
-
fromPartial(object) {
|
|
5358
|
-
const message = createBaseRenderOutput();
|
|
5359
|
-
message.name = object.name ?? "";
|
|
5360
|
-
message.type = object.type ?? "";
|
|
5361
|
-
message.description = object.description ?? "";
|
|
5362
|
-
message.sensitive = object.sensitive ?? false;
|
|
5363
|
-
return message;
|
|
5364
|
-
}
|
|
5365
|
-
};
|
|
5366
|
-
function createBaseNodeConfig() {
|
|
5367
|
-
return {
|
|
5368
|
-
instance_id: "",
|
|
5369
|
-
inputs: [],
|
|
5370
|
-
outputs: [],
|
|
5371
|
-
sibling_ids: [],
|
|
5372
|
-
depends_on: [],
|
|
5373
|
-
available_variables: [],
|
|
5374
|
-
providers: {}
|
|
5375
|
-
};
|
|
5376
|
-
}
|
|
5377
|
-
var NodeConfig = {
|
|
5378
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5379
|
-
if (message.instance_id !== "") {
|
|
5380
|
-
writer.uint32(10).string(message.instance_id);
|
|
5381
|
-
}
|
|
5382
|
-
for (const v of message.inputs) {
|
|
5383
|
-
RenderInput.encode(v, writer.uint32(18).fork()).join();
|
|
5384
|
-
}
|
|
5385
|
-
for (const v of message.outputs) {
|
|
5386
|
-
RenderOutput.encode(v, writer.uint32(26).fork()).join();
|
|
5387
|
-
}
|
|
5388
|
-
for (const v of message.sibling_ids) {
|
|
5389
|
-
writer.uint32(34).string(v);
|
|
5390
|
-
}
|
|
5391
|
-
for (const v of message.depends_on) {
|
|
5392
|
-
writer.uint32(42).string(v);
|
|
5393
|
-
}
|
|
5394
|
-
for (const v of message.available_variables) {
|
|
5395
|
-
VariableRef.encode(v, writer.uint32(50).fork()).join();
|
|
5396
|
-
}
|
|
5397
|
-
globalThis.Object.entries(message.providers).forEach(([key, value]) => {
|
|
5398
|
-
NodeConfig_ProvidersEntry.encode({ key, value }, writer.uint32(58).fork()).join();
|
|
5399
|
-
});
|
|
5400
|
-
return writer;
|
|
5401
|
-
},
|
|
5402
|
-
decode(input, length) {
|
|
5403
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5404
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5405
|
-
const message = createBaseNodeConfig();
|
|
5406
|
-
while (reader.pos < end) {
|
|
5407
|
-
const tag = reader.uint32();
|
|
5408
|
-
switch (tag >>> 3) {
|
|
5409
|
-
case 1: {
|
|
5410
|
-
if (tag !== 10) {
|
|
5411
|
-
break;
|
|
5412
|
-
}
|
|
5413
|
-
message.instance_id = reader.string();
|
|
5414
|
-
continue;
|
|
5415
|
-
}
|
|
5416
|
-
case 2: {
|
|
5417
|
-
if (tag !== 18) {
|
|
5418
|
-
break;
|
|
5419
|
-
}
|
|
5420
|
-
message.inputs.push(RenderInput.decode(reader, reader.uint32()));
|
|
5421
|
-
continue;
|
|
5422
|
-
}
|
|
5423
|
-
case 3: {
|
|
5424
|
-
if (tag !== 26) {
|
|
5425
|
-
break;
|
|
5426
|
-
}
|
|
5427
|
-
message.outputs.push(RenderOutput.decode(reader, reader.uint32()));
|
|
5428
|
-
continue;
|
|
5429
|
-
}
|
|
5430
|
-
case 4: {
|
|
5431
|
-
if (tag !== 34) {
|
|
5432
|
-
break;
|
|
5433
|
-
}
|
|
5434
|
-
message.sibling_ids.push(reader.string());
|
|
5435
|
-
continue;
|
|
5436
|
-
}
|
|
5437
|
-
case 5: {
|
|
5438
|
-
if (tag !== 42) {
|
|
5439
|
-
break;
|
|
5440
|
-
}
|
|
5441
|
-
message.depends_on.push(reader.string());
|
|
5442
|
-
continue;
|
|
5443
|
-
}
|
|
5444
|
-
case 6: {
|
|
5445
|
-
if (tag !== 50) {
|
|
5446
|
-
break;
|
|
5447
|
-
}
|
|
5448
|
-
message.available_variables.push(VariableRef.decode(reader, reader.uint32()));
|
|
5449
|
-
continue;
|
|
5450
|
-
}
|
|
5451
|
-
case 7: {
|
|
5452
|
-
if (tag !== 58) {
|
|
5453
|
-
break;
|
|
5454
|
-
}
|
|
5455
|
-
const entry7 = NodeConfig_ProvidersEntry.decode(reader, reader.uint32());
|
|
5456
|
-
if (entry7.value !== void 0) {
|
|
5457
|
-
message.providers[entry7.key] = entry7.value;
|
|
5458
|
-
}
|
|
5459
|
-
continue;
|
|
5460
|
-
}
|
|
5461
|
-
}
|
|
5462
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5463
|
-
break;
|
|
5464
|
-
}
|
|
5465
|
-
reader.skip(tag & 7);
|
|
5466
|
-
}
|
|
5467
|
-
return message;
|
|
5468
|
-
},
|
|
5469
|
-
fromJSON(object) {
|
|
5470
|
-
return {
|
|
5471
|
-
instance_id: isSet3(object.instanceId) ? globalThis.String(object.instanceId) : isSet3(object.instance_id) ? globalThis.String(object.instance_id) : "",
|
|
5472
|
-
inputs: globalThis.Array.isArray(object?.inputs) ? object.inputs.map((e) => RenderInput.fromJSON(e)) : [],
|
|
5473
|
-
outputs: globalThis.Array.isArray(object?.outputs) ? object.outputs.map((e) => RenderOutput.fromJSON(e)) : [],
|
|
5474
|
-
sibling_ids: globalThis.Array.isArray(object?.siblingIds) ? object.siblingIds.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.sibling_ids) ? object.sibling_ids.map((e) => globalThis.String(e)) : [],
|
|
5475
|
-
depends_on: globalThis.Array.isArray(object?.dependsOn) ? object.dependsOn.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.depends_on) ? object.depends_on.map((e) => globalThis.String(e)) : [],
|
|
5476
|
-
available_variables: globalThis.Array.isArray(object?.availableVariables) ? object.availableVariables.map((e) => VariableRef.fromJSON(e)) : globalThis.Array.isArray(object?.available_variables) ? object.available_variables.map((e) => VariableRef.fromJSON(e)) : [],
|
|
5477
|
-
providers: isObject3(object.providers) ? globalThis.Object.entries(object.providers).reduce(
|
|
5478
|
-
(acc, [key, value]) => {
|
|
5479
|
-
acc[key] = globalThis.String(value);
|
|
5480
|
-
return acc;
|
|
5481
|
-
},
|
|
5482
|
-
{}
|
|
5483
|
-
) : {}
|
|
5484
|
-
};
|
|
5485
|
-
},
|
|
5486
|
-
toJSON(message) {
|
|
5487
|
-
const obj = {};
|
|
5488
|
-
if (message.instance_id !== "") {
|
|
5489
|
-
obj.instanceId = message.instance_id;
|
|
5490
|
-
}
|
|
5491
|
-
if (message.inputs?.length) {
|
|
5492
|
-
obj.inputs = message.inputs.map((e) => RenderInput.toJSON(e));
|
|
5493
|
-
}
|
|
5494
|
-
if (message.outputs?.length) {
|
|
5495
|
-
obj.outputs = message.outputs.map((e) => RenderOutput.toJSON(e));
|
|
5496
|
-
}
|
|
5497
|
-
if (message.sibling_ids?.length) {
|
|
5498
|
-
obj.siblingIds = message.sibling_ids;
|
|
5499
|
-
}
|
|
5500
|
-
if (message.depends_on?.length) {
|
|
5501
|
-
obj.dependsOn = message.depends_on;
|
|
5502
|
-
}
|
|
5503
|
-
if (message.available_variables?.length) {
|
|
5504
|
-
obj.availableVariables = message.available_variables.map((e) => VariableRef.toJSON(e));
|
|
5505
|
-
}
|
|
5506
|
-
if (message.providers) {
|
|
5507
|
-
const entries = globalThis.Object.entries(message.providers);
|
|
5508
|
-
if (entries.length > 0) {
|
|
5509
|
-
obj.providers = {};
|
|
5510
|
-
entries.forEach(([k, v]) => {
|
|
5511
|
-
obj.providers[k] = v;
|
|
5512
|
-
});
|
|
5513
|
-
}
|
|
5514
|
-
}
|
|
5515
|
-
return obj;
|
|
5516
|
-
},
|
|
5517
|
-
create(base) {
|
|
5518
|
-
return NodeConfig.fromPartial(base ?? {});
|
|
5519
|
-
},
|
|
5520
|
-
fromPartial(object) {
|
|
5521
|
-
const message = createBaseNodeConfig();
|
|
5522
|
-
message.instance_id = object.instance_id ?? "";
|
|
5523
|
-
message.inputs = object.inputs?.map((e) => RenderInput.fromPartial(e)) || [];
|
|
5524
|
-
message.outputs = object.outputs?.map((e) => RenderOutput.fromPartial(e)) || [];
|
|
5525
|
-
message.sibling_ids = object.sibling_ids?.map((e) => e) || [];
|
|
5526
|
-
message.depends_on = object.depends_on?.map((e) => e) || [];
|
|
5527
|
-
message.available_variables = object.available_variables?.map((e) => VariableRef.fromPartial(e)) || [];
|
|
5528
|
-
message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
|
|
5529
|
-
(acc, [key, value]) => {
|
|
5530
|
-
if (value !== void 0) {
|
|
5531
|
-
acc[key] = globalThis.String(value);
|
|
5532
|
-
}
|
|
5533
|
-
return acc;
|
|
5534
|
-
},
|
|
5535
|
-
{}
|
|
5536
|
-
);
|
|
5537
|
-
return message;
|
|
5538
|
-
}
|
|
5539
|
-
};
|
|
5540
|
-
function createBaseNodeConfig_ProvidersEntry() {
|
|
5541
|
-
return { key: "", value: "" };
|
|
5542
|
-
}
|
|
5543
|
-
var NodeConfig_ProvidersEntry = {
|
|
5544
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5545
|
-
if (message.key !== "") {
|
|
5546
|
-
writer.uint32(10).string(message.key);
|
|
5547
|
-
}
|
|
5548
|
-
if (message.value !== "") {
|
|
5549
|
-
writer.uint32(18).string(message.value);
|
|
5550
|
-
}
|
|
5551
|
-
return writer;
|
|
5552
|
-
},
|
|
5553
|
-
decode(input, length) {
|
|
5554
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5555
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5556
|
-
const message = createBaseNodeConfig_ProvidersEntry();
|
|
5557
|
-
while (reader.pos < end) {
|
|
5558
|
-
const tag = reader.uint32();
|
|
5559
|
-
switch (tag >>> 3) {
|
|
5560
|
-
case 1: {
|
|
5561
|
-
if (tag !== 10) {
|
|
5562
|
-
break;
|
|
5563
|
-
}
|
|
5564
|
-
message.key = reader.string();
|
|
5565
|
-
continue;
|
|
5566
|
-
}
|
|
5567
|
-
case 2: {
|
|
5568
|
-
if (tag !== 18) {
|
|
5569
|
-
break;
|
|
5570
|
-
}
|
|
5571
|
-
message.value = reader.string();
|
|
5572
|
-
continue;
|
|
5573
|
-
}
|
|
5574
|
-
}
|
|
5575
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5576
|
-
break;
|
|
5577
|
-
}
|
|
5578
|
-
reader.skip(tag & 7);
|
|
5579
|
-
}
|
|
5580
|
-
return message;
|
|
5581
|
-
},
|
|
5582
|
-
fromJSON(object) {
|
|
5583
|
-
return {
|
|
5584
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
5585
|
-
value: isSet3(object.value) ? globalThis.String(object.value) : ""
|
|
5586
|
-
};
|
|
5587
|
-
},
|
|
5588
|
-
toJSON(message) {
|
|
5589
|
-
const obj = {};
|
|
5590
|
-
if (message.key !== "") {
|
|
5591
|
-
obj.key = message.key;
|
|
5592
|
-
}
|
|
5593
|
-
if (message.value !== "") {
|
|
5594
|
-
obj.value = message.value;
|
|
5595
|
-
}
|
|
5596
|
-
return obj;
|
|
5597
|
-
},
|
|
5598
|
-
create(base) {
|
|
5599
|
-
return NodeConfig_ProvidersEntry.fromPartial(base ?? {});
|
|
5600
|
-
},
|
|
5601
|
-
fromPartial(object) {
|
|
5602
|
-
const message = createBaseNodeConfig_ProvidersEntry();
|
|
5603
|
-
message.key = object.key ?? "";
|
|
5604
|
-
message.value = object.value ?? "";
|
|
5605
|
-
return message;
|
|
5606
|
-
}
|
|
5607
|
-
};
|
|
5608
|
-
function createBaseVariableRef() {
|
|
5609
|
-
return { name: "", type: "" };
|
|
5610
|
-
}
|
|
5611
|
-
var VariableRef = {
|
|
5612
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5613
|
-
if (message.name !== "") {
|
|
5614
|
-
writer.uint32(10).string(message.name);
|
|
5615
|
-
}
|
|
5616
|
-
if (message.type !== "") {
|
|
5617
|
-
writer.uint32(18).string(message.type);
|
|
5618
|
-
}
|
|
5619
|
-
return writer;
|
|
5620
|
-
},
|
|
5621
|
-
decode(input, length) {
|
|
5622
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5623
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5624
|
-
const message = createBaseVariableRef();
|
|
5625
|
-
while (reader.pos < end) {
|
|
5626
|
-
const tag = reader.uint32();
|
|
5627
|
-
switch (tag >>> 3) {
|
|
5628
|
-
case 1: {
|
|
5629
|
-
if (tag !== 10) {
|
|
5630
|
-
break;
|
|
5631
|
-
}
|
|
5632
|
-
message.name = reader.string();
|
|
5633
|
-
continue;
|
|
5634
|
-
}
|
|
5635
|
-
case 2: {
|
|
5636
|
-
if (tag !== 18) {
|
|
5637
|
-
break;
|
|
5638
|
-
}
|
|
5639
|
-
message.type = reader.string();
|
|
5640
|
-
continue;
|
|
5641
|
-
}
|
|
5642
|
-
}
|
|
5643
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5644
|
-
break;
|
|
5645
|
-
}
|
|
5646
|
-
reader.skip(tag & 7);
|
|
5647
|
-
}
|
|
5648
|
-
return message;
|
|
5649
|
-
},
|
|
5650
|
-
fromJSON(object) {
|
|
5651
|
-
return {
|
|
5652
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
5653
|
-
type: isSet3(object.type) ? globalThis.String(object.type) : ""
|
|
5654
|
-
};
|
|
5655
|
-
},
|
|
5656
|
-
toJSON(message) {
|
|
5657
|
-
const obj = {};
|
|
5658
|
-
if (message.name !== "") {
|
|
5659
|
-
obj.name = message.name;
|
|
5660
|
-
}
|
|
5661
|
-
if (message.type !== "") {
|
|
5662
|
-
obj.type = message.type;
|
|
5663
|
-
}
|
|
5664
|
-
return obj;
|
|
5665
|
-
},
|
|
5666
|
-
create(base) {
|
|
5667
|
-
return VariableRef.fromPartial(base ?? {});
|
|
5668
|
-
},
|
|
5669
|
-
fromPartial(object) {
|
|
5670
|
-
const message = createBaseVariableRef();
|
|
5671
|
-
message.name = object.name ?? "";
|
|
5672
|
-
message.type = object.type ?? "";
|
|
5673
|
-
return message;
|
|
5674
|
-
}
|
|
5675
|
-
};
|
|
5676
|
-
function createBaseEdgeConfig() {
|
|
5677
|
-
return { source_instance: "", target_instance: "", source_outputs: [], target_unbound_inputs: [] };
|
|
5678
|
-
}
|
|
5679
|
-
var EdgeConfig = {
|
|
5680
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5681
|
-
if (message.source_instance !== "") {
|
|
5682
|
-
writer.uint32(10).string(message.source_instance);
|
|
5683
|
-
}
|
|
5684
|
-
if (message.target_instance !== "") {
|
|
5685
|
-
writer.uint32(18).string(message.target_instance);
|
|
5686
|
-
}
|
|
5687
|
-
for (const v of message.source_outputs) {
|
|
5688
|
-
RenderOutput.encode(v, writer.uint32(26).fork()).join();
|
|
5689
|
-
}
|
|
5690
|
-
for (const v of message.target_unbound_inputs) {
|
|
5691
|
-
RenderInput.encode(v, writer.uint32(34).fork()).join();
|
|
5692
|
-
}
|
|
5693
|
-
return writer;
|
|
5694
|
-
},
|
|
5695
|
-
decode(input, length) {
|
|
5696
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5697
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5698
|
-
const message = createBaseEdgeConfig();
|
|
5699
|
-
while (reader.pos < end) {
|
|
5700
|
-
const tag = reader.uint32();
|
|
5701
|
-
switch (tag >>> 3) {
|
|
5702
|
-
case 1: {
|
|
5703
|
-
if (tag !== 10) {
|
|
5704
|
-
break;
|
|
5705
|
-
}
|
|
5706
|
-
message.source_instance = reader.string();
|
|
5707
|
-
continue;
|
|
5708
|
-
}
|
|
5709
|
-
case 2: {
|
|
5710
|
-
if (tag !== 18) {
|
|
5711
|
-
break;
|
|
5712
|
-
}
|
|
5713
|
-
message.target_instance = reader.string();
|
|
5714
|
-
continue;
|
|
5715
|
-
}
|
|
5716
|
-
case 3: {
|
|
5717
|
-
if (tag !== 26) {
|
|
5718
|
-
break;
|
|
5719
|
-
}
|
|
5720
|
-
message.source_outputs.push(RenderOutput.decode(reader, reader.uint32()));
|
|
5721
|
-
continue;
|
|
5722
|
-
}
|
|
5723
|
-
case 4: {
|
|
5724
|
-
if (tag !== 34) {
|
|
5725
|
-
break;
|
|
5726
|
-
}
|
|
5727
|
-
message.target_unbound_inputs.push(RenderInput.decode(reader, reader.uint32()));
|
|
5728
|
-
continue;
|
|
5729
|
-
}
|
|
5730
|
-
}
|
|
5731
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5732
|
-
break;
|
|
5733
|
-
}
|
|
5734
|
-
reader.skip(tag & 7);
|
|
5735
|
-
}
|
|
5736
|
-
return message;
|
|
5737
|
-
},
|
|
5738
|
-
fromJSON(object) {
|
|
5739
|
-
return {
|
|
5740
|
-
source_instance: isSet3(object.sourceInstance) ? globalThis.String(object.sourceInstance) : isSet3(object.source_instance) ? globalThis.String(object.source_instance) : "",
|
|
5741
|
-
target_instance: isSet3(object.targetInstance) ? globalThis.String(object.targetInstance) : isSet3(object.target_instance) ? globalThis.String(object.target_instance) : "",
|
|
5742
|
-
source_outputs: globalThis.Array.isArray(object?.sourceOutputs) ? object.sourceOutputs.map((e) => RenderOutput.fromJSON(e)) : globalThis.Array.isArray(object?.source_outputs) ? object.source_outputs.map((e) => RenderOutput.fromJSON(e)) : [],
|
|
5743
|
-
target_unbound_inputs: globalThis.Array.isArray(object?.targetUnboundInputs) ? object.targetUnboundInputs.map((e) => RenderInput.fromJSON(e)) : globalThis.Array.isArray(object?.target_unbound_inputs) ? object.target_unbound_inputs.map((e) => RenderInput.fromJSON(e)) : []
|
|
5744
|
-
};
|
|
5745
|
-
},
|
|
5746
|
-
toJSON(message) {
|
|
5747
|
-
const obj = {};
|
|
5748
|
-
if (message.source_instance !== "") {
|
|
5749
|
-
obj.sourceInstance = message.source_instance;
|
|
5750
|
-
}
|
|
5751
|
-
if (message.target_instance !== "") {
|
|
5752
|
-
obj.targetInstance = message.target_instance;
|
|
5753
|
-
}
|
|
5754
|
-
if (message.source_outputs?.length) {
|
|
5755
|
-
obj.sourceOutputs = message.source_outputs.map((e) => RenderOutput.toJSON(e));
|
|
5756
|
-
}
|
|
5757
|
-
if (message.target_unbound_inputs?.length) {
|
|
5758
|
-
obj.targetUnboundInputs = message.target_unbound_inputs.map((e) => RenderInput.toJSON(e));
|
|
5759
|
-
}
|
|
5760
|
-
return obj;
|
|
5761
|
-
},
|
|
5762
|
-
create(base) {
|
|
5763
|
-
return EdgeConfig.fromPartial(base ?? {});
|
|
5764
|
-
},
|
|
5765
|
-
fromPartial(object) {
|
|
5766
|
-
const message = createBaseEdgeConfig();
|
|
5767
|
-
message.source_instance = object.source_instance ?? "";
|
|
5768
|
-
message.target_instance = object.target_instance ?? "";
|
|
5769
|
-
message.source_outputs = object.source_outputs?.map((e) => RenderOutput.fromPartial(e)) || [];
|
|
5770
|
-
message.target_unbound_inputs = object.target_unbound_inputs?.map((e) => RenderInput.fromPartial(e)) || [];
|
|
5771
|
-
return message;
|
|
5772
|
-
}
|
|
5773
|
-
};
|
|
5774
|
-
function createBaseSettingsConfig() {
|
|
5775
|
-
return {
|
|
5776
|
-
terraform: void 0,
|
|
5777
|
-
providers: [],
|
|
5778
|
-
locals: [],
|
|
5779
|
-
environments: {},
|
|
5780
|
-
environment_backends: {},
|
|
5781
|
-
variables: [],
|
|
5782
|
-
exports: [],
|
|
5783
|
-
output_defs: []
|
|
5784
|
-
};
|
|
5785
|
-
}
|
|
5786
|
-
var SettingsConfig = {
|
|
5787
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
5788
|
-
if (message.terraform !== void 0) {
|
|
5789
|
-
TerraformView.encode(message.terraform, writer.uint32(10).fork()).join();
|
|
5790
|
-
}
|
|
5791
|
-
for (const v of message.providers) {
|
|
5792
|
-
ProviderView.encode(v, writer.uint32(18).fork()).join();
|
|
5793
|
-
}
|
|
5794
|
-
for (const v of message.locals) {
|
|
5795
|
-
LocalView.encode(v, writer.uint32(26).fork()).join();
|
|
5796
|
-
}
|
|
5797
|
-
globalThis.Object.entries(message.environments).forEach(
|
|
5798
|
-
([key, value]) => {
|
|
5799
|
-
if (value !== void 0) {
|
|
5800
|
-
SettingsConfig_EnvironmentsEntry.encode({ key, value }, writer.uint32(34).fork()).join();
|
|
5801
|
-
}
|
|
5802
|
-
}
|
|
5803
|
-
);
|
|
5804
|
-
globalThis.Object.entries(message.environment_backends).forEach(([key, value]) => {
|
|
5805
|
-
SettingsConfig_EnvironmentBackendsEntry.encode({ key, value }, writer.uint32(42).fork()).join();
|
|
5806
|
-
});
|
|
5807
|
-
for (const v of message.variables) {
|
|
5808
|
-
InputDef2.encode(v, writer.uint32(50).fork()).join();
|
|
5809
|
-
}
|
|
5810
|
-
for (const v of message.exports) {
|
|
5811
|
-
OutputExportEntry.encode(v, writer.uint32(58).fork()).join();
|
|
5812
|
-
}
|
|
5813
|
-
for (const v of message.output_defs) {
|
|
5814
|
-
OutputDef2.encode(v, writer.uint32(66).fork()).join();
|
|
5815
|
-
}
|
|
5816
|
-
return writer;
|
|
5817
|
-
},
|
|
5818
|
-
decode(input, length) {
|
|
5819
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
5820
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
5821
|
-
const message = createBaseSettingsConfig();
|
|
5822
|
-
while (reader.pos < end) {
|
|
5823
|
-
const tag = reader.uint32();
|
|
5824
|
-
switch (tag >>> 3) {
|
|
5825
|
-
case 1: {
|
|
5826
|
-
if (tag !== 10) {
|
|
5827
|
-
break;
|
|
5828
|
-
}
|
|
5829
|
-
message.terraform = TerraformView.decode(reader, reader.uint32());
|
|
5830
|
-
continue;
|
|
5831
|
-
}
|
|
5832
|
-
case 2: {
|
|
5833
|
-
if (tag !== 18) {
|
|
5834
|
-
break;
|
|
5835
|
-
}
|
|
5836
|
-
message.providers.push(ProviderView.decode(reader, reader.uint32()));
|
|
5837
|
-
continue;
|
|
5838
|
-
}
|
|
5839
|
-
case 3: {
|
|
5840
|
-
if (tag !== 26) {
|
|
5841
|
-
break;
|
|
5842
|
-
}
|
|
5843
|
-
message.locals.push(LocalView.decode(reader, reader.uint32()));
|
|
5844
|
-
continue;
|
|
5845
|
-
}
|
|
5846
|
-
case 4: {
|
|
5847
|
-
if (tag !== 34) {
|
|
5848
|
-
break;
|
|
5849
|
-
}
|
|
5850
|
-
const entry4 = SettingsConfig_EnvironmentsEntry.decode(reader, reader.uint32());
|
|
5851
|
-
if (entry4.value !== void 0) {
|
|
5852
|
-
message.environments[entry4.key] = entry4.value;
|
|
5853
|
-
}
|
|
5854
|
-
continue;
|
|
5855
|
-
}
|
|
5856
|
-
case 5: {
|
|
5857
|
-
if (tag !== 42) {
|
|
5858
|
-
break;
|
|
5859
|
-
}
|
|
5860
|
-
const entry5 = SettingsConfig_EnvironmentBackendsEntry.decode(reader, reader.uint32());
|
|
5861
|
-
if (entry5.value !== void 0) {
|
|
5862
|
-
message.environment_backends[entry5.key] = entry5.value;
|
|
5863
|
-
}
|
|
5864
|
-
continue;
|
|
5865
|
-
}
|
|
5866
|
-
case 6: {
|
|
5867
|
-
if (tag !== 50) {
|
|
5868
|
-
break;
|
|
5869
|
-
}
|
|
5870
|
-
message.variables.push(InputDef2.decode(reader, reader.uint32()));
|
|
5871
|
-
continue;
|
|
5872
|
-
}
|
|
5873
|
-
case 7: {
|
|
5874
|
-
if (tag !== 58) {
|
|
5875
|
-
break;
|
|
5876
|
-
}
|
|
5877
|
-
message.exports.push(OutputExportEntry.decode(reader, reader.uint32()));
|
|
5878
|
-
continue;
|
|
5879
|
-
}
|
|
5880
|
-
case 8: {
|
|
5881
|
-
if (tag !== 66) {
|
|
5882
|
-
break;
|
|
5883
|
-
}
|
|
5884
|
-
message.output_defs.push(OutputDef2.decode(reader, reader.uint32()));
|
|
5885
|
-
continue;
|
|
5886
|
-
}
|
|
5887
|
-
}
|
|
5888
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
5889
|
-
break;
|
|
5890
|
-
}
|
|
5891
|
-
reader.skip(tag & 7);
|
|
5892
|
-
}
|
|
5893
|
-
return message;
|
|
5894
|
-
},
|
|
5895
|
-
fromJSON(object) {
|
|
5896
|
-
return {
|
|
5897
|
-
terraform: isSet3(object.terraform) ? TerraformView.fromJSON(object.terraform) : void 0,
|
|
5898
|
-
providers: globalThis.Array.isArray(object?.providers) ? object.providers.map((e) => ProviderView.fromJSON(e)) : [],
|
|
5899
|
-
locals: globalThis.Array.isArray(object?.locals) ? object.locals.map((e) => LocalView.fromJSON(e)) : [],
|
|
5900
|
-
environments: isObject3(object.environments) ? globalThis.Object.entries(object.environments).reduce(
|
|
5901
|
-
(acc, [key, value]) => {
|
|
5902
|
-
acc[key] = value;
|
|
5903
|
-
return acc;
|
|
5904
|
-
},
|
|
5905
|
-
{}
|
|
5906
|
-
) : {},
|
|
5907
|
-
environment_backends: isObject3(object.environmentBackends) ? globalThis.Object.entries(object.environmentBackends).reduce(
|
|
5908
|
-
(acc, [key, value]) => {
|
|
5909
|
-
acc[key] = BackendView.fromJSON(value);
|
|
5910
|
-
return acc;
|
|
5911
|
-
},
|
|
5912
|
-
{}
|
|
5913
|
-
) : isObject3(object.environment_backends) ? globalThis.Object.entries(object.environment_backends).reduce(
|
|
5914
|
-
(acc, [key, value]) => {
|
|
5915
|
-
acc[key] = BackendView.fromJSON(value);
|
|
5916
|
-
return acc;
|
|
5917
|
-
},
|
|
5918
|
-
{}
|
|
5919
|
-
) : {},
|
|
5920
|
-
variables: globalThis.Array.isArray(object?.variables) ? object.variables.map((e) => InputDef2.fromJSON(e)) : [],
|
|
5921
|
-
exports: globalThis.Array.isArray(object?.exports) ? object.exports.map((e) => OutputExportEntry.fromJSON(e)) : [],
|
|
5922
|
-
output_defs: globalThis.Array.isArray(object?.outputDefs) ? object.outputDefs.map((e) => OutputDef2.fromJSON(e)) : globalThis.Array.isArray(object?.output_defs) ? object.output_defs.map((e) => OutputDef2.fromJSON(e)) : []
|
|
5923
|
-
};
|
|
5924
|
-
},
|
|
5925
|
-
toJSON(message) {
|
|
5926
|
-
const obj = {};
|
|
5927
|
-
if (message.terraform !== void 0) {
|
|
5928
|
-
obj.terraform = TerraformView.toJSON(message.terraform);
|
|
5929
|
-
}
|
|
5930
|
-
if (message.providers?.length) {
|
|
5931
|
-
obj.providers = message.providers.map((e) => ProviderView.toJSON(e));
|
|
5932
|
-
}
|
|
5933
|
-
if (message.locals?.length) {
|
|
5934
|
-
obj.locals = message.locals.map((e) => LocalView.toJSON(e));
|
|
5935
|
-
}
|
|
5936
|
-
if (message.environments) {
|
|
5937
|
-
const entries = globalThis.Object.entries(message.environments);
|
|
5938
|
-
if (entries.length > 0) {
|
|
5939
|
-
obj.environments = {};
|
|
5940
|
-
entries.forEach(([k, v]) => {
|
|
5941
|
-
obj.environments[k] = v;
|
|
5942
|
-
});
|
|
5943
|
-
}
|
|
5944
|
-
}
|
|
5945
|
-
if (message.environment_backends) {
|
|
5946
|
-
const entries = globalThis.Object.entries(message.environment_backends);
|
|
5947
|
-
if (entries.length > 0) {
|
|
5948
|
-
obj.environmentBackends = {};
|
|
5949
|
-
entries.forEach(([k, v]) => {
|
|
5950
|
-
obj.environmentBackends[k] = BackendView.toJSON(v);
|
|
5951
|
-
});
|
|
5952
|
-
}
|
|
5953
|
-
}
|
|
5954
|
-
if (message.variables?.length) {
|
|
5955
|
-
obj.variables = message.variables.map((e) => InputDef2.toJSON(e));
|
|
5956
|
-
}
|
|
5957
|
-
if (message.exports?.length) {
|
|
5958
|
-
obj.exports = message.exports.map((e) => OutputExportEntry.toJSON(e));
|
|
5959
|
-
}
|
|
5960
|
-
if (message.output_defs?.length) {
|
|
5961
|
-
obj.outputDefs = message.output_defs.map((e) => OutputDef2.toJSON(e));
|
|
5962
|
-
}
|
|
5963
|
-
return obj;
|
|
5964
|
-
},
|
|
5965
|
-
create(base) {
|
|
5966
|
-
return SettingsConfig.fromPartial(base ?? {});
|
|
5967
|
-
},
|
|
5968
|
-
fromPartial(object) {
|
|
5969
|
-
const message = createBaseSettingsConfig();
|
|
5970
|
-
message.terraform = object.terraform !== void 0 && object.terraform !== null ? TerraformView.fromPartial(object.terraform) : void 0;
|
|
5971
|
-
message.providers = object.providers?.map((e) => ProviderView.fromPartial(e)) || [];
|
|
5972
|
-
message.locals = object.locals?.map((e) => LocalView.fromPartial(e)) || [];
|
|
5973
|
-
message.environments = globalThis.Object.entries(object.environments ?? {}).reduce(
|
|
5974
|
-
(acc, [key, value]) => {
|
|
5975
|
-
if (value !== void 0) {
|
|
5976
|
-
acc[key] = value;
|
|
5977
|
-
}
|
|
5978
|
-
return acc;
|
|
5979
|
-
},
|
|
5980
|
-
{}
|
|
5981
|
-
);
|
|
5982
|
-
message.environment_backends = globalThis.Object.entries(object.environment_backends ?? {}).reduce(
|
|
5983
|
-
(acc, [key, value]) => {
|
|
5984
|
-
if (value !== void 0) {
|
|
5985
|
-
acc[key] = BackendView.fromPartial(value);
|
|
5986
|
-
}
|
|
5987
|
-
return acc;
|
|
5988
|
-
},
|
|
5989
|
-
{}
|
|
5990
|
-
);
|
|
5991
|
-
message.variables = object.variables?.map((e) => InputDef2.fromPartial(e)) || [];
|
|
5992
|
-
message.exports = object.exports?.map((e) => OutputExportEntry.fromPartial(e)) || [];
|
|
5993
|
-
message.output_defs = object.output_defs?.map((e) => OutputDef2.fromPartial(e)) || [];
|
|
5994
|
-
return message;
|
|
5995
|
-
}
|
|
5996
|
-
};
|
|
5997
|
-
function createBaseSettingsConfig_EnvironmentsEntry() {
|
|
5998
|
-
return { key: "", value: void 0 };
|
|
5999
|
-
}
|
|
6000
|
-
var SettingsConfig_EnvironmentsEntry = {
|
|
6001
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6002
|
-
if (message.key !== "") {
|
|
6003
|
-
writer.uint32(10).string(message.key);
|
|
6004
|
-
}
|
|
6005
|
-
if (message.value !== void 0) {
|
|
6006
|
-
Struct.encode(Struct.wrap(message.value), writer.uint32(18).fork()).join();
|
|
6007
|
-
}
|
|
6008
|
-
return writer;
|
|
6009
|
-
},
|
|
6010
|
-
decode(input, length) {
|
|
6011
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6012
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6013
|
-
const message = createBaseSettingsConfig_EnvironmentsEntry();
|
|
6014
|
-
while (reader.pos < end) {
|
|
6015
|
-
const tag = reader.uint32();
|
|
6016
|
-
switch (tag >>> 3) {
|
|
6017
|
-
case 1: {
|
|
6018
|
-
if (tag !== 10) {
|
|
6019
|
-
break;
|
|
6020
|
-
}
|
|
6021
|
-
message.key = reader.string();
|
|
6022
|
-
continue;
|
|
6023
|
-
}
|
|
6024
|
-
case 2: {
|
|
6025
|
-
if (tag !== 18) {
|
|
6026
|
-
break;
|
|
6027
|
-
}
|
|
6028
|
-
message.value = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
6029
|
-
continue;
|
|
6030
|
-
}
|
|
6031
|
-
}
|
|
6032
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6033
|
-
break;
|
|
6034
|
-
}
|
|
6035
|
-
reader.skip(tag & 7);
|
|
6036
|
-
}
|
|
6037
|
-
return message;
|
|
6038
|
-
},
|
|
6039
|
-
fromJSON(object) {
|
|
6040
|
-
return {
|
|
6041
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
6042
|
-
value: isObject3(object.value) ? object.value : void 0
|
|
6043
|
-
};
|
|
6044
|
-
},
|
|
6045
|
-
toJSON(message) {
|
|
6046
|
-
const obj = {};
|
|
6047
|
-
if (message.key !== "") {
|
|
6048
|
-
obj.key = message.key;
|
|
6049
|
-
}
|
|
6050
|
-
if (message.value !== void 0) {
|
|
6051
|
-
obj.value = message.value;
|
|
6052
|
-
}
|
|
6053
|
-
return obj;
|
|
6054
|
-
},
|
|
6055
|
-
create(base) {
|
|
6056
|
-
return SettingsConfig_EnvironmentsEntry.fromPartial(base ?? {});
|
|
6057
|
-
},
|
|
6058
|
-
fromPartial(object) {
|
|
6059
|
-
const message = createBaseSettingsConfig_EnvironmentsEntry();
|
|
6060
|
-
message.key = object.key ?? "";
|
|
6061
|
-
message.value = object.value ?? void 0;
|
|
6062
|
-
return message;
|
|
6063
|
-
}
|
|
6064
|
-
};
|
|
6065
|
-
function createBaseSettingsConfig_EnvironmentBackendsEntry() {
|
|
6066
|
-
return { key: "", value: void 0 };
|
|
6067
|
-
}
|
|
6068
|
-
var SettingsConfig_EnvironmentBackendsEntry = {
|
|
6069
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6070
|
-
if (message.key !== "") {
|
|
6071
|
-
writer.uint32(10).string(message.key);
|
|
6072
|
-
}
|
|
6073
|
-
if (message.value !== void 0) {
|
|
6074
|
-
BackendView.encode(message.value, writer.uint32(18).fork()).join();
|
|
6075
|
-
}
|
|
6076
|
-
return writer;
|
|
6077
|
-
},
|
|
6078
|
-
decode(input, length) {
|
|
6079
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6080
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6081
|
-
const message = createBaseSettingsConfig_EnvironmentBackendsEntry();
|
|
6082
|
-
while (reader.pos < end) {
|
|
6083
|
-
const tag = reader.uint32();
|
|
6084
|
-
switch (tag >>> 3) {
|
|
6085
|
-
case 1: {
|
|
6086
|
-
if (tag !== 10) {
|
|
6087
|
-
break;
|
|
6088
|
-
}
|
|
6089
|
-
message.key = reader.string();
|
|
6090
|
-
continue;
|
|
6091
|
-
}
|
|
6092
|
-
case 2: {
|
|
6093
|
-
if (tag !== 18) {
|
|
6094
|
-
break;
|
|
6095
|
-
}
|
|
6096
|
-
message.value = BackendView.decode(reader, reader.uint32());
|
|
6097
|
-
continue;
|
|
6098
|
-
}
|
|
6099
|
-
}
|
|
6100
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6101
|
-
break;
|
|
6102
|
-
}
|
|
6103
|
-
reader.skip(tag & 7);
|
|
6104
|
-
}
|
|
6105
|
-
return message;
|
|
6106
|
-
},
|
|
6107
|
-
fromJSON(object) {
|
|
6108
|
-
return {
|
|
6109
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
6110
|
-
value: isSet3(object.value) ? BackendView.fromJSON(object.value) : void 0
|
|
6111
|
-
};
|
|
6112
|
-
},
|
|
6113
|
-
toJSON(message) {
|
|
6114
|
-
const obj = {};
|
|
6115
|
-
if (message.key !== "") {
|
|
6116
|
-
obj.key = message.key;
|
|
6117
|
-
}
|
|
6118
|
-
if (message.value !== void 0) {
|
|
6119
|
-
obj.value = BackendView.toJSON(message.value);
|
|
6120
|
-
}
|
|
6121
|
-
return obj;
|
|
6122
|
-
},
|
|
6123
|
-
create(base) {
|
|
6124
|
-
return SettingsConfig_EnvironmentBackendsEntry.fromPartial(base ?? {});
|
|
6125
|
-
},
|
|
6126
|
-
fromPartial(object) {
|
|
6127
|
-
const message = createBaseSettingsConfig_EnvironmentBackendsEntry();
|
|
6128
|
-
message.key = object.key ?? "";
|
|
6129
|
-
message.value = object.value !== void 0 && object.value !== null ? BackendView.fromPartial(object.value) : void 0;
|
|
6130
|
-
return message;
|
|
6131
|
-
}
|
|
6132
|
-
};
|
|
6133
|
-
function createBaseTerraformView() {
|
|
6134
|
-
return { required_version: "", required_providers: [], backend: void 0 };
|
|
6135
|
-
}
|
|
6136
|
-
var TerraformView = {
|
|
6137
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6138
|
-
if (message.required_version !== "") {
|
|
6139
|
-
writer.uint32(10).string(message.required_version);
|
|
6140
|
-
}
|
|
6141
|
-
for (const v of message.required_providers) {
|
|
6142
|
-
ProviderReqView.encode(v, writer.uint32(18).fork()).join();
|
|
6143
|
-
}
|
|
6144
|
-
if (message.backend !== void 0) {
|
|
6145
|
-
BackendView.encode(message.backend, writer.uint32(26).fork()).join();
|
|
6146
|
-
}
|
|
6147
|
-
return writer;
|
|
6148
|
-
},
|
|
6149
|
-
decode(input, length) {
|
|
6150
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6151
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6152
|
-
const message = createBaseTerraformView();
|
|
6153
|
-
while (reader.pos < end) {
|
|
6154
|
-
const tag = reader.uint32();
|
|
6155
|
-
switch (tag >>> 3) {
|
|
6156
|
-
case 1: {
|
|
6157
|
-
if (tag !== 10) {
|
|
6158
|
-
break;
|
|
6159
|
-
}
|
|
6160
|
-
message.required_version = reader.string();
|
|
6161
|
-
continue;
|
|
6162
|
-
}
|
|
6163
|
-
case 2: {
|
|
6164
|
-
if (tag !== 18) {
|
|
6165
|
-
break;
|
|
6166
|
-
}
|
|
6167
|
-
message.required_providers.push(ProviderReqView.decode(reader, reader.uint32()));
|
|
6168
|
-
continue;
|
|
6169
|
-
}
|
|
6170
|
-
case 3: {
|
|
6171
|
-
if (tag !== 26) {
|
|
6172
|
-
break;
|
|
6173
|
-
}
|
|
6174
|
-
message.backend = BackendView.decode(reader, reader.uint32());
|
|
6175
|
-
continue;
|
|
6176
|
-
}
|
|
6177
|
-
}
|
|
6178
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6179
|
-
break;
|
|
6180
|
-
}
|
|
6181
|
-
reader.skip(tag & 7);
|
|
6182
|
-
}
|
|
6183
|
-
return message;
|
|
6184
|
-
},
|
|
6185
|
-
fromJSON(object) {
|
|
6186
|
-
return {
|
|
6187
|
-
required_version: isSet3(object.requiredVersion) ? globalThis.String(object.requiredVersion) : isSet3(object.required_version) ? globalThis.String(object.required_version) : "",
|
|
6188
|
-
required_providers: globalThis.Array.isArray(object?.requiredProviders) ? object.requiredProviders.map((e) => ProviderReqView.fromJSON(e)) : globalThis.Array.isArray(object?.required_providers) ? object.required_providers.map((e) => ProviderReqView.fromJSON(e)) : [],
|
|
6189
|
-
backend: isSet3(object.backend) ? BackendView.fromJSON(object.backend) : void 0
|
|
6190
|
-
};
|
|
6191
|
-
},
|
|
6192
|
-
toJSON(message) {
|
|
6193
|
-
const obj = {};
|
|
6194
|
-
if (message.required_version !== "") {
|
|
6195
|
-
obj.requiredVersion = message.required_version;
|
|
6196
|
-
}
|
|
6197
|
-
if (message.required_providers?.length) {
|
|
6198
|
-
obj.requiredProviders = message.required_providers.map((e) => ProviderReqView.toJSON(e));
|
|
6199
|
-
}
|
|
6200
|
-
if (message.backend !== void 0) {
|
|
6201
|
-
obj.backend = BackendView.toJSON(message.backend);
|
|
6202
|
-
}
|
|
6203
|
-
return obj;
|
|
6204
|
-
},
|
|
6205
|
-
create(base) {
|
|
6206
|
-
return TerraformView.fromPartial(base ?? {});
|
|
6207
|
-
},
|
|
6208
|
-
fromPartial(object) {
|
|
6209
|
-
const message = createBaseTerraformView();
|
|
6210
|
-
message.required_version = object.required_version ?? "";
|
|
6211
|
-
message.required_providers = object.required_providers?.map((e) => ProviderReqView.fromPartial(e)) || [];
|
|
6212
|
-
message.backend = object.backend !== void 0 && object.backend !== null ? BackendView.fromPartial(object.backend) : void 0;
|
|
6213
|
-
return message;
|
|
6214
|
-
}
|
|
6215
|
-
};
|
|
6216
|
-
function createBaseProviderReqView() {
|
|
6217
|
-
return { name: "", source: "", version: "", configuration_aliases: [] };
|
|
6218
|
-
}
|
|
6219
|
-
var ProviderReqView = {
|
|
6220
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6221
|
-
if (message.name !== "") {
|
|
6222
|
-
writer.uint32(10).string(message.name);
|
|
6223
|
-
}
|
|
6224
|
-
if (message.source !== "") {
|
|
6225
|
-
writer.uint32(18).string(message.source);
|
|
6226
|
-
}
|
|
6227
|
-
if (message.version !== "") {
|
|
6228
|
-
writer.uint32(26).string(message.version);
|
|
6229
|
-
}
|
|
6230
|
-
for (const v of message.configuration_aliases) {
|
|
6231
|
-
writer.uint32(34).string(v);
|
|
6232
|
-
}
|
|
6233
|
-
return writer;
|
|
6234
|
-
},
|
|
6235
|
-
decode(input, length) {
|
|
6236
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6237
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6238
|
-
const message = createBaseProviderReqView();
|
|
6239
|
-
while (reader.pos < end) {
|
|
6240
|
-
const tag = reader.uint32();
|
|
6241
|
-
switch (tag >>> 3) {
|
|
6242
|
-
case 1: {
|
|
6243
|
-
if (tag !== 10) {
|
|
6244
|
-
break;
|
|
6245
|
-
}
|
|
6246
|
-
message.name = reader.string();
|
|
6247
|
-
continue;
|
|
6248
|
-
}
|
|
6249
|
-
case 2: {
|
|
6250
|
-
if (tag !== 18) {
|
|
6251
|
-
break;
|
|
6252
|
-
}
|
|
6253
|
-
message.source = reader.string();
|
|
6254
|
-
continue;
|
|
6255
|
-
}
|
|
6256
|
-
case 3: {
|
|
6257
|
-
if (tag !== 26) {
|
|
6258
|
-
break;
|
|
6259
|
-
}
|
|
6260
|
-
message.version = reader.string();
|
|
6261
|
-
continue;
|
|
6262
|
-
}
|
|
6263
|
-
case 4: {
|
|
6264
|
-
if (tag !== 34) {
|
|
6265
|
-
break;
|
|
6266
|
-
}
|
|
6267
|
-
message.configuration_aliases.push(reader.string());
|
|
6268
|
-
continue;
|
|
6269
|
-
}
|
|
6270
|
-
}
|
|
6271
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6272
|
-
break;
|
|
6273
|
-
}
|
|
6274
|
-
reader.skip(tag & 7);
|
|
6275
|
-
}
|
|
6276
|
-
return message;
|
|
6277
|
-
},
|
|
6278
|
-
fromJSON(object) {
|
|
6279
|
-
return {
|
|
6280
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
6281
|
-
source: isSet3(object.source) ? globalThis.String(object.source) : "",
|
|
6282
|
-
version: isSet3(object.version) ? globalThis.String(object.version) : "",
|
|
6283
|
-
configuration_aliases: globalThis.Array.isArray(object?.configurationAliases) ? object.configurationAliases.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.configuration_aliases) ? object.configuration_aliases.map((e) => globalThis.String(e)) : []
|
|
6284
|
-
};
|
|
6285
|
-
},
|
|
6286
|
-
toJSON(message) {
|
|
6287
|
-
const obj = {};
|
|
6288
|
-
if (message.name !== "") {
|
|
6289
|
-
obj.name = message.name;
|
|
6290
|
-
}
|
|
6291
|
-
if (message.source !== "") {
|
|
6292
|
-
obj.source = message.source;
|
|
6293
|
-
}
|
|
6294
|
-
if (message.version !== "") {
|
|
6295
|
-
obj.version = message.version;
|
|
6296
|
-
}
|
|
6297
|
-
if (message.configuration_aliases?.length) {
|
|
6298
|
-
obj.configurationAliases = message.configuration_aliases;
|
|
6299
|
-
}
|
|
6300
|
-
return obj;
|
|
6301
|
-
},
|
|
6302
|
-
create(base) {
|
|
6303
|
-
return ProviderReqView.fromPartial(base ?? {});
|
|
6304
|
-
},
|
|
6305
|
-
fromPartial(object) {
|
|
6306
|
-
const message = createBaseProviderReqView();
|
|
6307
|
-
message.name = object.name ?? "";
|
|
6308
|
-
message.source = object.source ?? "";
|
|
6309
|
-
message.version = object.version ?? "";
|
|
6310
|
-
message.configuration_aliases = object.configuration_aliases?.map((e) => e) || [];
|
|
6311
|
-
return message;
|
|
6312
|
-
}
|
|
6313
|
-
};
|
|
6314
|
-
function createBaseBackendView() {
|
|
6315
|
-
return { type: "", config: {} };
|
|
6316
|
-
}
|
|
6317
|
-
var BackendView = {
|
|
6318
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6319
|
-
if (message.type !== "") {
|
|
6320
|
-
writer.uint32(10).string(message.type);
|
|
6321
|
-
}
|
|
6322
|
-
globalThis.Object.entries(message.config).forEach(([key, value]) => {
|
|
6323
|
-
if (value !== void 0) {
|
|
6324
|
-
BackendView_ConfigEntry.encode({ key, value }, writer.uint32(18).fork()).join();
|
|
6325
|
-
}
|
|
6326
|
-
});
|
|
6327
|
-
return writer;
|
|
6328
|
-
},
|
|
6329
|
-
decode(input, length) {
|
|
6330
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6331
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6332
|
-
const message = createBaseBackendView();
|
|
6333
|
-
while (reader.pos < end) {
|
|
6334
|
-
const tag = reader.uint32();
|
|
6335
|
-
switch (tag >>> 3) {
|
|
6336
|
-
case 1: {
|
|
6337
|
-
if (tag !== 10) {
|
|
6338
|
-
break;
|
|
6339
|
-
}
|
|
6340
|
-
message.type = reader.string();
|
|
6341
|
-
continue;
|
|
6342
|
-
}
|
|
6343
|
-
case 2: {
|
|
6344
|
-
if (tag !== 18) {
|
|
6345
|
-
break;
|
|
6346
|
-
}
|
|
6347
|
-
const entry2 = BackendView_ConfigEntry.decode(reader, reader.uint32());
|
|
6348
|
-
if (entry2.value !== void 0) {
|
|
6349
|
-
message.config[entry2.key] = entry2.value;
|
|
6350
|
-
}
|
|
6351
|
-
continue;
|
|
6352
|
-
}
|
|
6353
|
-
}
|
|
6354
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6355
|
-
break;
|
|
6356
|
-
}
|
|
6357
|
-
reader.skip(tag & 7);
|
|
6358
|
-
}
|
|
6359
|
-
return message;
|
|
6360
|
-
},
|
|
6361
|
-
fromJSON(object) {
|
|
6362
|
-
return {
|
|
6363
|
-
type: isSet3(object.type) ? globalThis.String(object.type) : "",
|
|
6364
|
-
config: isObject3(object.config) ? globalThis.Object.entries(object.config).reduce(
|
|
6365
|
-
(acc, [key, value]) => {
|
|
6366
|
-
acc[key] = value;
|
|
6367
|
-
return acc;
|
|
6368
|
-
},
|
|
6369
|
-
{}
|
|
6370
|
-
) : {}
|
|
6371
|
-
};
|
|
6372
|
-
},
|
|
6373
|
-
toJSON(message) {
|
|
6374
|
-
const obj = {};
|
|
6375
|
-
if (message.type !== "") {
|
|
6376
|
-
obj.type = message.type;
|
|
6377
|
-
}
|
|
6378
|
-
if (message.config) {
|
|
6379
|
-
const entries = globalThis.Object.entries(message.config);
|
|
6380
|
-
if (entries.length > 0) {
|
|
6381
|
-
obj.config = {};
|
|
6382
|
-
entries.forEach(([k, v]) => {
|
|
6383
|
-
obj.config[k] = v;
|
|
6384
|
-
});
|
|
6385
|
-
}
|
|
6386
|
-
}
|
|
6387
|
-
return obj;
|
|
6388
|
-
},
|
|
6389
|
-
create(base) {
|
|
6390
|
-
return BackendView.fromPartial(base ?? {});
|
|
6391
|
-
},
|
|
6392
|
-
fromPartial(object) {
|
|
6393
|
-
const message = createBaseBackendView();
|
|
6394
|
-
message.type = object.type ?? "";
|
|
6395
|
-
message.config = globalThis.Object.entries(object.config ?? {}).reduce(
|
|
6396
|
-
(acc, [key, value]) => {
|
|
6397
|
-
if (value !== void 0) {
|
|
6398
|
-
acc[key] = value;
|
|
6399
|
-
}
|
|
6400
|
-
return acc;
|
|
6401
|
-
},
|
|
6402
|
-
{}
|
|
6403
|
-
);
|
|
6404
|
-
return message;
|
|
6405
|
-
}
|
|
6406
|
-
};
|
|
6407
|
-
function createBaseBackendView_ConfigEntry() {
|
|
6408
|
-
return { key: "", value: void 0 };
|
|
6409
|
-
}
|
|
6410
|
-
var BackendView_ConfigEntry = {
|
|
6411
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6412
|
-
if (message.key !== "") {
|
|
6413
|
-
writer.uint32(10).string(message.key);
|
|
6414
|
-
}
|
|
6415
|
-
if (message.value !== void 0) {
|
|
6416
|
-
Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
6417
|
-
}
|
|
6418
|
-
return writer;
|
|
6419
|
-
},
|
|
6420
|
-
decode(input, length) {
|
|
6421
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6422
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6423
|
-
const message = createBaseBackendView_ConfigEntry();
|
|
6424
|
-
while (reader.pos < end) {
|
|
6425
|
-
const tag = reader.uint32();
|
|
6426
|
-
switch (tag >>> 3) {
|
|
6427
|
-
case 1: {
|
|
6428
|
-
if (tag !== 10) {
|
|
6429
|
-
break;
|
|
6430
|
-
}
|
|
6431
|
-
message.key = reader.string();
|
|
6432
|
-
continue;
|
|
6433
|
-
}
|
|
6434
|
-
case 2: {
|
|
6435
|
-
if (tag !== 18) {
|
|
6436
|
-
break;
|
|
6437
|
-
}
|
|
6438
|
-
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
6439
|
-
continue;
|
|
6440
|
-
}
|
|
6441
|
-
}
|
|
6442
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6443
|
-
break;
|
|
6444
|
-
}
|
|
6445
|
-
reader.skip(tag & 7);
|
|
6446
|
-
}
|
|
6447
|
-
return message;
|
|
6448
|
-
},
|
|
6449
|
-
fromJSON(object) {
|
|
6450
|
-
return {
|
|
6451
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
6452
|
-
value: isSet3(object?.value) ? object.value : void 0
|
|
6453
|
-
};
|
|
6454
|
-
},
|
|
6455
|
-
toJSON(message) {
|
|
6456
|
-
const obj = {};
|
|
6457
|
-
if (message.key !== "") {
|
|
6458
|
-
obj.key = message.key;
|
|
6459
|
-
}
|
|
6460
|
-
if (message.value !== void 0) {
|
|
6461
|
-
obj.value = message.value;
|
|
6462
|
-
}
|
|
6463
|
-
return obj;
|
|
6464
|
-
},
|
|
6465
|
-
create(base) {
|
|
6466
|
-
return BackendView_ConfigEntry.fromPartial(base ?? {});
|
|
6467
|
-
},
|
|
6468
|
-
fromPartial(object) {
|
|
6469
|
-
const message = createBaseBackendView_ConfigEntry();
|
|
6470
|
-
message.key = object.key ?? "";
|
|
6471
|
-
message.value = object.value ?? void 0;
|
|
6472
|
-
return message;
|
|
6473
|
-
}
|
|
6474
|
-
};
|
|
6475
|
-
function createBaseProviderView() {
|
|
6476
|
-
return { name: "", alias: "", config: {}, blocks: [] };
|
|
6477
|
-
}
|
|
6478
|
-
var ProviderView = {
|
|
6479
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6480
|
-
if (message.name !== "") {
|
|
6481
|
-
writer.uint32(10).string(message.name);
|
|
6482
|
-
}
|
|
6483
|
-
if (message.alias !== "") {
|
|
6484
|
-
writer.uint32(18).string(message.alias);
|
|
6485
|
-
}
|
|
6486
|
-
globalThis.Object.entries(message.config).forEach(([key, value]) => {
|
|
6487
|
-
ProviderView_ConfigEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
6488
|
-
});
|
|
6489
|
-
for (const v of message.blocks) {
|
|
6490
|
-
Block.encode(v, writer.uint32(34).fork()).join();
|
|
6491
|
-
}
|
|
6492
|
-
return writer;
|
|
6493
|
-
},
|
|
6494
|
-
decode(input, length) {
|
|
6495
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6496
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6497
|
-
const message = createBaseProviderView();
|
|
6498
|
-
while (reader.pos < end) {
|
|
6499
|
-
const tag = reader.uint32();
|
|
6500
|
-
switch (tag >>> 3) {
|
|
6501
|
-
case 1: {
|
|
6502
|
-
if (tag !== 10) {
|
|
6503
|
-
break;
|
|
6504
|
-
}
|
|
6505
|
-
message.name = reader.string();
|
|
6506
|
-
continue;
|
|
6507
|
-
}
|
|
6508
|
-
case 2: {
|
|
6509
|
-
if (tag !== 18) {
|
|
6510
|
-
break;
|
|
6511
|
-
}
|
|
6512
|
-
message.alias = reader.string();
|
|
6513
|
-
continue;
|
|
6514
|
-
}
|
|
6515
|
-
case 3: {
|
|
6516
|
-
if (tag !== 26) {
|
|
6517
|
-
break;
|
|
6518
|
-
}
|
|
6519
|
-
const entry3 = ProviderView_ConfigEntry.decode(reader, reader.uint32());
|
|
6520
|
-
if (entry3.value !== void 0) {
|
|
6521
|
-
message.config[entry3.key] = entry3.value;
|
|
6522
|
-
}
|
|
6523
|
-
continue;
|
|
6524
|
-
}
|
|
6525
|
-
case 4: {
|
|
6526
|
-
if (tag !== 34) {
|
|
6527
|
-
break;
|
|
6528
|
-
}
|
|
6529
|
-
message.blocks.push(Block.decode(reader, reader.uint32()));
|
|
6530
|
-
continue;
|
|
6531
|
-
}
|
|
6532
|
-
}
|
|
6533
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6534
|
-
break;
|
|
6535
|
-
}
|
|
6536
|
-
reader.skip(tag & 7);
|
|
6537
|
-
}
|
|
6538
|
-
return message;
|
|
6539
|
-
},
|
|
6540
|
-
fromJSON(object) {
|
|
6541
|
-
return {
|
|
6542
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
6543
|
-
alias: isSet3(object.alias) ? globalThis.String(object.alias) : "",
|
|
6544
|
-
config: isObject3(object.config) ? globalThis.Object.entries(object.config).reduce(
|
|
6545
|
-
(acc, [key, value]) => {
|
|
6546
|
-
acc[key] = globalThis.String(value);
|
|
6547
|
-
return acc;
|
|
6548
|
-
},
|
|
6549
|
-
{}
|
|
6550
|
-
) : {},
|
|
6551
|
-
blocks: globalThis.Array.isArray(object?.blocks) ? object.blocks.map((e) => Block.fromJSON(e)) : []
|
|
6552
|
-
};
|
|
6553
|
-
},
|
|
6554
|
-
toJSON(message) {
|
|
6555
|
-
const obj = {};
|
|
6556
|
-
if (message.name !== "") {
|
|
6557
|
-
obj.name = message.name;
|
|
6558
|
-
}
|
|
6559
|
-
if (message.alias !== "") {
|
|
6560
|
-
obj.alias = message.alias;
|
|
6561
|
-
}
|
|
6562
|
-
if (message.config) {
|
|
6563
|
-
const entries = globalThis.Object.entries(message.config);
|
|
6564
|
-
if (entries.length > 0) {
|
|
6565
|
-
obj.config = {};
|
|
6566
|
-
entries.forEach(([k, v]) => {
|
|
6567
|
-
obj.config[k] = v;
|
|
6568
|
-
});
|
|
6569
|
-
}
|
|
6570
|
-
}
|
|
6571
|
-
if (message.blocks?.length) {
|
|
6572
|
-
obj.blocks = message.blocks.map((e) => Block.toJSON(e));
|
|
6573
|
-
}
|
|
6574
|
-
return obj;
|
|
6575
|
-
},
|
|
6576
|
-
create(base) {
|
|
6577
|
-
return ProviderView.fromPartial(base ?? {});
|
|
6578
|
-
},
|
|
6579
|
-
fromPartial(object) {
|
|
6580
|
-
const message = createBaseProviderView();
|
|
6581
|
-
message.name = object.name ?? "";
|
|
6582
|
-
message.alias = object.alias ?? "";
|
|
6583
|
-
message.config = globalThis.Object.entries(object.config ?? {}).reduce(
|
|
6584
|
-
(acc, [key, value]) => {
|
|
6585
|
-
if (value !== void 0) {
|
|
6586
|
-
acc[key] = globalThis.String(value);
|
|
6587
|
-
}
|
|
6588
|
-
return acc;
|
|
6589
|
-
},
|
|
6590
|
-
{}
|
|
6591
|
-
);
|
|
6592
|
-
message.blocks = object.blocks?.map((e) => Block.fromPartial(e)) || [];
|
|
6593
|
-
return message;
|
|
6594
|
-
}
|
|
6595
|
-
};
|
|
6596
|
-
function createBaseProviderView_ConfigEntry() {
|
|
6597
|
-
return { key: "", value: "" };
|
|
6598
|
-
}
|
|
6599
|
-
var ProviderView_ConfigEntry = {
|
|
6600
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6601
|
-
if (message.key !== "") {
|
|
6602
|
-
writer.uint32(10).string(message.key);
|
|
6603
|
-
}
|
|
6604
|
-
if (message.value !== "") {
|
|
6605
|
-
writer.uint32(18).string(message.value);
|
|
6606
|
-
}
|
|
6607
|
-
return writer;
|
|
6608
|
-
},
|
|
6609
|
-
decode(input, length) {
|
|
6610
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6611
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6612
|
-
const message = createBaseProviderView_ConfigEntry();
|
|
6613
|
-
while (reader.pos < end) {
|
|
6614
|
-
const tag = reader.uint32();
|
|
6615
|
-
switch (tag >>> 3) {
|
|
6616
|
-
case 1: {
|
|
6617
|
-
if (tag !== 10) {
|
|
6618
|
-
break;
|
|
6619
|
-
}
|
|
6620
|
-
message.key = reader.string();
|
|
6621
|
-
continue;
|
|
6622
|
-
}
|
|
6623
|
-
case 2: {
|
|
6624
|
-
if (tag !== 18) {
|
|
6625
|
-
break;
|
|
6626
|
-
}
|
|
6627
|
-
message.value = reader.string();
|
|
6628
|
-
continue;
|
|
6629
|
-
}
|
|
6630
|
-
}
|
|
6631
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6632
|
-
break;
|
|
6633
|
-
}
|
|
6634
|
-
reader.skip(tag & 7);
|
|
6635
|
-
}
|
|
6636
|
-
return message;
|
|
6637
|
-
},
|
|
6638
|
-
fromJSON(object) {
|
|
6639
|
-
return {
|
|
6640
|
-
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
6641
|
-
value: isSet3(object.value) ? globalThis.String(object.value) : ""
|
|
6642
|
-
};
|
|
6643
|
-
},
|
|
6644
|
-
toJSON(message) {
|
|
6645
|
-
const obj = {};
|
|
6646
|
-
if (message.key !== "") {
|
|
6647
|
-
obj.key = message.key;
|
|
6648
|
-
}
|
|
6649
|
-
if (message.value !== "") {
|
|
6650
|
-
obj.value = message.value;
|
|
6651
|
-
}
|
|
6652
|
-
return obj;
|
|
6653
|
-
},
|
|
6654
|
-
create(base) {
|
|
6655
|
-
return ProviderView_ConfigEntry.fromPartial(base ?? {});
|
|
6656
|
-
},
|
|
6657
|
-
fromPartial(object) {
|
|
6658
|
-
const message = createBaseProviderView_ConfigEntry();
|
|
6659
|
-
message.key = object.key ?? "";
|
|
6660
|
-
message.value = object.value ?? "";
|
|
6661
|
-
return message;
|
|
6662
|
-
}
|
|
6663
|
-
};
|
|
6664
|
-
function createBaseLocalView() {
|
|
6665
|
-
return { name: "", mode: "", value_display: "" };
|
|
6666
|
-
}
|
|
6667
|
-
var LocalView = {
|
|
6668
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6669
|
-
if (message.name !== "") {
|
|
6670
|
-
writer.uint32(10).string(message.name);
|
|
6671
|
-
}
|
|
6672
|
-
if (message.mode !== "") {
|
|
6673
|
-
writer.uint32(18).string(message.mode);
|
|
6674
|
-
}
|
|
6675
|
-
if (message.value_display !== "") {
|
|
6676
|
-
writer.uint32(26).string(message.value_display);
|
|
6677
|
-
}
|
|
6678
|
-
return writer;
|
|
6679
|
-
},
|
|
6680
|
-
decode(input, length) {
|
|
6681
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6682
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6683
|
-
const message = createBaseLocalView();
|
|
6684
|
-
while (reader.pos < end) {
|
|
6685
|
-
const tag = reader.uint32();
|
|
6686
|
-
switch (tag >>> 3) {
|
|
6687
|
-
case 1: {
|
|
6688
|
-
if (tag !== 10) {
|
|
6689
|
-
break;
|
|
6690
|
-
}
|
|
6691
|
-
message.name = reader.string();
|
|
6692
|
-
continue;
|
|
6693
|
-
}
|
|
6694
|
-
case 2: {
|
|
6695
|
-
if (tag !== 18) {
|
|
6696
|
-
break;
|
|
6697
|
-
}
|
|
6698
|
-
message.mode = reader.string();
|
|
6699
|
-
continue;
|
|
6700
|
-
}
|
|
6701
|
-
case 3: {
|
|
6702
|
-
if (tag !== 26) {
|
|
6703
|
-
break;
|
|
6704
|
-
}
|
|
6705
|
-
message.value_display = reader.string();
|
|
6706
|
-
continue;
|
|
6707
|
-
}
|
|
6708
|
-
}
|
|
6709
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6710
|
-
break;
|
|
6711
|
-
}
|
|
6712
|
-
reader.skip(tag & 7);
|
|
6713
|
-
}
|
|
6714
|
-
return message;
|
|
6715
|
-
},
|
|
6716
|
-
fromJSON(object) {
|
|
6717
|
-
return {
|
|
6718
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
6719
|
-
mode: isSet3(object.mode) ? globalThis.String(object.mode) : "",
|
|
6720
|
-
value_display: isSet3(object.valueDisplay) ? globalThis.String(object.valueDisplay) : isSet3(object.value_display) ? globalThis.String(object.value_display) : ""
|
|
6721
|
-
};
|
|
6722
|
-
},
|
|
6723
|
-
toJSON(message) {
|
|
6724
|
-
const obj = {};
|
|
6725
|
-
if (message.name !== "") {
|
|
6726
|
-
obj.name = message.name;
|
|
6727
|
-
}
|
|
6728
|
-
if (message.mode !== "") {
|
|
6729
|
-
obj.mode = message.mode;
|
|
6730
|
-
}
|
|
6731
|
-
if (message.value_display !== "") {
|
|
6732
|
-
obj.valueDisplay = message.value_display;
|
|
6733
|
-
}
|
|
6734
|
-
return obj;
|
|
6735
|
-
},
|
|
6736
|
-
create(base) {
|
|
6737
|
-
return LocalView.fromPartial(base ?? {});
|
|
6738
|
-
},
|
|
6739
|
-
fromPartial(object) {
|
|
6740
|
-
const message = createBaseLocalView();
|
|
6741
|
-
message.name = object.name ?? "";
|
|
6742
|
-
message.mode = object.mode ?? "";
|
|
6743
|
-
message.value_display = object.value_display ?? "";
|
|
6744
|
-
return message;
|
|
6745
|
-
}
|
|
6746
|
-
};
|
|
6747
|
-
function createBaseRenderError() {
|
|
6748
|
-
return { instance_id: "", input_name: "", message: "" };
|
|
6749
|
-
}
|
|
6750
|
-
var RenderError = {
|
|
6751
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6752
|
-
if (message.instance_id !== "") {
|
|
6753
|
-
writer.uint32(10).string(message.instance_id);
|
|
6754
|
-
}
|
|
6755
|
-
if (message.input_name !== "") {
|
|
6756
|
-
writer.uint32(18).string(message.input_name);
|
|
6757
|
-
}
|
|
6758
|
-
if (message.message !== "") {
|
|
6759
|
-
writer.uint32(26).string(message.message);
|
|
6760
|
-
}
|
|
6761
|
-
return writer;
|
|
6762
|
-
},
|
|
6763
|
-
decode(input, length) {
|
|
6764
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6765
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6766
|
-
const message = createBaseRenderError();
|
|
6767
|
-
while (reader.pos < end) {
|
|
6768
|
-
const tag = reader.uint32();
|
|
6769
|
-
switch (tag >>> 3) {
|
|
6770
|
-
case 1: {
|
|
6771
|
-
if (tag !== 10) {
|
|
6772
|
-
break;
|
|
6773
|
-
}
|
|
6774
|
-
message.instance_id = reader.string();
|
|
6775
|
-
continue;
|
|
6776
|
-
}
|
|
6777
|
-
case 2: {
|
|
6778
|
-
if (tag !== 18) {
|
|
6779
|
-
break;
|
|
6780
|
-
}
|
|
6781
|
-
message.input_name = reader.string();
|
|
6782
|
-
continue;
|
|
6783
|
-
}
|
|
6784
|
-
case 3: {
|
|
6785
|
-
if (tag !== 26) {
|
|
6786
|
-
break;
|
|
6787
|
-
}
|
|
6788
|
-
message.message = reader.string();
|
|
6789
|
-
continue;
|
|
6790
|
-
}
|
|
6791
|
-
}
|
|
6792
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6793
|
-
break;
|
|
6794
|
-
}
|
|
6795
|
-
reader.skip(tag & 7);
|
|
6796
|
-
}
|
|
6797
|
-
return message;
|
|
6798
|
-
},
|
|
6799
|
-
fromJSON(object) {
|
|
6800
|
-
return {
|
|
6801
|
-
instance_id: isSet3(object.instanceId) ? globalThis.String(object.instanceId) : isSet3(object.instance_id) ? globalThis.String(object.instance_id) : "",
|
|
6802
|
-
input_name: isSet3(object.inputName) ? globalThis.String(object.inputName) : isSet3(object.input_name) ? globalThis.String(object.input_name) : "",
|
|
6803
|
-
message: isSet3(object.message) ? globalThis.String(object.message) : ""
|
|
6804
|
-
};
|
|
6805
|
-
},
|
|
6806
|
-
toJSON(message) {
|
|
6807
|
-
const obj = {};
|
|
6808
|
-
if (message.instance_id !== "") {
|
|
6809
|
-
obj.instanceId = message.instance_id;
|
|
6810
|
-
}
|
|
6811
|
-
if (message.input_name !== "") {
|
|
6812
|
-
obj.inputName = message.input_name;
|
|
6813
|
-
}
|
|
6814
|
-
if (message.message !== "") {
|
|
6815
|
-
obj.message = message.message;
|
|
6816
|
-
}
|
|
6817
|
-
return obj;
|
|
6818
|
-
},
|
|
6819
|
-
create(base) {
|
|
6820
|
-
return RenderError.fromPartial(base ?? {});
|
|
6821
|
-
},
|
|
6822
|
-
fromPartial(object) {
|
|
6823
|
-
const message = createBaseRenderError();
|
|
6824
|
-
message.instance_id = object.instance_id ?? "";
|
|
6825
|
-
message.input_name = object.input_name ?? "";
|
|
6826
|
-
message.message = object.message ?? "";
|
|
6827
|
-
return message;
|
|
6828
|
-
}
|
|
6829
|
-
};
|
|
6830
|
-
function createBasePosition() {
|
|
6831
|
-
return { x: 0, y: 0 };
|
|
6832
|
-
}
|
|
6833
|
-
var Position = {
|
|
6834
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6835
|
-
if (message.x !== 0) {
|
|
6836
|
-
writer.uint32(9).double(message.x);
|
|
6837
|
-
}
|
|
6838
|
-
if (message.y !== 0) {
|
|
6839
|
-
writer.uint32(17).double(message.y);
|
|
6840
|
-
}
|
|
6841
|
-
return writer;
|
|
6842
|
-
},
|
|
6843
|
-
decode(input, length) {
|
|
6844
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6845
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6846
|
-
const message = createBasePosition();
|
|
6847
|
-
while (reader.pos < end) {
|
|
6848
|
-
const tag = reader.uint32();
|
|
6849
|
-
switch (tag >>> 3) {
|
|
6850
|
-
case 1: {
|
|
6851
|
-
if (tag !== 9) {
|
|
6852
|
-
break;
|
|
6853
|
-
}
|
|
6854
|
-
message.x = reader.double();
|
|
6855
|
-
continue;
|
|
6856
|
-
}
|
|
6857
|
-
case 2: {
|
|
6858
|
-
if (tag !== 17) {
|
|
6859
|
-
break;
|
|
6860
|
-
}
|
|
6861
|
-
message.y = reader.double();
|
|
6862
|
-
continue;
|
|
6863
|
-
}
|
|
6864
|
-
}
|
|
6865
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
6866
|
-
break;
|
|
6867
|
-
}
|
|
6868
|
-
reader.skip(tag & 7);
|
|
6869
|
-
}
|
|
6870
|
-
return message;
|
|
6871
|
-
},
|
|
6872
|
-
fromJSON(object) {
|
|
6873
|
-
return {
|
|
6874
|
-
x: isSet3(object.x) ? globalThis.Number(object.x) : 0,
|
|
6875
|
-
y: isSet3(object.y) ? globalThis.Number(object.y) : 0
|
|
6876
|
-
};
|
|
6877
|
-
},
|
|
6878
|
-
toJSON(message) {
|
|
6879
|
-
const obj = {};
|
|
6880
|
-
if (message.x !== 0) {
|
|
6881
|
-
obj.x = message.x;
|
|
6882
|
-
}
|
|
6883
|
-
if (message.y !== 0) {
|
|
6884
|
-
obj.y = message.y;
|
|
6885
|
-
}
|
|
6886
|
-
return obj;
|
|
6887
|
-
},
|
|
6888
|
-
create(base) {
|
|
6889
|
-
return Position.fromPartial(base ?? {});
|
|
6890
|
-
},
|
|
6891
|
-
fromPartial(object) {
|
|
6892
|
-
const message = createBasePosition();
|
|
6893
|
-
message.x = object.x ?? 0;
|
|
6894
|
-
message.y = object.y ?? 0;
|
|
6895
|
-
return message;
|
|
6896
|
-
}
|
|
6897
|
-
};
|
|
6898
|
-
function createBaseInputDef2() {
|
|
6899
|
-
return {
|
|
6900
|
-
name: "",
|
|
6901
|
-
type: "",
|
|
6902
|
-
required: false,
|
|
6903
|
-
description: "",
|
|
6904
|
-
default_value: void 0,
|
|
6905
|
-
validation: [],
|
|
6906
|
-
ephemeral: void 0,
|
|
6907
|
-
nullable: void 0,
|
|
6908
|
-
sensitive: false
|
|
6909
|
-
};
|
|
6910
|
-
}
|
|
6911
|
-
var InputDef2 = {
|
|
6912
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
6913
|
-
if (message.name !== "") {
|
|
6914
|
-
writer.uint32(10).string(message.name);
|
|
6915
|
-
}
|
|
6916
|
-
if (message.type !== "") {
|
|
6917
|
-
writer.uint32(18).string(message.type);
|
|
6918
|
-
}
|
|
6919
|
-
if (message.required !== false) {
|
|
6920
|
-
writer.uint32(24).bool(message.required);
|
|
6921
|
-
}
|
|
6922
|
-
if (message.description !== "") {
|
|
6923
|
-
writer.uint32(34).string(message.description);
|
|
6924
|
-
}
|
|
6925
|
-
if (message.default_value !== void 0) {
|
|
6926
|
-
Value.encode(Value.wrap(message.default_value), writer.uint32(42).fork()).join();
|
|
6927
|
-
}
|
|
6928
|
-
for (const v of message.validation) {
|
|
6929
|
-
ValidationBlock2.encode(v, writer.uint32(50).fork()).join();
|
|
6930
|
-
}
|
|
6931
|
-
if (message.ephemeral !== void 0) {
|
|
6932
|
-
writer.uint32(56).bool(message.ephemeral);
|
|
6933
|
-
}
|
|
6934
|
-
if (message.nullable !== void 0) {
|
|
6935
|
-
writer.uint32(64).bool(message.nullable);
|
|
6936
|
-
}
|
|
6937
|
-
if (message.sensitive !== false) {
|
|
6938
|
-
writer.uint32(72).bool(message.sensitive);
|
|
6939
|
-
}
|
|
6940
|
-
return writer;
|
|
6941
|
-
},
|
|
6942
|
-
decode(input, length) {
|
|
6943
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
6944
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
6945
|
-
const message = createBaseInputDef2();
|
|
6946
|
-
while (reader.pos < end) {
|
|
6947
|
-
const tag = reader.uint32();
|
|
6948
|
-
switch (tag >>> 3) {
|
|
6949
|
-
case 1: {
|
|
6950
|
-
if (tag !== 10) {
|
|
6951
|
-
break;
|
|
6952
|
-
}
|
|
6953
|
-
message.name = reader.string();
|
|
6954
|
-
continue;
|
|
6955
|
-
}
|
|
6956
|
-
case 2: {
|
|
6957
|
-
if (tag !== 18) {
|
|
6958
|
-
break;
|
|
6959
|
-
}
|
|
6960
|
-
message.type = reader.string();
|
|
6961
|
-
continue;
|
|
6962
|
-
}
|
|
6963
|
-
case 3: {
|
|
6964
|
-
if (tag !== 24) {
|
|
6965
|
-
break;
|
|
6966
|
-
}
|
|
6967
|
-
message.required = reader.bool();
|
|
6968
|
-
continue;
|
|
6969
|
-
}
|
|
6970
|
-
case 4: {
|
|
6971
|
-
if (tag !== 34) {
|
|
6972
|
-
break;
|
|
6973
|
-
}
|
|
6974
|
-
message.description = reader.string();
|
|
6975
|
-
continue;
|
|
6976
|
-
}
|
|
6977
|
-
case 5: {
|
|
6978
|
-
if (tag !== 42) {
|
|
6979
|
-
break;
|
|
6980
|
-
}
|
|
6981
|
-
message.default_value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
6982
|
-
continue;
|
|
6983
|
-
}
|
|
6984
|
-
case 6: {
|
|
6985
|
-
if (tag !== 50) {
|
|
6986
|
-
break;
|
|
6987
|
-
}
|
|
6988
|
-
message.validation.push(ValidationBlock2.decode(reader, reader.uint32()));
|
|
6989
|
-
continue;
|
|
6990
|
-
}
|
|
6991
|
-
case 7: {
|
|
6992
|
-
if (tag !== 56) {
|
|
6993
|
-
break;
|
|
6994
|
-
}
|
|
6995
|
-
message.ephemeral = reader.bool();
|
|
6996
|
-
continue;
|
|
6997
|
-
}
|
|
6998
|
-
case 8: {
|
|
6999
|
-
if (tag !== 64) {
|
|
7000
|
-
break;
|
|
7001
|
-
}
|
|
7002
|
-
message.nullable = reader.bool();
|
|
7003
|
-
continue;
|
|
7004
|
-
}
|
|
7005
|
-
case 9: {
|
|
7006
|
-
if (tag !== 72) {
|
|
7007
|
-
break;
|
|
7008
|
-
}
|
|
7009
|
-
message.sensitive = reader.bool();
|
|
7010
|
-
continue;
|
|
7011
|
-
}
|
|
7012
|
-
}
|
|
7013
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
7014
|
-
break;
|
|
7015
|
-
}
|
|
7016
|
-
reader.skip(tag & 7);
|
|
7017
|
-
}
|
|
7018
|
-
return message;
|
|
7019
|
-
},
|
|
7020
|
-
fromJSON(object) {
|
|
7021
|
-
return {
|
|
7022
|
-
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
7023
|
-
type: isSet3(object.type) ? globalThis.String(object.type) : "",
|
|
7024
|
-
required: isSet3(object.required) ? globalThis.Boolean(object.required) : false,
|
|
7025
|
-
description: isSet3(object.description) ? globalThis.String(object.description) : "",
|
|
7026
|
-
default_value: isSet3(object?.defaultValue) ? object.defaultValue : isSet3(object?.default_value) ? object.default_value : void 0,
|
|
7027
|
-
validation: globalThis.Array.isArray(object?.validation) ? object.validation.map((e) => ValidationBlock2.fromJSON(e)) : [],
|
|
7028
|
-
ephemeral: isSet3(object.ephemeral) ? globalThis.Boolean(object.ephemeral) : void 0,
|
|
7029
|
-
nullable: isSet3(object.nullable) ? globalThis.Boolean(object.nullable) : void 0,
|
|
7030
|
-
sensitive: isSet3(object.sensitive) ? globalThis.Boolean(object.sensitive) : false
|
|
7031
|
-
};
|
|
7032
|
-
},
|
|
7033
|
-
toJSON(message) {
|
|
7034
|
-
const obj = {};
|
|
7035
|
-
if (message.name !== "") {
|
|
7036
|
-
obj.name = message.name;
|
|
7037
|
-
}
|
|
7038
|
-
if (message.type !== "") {
|
|
7039
|
-
obj.type = message.type;
|
|
7040
|
-
}
|
|
7041
|
-
if (message.required !== false) {
|
|
7042
|
-
obj.required = message.required;
|
|
7043
|
-
}
|
|
7044
|
-
if (message.description !== "") {
|
|
7045
|
-
obj.description = message.description;
|
|
7046
|
-
}
|
|
7047
|
-
if (message.default_value !== void 0) {
|
|
7048
|
-
obj.defaultValue = message.default_value;
|
|
7049
|
-
}
|
|
7050
|
-
if (message.validation?.length) {
|
|
7051
|
-
obj.validation = message.validation.map((e) => ValidationBlock2.toJSON(e));
|
|
7052
|
-
}
|
|
7053
|
-
if (message.ephemeral !== void 0) {
|
|
7054
|
-
obj.ephemeral = message.ephemeral;
|
|
7055
|
-
}
|
|
7056
|
-
if (message.nullable !== void 0) {
|
|
7057
|
-
obj.nullable = message.nullable;
|
|
7058
|
-
}
|
|
7059
|
-
if (message.sensitive !== false) {
|
|
7060
|
-
obj.sensitive = message.sensitive;
|
|
7061
|
-
}
|
|
7062
|
-
return obj;
|
|
7063
|
-
},
|
|
7064
|
-
create(base) {
|
|
7065
|
-
return InputDef2.fromPartial(base ?? {});
|
|
7066
|
-
},
|
|
7067
|
-
fromPartial(object) {
|
|
7068
|
-
const message = createBaseInputDef2();
|
|
7069
|
-
message.name = object.name ?? "";
|
|
7070
|
-
message.type = object.type ?? "";
|
|
7071
|
-
message.required = object.required ?? false;
|
|
7072
|
-
message.description = object.description ?? "";
|
|
7073
|
-
message.default_value = object.default_value ?? void 0;
|
|
7074
|
-
message.validation = object.validation?.map((e) => ValidationBlock2.fromPartial(e)) || [];
|
|
7075
|
-
message.ephemeral = object.ephemeral ?? void 0;
|
|
7076
|
-
message.nullable = object.nullable ?? void 0;
|
|
7077
|
-
message.sensitive = object.sensitive ?? false;
|
|
7078
|
-
return message;
|
|
7079
|
-
}
|
|
7080
|
-
};
|
|
7081
|
-
function createBaseValidationBlock2() {
|
|
7082
|
-
return { condition: "", error_message: "" };
|
|
7083
|
-
}
|
|
7084
|
-
var ValidationBlock2 = {
|
|
7085
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
7086
|
-
if (message.condition !== "") {
|
|
7087
|
-
writer.uint32(10).string(message.condition);
|
|
7088
|
-
}
|
|
7089
|
-
if (message.error_message !== "") {
|
|
7090
|
-
writer.uint32(18).string(message.error_message);
|
|
7091
|
-
}
|
|
7092
|
-
return writer;
|
|
7093
|
-
},
|
|
7094
|
-
decode(input, length) {
|
|
7095
|
-
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
7096
|
-
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7097
|
-
const message = createBaseValidationBlock2();
|
|
7098
|
-
while (reader.pos < end) {
|
|
7099
|
-
const tag = reader.uint32();
|
|
7100
|
-
switch (tag >>> 3) {
|
|
7101
|
-
case 1: {
|
|
7102
|
-
if (tag !== 10) {
|
|
7103
|
-
break;
|
|
7104
|
-
}
|
|
7105
|
-
message.condition = reader.string();
|
|
7106
|
-
continue;
|
|
7107
|
-
}
|
|
7108
|
-
case 2: {
|
|
7109
|
-
if (tag !== 18) {
|
|
7110
|
-
break;
|
|
7111
|
-
}
|
|
7112
|
-
message.error_message = reader.string();
|
|
7113
|
-
continue;
|
|
7114
|
-
}
|
|
7115
|
-
}
|
|
7116
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
7117
|
-
break;
|
|
7118
|
-
}
|
|
7119
|
-
reader.skip(tag & 7);
|
|
7120
|
-
}
|
|
7121
|
-
return message;
|
|
7122
|
-
},
|
|
7123
|
-
fromJSON(object) {
|
|
7124
|
-
return {
|
|
7125
|
-
condition: isSet3(object.condition) ? globalThis.String(object.condition) : "",
|
|
7126
|
-
error_message: isSet3(object.errorMessage) ? globalThis.String(object.errorMessage) : isSet3(object.error_message) ? globalThis.String(object.error_message) : ""
|
|
7127
|
-
};
|
|
7128
|
-
},
|
|
7129
|
-
toJSON(message) {
|
|
7130
|
-
const obj = {};
|
|
7131
|
-
if (message.condition !== "") {
|
|
7132
|
-
obj.condition = message.condition;
|
|
7133
|
-
}
|
|
7134
|
-
if (message.error_message !== "") {
|
|
7135
|
-
obj.errorMessage = message.error_message;
|
|
7136
|
-
}
|
|
7137
|
-
return obj;
|
|
7138
|
-
},
|
|
7139
|
-
create(base) {
|
|
7140
|
-
return ValidationBlock2.fromPartial(base ?? {});
|
|
7141
|
-
},
|
|
7142
|
-
fromPartial(object) {
|
|
7143
|
-
const message = createBaseValidationBlock2();
|
|
7144
|
-
message.condition = object.condition ?? "";
|
|
7145
|
-
message.error_message = object.error_message ?? "";
|
|
7146
|
-
return message;
|
|
7147
|
-
}
|
|
7148
|
-
};
|
|
7149
|
-
function createBaseOutputDef2() {
|
|
7150
|
-
return { name: "", type: "", description: "", sensitive: false, depends_on: [] };
|
|
7151
|
-
}
|
|
7152
|
-
var OutputDef2 = {
|
|
7153
|
-
encode(message, writer = new import_wire3.BinaryWriter()) {
|
|
7154
|
-
if (message.name !== "") {
|
|
7155
|
-
writer.uint32(10).string(message.name);
|
|
7156
|
-
}
|
|
7157
|
-
if (message.type !== "") {
|
|
7158
|
-
writer.uint32(18).string(message.type);
|
|
7159
|
-
}
|
|
7160
|
-
if (message.description !== "") {
|
|
7161
|
-
writer.uint32(26).string(message.description);
|
|
7162
|
-
}
|
|
7163
|
-
if (message.sensitive !== false) {
|
|
7164
|
-
writer.uint32(32).bool(message.sensitive);
|
|
7165
|
-
}
|
|
7166
|
-
for (const v of message.depends_on) {
|
|
7167
|
-
writer.uint32(42).string(v);
|
|
4729
|
+
if (message.y !== 0) {
|
|
4730
|
+
writer.uint32(17).double(message.y);
|
|
7168
4731
|
}
|
|
7169
4732
|
return writer;
|
|
7170
4733
|
},
|
|
7171
4734
|
decode(input, length) {
|
|
7172
4735
|
const reader = input instanceof import_wire3.BinaryReader ? input : new import_wire3.BinaryReader(input);
|
|
7173
4736
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
7174
|
-
const message =
|
|
4737
|
+
const message = createBasePosition();
|
|
7175
4738
|
while (reader.pos < end) {
|
|
7176
4739
|
const tag = reader.uint32();
|
|
7177
4740
|
switch (tag >>> 3) {
|
|
7178
4741
|
case 1: {
|
|
7179
|
-
if (tag !==
|
|
4742
|
+
if (tag !== 9) {
|
|
7180
4743
|
break;
|
|
7181
4744
|
}
|
|
7182
|
-
message.
|
|
4745
|
+
message.x = reader.double();
|
|
7183
4746
|
continue;
|
|
7184
4747
|
}
|
|
7185
4748
|
case 2: {
|
|
7186
|
-
if (tag !==
|
|
7187
|
-
break;
|
|
7188
|
-
}
|
|
7189
|
-
message.type = reader.string();
|
|
7190
|
-
continue;
|
|
7191
|
-
}
|
|
7192
|
-
case 3: {
|
|
7193
|
-
if (tag !== 26) {
|
|
7194
|
-
break;
|
|
7195
|
-
}
|
|
7196
|
-
message.description = reader.string();
|
|
7197
|
-
continue;
|
|
7198
|
-
}
|
|
7199
|
-
case 4: {
|
|
7200
|
-
if (tag !== 32) {
|
|
7201
|
-
break;
|
|
7202
|
-
}
|
|
7203
|
-
message.sensitive = reader.bool();
|
|
7204
|
-
continue;
|
|
7205
|
-
}
|
|
7206
|
-
case 5: {
|
|
7207
|
-
if (tag !== 42) {
|
|
4749
|
+
if (tag !== 17) {
|
|
7208
4750
|
break;
|
|
7209
4751
|
}
|
|
7210
|
-
message.
|
|
4752
|
+
message.y = reader.double();
|
|
7211
4753
|
continue;
|
|
7212
4754
|
}
|
|
7213
4755
|
}
|
|
@@ -7220,79 +4762,53 @@ var OutputDef2 = {
|
|
|
7220
4762
|
},
|
|
7221
4763
|
fromJSON(object) {
|
|
7222
4764
|
return {
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
description: isSet3(object.description) ? globalThis.String(object.description) : "",
|
|
7226
|
-
sensitive: isSet3(object.sensitive) ? globalThis.Boolean(object.sensitive) : false,
|
|
7227
|
-
depends_on: globalThis.Array.isArray(object?.dependsOn) ? object.dependsOn.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.depends_on) ? object.depends_on.map((e) => globalThis.String(e)) : []
|
|
4765
|
+
x: isSet3(object.x) ? globalThis.Number(object.x) : 0,
|
|
4766
|
+
y: isSet3(object.y) ? globalThis.Number(object.y) : 0
|
|
7228
4767
|
};
|
|
7229
4768
|
},
|
|
7230
4769
|
toJSON(message) {
|
|
7231
4770
|
const obj = {};
|
|
7232
|
-
if (message.
|
|
7233
|
-
obj.
|
|
7234
|
-
}
|
|
7235
|
-
if (message.type !== "") {
|
|
7236
|
-
obj.type = message.type;
|
|
7237
|
-
}
|
|
7238
|
-
if (message.description !== "") {
|
|
7239
|
-
obj.description = message.description;
|
|
7240
|
-
}
|
|
7241
|
-
if (message.sensitive !== false) {
|
|
7242
|
-
obj.sensitive = message.sensitive;
|
|
4771
|
+
if (message.x !== 0) {
|
|
4772
|
+
obj.x = message.x;
|
|
7243
4773
|
}
|
|
7244
|
-
if (message.
|
|
7245
|
-
obj.
|
|
4774
|
+
if (message.y !== 0) {
|
|
4775
|
+
obj.y = message.y;
|
|
7246
4776
|
}
|
|
7247
4777
|
return obj;
|
|
7248
4778
|
},
|
|
7249
4779
|
create(base) {
|
|
7250
|
-
return
|
|
4780
|
+
return Position.fromPartial(base ?? {});
|
|
7251
4781
|
},
|
|
7252
4782
|
fromPartial(object) {
|
|
7253
|
-
const message =
|
|
7254
|
-
message.
|
|
7255
|
-
message.
|
|
7256
|
-
message.description = object.description ?? "";
|
|
7257
|
-
message.sensitive = object.sensitive ?? false;
|
|
7258
|
-
message.depends_on = object.depends_on?.map((e) => e) || [];
|
|
4783
|
+
const message = createBasePosition();
|
|
4784
|
+
message.x = object.x ?? 0;
|
|
4785
|
+
message.y = object.y ?? 0;
|
|
7259
4786
|
return message;
|
|
7260
4787
|
}
|
|
7261
4788
|
};
|
|
7262
|
-
function isObject3(value) {
|
|
7263
|
-
return typeof value === "object" && value !== null;
|
|
7264
|
-
}
|
|
7265
4789
|
function isSet3(value) {
|
|
7266
4790
|
return value !== null && value !== void 0;
|
|
7267
4791
|
}
|
|
7268
4792
|
|
|
7269
4793
|
// src/proto-messages.ts
|
|
7270
4794
|
var CanvasViewProto = CanvasView;
|
|
7271
|
-
var NodeConfigProto = NodeConfig;
|
|
7272
|
-
var EdgeConfigProto = EdgeConfig;
|
|
7273
|
-
var SettingsConfigProto = SettingsConfig;
|
|
7274
4795
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7275
4796
|
0 && (module.exports = {
|
|
4797
|
+
BRIDGE_METHODS,
|
|
7276
4798
|
Bundle,
|
|
7277
4799
|
CanvasViewProto,
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
convertCanvasView,
|
|
4800
|
+
EMPTY_BUNDLE,
|
|
4801
|
+
ENGINE_METHODS,
|
|
4802
|
+
ENGINE_STREAM_METHODS,
|
|
7282
4803
|
convertDiagnostic,
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
convertNodeKind,
|
|
7288
|
-
convertRenderError,
|
|
7289
|
-
convertRenderInput,
|
|
7290
|
-
convertRenderNode,
|
|
7291
|
-
convertSettingsConfig,
|
|
7292
|
-
modeToInputMode,
|
|
4804
|
+
deriveNodeConfig,
|
|
4805
|
+
deriveSettingsConfig,
|
|
4806
|
+
nodeIdForAddress,
|
|
4807
|
+
nodeIdForDiagnostic,
|
|
7293
4808
|
parseModuleKey,
|
|
7294
4809
|
projectCanvasView,
|
|
7295
4810
|
resolveScopePath,
|
|
7296
|
-
resolveScopePositions
|
|
4811
|
+
resolveScopePositions,
|
|
4812
|
+
resolveScopePositionsByDepth
|
|
7297
4813
|
});
|
|
7298
4814
|
//# sourceMappingURL=index.cjs.map
|