@tangle-network/sandbox-ui 0.55.0 → 0.56.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.
|
@@ -43,7 +43,7 @@ function pickDetail(cfg, keys) {
|
|
|
43
43
|
}
|
|
44
44
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function describeActionBase(action) {
|
|
47
47
|
const rec = asRecord(action);
|
|
48
48
|
const [kind] = Object.keys(rec);
|
|
49
49
|
const cfg = asRecord(rec[kind]);
|
|
@@ -134,6 +134,41 @@ function describeAction(action) {
|
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
+
var MAX_CONFIG_DEPTH = 100;
|
|
138
|
+
function toJsonSafe(value, seen = /* @__PURE__ */ new WeakSet(), depth = 0) {
|
|
139
|
+
if (value === null) return null;
|
|
140
|
+
if (typeof value === "number") return Number.isFinite(value) ? value : null;
|
|
141
|
+
if (typeof value === "string" || typeof value === "boolean") return value;
|
|
142
|
+
if (typeof value !== "object") return void 0;
|
|
143
|
+
if (value instanceof Date) return value.toISOString();
|
|
144
|
+
if (seen.has(value)) return "[Circular]";
|
|
145
|
+
if (depth >= MAX_CONFIG_DEPTH) return "[Max depth exceeded]";
|
|
146
|
+
seen.add(value);
|
|
147
|
+
let out;
|
|
148
|
+
if (Array.isArray(value)) {
|
|
149
|
+
out = value.map((v) => {
|
|
150
|
+
const s = toJsonSafe(v, seen, depth + 1);
|
|
151
|
+
return s === void 0 ? null : s;
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
const obj = {};
|
|
155
|
+
for (const [k, v] of Object.entries(value)) {
|
|
156
|
+
const s = toJsonSafe(v, seen, depth + 1);
|
|
157
|
+
if (s !== void 0) obj[k] = s;
|
|
158
|
+
}
|
|
159
|
+
out = obj;
|
|
160
|
+
}
|
|
161
|
+
seen.delete(value);
|
|
162
|
+
return out;
|
|
163
|
+
}
|
|
164
|
+
function withConfig(base, cfg) {
|
|
165
|
+
return Object.keys(cfg).length > 0 ? { ...base, config: toJsonSafe(cfg) } : base;
|
|
166
|
+
}
|
|
167
|
+
function describeAction(action) {
|
|
168
|
+
const rec = asRecord(action);
|
|
169
|
+
const [kind] = Object.keys(rec);
|
|
170
|
+
return withConfig(describeActionBase(action), asRecord(rec[kind]));
|
|
171
|
+
}
|
|
137
172
|
function describeTrigger(on) {
|
|
138
173
|
const rec = asRecord(on);
|
|
139
174
|
if (rec.provider_event) {
|
|
@@ -146,36 +181,46 @@ function describeTrigger(on) {
|
|
|
146
181
|
if (event) subtitle += ` \xB7 ${event}`;
|
|
147
182
|
if (actions.length > 0) subtitle += ` (${actions.join("/")})`;
|
|
148
183
|
if (repo) subtitle += ` on ${repo}`;
|
|
149
|
-
return
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
184
|
+
return withConfig(
|
|
185
|
+
{
|
|
186
|
+
title: "Trigger",
|
|
187
|
+
kind: "provider_event",
|
|
188
|
+
subtitle,
|
|
189
|
+
provider: connection,
|
|
190
|
+
hasBranches: false,
|
|
191
|
+
isRoot: true,
|
|
192
|
+
tone: "trigger"
|
|
193
|
+
},
|
|
194
|
+
ev
|
|
195
|
+
);
|
|
158
196
|
}
|
|
159
197
|
if (rec.schedule) {
|
|
160
198
|
const sch = asRecord(rec.schedule);
|
|
161
199
|
const cron = str(sch.cron);
|
|
162
200
|
const tz = str(sch.timezone);
|
|
163
|
-
return
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
201
|
+
return withConfig(
|
|
202
|
+
{
|
|
203
|
+
title: "Schedule",
|
|
204
|
+
kind: "schedule",
|
|
205
|
+
subtitle: cron ? tz ? `${cron} (${tz})` : cron : void 0,
|
|
206
|
+
hasBranches: false,
|
|
207
|
+
isRoot: true,
|
|
208
|
+
tone: "trigger"
|
|
209
|
+
},
|
|
210
|
+
sch
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
const [kind] = Object.keys(rec);
|
|
214
|
+
return withConfig(
|
|
215
|
+
{
|
|
216
|
+
title: "Trigger",
|
|
217
|
+
kind: "trigger",
|
|
167
218
|
hasBranches: false,
|
|
168
219
|
isRoot: true,
|
|
169
220
|
tone: "trigger"
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
title: "Trigger",
|
|
174
|
-
kind: "trigger",
|
|
175
|
-
hasBranches: false,
|
|
176
|
-
isRoot: true,
|
|
177
|
-
tone: "trigger"
|
|
178
|
-
};
|
|
221
|
+
},
|
|
222
|
+
asRecord(kind ? rec[kind] : void 0)
|
|
223
|
+
);
|
|
179
224
|
}
|
|
180
225
|
function buildWorkflowGraph(yaml, options) {
|
|
181
226
|
const reserveRunState = options?.reserveRunState ?? false;
|
package/dist/workflows.d.ts
CHANGED
|
@@ -58,6 +58,14 @@ interface WfNodeData extends Record<string, unknown> {
|
|
|
58
58
|
path?: string;
|
|
59
59
|
/** Notable config fields for the expand drawer (kept small + stringified). */
|
|
60
60
|
detail?: Record<string, string>;
|
|
61
|
+
/** The raw, UNTRUNCATED config for this node — the action/trigger config from
|
|
62
|
+
* the definition. The compact card reads {@link detail}; a full-detail view
|
|
63
|
+
* (e.g. a node drawer) reads this to render every field — the complete prompt,
|
|
64
|
+
* all profile/source/input keys — without the card-sized clamp. It is a
|
|
65
|
+
* JSON-safe deep copy of the config (cycles and non-JSON values normalized),
|
|
66
|
+
* so a consumer can serialize or render it freely. Omitted when the node has
|
|
67
|
+
* no config. */
|
|
68
|
+
config?: Record<string, unknown>;
|
|
61
69
|
/** Connector slug (e.g. `github`) for the provider chip, when one applies. */
|
|
62
70
|
provider?: string;
|
|
63
71
|
/** Small corner tag, e.g. "×3" for a parallel fan-out. */
|
package/dist/workflows.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildWorkflowGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WEYFEMIN.js";
|
|
4
4
|
import "./chunk-7JLB7UZ3.js";
|
|
5
5
|
import "./chunk-U67V476Y.js";
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
|
|
|
27
27
|
function lazyWorkflowGraph() {
|
|
28
28
|
return lazy(
|
|
29
29
|
() => retryImport(
|
|
30
|
-
() => import("./WorkflowGraph-
|
|
30
|
+
() => import("./WorkflowGraph-VMG2ZEAN.js").then((m) => ({ default: m.WorkflowGraph }))
|
|
31
31
|
)
|
|
32
32
|
);
|
|
33
33
|
}
|
package/package.json
CHANGED