@lace-cloud/canvas 0.8.0 → 0.9.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/{ModuleConfigPanel-UUJPO457.css → ModuleConfigPanel-LZRL4F3Q.css} +13 -0
- package/dist/index.cjs +743 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +287 -249
- package/dist/index.d.ts +287 -249
- package/dist/index.mjs +742 -66
- package/dist/index.mjs.map +1 -1
- package/dist/{panels-shared-5HTOXZUS.css → panels-shared-LLLB7PR4.css} +27 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -45,6 +45,8 @@ __export(index_exports, {
|
|
|
45
45
|
LocalsContent: () => LocalsContent,
|
|
46
46
|
LocalsPanel: () => LocalsPanel,
|
|
47
47
|
ModuleConfigPanel: () => ModuleConfigPanel,
|
|
48
|
+
ModuleInterfaceContent: () => ModuleInterfaceContent,
|
|
49
|
+
ModuleInterfacePanel: () => ModuleInterfacePanel,
|
|
48
50
|
ModuleNode: () => ModuleNode_default,
|
|
49
51
|
PolicySidebar: () => PolicySidebar,
|
|
50
52
|
PostMessageEngine: () => PostMessageEngine,
|
|
@@ -1037,8 +1039,8 @@ function AccordionSection({ title, defaultOpen = false, badge, children }) {
|
|
|
1037
1039
|
}
|
|
1038
1040
|
|
|
1039
1041
|
// src/components/panels/ModuleConfigPanel.tsx
|
|
1040
|
-
var import_ModuleConfigPanel = require("./ModuleConfigPanel-
|
|
1041
|
-
var import_panels_shared = require("./panels-shared-
|
|
1042
|
+
var import_ModuleConfigPanel = require("./ModuleConfigPanel-LZRL4F3Q.css");
|
|
1043
|
+
var import_panels_shared = require("./panels-shared-LLLB7PR4.css");
|
|
1042
1044
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1043
1045
|
var MODE_ITEMS = [
|
|
1044
1046
|
{ value: "literal", label: "Lit" },
|
|
@@ -1079,6 +1081,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
|
|
|
1079
1081
|
[]
|
|
1080
1082
|
);
|
|
1081
1083
|
const [localDependsOn, setLocalDependsOn] = (0, import_react8.useState)(/* @__PURE__ */ new Set());
|
|
1084
|
+
const [localProviders, setLocalProviders] = (0, import_react8.useState)([]);
|
|
1082
1085
|
const [error, setError] = (0, import_react8.useState)(null);
|
|
1083
1086
|
(0, import_react8.useEffect)(() => {
|
|
1084
1087
|
let cancelled = false;
|
|
@@ -1100,6 +1103,9 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
|
|
|
1100
1103
|
}
|
|
1101
1104
|
setInputState({ modes, values, variables, expressions });
|
|
1102
1105
|
setLocalDependsOn(new Set(result.depends_on));
|
|
1106
|
+
setLocalProviders(
|
|
1107
|
+
Object.entries(result.providers ?? {}).map(([key, value]) => ({ key, value }))
|
|
1108
|
+
);
|
|
1103
1109
|
}).catch((err) => {
|
|
1104
1110
|
if (cancelled) return;
|
|
1105
1111
|
console.error(`[ModuleConfigPanel] queryNodeConfig failed for "${instance_id}":`, err);
|
|
@@ -1160,6 +1166,12 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
|
|
|
1160
1166
|
);
|
|
1161
1167
|
}
|
|
1162
1168
|
await engine.setDependsOn(instance_id, [...localDependsOn]);
|
|
1169
|
+
const providersRecord = {};
|
|
1170
|
+
for (const { key, value } of localProviders) {
|
|
1171
|
+
const name = key.trim();
|
|
1172
|
+
if (name) providersRecord[name] = value.trim();
|
|
1173
|
+
}
|
|
1174
|
+
await engine.setUseProviders(instance_id, providersRecord);
|
|
1163
1175
|
const requiredToCheck = config.inputs.filter((i) => i.required);
|
|
1164
1176
|
const hasFilledRequired = requiredToCheck.length === 0 || requiredToCheck.some((input) => {
|
|
1165
1177
|
const mode = localModes[input.name] ?? input.mode;
|
|
@@ -1399,6 +1411,73 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
|
|
|
1399
1411
|
]
|
|
1400
1412
|
}
|
|
1401
1413
|
),
|
|
1414
|
+
(localProviders.length > 0 || !readOnly) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1415
|
+
AccordionSection,
|
|
1416
|
+
{
|
|
1417
|
+
title: "Providers",
|
|
1418
|
+
badge: localProviders.length > 0 ? `(${localProviders.length})` : void 0,
|
|
1419
|
+
children: [
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "lace-mcp__depends-hint", children: [
|
|
1421
|
+
"Map each child-local provider name to the root provider reference passed down (e.g.",
|
|
1422
|
+
" ",
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "aws" }),
|
|
1424
|
+
" \u2192 ",
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { children: "aws.west" }),
|
|
1426
|
+
")."
|
|
1427
|
+
] }),
|
|
1428
|
+
localProviders.map((row, i) => (
|
|
1429
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional and freely editable
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "lace-mcp__provider-row", children: [
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1432
|
+
import_ui2.Input,
|
|
1433
|
+
{
|
|
1434
|
+
value: row.key,
|
|
1435
|
+
onChange: (e) => setLocalProviders(
|
|
1436
|
+
(prev) => prev.map((r, j) => j === i ? { ...r, key: e.target.value } : r)
|
|
1437
|
+
),
|
|
1438
|
+
placeholder: "child local (e.g. aws)",
|
|
1439
|
+
mono: true,
|
|
1440
|
+
readOnly
|
|
1441
|
+
}
|
|
1442
|
+
),
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "lace-mcp__provider-arrow", children: "=" }),
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1445
|
+
import_ui2.Input,
|
|
1446
|
+
{
|
|
1447
|
+
value: row.value,
|
|
1448
|
+
onChange: (e) => setLocalProviders(
|
|
1449
|
+
(prev) => prev.map((r, j) => j === i ? { ...r, value: e.target.value } : r)
|
|
1450
|
+
),
|
|
1451
|
+
placeholder: "root ref (e.g. aws.west)",
|
|
1452
|
+
mono: true,
|
|
1453
|
+
readOnly
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1457
|
+
import_ui2.Button,
|
|
1458
|
+
{
|
|
1459
|
+
variant: "danger",
|
|
1460
|
+
size: "sm",
|
|
1461
|
+
onClick: () => setLocalProviders((prev) => prev.filter((_, j) => j !== i)),
|
|
1462
|
+
title: "Remove this provider mapping",
|
|
1463
|
+
"aria-label": "Remove provider mapping",
|
|
1464
|
+
children: "\u2715"
|
|
1465
|
+
}
|
|
1466
|
+
)
|
|
1467
|
+
] }, i)
|
|
1468
|
+
)),
|
|
1469
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1470
|
+
import_ui2.Button,
|
|
1471
|
+
{
|
|
1472
|
+
variant: "secondary",
|
|
1473
|
+
size: "sm",
|
|
1474
|
+
onClick: () => setLocalProviders((prev) => [...prev, { key: "", value: "" }]),
|
|
1475
|
+
children: "Add provider mapping"
|
|
1476
|
+
}
|
|
1477
|
+
)
|
|
1478
|
+
]
|
|
1479
|
+
}
|
|
1480
|
+
),
|
|
1402
1481
|
config.outputs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AccordionSection, { title: "Outputs", badge: `(${config.outputs.length})`, children: config.outputs.map((o) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "lace-mcp__output-card", children: [
|
|
1403
1482
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "lace-mcp__output-header", children: [
|
|
1404
1483
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("strong", { className: "lace-mcp__output-name", children: o.name }),
|
|
@@ -1413,7 +1492,7 @@ function ModuleConfigPanel({ instance_id, engine, onClose, onModified }) {
|
|
|
1413
1492
|
// src/components/panels/PolicySidebar.tsx
|
|
1414
1493
|
var import_ui3 = require("@lace-cloud/ui");
|
|
1415
1494
|
var import_react9 = require("react");
|
|
1416
|
-
var import_panels_shared2 = require("./panels-shared-
|
|
1495
|
+
var import_panels_shared2 = require("./panels-shared-LLLB7PR4.css");
|
|
1417
1496
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1418
1497
|
var NODE_HOVER_EVENT = "lace:canvas:nodeHover";
|
|
1419
1498
|
var HOVER_DEBOUNCE_MS = 150;
|
|
@@ -1809,7 +1888,7 @@ function SaveButton({ status, label, onClick, disabled, disabledTitle }) {
|
|
|
1809
1888
|
}
|
|
1810
1889
|
|
|
1811
1890
|
// src/components/panels/EnvironmentsPanel.tsx
|
|
1812
|
-
var import_panels_shared3 = require("./panels-shared-
|
|
1891
|
+
var import_panels_shared3 = require("./panels-shared-LLLB7PR4.css");
|
|
1813
1892
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1814
1893
|
function toEnvRows(envs) {
|
|
1815
1894
|
if (!envs) return [];
|
|
@@ -1992,7 +2071,7 @@ function EnvironmentsPanel({ environments, onSave, onClose }) {
|
|
|
1992
2071
|
// src/components/panels/LocalsPanel.tsx
|
|
1993
2072
|
var import_ui7 = require("@lace-cloud/ui");
|
|
1994
2073
|
var import_react13 = require("react");
|
|
1995
|
-
var import_panels_shared4 = require("./panels-shared-
|
|
2074
|
+
var import_panels_shared4 = require("./panels-shared-LLLB7PR4.css");
|
|
1996
2075
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1997
2076
|
function toRows(locals) {
|
|
1998
2077
|
if (!locals) return [];
|
|
@@ -2128,7 +2207,7 @@ function LocalsPanel({ locals, onSave, onClose }) {
|
|
|
2128
2207
|
// src/components/panels/ModuleInterfacePanel.tsx
|
|
2129
2208
|
var import_ui8 = require("@lace-cloud/ui");
|
|
2130
2209
|
var import_react14 = require("react");
|
|
2131
|
-
var import_panels_shared5 = require("./panels-shared-
|
|
2210
|
+
var import_panels_shared5 = require("./panels-shared-LLLB7PR4.css");
|
|
2132
2211
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2133
2212
|
function variablesToRows(variables) {
|
|
2134
2213
|
return variables.map((v) => ({
|
|
@@ -2137,15 +2216,29 @@ function variablesToRows(variables) {
|
|
|
2137
2216
|
type: v.type,
|
|
2138
2217
|
required: v.required,
|
|
2139
2218
|
description: v.description ?? "",
|
|
2140
|
-
default_value: v.default_value
|
|
2219
|
+
default_value: v.default_value,
|
|
2220
|
+
validation: (v.validation ?? []).map((b) => ({
|
|
2221
|
+
id: crypto.randomUUID(),
|
|
2222
|
+
condition: b.condition,
|
|
2223
|
+
error_message: b.error_message
|
|
2224
|
+
})),
|
|
2225
|
+
ephemeral: v.ephemeral ?? false,
|
|
2226
|
+
sensitive: v.sensitive ?? false,
|
|
2227
|
+
// Wire `nullable` is tri-state: unset means Terraform's default (null
|
|
2228
|
+
// allowed), so an absent value shows the toggle ON.
|
|
2229
|
+
nullable: v.nullable ?? true
|
|
2141
2230
|
}));
|
|
2142
2231
|
}
|
|
2143
|
-
function buildOutputRows(view, exports2) {
|
|
2232
|
+
function buildOutputRows(view, exports2, outputDefs) {
|
|
2144
2233
|
if (!view) return [];
|
|
2145
2234
|
const exposedByKey = /* @__PURE__ */ new Map();
|
|
2146
2235
|
for (const e of exports2) {
|
|
2147
2236
|
exposedByKey.set(`${e.source_instance}|${e.source_output}`, { name: e.name });
|
|
2148
2237
|
}
|
|
2238
|
+
const dependsOnByName = /* @__PURE__ */ new Map();
|
|
2239
|
+
for (const d of outputDefs) {
|
|
2240
|
+
if (d.depends_on && d.depends_on.length > 0) dependsOnByName.set(d.name, d.depends_on);
|
|
2241
|
+
}
|
|
2149
2242
|
const sources = [];
|
|
2150
2243
|
for (const node of view.nodes) {
|
|
2151
2244
|
if (node.outputs.length > 0) sources.push({ id: node.id, outputs: node.outputs });
|
|
@@ -2160,6 +2253,7 @@ function buildOutputRows(view, exports2) {
|
|
|
2160
2253
|
for (const out of src.outputs) {
|
|
2161
2254
|
const key = `${src.id}|${out.name}`;
|
|
2162
2255
|
const exposed = exposedByKey.get(key);
|
|
2256
|
+
const exposedName = exposed?.name ?? out.name;
|
|
2163
2257
|
rows.push({
|
|
2164
2258
|
id: crypto.randomUUID(),
|
|
2165
2259
|
source_instance: src.id,
|
|
@@ -2168,7 +2262,8 @@ function buildOutputRows(view, exports2) {
|
|
|
2168
2262
|
description: out.description ?? "",
|
|
2169
2263
|
sensitive: out.sensitive ?? false,
|
|
2170
2264
|
exposed: Boolean(exposed),
|
|
2171
|
-
exposed_name:
|
|
2265
|
+
exposed_name: exposedName,
|
|
2266
|
+
depends_on: exposed ? dependsOnByName.get(exposedName) ?? [] : []
|
|
2172
2267
|
});
|
|
2173
2268
|
}
|
|
2174
2269
|
}
|
|
@@ -2185,20 +2280,68 @@ function ModuleInterfaceContent({
|
|
|
2185
2280
|
() => variablesToRows(settings.variables)
|
|
2186
2281
|
);
|
|
2187
2282
|
const [outputs, setOutputs] = (0, import_react14.useState)(
|
|
2188
|
-
() => buildOutputRows(view, settings.exports)
|
|
2283
|
+
() => buildOutputRows(view, settings.exports, settings.output_defs)
|
|
2189
2284
|
);
|
|
2285
|
+
const siblingModuleKeys = (0, import_react14.useMemo)(() => (view?.nodes ?? []).map((n) => `module.${n.id}`), [view]);
|
|
2190
2286
|
const updateVariable = (0, import_react14.useCallback)(
|
|
2191
2287
|
(index, field, value) => {
|
|
2192
2288
|
setVariables((prev) => prev.map((v, i) => i === index ? { ...v, [field]: value } : v));
|
|
2193
2289
|
},
|
|
2194
2290
|
[]
|
|
2195
2291
|
);
|
|
2292
|
+
const addValidation = (0, import_react14.useCallback)((index) => {
|
|
2293
|
+
setVariables(
|
|
2294
|
+
(prev) => prev.map(
|
|
2295
|
+
(v, i) => i === index ? {
|
|
2296
|
+
...v,
|
|
2297
|
+
validation: [
|
|
2298
|
+
...v.validation,
|
|
2299
|
+
{ id: crypto.randomUUID(), condition: "", error_message: "" }
|
|
2300
|
+
]
|
|
2301
|
+
} : v
|
|
2302
|
+
)
|
|
2303
|
+
);
|
|
2304
|
+
}, []);
|
|
2305
|
+
const removeValidation = (0, import_react14.useCallback)((index, vIndex) => {
|
|
2306
|
+
setVariables(
|
|
2307
|
+
(prev) => prev.map(
|
|
2308
|
+
(v, i) => i === index ? { ...v, validation: v.validation.filter((_, j) => j !== vIndex) } : v
|
|
2309
|
+
)
|
|
2310
|
+
);
|
|
2311
|
+
}, []);
|
|
2312
|
+
const updateValidation = (0, import_react14.useCallback)(
|
|
2313
|
+
(index, vIndex, field, value) => {
|
|
2314
|
+
setVariables(
|
|
2315
|
+
(prev) => prev.map(
|
|
2316
|
+
(v, i) => i === index ? {
|
|
2317
|
+
...v,
|
|
2318
|
+
validation: v.validation.map(
|
|
2319
|
+
(b, j) => j === vIndex ? { ...b, [field]: value } : b
|
|
2320
|
+
)
|
|
2321
|
+
} : v
|
|
2322
|
+
)
|
|
2323
|
+
);
|
|
2324
|
+
},
|
|
2325
|
+
[]
|
|
2326
|
+
);
|
|
2196
2327
|
const toggleExposed = (0, import_react14.useCallback)((index) => {
|
|
2197
2328
|
setOutputs((prev) => prev.map((o, i) => i === index ? { ...o, exposed: !o.exposed } : o));
|
|
2198
2329
|
}, []);
|
|
2199
2330
|
const updateExposedName = (0, import_react14.useCallback)((index, value) => {
|
|
2200
2331
|
setOutputs((prev) => prev.map((o, i) => i === index ? { ...o, exposed_name: value } : o));
|
|
2201
2332
|
}, []);
|
|
2333
|
+
const toggleDependsOn = (0, import_react14.useCallback)((index, depKey) => {
|
|
2334
|
+
setOutputs(
|
|
2335
|
+
(prev) => prev.map((o, i) => {
|
|
2336
|
+
if (i !== index) return o;
|
|
2337
|
+
const has = o.depends_on.includes(depKey);
|
|
2338
|
+
return {
|
|
2339
|
+
...o,
|
|
2340
|
+
depends_on: has ? o.depends_on.filter((k) => k !== depKey) : [...o.depends_on, depKey]
|
|
2341
|
+
};
|
|
2342
|
+
})
|
|
2343
|
+
);
|
|
2344
|
+
}, []);
|
|
2202
2345
|
const exposedNameCollisions = (0, import_react14.useMemo)(() => {
|
|
2203
2346
|
const counts = /* @__PURE__ */ new Map();
|
|
2204
2347
|
for (const o of outputs) {
|
|
@@ -2223,13 +2366,28 @@ function ModuleInterfaceContent({
|
|
|
2223
2366
|
const { status: saveStatus, handleSave } = useSaveState(
|
|
2224
2367
|
(0, import_react14.useCallback)(async () => {
|
|
2225
2368
|
if (hasErrors) return;
|
|
2226
|
-
const variableDefs = variables.filter((v) => v.name.trim()).map((v) =>
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2369
|
+
const variableDefs = variables.filter((v) => v.name.trim()).map((v) => {
|
|
2370
|
+
const validation = v.validation.map((b) => ({ condition: b.condition.trim(), error_message: b.error_message.trim() })).filter((b) => b.condition || b.error_message);
|
|
2371
|
+
return {
|
|
2372
|
+
name: v.name.trim(),
|
|
2373
|
+
type: v.type.trim() || "string",
|
|
2374
|
+
required: v.required,
|
|
2375
|
+
description: v.description.trim() || void 0,
|
|
2376
|
+
default: v.default_value,
|
|
2377
|
+
validation: validation.length > 0 ? validation : void 0,
|
|
2378
|
+
ephemeral: v.ephemeral || void 0,
|
|
2379
|
+
// Send `false` (not undefined) so turning sensitive OFF actually
|
|
2380
|
+
// clears the stored flag — the settings tier assigns wholesale
|
|
2381
|
+
// (#849). An omitted value would default back to false at the
|
|
2382
|
+
// mapper, which is the same effect, but being explicit documents
|
|
2383
|
+
// that OFF is authorable.
|
|
2384
|
+
sensitive: v.sensitive,
|
|
2385
|
+
// `nullable` is tri-state on the wire (unset = default true). The
|
|
2386
|
+
// toggle ON preserves the default by omitting the field; OFF
|
|
2387
|
+
// authors an explicit `false`.
|
|
2388
|
+
nullable: v.nullable ? void 0 : false
|
|
2389
|
+
};
|
|
2390
|
+
});
|
|
2233
2391
|
const exportDefs = [];
|
|
2234
2392
|
const outputDefs = [];
|
|
2235
2393
|
for (const o of outputs) {
|
|
@@ -2245,7 +2403,8 @@ function ModuleInterfaceContent({
|
|
|
2245
2403
|
name,
|
|
2246
2404
|
type: o.type,
|
|
2247
2405
|
description: o.description || void 0,
|
|
2248
|
-
sensitive: o.sensitive || void 0
|
|
2406
|
+
sensitive: o.sensitive || void 0,
|
|
2407
|
+
depends_on: o.depends_on.length > 0 ? o.depends_on : void 0
|
|
2249
2408
|
});
|
|
2250
2409
|
}
|
|
2251
2410
|
await onSaveVariables(variableDefs);
|
|
@@ -2284,18 +2443,96 @@ function ModuleInterfaceContent({
|
|
|
2284
2443
|
readOnly
|
|
2285
2444
|
}
|
|
2286
2445
|
) }),
|
|
2287
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.
|
|
2288
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lace-panel-row-actions", children: [
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "lace-panel-checkbox-row", children: [
|
|
2448
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2449
|
+
"input",
|
|
2450
|
+
{
|
|
2451
|
+
type: "checkbox",
|
|
2452
|
+
checked: v.required,
|
|
2453
|
+
onChange: (e) => updateVariable(i, "required", e.target.checked),
|
|
2454
|
+
disabled: readOnly
|
|
2455
|
+
}
|
|
2456
|
+
),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Required" })
|
|
2458
|
+
] }),
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "lace-panel-checkbox-row", children: [
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2461
|
+
"input",
|
|
2462
|
+
{
|
|
2463
|
+
type: "checkbox",
|
|
2464
|
+
checked: v.ephemeral,
|
|
2465
|
+
onChange: (e) => updateVariable(i, "ephemeral", e.target.checked),
|
|
2466
|
+
disabled: readOnly
|
|
2467
|
+
}
|
|
2468
|
+
),
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Ephemeral" })
|
|
2470
|
+
] }),
|
|
2471
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "lace-panel-checkbox-row", children: [
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2473
|
+
"input",
|
|
2474
|
+
{
|
|
2475
|
+
type: "checkbox",
|
|
2476
|
+
checked: v.sensitive,
|
|
2477
|
+
onChange: (e) => updateVariable(i, "sensitive", e.target.checked),
|
|
2478
|
+
disabled: readOnly
|
|
2479
|
+
}
|
|
2480
|
+
),
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Sensitive" })
|
|
2482
|
+
] }),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "lace-panel-checkbox-row", children: [
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2485
|
+
"input",
|
|
2486
|
+
{
|
|
2487
|
+
type: "checkbox",
|
|
2488
|
+
checked: v.nullable,
|
|
2489
|
+
onChange: (e) => updateVariable(i, "nullable", e.target.checked),
|
|
2490
|
+
disabled: readOnly
|
|
2491
|
+
}
|
|
2492
|
+
),
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Nullable" })
|
|
2494
|
+
] })
|
|
2495
|
+
] }),
|
|
2496
|
+
(v.validation.length > 0 || !readOnly) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lace-panel-row-content", children: [
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lace-panel-subsection-label", children: "Validation" }),
|
|
2498
|
+
v.validation.map((block, j) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lace-panel-validation-block", children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2500
|
+
import_ui8.Input,
|
|
2501
|
+
{
|
|
2502
|
+
value: block.condition,
|
|
2503
|
+
onChange: (e) => updateValidation(i, j, "condition", e.target.value),
|
|
2504
|
+
placeholder: "condition (e.g. length(var.x) > 0)",
|
|
2505
|
+
"aria-label": "Validation condition",
|
|
2506
|
+
fullWidth: true,
|
|
2507
|
+
mono: true,
|
|
2508
|
+
readOnly
|
|
2509
|
+
}
|
|
2510
|
+
),
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2512
|
+
import_ui8.Input,
|
|
2513
|
+
{
|
|
2514
|
+
value: block.error_message,
|
|
2515
|
+
onChange: (e) => updateValidation(i, j, "error_message", e.target.value),
|
|
2516
|
+
placeholder: "error message",
|
|
2517
|
+
"aria-label": "Validation error message",
|
|
2518
|
+
fullWidth: true,
|
|
2519
|
+
readOnly
|
|
2520
|
+
}
|
|
2521
|
+
),
|
|
2522
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2523
|
+
import_ui8.Button,
|
|
2524
|
+
{
|
|
2525
|
+
variant: "danger",
|
|
2526
|
+
size: "sm",
|
|
2527
|
+
onClick: () => removeValidation(i, j),
|
|
2528
|
+
"aria-label": "Remove validation rule",
|
|
2529
|
+
title: "Remove validation rule",
|
|
2530
|
+
children: "\u2715"
|
|
2531
|
+
}
|
|
2532
|
+
)
|
|
2533
|
+
] }, block.id)),
|
|
2534
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui8.Button, { variant: "secondary", size: "sm", onClick: () => addValidation(i), children: "+ Add validation rule" })
|
|
2535
|
+
] })
|
|
2299
2536
|
] }, v.id)),
|
|
2300
2537
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h4", { className: "lace-panel-section-title", children: "Outputs" }),
|
|
2301
2538
|
outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lace-panel-hint", children: "No child outputs available yet. Drop a module onto the canvas to see its outputs here." }) : outputs.map((o, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lace-panel-row-card lace-panel-row-card--with-footer", children: [
|
|
@@ -2327,6 +2564,20 @@ function ModuleInterfaceContent({
|
|
|
2327
2564
|
error: exposedNameCollisions.has(i)
|
|
2328
2565
|
}
|
|
2329
2566
|
) }) : null,
|
|
2567
|
+
o.exposed && (o.depends_on.length > 0 || !readOnly && siblingModuleKeys.length > 0) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lace-panel-row-content", children: [
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lace-panel-subsection-label", children: "Depends on" }),
|
|
2569
|
+
readOnly ? o.depends_on.map((depKey) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lace-panel-depends-item", children: depKey }, depKey)) : siblingModuleKeys.map((depKey) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "lace-panel-checkbox-row", children: [
|
|
2570
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2571
|
+
"input",
|
|
2572
|
+
{
|
|
2573
|
+
type: "checkbox",
|
|
2574
|
+
checked: o.depends_on.includes(depKey),
|
|
2575
|
+
onChange: () => toggleDependsOn(i, depKey)
|
|
2576
|
+
}
|
|
2577
|
+
),
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "lace-panel-checkbox-row__source", children: depKey })
|
|
2579
|
+
] }, depKey))
|
|
2580
|
+
] }) : null,
|
|
2330
2581
|
exposedNameCollisions.has(i) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lace-panel-row-error", children: "Exposed name must be unique and non-empty." }) : null
|
|
2331
2582
|
] }, o.id)),
|
|
2332
2583
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
@@ -2341,11 +2592,30 @@ function ModuleInterfaceContent({
|
|
|
2341
2592
|
)
|
|
2342
2593
|
] });
|
|
2343
2594
|
}
|
|
2595
|
+
function ModuleInterfacePanel({
|
|
2596
|
+
settings,
|
|
2597
|
+
view,
|
|
2598
|
+
readOnly = false,
|
|
2599
|
+
onSaveVariables,
|
|
2600
|
+
onSaveExports,
|
|
2601
|
+
onClose
|
|
2602
|
+
}) {
|
|
2603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui8.Panel, { title: "Module Interface", onClose, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2604
|
+
ModuleInterfaceContent,
|
|
2605
|
+
{
|
|
2606
|
+
settings,
|
|
2607
|
+
view,
|
|
2608
|
+
readOnly,
|
|
2609
|
+
onSaveVariables,
|
|
2610
|
+
onSaveExports
|
|
2611
|
+
}
|
|
2612
|
+
) });
|
|
2613
|
+
}
|
|
2344
2614
|
|
|
2345
2615
|
// src/components/panels/ModuleMetadataPanel.tsx
|
|
2346
2616
|
var import_ui9 = require("@lace-cloud/ui");
|
|
2347
2617
|
var import_react15 = require("react");
|
|
2348
|
-
var import_panels_shared6 = require("./panels-shared-
|
|
2618
|
+
var import_panels_shared6 = require("./panels-shared-LLLB7PR4.css");
|
|
2349
2619
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2350
2620
|
var ID_PATTERN = /^[a-z0-9_-]+\/[a-z0-9_-]+\/[a-z0-9_-]+$/;
|
|
2351
2621
|
var NAME_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
@@ -2601,12 +2871,12 @@ function ModuleMetadataContent({ engine, readOnly = false, onSaved }) {
|
|
|
2601
2871
|
}
|
|
2602
2872
|
|
|
2603
2873
|
// src/components/panels/UnifiedSettingsPanel.tsx
|
|
2604
|
-
var import_panels_shared9 = require("./panels-shared-
|
|
2874
|
+
var import_panels_shared9 = require("./panels-shared-LLLB7PR4.css");
|
|
2605
2875
|
|
|
2606
2876
|
// src/components/panels/ProvidersPanel.tsx
|
|
2607
2877
|
var import_ui10 = require("@lace-cloud/ui");
|
|
2608
2878
|
var import_react16 = require("react");
|
|
2609
|
-
var import_panels_shared7 = require("./panels-shared-
|
|
2879
|
+
var import_panels_shared7 = require("./panels-shared-LLLB7PR4.css");
|
|
2610
2880
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2611
2881
|
function toRows2(providers) {
|
|
2612
2882
|
if (!providers || providers.length === 0) return [];
|
|
@@ -2618,7 +2888,8 @@ function toRows2(providers) {
|
|
|
2618
2888
|
id: crypto.randomUUID(),
|
|
2619
2889
|
key,
|
|
2620
2890
|
value: String(value)
|
|
2621
|
-
}))
|
|
2891
|
+
})),
|
|
2892
|
+
blocks: p.blocks ?? []
|
|
2622
2893
|
}));
|
|
2623
2894
|
}
|
|
2624
2895
|
function fromRows2(rows) {
|
|
@@ -2632,10 +2903,16 @@ function fromRows2(rows) {
|
|
|
2632
2903
|
return {
|
|
2633
2904
|
name: r.name.trim(),
|
|
2634
2905
|
alias: r.alias.trim() || "",
|
|
2635
|
-
config
|
|
2906
|
+
config,
|
|
2907
|
+
// Echo the nested blocks verbatim so a config edit never wipes them.
|
|
2908
|
+
blocks: r.blocks.length > 0 ? r.blocks : void 0
|
|
2636
2909
|
};
|
|
2637
2910
|
});
|
|
2638
2911
|
}
|
|
2912
|
+
function blockLabel(block) {
|
|
2913
|
+
const labels = block.labels.length > 0 ? ` ${block.labels.map((l) => `"${l}"`).join(" ")}` : "";
|
|
2914
|
+
return `${block.type}${labels}`;
|
|
2915
|
+
}
|
|
2639
2916
|
function ProvidersContent({ providers, readOnly = false, onSave }) {
|
|
2640
2917
|
const [rows, setRows] = (0, import_react16.useState)(() => toRows2(providers));
|
|
2641
2918
|
const addProvider = (0, import_react16.useCallback)(() => {
|
|
@@ -2645,7 +2922,8 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
|
|
|
2645
2922
|
id: crypto.randomUUID(),
|
|
2646
2923
|
name: "",
|
|
2647
2924
|
alias: "",
|
|
2648
|
-
configEntries: [{ id: crypto.randomUUID(), key: "", value: "" }]
|
|
2925
|
+
configEntries: [{ id: crypto.randomUUID(), key: "", value: "" }],
|
|
2926
|
+
blocks: []
|
|
2649
2927
|
}
|
|
2650
2928
|
]);
|
|
2651
2929
|
}, []);
|
|
@@ -2767,7 +3045,18 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
|
|
|
2767
3045
|
className: "lace-panel-add-btn lace-panel-add-btn--sm",
|
|
2768
3046
|
children: "+ Add config key"
|
|
2769
3047
|
}
|
|
2770
|
-
)
|
|
3048
|
+
),
|
|
3049
|
+
row.blocks.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "lace-panel-row-sublabel", children: "Nested blocks (read-only)" }),
|
|
3051
|
+
row.blocks.map((block, bi) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3052
|
+
"div",
|
|
3053
|
+
{
|
|
3054
|
+
className: "lace-panel-depends-item",
|
|
3055
|
+
children: blockLabel(block)
|
|
3056
|
+
},
|
|
3057
|
+
`${row.id}-block-${bi}`
|
|
3058
|
+
))
|
|
3059
|
+
] }) : null
|
|
2771
3060
|
] }, row.id)),
|
|
2772
3061
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
2773
3062
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
|
|
@@ -2775,14 +3064,14 @@ function ProvidersContent({ providers, readOnly = false, onSave }) {
|
|
|
2775
3064
|
] })
|
|
2776
3065
|
] });
|
|
2777
3066
|
}
|
|
2778
|
-
function ProvidersPanel({ providers, onSave, onClose }) {
|
|
2779
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui10.Panel, { title: "Providers", onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ProvidersContent, { providers, onSave }) });
|
|
3067
|
+
function ProvidersPanel({ providers, readOnly = false, onSave, onClose }) {
|
|
3068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui10.Panel, { title: "Providers", onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ProvidersContent, { providers, readOnly, onSave }) });
|
|
2780
3069
|
}
|
|
2781
3070
|
|
|
2782
3071
|
// src/components/panels/TerraformConfigPanel.tsx
|
|
2783
3072
|
var import_ui11 = require("@lace-cloud/ui");
|
|
2784
3073
|
var import_react17 = require("react");
|
|
2785
|
-
var import_panels_shared8 = require("./panels-shared-
|
|
3074
|
+
var import_panels_shared8 = require("./panels-shared-LLLB7PR4.css");
|
|
2786
3075
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2787
3076
|
function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
|
|
2788
3077
|
const [requiredVersion, setRequiredVersion] = (0, import_react17.useState)(terraform?.required_version ?? "");
|
|
@@ -2792,13 +3081,14 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
|
|
|
2792
3081
|
id: crypto.randomUUID(),
|
|
2793
3082
|
name: req.name,
|
|
2794
3083
|
source: req.source ?? "",
|
|
2795
|
-
version: req.version ?? ""
|
|
3084
|
+
version: req.version ?? "",
|
|
3085
|
+
configuration_aliases: req.configuration_aliases ?? []
|
|
2796
3086
|
}));
|
|
2797
3087
|
});
|
|
2798
3088
|
const addProvider = (0, import_react17.useCallback)(() => {
|
|
2799
3089
|
setProviders((prev) => [
|
|
2800
3090
|
...prev,
|
|
2801
|
-
{ id: crypto.randomUUID(), name: "", source: "", version: "" }
|
|
3091
|
+
{ id: crypto.randomUUID(), name: "", source: "", version: "", configuration_aliases: [] }
|
|
2802
3092
|
]);
|
|
2803
3093
|
}, []);
|
|
2804
3094
|
const removeProvider = (0, import_react17.useCallback)((index) => {
|
|
@@ -2817,7 +3107,8 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
|
|
|
2817
3107
|
required_providers: providers.filter((p) => p.name.trim()).map((p) => ({
|
|
2818
3108
|
name: p.name.trim(),
|
|
2819
3109
|
source: p.source.trim(),
|
|
2820
|
-
version: p.version.trim()
|
|
3110
|
+
version: p.version.trim(),
|
|
3111
|
+
configuration_aliases: p.configuration_aliases.length > 0 ? p.configuration_aliases : void 0
|
|
2821
3112
|
}))
|
|
2822
3113
|
};
|
|
2823
3114
|
await onSave(block);
|
|
@@ -2877,6 +3168,16 @@ function TerraformConfigContent({ terraform, readOnly = false, onSave }) {
|
|
|
2877
3168
|
fullWidth: true,
|
|
2878
3169
|
readOnly
|
|
2879
3170
|
}
|
|
3171
|
+
) }),
|
|
3172
|
+
p.configuration_aliases.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "lace-panel-row-actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3173
|
+
import_ui11.Input,
|
|
3174
|
+
{
|
|
3175
|
+
value: p.configuration_aliases.join(", "),
|
|
3176
|
+
"aria-label": `${p.name || "provider"} configuration_aliases`,
|
|
3177
|
+
placeholder: "configuration_aliases",
|
|
3178
|
+
fullWidth: true,
|
|
3179
|
+
readOnly: true
|
|
3180
|
+
}
|
|
2880
3181
|
) })
|
|
2881
3182
|
] }, p.id)),
|
|
2882
3183
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", onClick: addProvider, className: "lace-panel-add-btn", children: "+ Add provider" }),
|
|
@@ -2939,7 +3240,8 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
|
|
|
2939
3240
|
terraform.required_providers.length > 0 ? terraform.required_providers.map((p) => ({
|
|
2940
3241
|
name: p.name,
|
|
2941
3242
|
source: p.source,
|
|
2942
|
-
version: p.version
|
|
3243
|
+
version: p.version,
|
|
3244
|
+
configuration_aliases: p.configuration_aliases
|
|
2943
3245
|
})) : void 0
|
|
2944
3246
|
);
|
|
2945
3247
|
onSaved?.();
|
|
@@ -2956,7 +3258,8 @@ function UnifiedSettingsPanel({ engine, onClose, onSaved }) {
|
|
|
2956
3258
|
providers.map((p) => ({
|
|
2957
3259
|
name: p.name,
|
|
2958
3260
|
alias: p.alias,
|
|
2959
|
-
config: p.config
|
|
3261
|
+
config: p.config,
|
|
3262
|
+
blocks: p.blocks
|
|
2960
3263
|
}))
|
|
2961
3264
|
);
|
|
2962
3265
|
onSaved?.();
|
|
@@ -12143,6 +12446,165 @@ var SetDependsOnAction = {
|
|
|
12143
12446
|
return message;
|
|
12144
12447
|
}
|
|
12145
12448
|
};
|
|
12449
|
+
function createBaseSetUseProvidersAction() {
|
|
12450
|
+
return { instance_id: "", providers: {} };
|
|
12451
|
+
}
|
|
12452
|
+
var SetUseProvidersAction = {
|
|
12453
|
+
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12454
|
+
if (message.instance_id !== "") {
|
|
12455
|
+
writer.uint32(10).string(message.instance_id);
|
|
12456
|
+
}
|
|
12457
|
+
globalThis.Object.entries(message.providers).forEach(([key, value]) => {
|
|
12458
|
+
SetUseProvidersAction_ProvidersEntry.encode({ key, value }, writer.uint32(18).fork()).join();
|
|
12459
|
+
});
|
|
12460
|
+
return writer;
|
|
12461
|
+
},
|
|
12462
|
+
decode(input, length) {
|
|
12463
|
+
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12464
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12465
|
+
const message = createBaseSetUseProvidersAction();
|
|
12466
|
+
while (reader.pos < end) {
|
|
12467
|
+
const tag = reader.uint32();
|
|
12468
|
+
switch (tag >>> 3) {
|
|
12469
|
+
case 1: {
|
|
12470
|
+
if (tag !== 10) {
|
|
12471
|
+
break;
|
|
12472
|
+
}
|
|
12473
|
+
message.instance_id = reader.string();
|
|
12474
|
+
continue;
|
|
12475
|
+
}
|
|
12476
|
+
case 2: {
|
|
12477
|
+
if (tag !== 18) {
|
|
12478
|
+
break;
|
|
12479
|
+
}
|
|
12480
|
+
const entry2 = SetUseProvidersAction_ProvidersEntry.decode(reader, reader.uint32());
|
|
12481
|
+
if (entry2.value !== void 0) {
|
|
12482
|
+
message.providers[entry2.key] = entry2.value;
|
|
12483
|
+
}
|
|
12484
|
+
continue;
|
|
12485
|
+
}
|
|
12486
|
+
}
|
|
12487
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12488
|
+
break;
|
|
12489
|
+
}
|
|
12490
|
+
reader.skip(tag & 7);
|
|
12491
|
+
}
|
|
12492
|
+
return message;
|
|
12493
|
+
},
|
|
12494
|
+
fromJSON(object) {
|
|
12495
|
+
return {
|
|
12496
|
+
instance_id: isSet3(object.instanceId) ? globalThis.String(object.instanceId) : isSet3(object.instance_id) ? globalThis.String(object.instance_id) : "",
|
|
12497
|
+
providers: isObject3(object.providers) ? globalThis.Object.entries(object.providers).reduce(
|
|
12498
|
+
(acc, [key, value]) => {
|
|
12499
|
+
acc[key] = globalThis.String(value);
|
|
12500
|
+
return acc;
|
|
12501
|
+
},
|
|
12502
|
+
{}
|
|
12503
|
+
) : {}
|
|
12504
|
+
};
|
|
12505
|
+
},
|
|
12506
|
+
toJSON(message) {
|
|
12507
|
+
const obj = {};
|
|
12508
|
+
if (message.instance_id !== "") {
|
|
12509
|
+
obj.instanceId = message.instance_id;
|
|
12510
|
+
}
|
|
12511
|
+
if (message.providers) {
|
|
12512
|
+
const entries = globalThis.Object.entries(message.providers);
|
|
12513
|
+
if (entries.length > 0) {
|
|
12514
|
+
obj.providers = {};
|
|
12515
|
+
entries.forEach(([k, v]) => {
|
|
12516
|
+
obj.providers[k] = v;
|
|
12517
|
+
});
|
|
12518
|
+
}
|
|
12519
|
+
}
|
|
12520
|
+
return obj;
|
|
12521
|
+
},
|
|
12522
|
+
create(base) {
|
|
12523
|
+
return SetUseProvidersAction.fromPartial(base ?? {});
|
|
12524
|
+
},
|
|
12525
|
+
fromPartial(object) {
|
|
12526
|
+
const message = createBaseSetUseProvidersAction();
|
|
12527
|
+
message.instance_id = object.instance_id ?? "";
|
|
12528
|
+
message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
|
|
12529
|
+
(acc, [key, value]) => {
|
|
12530
|
+
if (value !== void 0) {
|
|
12531
|
+
acc[key] = globalThis.String(value);
|
|
12532
|
+
}
|
|
12533
|
+
return acc;
|
|
12534
|
+
},
|
|
12535
|
+
{}
|
|
12536
|
+
);
|
|
12537
|
+
return message;
|
|
12538
|
+
}
|
|
12539
|
+
};
|
|
12540
|
+
function createBaseSetUseProvidersAction_ProvidersEntry() {
|
|
12541
|
+
return { key: "", value: "" };
|
|
12542
|
+
}
|
|
12543
|
+
var SetUseProvidersAction_ProvidersEntry = {
|
|
12544
|
+
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
12545
|
+
if (message.key !== "") {
|
|
12546
|
+
writer.uint32(10).string(message.key);
|
|
12547
|
+
}
|
|
12548
|
+
if (message.value !== "") {
|
|
12549
|
+
writer.uint32(18).string(message.value);
|
|
12550
|
+
}
|
|
12551
|
+
return writer;
|
|
12552
|
+
},
|
|
12553
|
+
decode(input, length) {
|
|
12554
|
+
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
12555
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
12556
|
+
const message = createBaseSetUseProvidersAction_ProvidersEntry();
|
|
12557
|
+
while (reader.pos < end) {
|
|
12558
|
+
const tag = reader.uint32();
|
|
12559
|
+
switch (tag >>> 3) {
|
|
12560
|
+
case 1: {
|
|
12561
|
+
if (tag !== 10) {
|
|
12562
|
+
break;
|
|
12563
|
+
}
|
|
12564
|
+
message.key = reader.string();
|
|
12565
|
+
continue;
|
|
12566
|
+
}
|
|
12567
|
+
case 2: {
|
|
12568
|
+
if (tag !== 18) {
|
|
12569
|
+
break;
|
|
12570
|
+
}
|
|
12571
|
+
message.value = reader.string();
|
|
12572
|
+
continue;
|
|
12573
|
+
}
|
|
12574
|
+
}
|
|
12575
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
12576
|
+
break;
|
|
12577
|
+
}
|
|
12578
|
+
reader.skip(tag & 7);
|
|
12579
|
+
}
|
|
12580
|
+
return message;
|
|
12581
|
+
},
|
|
12582
|
+
fromJSON(object) {
|
|
12583
|
+
return {
|
|
12584
|
+
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
12585
|
+
value: isSet3(object.value) ? globalThis.String(object.value) : ""
|
|
12586
|
+
};
|
|
12587
|
+
},
|
|
12588
|
+
toJSON(message) {
|
|
12589
|
+
const obj = {};
|
|
12590
|
+
if (message.key !== "") {
|
|
12591
|
+
obj.key = message.key;
|
|
12592
|
+
}
|
|
12593
|
+
if (message.value !== "") {
|
|
12594
|
+
obj.value = message.value;
|
|
12595
|
+
}
|
|
12596
|
+
return obj;
|
|
12597
|
+
},
|
|
12598
|
+
create(base) {
|
|
12599
|
+
return SetUseProvidersAction_ProvidersEntry.fromPartial(base ?? {});
|
|
12600
|
+
},
|
|
12601
|
+
fromPartial(object) {
|
|
12602
|
+
const message = createBaseSetUseProvidersAction_ProvidersEntry();
|
|
12603
|
+
message.key = object.key ?? "";
|
|
12604
|
+
message.value = object.value ?? "";
|
|
12605
|
+
return message;
|
|
12606
|
+
}
|
|
12607
|
+
};
|
|
12146
12608
|
function createBaseSetEnvironmentsAction() {
|
|
12147
12609
|
return { environments: {}, environment_backends: {} };
|
|
12148
12610
|
}
|
|
@@ -12613,7 +13075,8 @@ function createBaseAction() {
|
|
|
12613
13075
|
set_environments: void 0,
|
|
12614
13076
|
undo: void 0,
|
|
12615
13077
|
redo: void 0,
|
|
12616
|
-
place_module: void 0
|
|
13078
|
+
place_module: void 0,
|
|
13079
|
+
set_use_providers: void 0
|
|
12617
13080
|
};
|
|
12618
13081
|
}
|
|
12619
13082
|
var Action = {
|
|
@@ -12684,6 +13147,9 @@ var Action = {
|
|
|
12684
13147
|
if (message.place_module !== void 0) {
|
|
12685
13148
|
PlaceModuleAction.encode(message.place_module, writer.uint32(178).fork()).join();
|
|
12686
13149
|
}
|
|
13150
|
+
if (message.set_use_providers !== void 0) {
|
|
13151
|
+
SetUseProvidersAction.encode(message.set_use_providers, writer.uint32(186).fork()).join();
|
|
13152
|
+
}
|
|
12687
13153
|
return writer;
|
|
12688
13154
|
},
|
|
12689
13155
|
decode(input, length) {
|
|
@@ -12847,6 +13313,13 @@ var Action = {
|
|
|
12847
13313
|
message.place_module = PlaceModuleAction.decode(reader, reader.uint32());
|
|
12848
13314
|
continue;
|
|
12849
13315
|
}
|
|
13316
|
+
case 23: {
|
|
13317
|
+
if (tag !== 186) {
|
|
13318
|
+
break;
|
|
13319
|
+
}
|
|
13320
|
+
message.set_use_providers = SetUseProvidersAction.decode(reader, reader.uint32());
|
|
13321
|
+
continue;
|
|
13322
|
+
}
|
|
12850
13323
|
}
|
|
12851
13324
|
if ((tag & 7) === 4 || tag === 0) {
|
|
12852
13325
|
break;
|
|
@@ -12878,7 +13351,8 @@ var Action = {
|
|
|
12878
13351
|
set_environments: isSet3(object.setEnvironments) ? SetEnvironmentsAction.fromJSON(object.setEnvironments) : isSet3(object.set_environments) ? SetEnvironmentsAction.fromJSON(object.set_environments) : void 0,
|
|
12879
13352
|
undo: isSet3(object.undo) ? UndoAction.fromJSON(object.undo) : void 0,
|
|
12880
13353
|
redo: isSet3(object.redo) ? RedoAction.fromJSON(object.redo) : void 0,
|
|
12881
|
-
place_module: isSet3(object.placeModule) ? PlaceModuleAction.fromJSON(object.placeModule) : isSet3(object.place_module) ? PlaceModuleAction.fromJSON(object.place_module) : void 0
|
|
13354
|
+
place_module: isSet3(object.placeModule) ? PlaceModuleAction.fromJSON(object.placeModule) : isSet3(object.place_module) ? PlaceModuleAction.fromJSON(object.place_module) : void 0,
|
|
13355
|
+
set_use_providers: isSet3(object.setUseProviders) ? SetUseProvidersAction.fromJSON(object.setUseProviders) : isSet3(object.set_use_providers) ? SetUseProvidersAction.fromJSON(object.set_use_providers) : void 0
|
|
12882
13356
|
};
|
|
12883
13357
|
},
|
|
12884
13358
|
toJSON(message) {
|
|
@@ -12949,6 +13423,9 @@ var Action = {
|
|
|
12949
13423
|
if (message.place_module !== void 0) {
|
|
12950
13424
|
obj.placeModule = PlaceModuleAction.toJSON(message.place_module);
|
|
12951
13425
|
}
|
|
13426
|
+
if (message.set_use_providers !== void 0) {
|
|
13427
|
+
obj.setUseProviders = SetUseProvidersAction.toJSON(message.set_use_providers);
|
|
13428
|
+
}
|
|
12952
13429
|
return obj;
|
|
12953
13430
|
},
|
|
12954
13431
|
create(base) {
|
|
@@ -12978,6 +13455,7 @@ var Action = {
|
|
|
12978
13455
|
message.undo = object.undo !== void 0 && object.undo !== null ? UndoAction.fromPartial(object.undo) : void 0;
|
|
12979
13456
|
message.redo = object.redo !== void 0 && object.redo !== null ? RedoAction.fromPartial(object.redo) : void 0;
|
|
12980
13457
|
message.place_module = object.place_module !== void 0 && object.place_module !== null ? PlaceModuleAction.fromPartial(object.place_module) : void 0;
|
|
13458
|
+
message.set_use_providers = object.set_use_providers !== void 0 && object.set_use_providers !== null ? SetUseProvidersAction.fromPartial(object.set_use_providers) : void 0;
|
|
12981
13459
|
return message;
|
|
12982
13460
|
}
|
|
12983
13461
|
};
|
|
@@ -14735,7 +15213,15 @@ var RenderOutput = {
|
|
|
14735
15213
|
}
|
|
14736
15214
|
};
|
|
14737
15215
|
function createBaseNodeConfig() {
|
|
14738
|
-
return {
|
|
15216
|
+
return {
|
|
15217
|
+
instance_id: "",
|
|
15218
|
+
inputs: [],
|
|
15219
|
+
outputs: [],
|
|
15220
|
+
sibling_ids: [],
|
|
15221
|
+
depends_on: [],
|
|
15222
|
+
available_variables: [],
|
|
15223
|
+
providers: {}
|
|
15224
|
+
};
|
|
14739
15225
|
}
|
|
14740
15226
|
var NodeConfig = {
|
|
14741
15227
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -14757,6 +15243,9 @@ var NodeConfig = {
|
|
|
14757
15243
|
for (const v of message.available_variables) {
|
|
14758
15244
|
VariableRef.encode(v, writer.uint32(50).fork()).join();
|
|
14759
15245
|
}
|
|
15246
|
+
globalThis.Object.entries(message.providers).forEach(([key, value]) => {
|
|
15247
|
+
NodeConfig_ProvidersEntry.encode({ key, value }, writer.uint32(58).fork()).join();
|
|
15248
|
+
});
|
|
14760
15249
|
return writer;
|
|
14761
15250
|
},
|
|
14762
15251
|
decode(input, length) {
|
|
@@ -14808,6 +15297,16 @@ var NodeConfig = {
|
|
|
14808
15297
|
message.available_variables.push(VariableRef.decode(reader, reader.uint32()));
|
|
14809
15298
|
continue;
|
|
14810
15299
|
}
|
|
15300
|
+
case 7: {
|
|
15301
|
+
if (tag !== 58) {
|
|
15302
|
+
break;
|
|
15303
|
+
}
|
|
15304
|
+
const entry7 = NodeConfig_ProvidersEntry.decode(reader, reader.uint32());
|
|
15305
|
+
if (entry7.value !== void 0) {
|
|
15306
|
+
message.providers[entry7.key] = entry7.value;
|
|
15307
|
+
}
|
|
15308
|
+
continue;
|
|
15309
|
+
}
|
|
14811
15310
|
}
|
|
14812
15311
|
if ((tag & 7) === 4 || tag === 0) {
|
|
14813
15312
|
break;
|
|
@@ -14823,7 +15322,14 @@ var NodeConfig = {
|
|
|
14823
15322
|
outputs: globalThis.Array.isArray(object?.outputs) ? object.outputs.map((e) => RenderOutput.fromJSON(e)) : [],
|
|
14824
15323
|
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)) : [],
|
|
14825
15324
|
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)) : [],
|
|
14826
|
-
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)) : []
|
|
15325
|
+
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)) : [],
|
|
15326
|
+
providers: isObject3(object.providers) ? globalThis.Object.entries(object.providers).reduce(
|
|
15327
|
+
(acc, [key, value]) => {
|
|
15328
|
+
acc[key] = globalThis.String(value);
|
|
15329
|
+
return acc;
|
|
15330
|
+
},
|
|
15331
|
+
{}
|
|
15332
|
+
) : {}
|
|
14827
15333
|
};
|
|
14828
15334
|
},
|
|
14829
15335
|
toJSON(message) {
|
|
@@ -14846,6 +15352,15 @@ var NodeConfig = {
|
|
|
14846
15352
|
if (message.available_variables?.length) {
|
|
14847
15353
|
obj.availableVariables = message.available_variables.map((e) => VariableRef.toJSON(e));
|
|
14848
15354
|
}
|
|
15355
|
+
if (message.providers) {
|
|
15356
|
+
const entries = globalThis.Object.entries(message.providers);
|
|
15357
|
+
if (entries.length > 0) {
|
|
15358
|
+
obj.providers = {};
|
|
15359
|
+
entries.forEach(([k, v]) => {
|
|
15360
|
+
obj.providers[k] = v;
|
|
15361
|
+
});
|
|
15362
|
+
}
|
|
15363
|
+
}
|
|
14849
15364
|
return obj;
|
|
14850
15365
|
},
|
|
14851
15366
|
create(base) {
|
|
@@ -14859,6 +15374,83 @@ var NodeConfig = {
|
|
|
14859
15374
|
message.sibling_ids = object.sibling_ids?.map((e) => e) || [];
|
|
14860
15375
|
message.depends_on = object.depends_on?.map((e) => e) || [];
|
|
14861
15376
|
message.available_variables = object.available_variables?.map((e) => VariableRef.fromPartial(e)) || [];
|
|
15377
|
+
message.providers = globalThis.Object.entries(object.providers ?? {}).reduce(
|
|
15378
|
+
(acc, [key, value]) => {
|
|
15379
|
+
if (value !== void 0) {
|
|
15380
|
+
acc[key] = globalThis.String(value);
|
|
15381
|
+
}
|
|
15382
|
+
return acc;
|
|
15383
|
+
},
|
|
15384
|
+
{}
|
|
15385
|
+
);
|
|
15386
|
+
return message;
|
|
15387
|
+
}
|
|
15388
|
+
};
|
|
15389
|
+
function createBaseNodeConfig_ProvidersEntry() {
|
|
15390
|
+
return { key: "", value: "" };
|
|
15391
|
+
}
|
|
15392
|
+
var NodeConfig_ProvidersEntry = {
|
|
15393
|
+
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
15394
|
+
if (message.key !== "") {
|
|
15395
|
+
writer.uint32(10).string(message.key);
|
|
15396
|
+
}
|
|
15397
|
+
if (message.value !== "") {
|
|
15398
|
+
writer.uint32(18).string(message.value);
|
|
15399
|
+
}
|
|
15400
|
+
return writer;
|
|
15401
|
+
},
|
|
15402
|
+
decode(input, length) {
|
|
15403
|
+
const reader = input instanceof import_wire4.BinaryReader ? input : new import_wire4.BinaryReader(input);
|
|
15404
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
15405
|
+
const message = createBaseNodeConfig_ProvidersEntry();
|
|
15406
|
+
while (reader.pos < end) {
|
|
15407
|
+
const tag = reader.uint32();
|
|
15408
|
+
switch (tag >>> 3) {
|
|
15409
|
+
case 1: {
|
|
15410
|
+
if (tag !== 10) {
|
|
15411
|
+
break;
|
|
15412
|
+
}
|
|
15413
|
+
message.key = reader.string();
|
|
15414
|
+
continue;
|
|
15415
|
+
}
|
|
15416
|
+
case 2: {
|
|
15417
|
+
if (tag !== 18) {
|
|
15418
|
+
break;
|
|
15419
|
+
}
|
|
15420
|
+
message.value = reader.string();
|
|
15421
|
+
continue;
|
|
15422
|
+
}
|
|
15423
|
+
}
|
|
15424
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15425
|
+
break;
|
|
15426
|
+
}
|
|
15427
|
+
reader.skip(tag & 7);
|
|
15428
|
+
}
|
|
15429
|
+
return message;
|
|
15430
|
+
},
|
|
15431
|
+
fromJSON(object) {
|
|
15432
|
+
return {
|
|
15433
|
+
key: isSet3(object.key) ? globalThis.String(object.key) : "",
|
|
15434
|
+
value: isSet3(object.value) ? globalThis.String(object.value) : ""
|
|
15435
|
+
};
|
|
15436
|
+
},
|
|
15437
|
+
toJSON(message) {
|
|
15438
|
+
const obj = {};
|
|
15439
|
+
if (message.key !== "") {
|
|
15440
|
+
obj.key = message.key;
|
|
15441
|
+
}
|
|
15442
|
+
if (message.value !== "") {
|
|
15443
|
+
obj.value = message.value;
|
|
15444
|
+
}
|
|
15445
|
+
return obj;
|
|
15446
|
+
},
|
|
15447
|
+
create(base) {
|
|
15448
|
+
return NodeConfig_ProvidersEntry.fromPartial(base ?? {});
|
|
15449
|
+
},
|
|
15450
|
+
fromPartial(object) {
|
|
15451
|
+
const message = createBaseNodeConfig_ProvidersEntry();
|
|
15452
|
+
message.key = object.key ?? "";
|
|
15453
|
+
message.value = object.value ?? "";
|
|
14862
15454
|
return message;
|
|
14863
15455
|
}
|
|
14864
15456
|
};
|
|
@@ -15471,7 +16063,7 @@ var TerraformView = {
|
|
|
15471
16063
|
}
|
|
15472
16064
|
};
|
|
15473
16065
|
function createBaseProviderReqView() {
|
|
15474
|
-
return { name: "", source: "", version: "" };
|
|
16066
|
+
return { name: "", source: "", version: "", configuration_aliases: [] };
|
|
15475
16067
|
}
|
|
15476
16068
|
var ProviderReqView = {
|
|
15477
16069
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -15484,6 +16076,9 @@ var ProviderReqView = {
|
|
|
15484
16076
|
if (message.version !== "") {
|
|
15485
16077
|
writer.uint32(26).string(message.version);
|
|
15486
16078
|
}
|
|
16079
|
+
for (const v of message.configuration_aliases) {
|
|
16080
|
+
writer.uint32(34).string(v);
|
|
16081
|
+
}
|
|
15487
16082
|
return writer;
|
|
15488
16083
|
},
|
|
15489
16084
|
decode(input, length) {
|
|
@@ -15514,6 +16109,13 @@ var ProviderReqView = {
|
|
|
15514
16109
|
message.version = reader.string();
|
|
15515
16110
|
continue;
|
|
15516
16111
|
}
|
|
16112
|
+
case 4: {
|
|
16113
|
+
if (tag !== 34) {
|
|
16114
|
+
break;
|
|
16115
|
+
}
|
|
16116
|
+
message.configuration_aliases.push(reader.string());
|
|
16117
|
+
continue;
|
|
16118
|
+
}
|
|
15517
16119
|
}
|
|
15518
16120
|
if ((tag & 7) === 4 || tag === 0) {
|
|
15519
16121
|
break;
|
|
@@ -15526,7 +16128,8 @@ var ProviderReqView = {
|
|
|
15526
16128
|
return {
|
|
15527
16129
|
name: isSet3(object.name) ? globalThis.String(object.name) : "",
|
|
15528
16130
|
source: isSet3(object.source) ? globalThis.String(object.source) : "",
|
|
15529
|
-
version: isSet3(object.version) ? globalThis.String(object.version) : ""
|
|
16131
|
+
version: isSet3(object.version) ? globalThis.String(object.version) : "",
|
|
16132
|
+
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)) : []
|
|
15530
16133
|
};
|
|
15531
16134
|
},
|
|
15532
16135
|
toJSON(message) {
|
|
@@ -15540,6 +16143,9 @@ var ProviderReqView = {
|
|
|
15540
16143
|
if (message.version !== "") {
|
|
15541
16144
|
obj.version = message.version;
|
|
15542
16145
|
}
|
|
16146
|
+
if (message.configuration_aliases?.length) {
|
|
16147
|
+
obj.configurationAliases = message.configuration_aliases;
|
|
16148
|
+
}
|
|
15543
16149
|
return obj;
|
|
15544
16150
|
},
|
|
15545
16151
|
create(base) {
|
|
@@ -15550,6 +16156,7 @@ var ProviderReqView = {
|
|
|
15550
16156
|
message.name = object.name ?? "";
|
|
15551
16157
|
message.source = object.source ?? "";
|
|
15552
16158
|
message.version = object.version ?? "";
|
|
16159
|
+
message.configuration_aliases = object.configuration_aliases?.map((e) => e) || [];
|
|
15553
16160
|
return message;
|
|
15554
16161
|
}
|
|
15555
16162
|
};
|
|
@@ -15715,7 +16322,7 @@ var BackendView_ConfigEntry = {
|
|
|
15715
16322
|
}
|
|
15716
16323
|
};
|
|
15717
16324
|
function createBaseProviderView() {
|
|
15718
|
-
return { name: "", alias: "", config: {} };
|
|
16325
|
+
return { name: "", alias: "", config: {}, blocks: [] };
|
|
15719
16326
|
}
|
|
15720
16327
|
var ProviderView = {
|
|
15721
16328
|
encode(message, writer = new import_wire4.BinaryWriter()) {
|
|
@@ -15728,6 +16335,9 @@ var ProviderView = {
|
|
|
15728
16335
|
globalThis.Object.entries(message.config).forEach(([key, value]) => {
|
|
15729
16336
|
ProviderView_ConfigEntry.encode({ key, value }, writer.uint32(26).fork()).join();
|
|
15730
16337
|
});
|
|
16338
|
+
for (const v of message.blocks) {
|
|
16339
|
+
Block.encode(v, writer.uint32(34).fork()).join();
|
|
16340
|
+
}
|
|
15731
16341
|
return writer;
|
|
15732
16342
|
},
|
|
15733
16343
|
decode(input, length) {
|
|
@@ -15761,6 +16371,13 @@ var ProviderView = {
|
|
|
15761
16371
|
}
|
|
15762
16372
|
continue;
|
|
15763
16373
|
}
|
|
16374
|
+
case 4: {
|
|
16375
|
+
if (tag !== 34) {
|
|
16376
|
+
break;
|
|
16377
|
+
}
|
|
16378
|
+
message.blocks.push(Block.decode(reader, reader.uint32()));
|
|
16379
|
+
continue;
|
|
16380
|
+
}
|
|
15764
16381
|
}
|
|
15765
16382
|
if ((tag & 7) === 4 || tag === 0) {
|
|
15766
16383
|
break;
|
|
@@ -15779,7 +16396,8 @@ var ProviderView = {
|
|
|
15779
16396
|
return acc;
|
|
15780
16397
|
},
|
|
15781
16398
|
{}
|
|
15782
|
-
) : {}
|
|
16399
|
+
) : {},
|
|
16400
|
+
blocks: globalThis.Array.isArray(object?.blocks) ? object.blocks.map((e) => Block.fromJSON(e)) : []
|
|
15783
16401
|
};
|
|
15784
16402
|
},
|
|
15785
16403
|
toJSON(message) {
|
|
@@ -15799,6 +16417,9 @@ var ProviderView = {
|
|
|
15799
16417
|
});
|
|
15800
16418
|
}
|
|
15801
16419
|
}
|
|
16420
|
+
if (message.blocks?.length) {
|
|
16421
|
+
obj.blocks = message.blocks.map((e) => Block.toJSON(e));
|
|
16422
|
+
}
|
|
15802
16423
|
return obj;
|
|
15803
16424
|
},
|
|
15804
16425
|
create(base) {
|
|
@@ -15817,6 +16438,7 @@ var ProviderView = {
|
|
|
15817
16438
|
},
|
|
15818
16439
|
{}
|
|
15819
16440
|
);
|
|
16441
|
+
message.blocks = object.blocks?.map((e) => Block.fromPartial(e)) || [];
|
|
15820
16442
|
return message;
|
|
15821
16443
|
}
|
|
15822
16444
|
};
|
|
@@ -16130,7 +16752,9 @@ function createBaseInputDef2() {
|
|
|
16130
16752
|
description: "",
|
|
16131
16753
|
default_value: void 0,
|
|
16132
16754
|
validation: [],
|
|
16133
|
-
ephemeral: void 0
|
|
16755
|
+
ephemeral: void 0,
|
|
16756
|
+
nullable: void 0,
|
|
16757
|
+
sensitive: false
|
|
16134
16758
|
};
|
|
16135
16759
|
}
|
|
16136
16760
|
var InputDef2 = {
|
|
@@ -16156,6 +16780,12 @@ var InputDef2 = {
|
|
|
16156
16780
|
if (message.ephemeral !== void 0) {
|
|
16157
16781
|
writer.uint32(56).bool(message.ephemeral);
|
|
16158
16782
|
}
|
|
16783
|
+
if (message.nullable !== void 0) {
|
|
16784
|
+
writer.uint32(64).bool(message.nullable);
|
|
16785
|
+
}
|
|
16786
|
+
if (message.sensitive !== false) {
|
|
16787
|
+
writer.uint32(72).bool(message.sensitive);
|
|
16788
|
+
}
|
|
16159
16789
|
return writer;
|
|
16160
16790
|
},
|
|
16161
16791
|
decode(input, length) {
|
|
@@ -16214,6 +16844,20 @@ var InputDef2 = {
|
|
|
16214
16844
|
message.ephemeral = reader.bool();
|
|
16215
16845
|
continue;
|
|
16216
16846
|
}
|
|
16847
|
+
case 8: {
|
|
16848
|
+
if (tag !== 64) {
|
|
16849
|
+
break;
|
|
16850
|
+
}
|
|
16851
|
+
message.nullable = reader.bool();
|
|
16852
|
+
continue;
|
|
16853
|
+
}
|
|
16854
|
+
case 9: {
|
|
16855
|
+
if (tag !== 72) {
|
|
16856
|
+
break;
|
|
16857
|
+
}
|
|
16858
|
+
message.sensitive = reader.bool();
|
|
16859
|
+
continue;
|
|
16860
|
+
}
|
|
16217
16861
|
}
|
|
16218
16862
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16219
16863
|
break;
|
|
@@ -16230,7 +16874,9 @@ var InputDef2 = {
|
|
|
16230
16874
|
description: isSet3(object.description) ? globalThis.String(object.description) : "",
|
|
16231
16875
|
default_value: isSet3(object?.defaultValue) ? object.defaultValue : isSet3(object?.default_value) ? object.default_value : void 0,
|
|
16232
16876
|
validation: globalThis.Array.isArray(object?.validation) ? object.validation.map((e) => ValidationBlock2.fromJSON(e)) : [],
|
|
16233
|
-
ephemeral: isSet3(object.ephemeral) ? globalThis.Boolean(object.ephemeral) : void 0
|
|
16877
|
+
ephemeral: isSet3(object.ephemeral) ? globalThis.Boolean(object.ephemeral) : void 0,
|
|
16878
|
+
nullable: isSet3(object.nullable) ? globalThis.Boolean(object.nullable) : void 0,
|
|
16879
|
+
sensitive: isSet3(object.sensitive) ? globalThis.Boolean(object.sensitive) : false
|
|
16234
16880
|
};
|
|
16235
16881
|
},
|
|
16236
16882
|
toJSON(message) {
|
|
@@ -16256,6 +16902,12 @@ var InputDef2 = {
|
|
|
16256
16902
|
if (message.ephemeral !== void 0) {
|
|
16257
16903
|
obj.ephemeral = message.ephemeral;
|
|
16258
16904
|
}
|
|
16905
|
+
if (message.nullable !== void 0) {
|
|
16906
|
+
obj.nullable = message.nullable;
|
|
16907
|
+
}
|
|
16908
|
+
if (message.sensitive !== false) {
|
|
16909
|
+
obj.sensitive = message.sensitive;
|
|
16910
|
+
}
|
|
16259
16911
|
return obj;
|
|
16260
16912
|
},
|
|
16261
16913
|
create(base) {
|
|
@@ -16270,6 +16922,8 @@ var InputDef2 = {
|
|
|
16270
16922
|
message.default_value = object.default_value ?? void 0;
|
|
16271
16923
|
message.validation = object.validation?.map((e) => ValidationBlock2.fromPartial(e)) || [];
|
|
16272
16924
|
message.ephemeral = object.ephemeral ?? void 0;
|
|
16925
|
+
message.nullable = object.nullable ?? void 0;
|
|
16926
|
+
message.sensitive = object.sensitive ?? false;
|
|
16273
16927
|
return message;
|
|
16274
16928
|
}
|
|
16275
16929
|
};
|
|
@@ -16771,8 +17425,10 @@ var ConnectWebEngine = class {
|
|
|
16771
17425
|
required: v.required,
|
|
16772
17426
|
description: v.description ?? "",
|
|
16773
17427
|
default_value: v.default ?? void 0,
|
|
16774
|
-
sensitive: false,
|
|
16775
|
-
validation: []
|
|
17428
|
+
sensitive: v.sensitive ?? false,
|
|
17429
|
+
validation: v.validation ?? [],
|
|
17430
|
+
ephemeral: v.ephemeral,
|
|
17431
|
+
nullable: v.nullable
|
|
16776
17432
|
}))
|
|
16777
17433
|
}
|
|
16778
17434
|
});
|
|
@@ -16790,7 +17446,7 @@ var ConnectWebEngine = class {
|
|
|
16790
17446
|
type: d.type,
|
|
16791
17447
|
description: d.description ?? "",
|
|
16792
17448
|
sensitive: d.sensitive ?? false,
|
|
16793
|
-
depends_on: []
|
|
17449
|
+
depends_on: d.depends_on ?? []
|
|
16794
17450
|
}))
|
|
16795
17451
|
}
|
|
16796
17452
|
});
|
|
@@ -16802,7 +17458,8 @@ var ConnectWebEngine = class {
|
|
|
16802
17458
|
required_providers: (requiredProviders ?? []).map((p) => ({
|
|
16803
17459
|
name: p.name,
|
|
16804
17460
|
source: p.source,
|
|
16805
|
-
version: p.version
|
|
17461
|
+
version: p.version,
|
|
17462
|
+
configuration_aliases: p.configuration_aliases ?? []
|
|
16806
17463
|
})),
|
|
16807
17464
|
backend: void 0
|
|
16808
17465
|
}
|
|
@@ -16814,7 +17471,8 @@ var ConnectWebEngine = class {
|
|
|
16814
17471
|
providers: providers.map((p) => ({
|
|
16815
17472
|
name: p.name,
|
|
16816
17473
|
alias: p.alias ?? "",
|
|
16817
|
-
config: p.config
|
|
17474
|
+
config: p.config,
|
|
17475
|
+
blocks: p.blocks ?? []
|
|
16818
17476
|
}))
|
|
16819
17477
|
}
|
|
16820
17478
|
});
|
|
@@ -16837,6 +17495,11 @@ var ConnectWebEngine = class {
|
|
|
16837
17495
|
set_depends_on: { instance_id: instanceId, depends_on: dependsOn }
|
|
16838
17496
|
});
|
|
16839
17497
|
}
|
|
17498
|
+
setUseProviders(instanceId, providers) {
|
|
17499
|
+
return this.applyAction({
|
|
17500
|
+
set_use_providers: { instance_id: instanceId, providers }
|
|
17501
|
+
});
|
|
17502
|
+
}
|
|
16840
17503
|
setEnvironments(environments) {
|
|
16841
17504
|
return this.applyAction({
|
|
16842
17505
|
set_environments: { environments, environment_backends: {} }
|
|
@@ -17443,8 +18106,10 @@ var PostMessageEngine = class {
|
|
|
17443
18106
|
required: v.required,
|
|
17444
18107
|
description: v.description ?? "",
|
|
17445
18108
|
default_value: v.default ?? void 0,
|
|
17446
|
-
sensitive: false,
|
|
17447
|
-
validation: []
|
|
18109
|
+
sensitive: v.sensitive ?? false,
|
|
18110
|
+
validation: v.validation ?? [],
|
|
18111
|
+
ephemeral: v.ephemeral,
|
|
18112
|
+
nullable: v.nullable
|
|
17448
18113
|
}))
|
|
17449
18114
|
}
|
|
17450
18115
|
});
|
|
@@ -17462,7 +18127,7 @@ var PostMessageEngine = class {
|
|
|
17462
18127
|
type: d.type,
|
|
17463
18128
|
description: d.description ?? "",
|
|
17464
18129
|
sensitive: d.sensitive ?? false,
|
|
17465
|
-
depends_on: []
|
|
18130
|
+
depends_on: d.depends_on ?? []
|
|
17466
18131
|
}))
|
|
17467
18132
|
}
|
|
17468
18133
|
});
|
|
@@ -17474,7 +18139,8 @@ var PostMessageEngine = class {
|
|
|
17474
18139
|
required_providers: (requiredProviders ?? []).map((p) => ({
|
|
17475
18140
|
name: p.name,
|
|
17476
18141
|
source: p.source,
|
|
17477
|
-
version: p.version
|
|
18142
|
+
version: p.version,
|
|
18143
|
+
configuration_aliases: p.configuration_aliases ?? []
|
|
17478
18144
|
})),
|
|
17479
18145
|
backend: void 0
|
|
17480
18146
|
}
|
|
@@ -17486,7 +18152,8 @@ var PostMessageEngine = class {
|
|
|
17486
18152
|
providers: providers.map((p) => ({
|
|
17487
18153
|
name: p.name,
|
|
17488
18154
|
alias: p.alias ?? "",
|
|
17489
|
-
config: p.config
|
|
18155
|
+
config: p.config,
|
|
18156
|
+
blocks: p.blocks ?? []
|
|
17490
18157
|
}))
|
|
17491
18158
|
}
|
|
17492
18159
|
});
|
|
@@ -17509,6 +18176,11 @@ var PostMessageEngine = class {
|
|
|
17509
18176
|
set_depends_on: { instance_id: instanceId, depends_on: dependsOn }
|
|
17510
18177
|
});
|
|
17511
18178
|
}
|
|
18179
|
+
setUseProviders(instanceId, providers) {
|
|
18180
|
+
return this.applyAction({
|
|
18181
|
+
set_use_providers: { instance_id: instanceId, providers }
|
|
18182
|
+
});
|
|
18183
|
+
}
|
|
17512
18184
|
setEnvironments(environments) {
|
|
17513
18185
|
return this.applyAction({
|
|
17514
18186
|
set_environments: { environments, environment_backends: {} }
|
|
@@ -17663,6 +18335,7 @@ var EMPTY_NODE_CONFIG = {
|
|
|
17663
18335
|
outputs: [],
|
|
17664
18336
|
sibling_ids: [],
|
|
17665
18337
|
depends_on: [],
|
|
18338
|
+
providers: {},
|
|
17666
18339
|
available_variables: []
|
|
17667
18340
|
};
|
|
17668
18341
|
var EMPTY_EDGE_CONFIG = {
|
|
@@ -17804,6 +18477,9 @@ var SnapshotCanvasEngine = class {
|
|
|
17804
18477
|
async setDependsOn(_instanceId, _dependsOn) {
|
|
17805
18478
|
return READ_ONLY_RESULT;
|
|
17806
18479
|
}
|
|
18480
|
+
async setUseProviders(_instanceId, _providers) {
|
|
18481
|
+
return READ_ONLY_RESULT;
|
|
18482
|
+
}
|
|
17807
18483
|
async setEnvironments(_environments) {
|
|
17808
18484
|
return READ_ONLY_RESULT;
|
|
17809
18485
|
}
|
|
@@ -17908,6 +18584,8 @@ var SnapshotCanvasEngine = class {
|
|
|
17908
18584
|
LocalsContent,
|
|
17909
18585
|
LocalsPanel,
|
|
17910
18586
|
ModuleConfigPanel,
|
|
18587
|
+
ModuleInterfaceContent,
|
|
18588
|
+
ModuleInterfacePanel,
|
|
17911
18589
|
ModuleNode,
|
|
17912
18590
|
PolicySidebar,
|
|
17913
18591
|
PostMessageEngine,
|