@burdenoff/microfe-devportal 2026.624.9 → 2026.624.10

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.
@@ -14,155 +14,167 @@ import { useDevportalPermission as c } from "../hooks/usePermission.js";
14
14
  import "../hooks/index.js";
15
15
  import ce from "../../node_modules/.bun/date-fns@3.6.0/node_modules/date-fns/format.js";
16
16
  import { usePackageUpload as le } from "../hooks/usePackageUpload.js";
17
- import { useCallback as ue, useEffect as de, useMemo as l, useRef as fe, useState as u } from "react";
18
- import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { AlertCircle as d, Archive as me, CheckCircle as f, Clock as he, FileJson as ge, Loader2 as p, Package as m, Plus as h, Upload as g } from "lucide-react";
17
+ import { useCallback as ue, useEffect as de, useMemo as l, useRef as u, useState as d } from "react";
18
+ import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { AlertCircle as f, Archive as pe, CheckCircle as p, Clock as me, FileJson as m, Loader2 as h, Package as he, Plus as ge, Upload as g } from "lucide-react";
20
20
  import { useParams as _e } from "react-router-dom";
21
21
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
22
22
  //#region src/devportal/pages/ApplicationVersionsPage.tsx
23
23
  var ve = () => {
24
- let { t: ve } = pe(), b = (e, t) => {
24
+ let { t: ve } = fe(), b = (e, t) => {
25
25
  let n = ve(e);
26
26
  return n === e ? t : n;
27
- }, { allowed: ye } = c(s.APP_VERSION_CREATE), { allowed: x } = c(s.APP_VERSION_PUBLISH), { allowed: S } = c(s.APP_VERSION_DEPRECATE), { appId: C } = _e(), { workspacesGatewayUrl: be, authToken: xe, workspaceId: Se, getWorkspaceToken: Ce } = e(), { upload: w, uploading: T, progress: E, error: D } = le(be, xe, Se, Ce), O = fe(null), [k, A] = u(!1), [j, M] = u({
27
+ }, { allowed: ye } = c(s.APP_VERSION_CREATE), { allowed: x } = c(s.APP_VERSION_PUBLISH), { allowed: S } = c(s.APP_VERSION_DEPRECATE), { appId: C } = _e(), { workspacesGatewayUrl: be, authToken: xe, workspaceId: Se, getWorkspaceToken: Ce } = e(), { upload: w, uploading: T, progress: E, error: D } = le(be, xe, Se, Ce), O = u(null), k = u(null), [A, j] = d(!1), [M, N] = d({
28
28
  version: "",
29
29
  releaseNotes: "",
30
30
  changelog: "",
31
31
  packageUrl: "",
32
32
  packageSize: "",
33
33
  manifestJson: ""
34
- }), [N, P] = u("file"), [F, I] = u(null), [L, R] = u(null), [z, B] = u(/* @__PURE__ */ new Set()), [V, H] = u(null), { data: U } = ee({
34
+ }), [P, F] = d(null), [I, L] = d("file"), [R, z] = d(null), [we, B] = d(null), [V, H] = d(/* @__PURE__ */ new Set()), [Te, U] = d(null), { data: W } = ee({
35
35
  variables: { id: C ?? "" },
36
36
  skip: !C,
37
37
  fetchPolicy: "cache-first"
38
- }), W = U?.application?.appType === "NODE" || U?.application?.appType === "WORKFLOW";
38
+ }), Ee = W?.application?.appType === "NODE" || W?.application?.appType === "WORKFLOW";
39
39
  de(() => {
40
- let e = U?.application?.name;
40
+ let e = W?.application?.name;
41
41
  if (!C || !e) return;
42
42
  let t = window.__breadcrumbRegistry;
43
43
  return t?.register(C, e), () => t?.unregister(C);
44
- }, [C, U?.application?.name]);
45
- let { data: G, loading: we, error: Te } = te({
44
+ }, [C, W?.application?.name]);
45
+ let { data: G, loading: De, error: Oe } = te({
46
46
  variables: { applicationId: C },
47
47
  skip: !C,
48
48
  fetchPolicy: "cache-and-network"
49
- }), [Ee, { loading: De }] = n({ refetchQueries: ["GetApplicationVersions"] }), [Oe] = ne({ refetchQueries: ["GetApplicationVersions"] }), [ke] = r({ refetchQueries: ["GetApplicationVersions"] }), K = l(() => G?.application?.versions?.edges?.map((e) => e.node) ?? [], [G?.application?.versions]), q = l(() => K.filter((e) => z.has(e.id)), [K, z]), J = l(() => q.filter((e) => e.status?.toUpperCase() === "DRAFT"), [q]), Y = l(() => q.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [q]), X = K.length > 0 && K.every((e) => z.has(e.id)), Z = K.some((e) => z.has(e.id)) && !X, Ae = async () => {
50
- if (!C || !j.version.trim()) return;
51
- if (I(null), W) {
52
- if (!j.packageUrl) {
53
- I("A ZIP package is required for this app type.");
49
+ }), [ke, { loading: Ae }] = n({ refetchQueries: ["GetApplicationVersions"] }), [je] = ne({ refetchQueries: ["GetApplicationVersions"] }), [Me] = r({ refetchQueries: ["GetApplicationVersions"] }), K = l(() => G?.application?.versions?.edges?.map((e) => e.node) ?? [], [G?.application?.versions]), q = l(() => K.filter((e) => V.has(e.id)), [K, V]), J = l(() => q.filter((e) => e.status?.toUpperCase() === "DRAFT"), [q]), Y = l(() => q.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [q]), X = K.length > 0 && K.every((e) => V.has(e.id)), Z = K.some((e) => V.has(e.id)) && !X, Ne = async () => {
50
+ if (!C || !M.version.trim()) return;
51
+ if (z(null), Ee) {
52
+ if (!M.packageUrl) {
53
+ z("A ZIP package is required for this app type.");
54
54
  return;
55
55
  }
56
- if (!j.manifestJson.trim()) {
57
- I("A manifest JSON is required for this app type.");
56
+ if (!M.manifestJson.trim()) {
57
+ z("A manifest JSON is required for this app type.");
58
58
  return;
59
59
  }
60
60
  }
61
61
  let e;
62
- if (j.manifestJson.trim()) try {
63
- e = JSON.parse(j.manifestJson);
62
+ if (M.manifestJson.trim()) try {
63
+ e = JSON.parse(M.manifestJson);
64
64
  } catch {
65
- I("Invalid JSON in manifest — please check your input.");
65
+ z("Invalid JSON in manifest — please check your input.");
66
66
  return;
67
67
  }
68
68
  try {
69
- await Ee({ variables: {
69
+ await ke({ variables: {
70
70
  applicationId: C,
71
71
  input: {
72
- version: j.version,
73
- releaseNotes: j.releaseNotes || void 0,
74
- changelog: j.changelog || void 0,
75
- packageUrl: j.packageUrl || void 0,
76
- packageSize: j.packageSize || void 0,
72
+ version: M.version,
73
+ releaseNotes: M.releaseNotes || void 0,
74
+ changelog: M.changelog || void 0,
75
+ packageUrl: M.packageUrl || void 0,
76
+ packageSize: M.packageSize || void 0,
77
77
  manifest: e
78
78
  }
79
- } }), A(!1), M({
79
+ } }), j(!1), N({
80
80
  version: "",
81
81
  releaseNotes: "",
82
82
  changelog: "",
83
83
  packageUrl: "",
84
84
  packageSize: "",
85
85
  manifestJson: ""
86
- }), P("file"), R(b("devportal.versionCreatedSuccess", "Version created successfully"));
86
+ }), F(null), L("file"), B(b("devportal.versionCreatedSuccess", "Version created successfully"));
87
87
  } catch (e) {
88
- I(e instanceof Error ? e.message : b("devportal.versionCreateFailed", "Failed to create version"));
88
+ z(e instanceof Error ? e.message : b("devportal.versionCreateFailed", "Failed to create version"));
89
89
  }
90
- }, je = ue(async (e) => {
90
+ }, Pe = ue(async (e) => {
91
91
  let t = e.target.files?.[0];
92
92
  if (t) {
93
93
  e.target.value = "";
94
94
  try {
95
95
  let e = await w(t);
96
- M((n) => ({
96
+ N((n) => ({
97
97
  ...n,
98
98
  packageUrl: e.downloadUrl,
99
99
  packageSize: String(t.size)
100
100
  }));
101
101
  } catch {}
102
102
  }
103
- }, [w]), Me = async (e) => {
104
- I(null), R(null);
103
+ }, [w]), Fe = ue((e) => {
104
+ let t = e.target.files?.[0];
105
+ if (!t) return;
106
+ e.target.value = "";
107
+ let n = new FileReader();
108
+ n.onload = (e) => {
109
+ let n = e.target?.result;
110
+ typeof n == "string" && (F(t.name), N((e) => ({
111
+ ...e,
112
+ manifestJson: n
113
+ })));
114
+ }, n.readAsText(t);
115
+ }, []), Ie = async (e) => {
116
+ z(null), B(null);
105
117
  try {
106
- await Oe({ variables: { id: e } }), R(b("devportal.versionPublishedSuccess", "Version published successfully"));
118
+ await je({ variables: { id: e } }), B(b("devportal.versionPublishedSuccess", "Version published successfully"));
107
119
  } catch (e) {
108
- I(e instanceof Error ? e.message : b("devportal.versionPublishFailed", "Failed to publish version"));
120
+ z(e instanceof Error ? e.message : b("devportal.versionPublishFailed", "Failed to publish version"));
109
121
  }
110
- }, Ne = async (e) => {
111
- I(null), R(null);
122
+ }, Le = async (e) => {
123
+ z(null), B(null);
112
124
  try {
113
- await ke({ variables: { id: e } }), R(b("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
125
+ await Me({ variables: { id: e } }), B(b("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
114
126
  } catch (e) {
115
- I(e instanceof Error ? e.message : b("devportal.versionDeprecateFailed", "Failed to deprecate version"));
127
+ z(e instanceof Error ? e.message : b("devportal.versionDeprecateFailed", "Failed to deprecate version"));
116
128
  }
117
- }, Pe = (e) => {
129
+ }, Re = (e) => {
118
130
  let t = e.status?.toUpperCase();
119
- return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */ v(f, {
131
+ return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */ v(p, {
120
132
  size: 16,
121
133
  className: "text-status-success-text"
122
- }) : t === "DRAFT" ? /* @__PURE__ */ v(he, {
134
+ }) : t === "DRAFT" ? /* @__PURE__ */ v(me, {
123
135
  size: 16,
124
136
  className: "text-status-warning-text"
125
- }) : t === "DEPRECATED" ? /* @__PURE__ */ v(me, {
137
+ }) : t === "DEPRECATED" ? /* @__PURE__ */ v(pe, {
126
138
  size: 16,
127
139
  className: "text-text-secondary"
128
- }) : /* @__PURE__ */ v(m, {
140
+ }) : /* @__PURE__ */ v(he, {
129
141
  size: 16,
130
142
  className: "text-accent-blue"
131
143
  });
132
- }, Fe = (e, t) => {
133
- B((n) => {
144
+ }, ze = (e, t) => {
145
+ H((n) => {
134
146
  let r = new Set(n);
135
147
  return t ? r.add(e) : r.delete(e), r;
136
148
  });
137
149
  }, Q = (e) => {
138
- B((t) => {
150
+ H((t) => {
139
151
  let n = new Set(t);
140
152
  return K.forEach((t) => {
141
153
  e ? n.add(t.id) : n.delete(t.id);
142
154
  }), n;
143
155
  });
144
- }, $ = () => B(/* @__PURE__ */ new Set());
145
- return we && !G ? /* @__PURE__ */ v(i, {
156
+ }, $ = () => H(/* @__PURE__ */ new Set());
157
+ return De && !G ? /* @__PURE__ */ v(i, {
146
158
  title: b("devportal.versionManagement", "Version Management"),
147
159
  description: b("devportal.versionManagementDescription", "Manage your application versions"),
148
160
  backLink: `/apps/${C}`,
149
161
  backLabel: b("devportal.backToApplication", "Back to Application"),
150
162
  children: /* @__PURE__ */ v("div", {
151
163
  className: "flex items-center justify-center py-16",
152
- children: /* @__PURE__ */ v(p, { className: "h-8 w-8 animate-spin text-muted-foreground" })
164
+ children: /* @__PURE__ */ v(h, { className: "h-8 w-8 animate-spin text-muted-foreground" })
153
165
  })
154
- }) : Te && !G ? /* @__PURE__ */ v(i, {
166
+ }) : Oe && !G ? /* @__PURE__ */ v(i, {
155
167
  title: b("devportal.versionManagement", "Version Management"),
156
168
  description: b("devportal.versionManagementDescription", "Manage your application versions"),
157
169
  backLink: `/apps/${C}`,
158
170
  backLabel: b("devportal.backToApplication", "Back to Application"),
159
171
  children: /* @__PURE__ */ v(t, {
160
- icon: /* @__PURE__ */ v(d, {
172
+ icon: /* @__PURE__ */ v(f, {
161
173
  size: 32,
162
174
  className: "text-status-error-text"
163
175
  }),
164
176
  title: b("devportal.failedToLoadVersions", "Failed to load versions"),
165
- description: Te.message || b("devportal.versionsLoadError", "An error occurred while loading versions")
177
+ description: Oe.message || b("devportal.versionsLoadError", "An error occurred while loading versions")
166
178
  })
167
179
  }) : /* @__PURE__ */ v(se, {
168
180
  permission: s.APP_READ,
@@ -172,38 +184,38 @@ var ve = () => {
172
184
  backLink: `/apps/${C}`,
173
185
  backLabel: b("devportal.backToApplication", "Back to Application"),
174
186
  actions: /* @__PURE__ */ y("button", {
175
- onClick: () => A(!0),
187
+ onClick: () => j(!0),
176
188
  disabled: !ye,
177
189
  "aria-disabled": !ye,
178
190
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50",
179
- children: [/* @__PURE__ */ v(h, { size: 16 }), b("devportal.newVersion", "New Version")]
191
+ children: [/* @__PURE__ */ v(ge, { size: 16 }), b("devportal.newVersion", "New Version")]
180
192
  }),
181
193
  children: [
182
- F && /* @__PURE__ */ y("div", {
194
+ R && /* @__PURE__ */ y("div", {
183
195
  className: "rounded-lg border border-border-subtle bg-status-error-bg-subtle p-3 flex items-center gap-2 text-sm text-status-error-text",
184
196
  children: [
185
- /* @__PURE__ */ v(d, {
197
+ /* @__PURE__ */ v(f, {
186
198
  size: 16,
187
199
  className: "flex-shrink-0"
188
200
  }),
189
- F,
201
+ R,
190
202
  /* @__PURE__ */ v("button", {
191
- onClick: () => I(null),
203
+ onClick: () => z(null),
192
204
  className: "ml-auto text-status-error-text hover:text-status-error-text",
193
205
  children: b("devportal.dismiss", "Dismiss")
194
206
  })
195
207
  ]
196
208
  }),
197
- L && /* @__PURE__ */ y("div", {
209
+ we && /* @__PURE__ */ y("div", {
198
210
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 flex items-center gap-2 text-sm text-status-success-text",
199
211
  children: [
200
- /* @__PURE__ */ v(f, {
212
+ /* @__PURE__ */ v(p, {
201
213
  size: 16,
202
214
  className: "flex-shrink-0"
203
215
  }),
204
- L,
216
+ we,
205
217
  /* @__PURE__ */ v("button", {
206
- onClick: () => R(null),
218
+ onClick: () => B(null),
207
219
  className: "ml-auto text-status-success-text hover:text-status-success-text",
208
220
  children: b("devportal.dismiss", "Dismiss")
209
221
  })
@@ -226,7 +238,7 @@ var ve = () => {
226
238
  className: "text-sm font-medium",
227
239
  children: b("devportal.selectAllVisible", "Select all visible")
228
240
  })]
229
- }), z.size > 0 && /* @__PURE__ */ v("button", {
241
+ }), V.size > 0 && /* @__PURE__ */ v("button", {
230
242
  onClick: $,
231
243
  className: "text-sm text-muted-foreground hover:text-foreground",
232
244
  children: b("devportal.clearSelection", "Clear selection")
@@ -236,17 +248,17 @@ var ve = () => {
236
248
  children: [
237
249
  /* @__PURE__ */ y("span", {
238
250
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
239
- children: [z.size, " selected"]
251
+ children: [V.size, " selected"]
240
252
  }),
241
253
  /* @__PURE__ */ y("button", {
242
- onClick: () => H("publish"),
254
+ onClick: () => U("publish"),
243
255
  disabled: J.length === 0 || !x,
244
256
  "aria-disabled": !x,
245
257
  className: "rounded-md border border-status-success-bg px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
246
258
  children: [b("devportal.publishSelected", "Publish Selected"), J.length > 0 ? ` (${J.length})` : ""]
247
259
  }),
248
260
  /* @__PURE__ */ y("button", {
249
- onClick: () => H("deprecate"),
261
+ onClick: () => U("deprecate"),
250
262
  disabled: Y.length === 0 || !S,
251
263
  "aria-disabled": !S,
252
264
  className: "rounded-md border border-status-warning-bg px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
@@ -272,8 +284,8 @@ var ve = () => {
272
284
  render: (e) => /* @__PURE__ */ v("div", {
273
285
  onClick: (e) => e.stopPropagation(),
274
286
  children: /* @__PURE__ */ v(a, {
275
- checked: z.has(e.id),
276
- onChange: (t) => Fe(e.id, t),
287
+ checked: V.has(e.id),
288
+ onChange: (t) => ze(e.id, t),
277
289
  ariaLabel: `Select version ${e.version}`
278
290
  })
279
291
  })
@@ -284,7 +296,7 @@ var ve = () => {
284
296
  render: (e) => /* @__PURE__ */ y("div", {
285
297
  className: "flex items-center gap-2",
286
298
  children: [
287
- Pe(e),
299
+ Re(e),
288
300
  /* @__PURE__ */ v("span", {
289
301
  className: "font-mono font-medium",
290
302
  children: e.version
@@ -328,49 +340,50 @@ var ve = () => {
328
340
  className: "text-xs text-primary hover:underline disabled:opacity-50",
329
341
  disabled: !x,
330
342
  "aria-disabled": !x,
331
- onClick: () => Me(e.id),
343
+ onClick: () => Ie(e.id),
332
344
  children: b("devportal.publish", "Publish")
333
345
  }), e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest && /* @__PURE__ */ v("button", {
334
346
  className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
335
347
  disabled: !S,
336
348
  "aria-disabled": !S,
337
- onClick: () => Ne(e.id),
349
+ onClick: () => Le(e.id),
338
350
  children: b("devportal.deprecate", "Deprecate")
339
351
  })]
340
352
  })
341
353
  }
342
354
  ]
343
355
  }) : /* @__PURE__ */ v(t, {
344
- icon: /* @__PURE__ */ v(m, { size: 32 }),
356
+ icon: /* @__PURE__ */ v(he, { size: 32 }),
345
357
  title: b("devportal.noVersionsYet", "No versions yet"),
346
358
  description: b("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
347
359
  action: /* @__PURE__ */ y("button", {
348
- onClick: () => A(!0),
360
+ onClick: () => j(!0),
349
361
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
350
- children: [/* @__PURE__ */ v(h, { size: 16 }), b("devportal.createVersion", "Create Version")]
362
+ children: [/* @__PURE__ */ v(ge, { size: 16 }), b("devportal.createVersion", "Create Version")]
351
363
  })
352
364
  }),
353
- k && /* @__PURE__ */ v(o, {
354
- open: k,
355
- onOpenChange: A,
356
- onConfirm: Ae,
365
+ A && /* @__PURE__ */ v(o, {
366
+ open: A,
367
+ onOpenChange: j,
368
+ onConfirm: Ne,
357
369
  title: b("devportal.createNewVersion", "Create New Version"),
358
- confirmLabel: De ? b("devportal.creating", "Creating...") : b("devportal.createVersion", "Create Version"),
370
+ size: "lg",
371
+ confirmLabel: Ae ? b("devportal.creating", "Creating...") : b("devportal.createVersion", "Create Version"),
359
372
  children: /* @__PURE__ */ y("div", {
360
373
  className: "space-y-4",
361
374
  children: [
362
375
  /* @__PURE__ */ v(ae, {
363
376
  label: b("devportal.versionNumber", "Version Number"),
364
- value: j.version,
365
- onChange: (e) => M({
366
- ...j,
377
+ value: M.version,
378
+ onChange: (e) => N({
379
+ ...M,
367
380
  version: e.target.value
368
381
  }),
369
382
  placeholder: "e.g., 2.2.0",
370
383
  hint: b("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
371
384
  required: !0
372
385
  }),
373
- W ? /* @__PURE__ */ y("div", {
386
+ Ee ? /* @__PURE__ */ y("div", {
374
387
  className: "space-y-3",
375
388
  children: [
376
389
  /* @__PURE__ */ v("div", {
@@ -395,7 +408,7 @@ var ve = () => {
395
408
  type: "file",
396
409
  accept: ".zip",
397
410
  className: "hidden",
398
- onChange: je
411
+ onChange: Pe
399
412
  }),
400
413
  /* @__PURE__ */ v("button", {
401
414
  type: "button",
@@ -403,7 +416,7 @@ var ve = () => {
403
416
  onClick: () => O.current?.click(),
404
417
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
405
418
  children: T ? /* @__PURE__ */ y(_, { children: [
406
- /* @__PURE__ */ v(p, {
419
+ /* @__PURE__ */ v(h, {
407
420
  size: 14,
408
421
  className: "animate-spin"
409
422
  }),
@@ -414,10 +427,10 @@ var ve = () => {
414
427
  ] }) : /* @__PURE__ */ y(_, { children: [
415
428
  /* @__PURE__ */ v(g, { size: 14 }),
416
429
  " ",
417
- j.packageUrl ? "Replace zip" : "Upload zip"
430
+ M.packageUrl ? "Replace zip" : "Upload zip"
418
431
  ] })
419
432
  }),
420
- j.packageUrl && !T && /* @__PURE__ */ v("span", {
433
+ M.packageUrl && !T && /* @__PURE__ */ v("span", {
421
434
  className: "text-xs text-status-success-text",
422
435
  children: "✓ Uploaded"
423
436
  })
@@ -439,19 +452,52 @@ var ve = () => {
439
452
  children: "*"
440
453
  })]
441
454
  }),
442
- /* @__PURE__ */ v("textarea", {
443
- rows: 5,
444
- placeholder: "{\n \"name\": \"my-node\",\n \"version\": \"1.0.0\",\n \"inputs\": [],\n \"outputs\": []\n}",
445
- value: j.manifestJson,
446
- onChange: (e) => M({
447
- ...j,
448
- manifestJson: e.target.value
449
- }),
450
- className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"
455
+ /* @__PURE__ */ v("input", {
456
+ ref: k,
457
+ type: "file",
458
+ accept: ".json,application/json",
459
+ className: "hidden",
460
+ onChange: Fe
461
+ }),
462
+ /* @__PURE__ */ y("div", {
463
+ className: "flex gap-2 items-center",
464
+ children: [/* @__PURE__ */ y("button", {
465
+ type: "button",
466
+ onClick: () => k.current?.click(),
467
+ className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
468
+ children: [/* @__PURE__ */ v(m, { size: 14 }), P ? "Replace manifest.json" : "Upload manifest.json"]
469
+ }), P && /* @__PURE__ */ y("span", {
470
+ className: "text-xs text-status-success-text",
471
+ children: ["✓ ", P]
472
+ })]
451
473
  }),
474
+ P && M.manifestJson && (() => {
475
+ try {
476
+ let e = JSON.parse(M.manifestJson), t = typeof e.name == "string" ? e.name : null, n = typeof e.version == "string" ? e.version : null, r = typeof e.itemType == "string" ? e.itemType : null;
477
+ return /* @__PURE__ */ y("div", {
478
+ className: "rounded-md border bg-muted/40 px-3 py-2 text-xs font-mono space-y-0.5",
479
+ children: [
480
+ t && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
481
+ className: "text-muted-foreground",
482
+ children: "name: "
483
+ }), t] }),
484
+ n && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
485
+ className: "text-muted-foreground",
486
+ children: "version: "
487
+ }), n] }),
488
+ r && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
489
+ className: "text-muted-foreground",
490
+ children: "itemType: "
491
+ }), r] })
492
+ ]
493
+ });
494
+ } catch {
495
+ return null;
496
+ }
497
+ })(),
452
498
  /* @__PURE__ */ v("p", {
453
499
  className: "text-xs text-muted-foreground",
454
- children: "Defines the node's inputs, outputs, and configuration schema."
500
+ children: "Upload your manifest.json — defines the node's inputs, outputs, and configuration schema."
455
501
  })
456
502
  ]
457
503
  })
@@ -467,17 +513,17 @@ var ve = () => {
467
513
  className: "flex gap-1 rounded-md border p-0.5 w-fit",
468
514
  children: [/* @__PURE__ */ y("button", {
469
515
  type: "button",
470
- onClick: () => P("file"),
471
- className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${N === "file" ? "bg-primary text-primary-foreground" : "hover:bg-muted"}`,
516
+ onClick: () => L("file"),
517
+ className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${I === "file" ? "bg-primary text-primary-foreground" : "hover:bg-muted"}`,
472
518
  children: [/* @__PURE__ */ v(g, { size: 12 }), " Upload zip"]
473
519
  }), /* @__PURE__ */ y("button", {
474
520
  type: "button",
475
- onClick: () => P("manifest"),
476
- className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${N === "manifest" ? "bg-primary text-primary-foreground" : "hover:bg-muted"}`,
477
- children: [/* @__PURE__ */ v(ge, { size: 12 }), " Paste manifest JSON"]
521
+ onClick: () => L("manifest"),
522
+ className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${I === "manifest" ? "bg-primary text-primary-foreground" : "hover:bg-muted"}`,
523
+ children: [/* @__PURE__ */ v(m, { size: 12 }), " Paste manifest JSON"]
478
524
  })]
479
525
  }),
480
- N === "file" && /* @__PURE__ */ y("div", {
526
+ I === "file" && /* @__PURE__ */ y("div", {
481
527
  className: "space-y-1",
482
528
  children: [/* @__PURE__ */ y("div", {
483
529
  className: "flex gap-2 items-center",
@@ -487,7 +533,7 @@ var ve = () => {
487
533
  type: "file",
488
534
  accept: ".zip",
489
535
  className: "hidden",
490
- onChange: je
536
+ onChange: Pe
491
537
  }),
492
538
  /* @__PURE__ */ v("button", {
493
539
  type: "button",
@@ -495,7 +541,7 @@ var ve = () => {
495
541
  onClick: () => O.current?.click(),
496
542
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
497
543
  children: T ? /* @__PURE__ */ y(_, { children: [
498
- /* @__PURE__ */ v(p, {
544
+ /* @__PURE__ */ v(h, {
499
545
  size: 14,
500
546
  className: "animate-spin"
501
547
  }),
@@ -506,10 +552,10 @@ var ve = () => {
506
552
  ] }) : /* @__PURE__ */ y(_, { children: [
507
553
  /* @__PURE__ */ v(g, { size: 14 }),
508
554
  " ",
509
- j.packageUrl ? "Replace zip" : "Upload zip"
555
+ M.packageUrl ? "Replace zip" : "Upload zip"
510
556
  ] })
511
557
  }),
512
- j.packageUrl && !T && /* @__PURE__ */ v("span", {
558
+ M.packageUrl && !T && /* @__PURE__ */ v("span", {
513
559
  className: "text-xs text-status-success-text",
514
560
  children: "✓ Uploaded"
515
561
  })
@@ -519,14 +565,14 @@ var ve = () => {
519
565
  children: D
520
566
  })]
521
567
  }),
522
- N === "manifest" && /* @__PURE__ */ y("div", {
568
+ I === "manifest" && /* @__PURE__ */ y("div", {
523
569
  className: "space-y-1",
524
570
  children: [/* @__PURE__ */ v("textarea", {
525
571
  rows: 6,
526
572
  placeholder: "{\n \"name\": \"my-workflow\",\n \"version\": \"1.0.0\",\n \"steps\": []\n}",
527
- value: j.manifestJson,
528
- onChange: (e) => M({
529
- ...j,
573
+ value: M.manifestJson,
574
+ onChange: (e) => N({
575
+ ...M,
530
576
  manifestJson: e.target.value
531
577
  }),
532
578
  className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"
@@ -539,9 +585,9 @@ var ve = () => {
539
585
  }),
540
586
  /* @__PURE__ */ v(oe, {
541
587
  label: b("devportal.releaseNotes", "Release Notes"),
542
- value: j.releaseNotes,
543
- onChange: (e) => M({
544
- ...j,
588
+ value: M.releaseNotes,
589
+ onChange: (e) => N({
590
+ ...M,
545
591
  releaseNotes: e.target.value
546
592
  }),
547
593
  placeholder: b("devportal.releaseNotesPlaceholder", "What changed in this release?"),
@@ -551,15 +597,15 @@ var ve = () => {
551
597
  })
552
598
  }),
553
599
  /* @__PURE__ */ v(o, {
554
- open: V === "publish",
600
+ open: Te === "publish",
555
601
  onOpenChange: (e) => {
556
- e || H(null);
602
+ e || U(null);
557
603
  },
558
604
  onConfirm: async () => {
559
605
  if (J.length === 0) return;
560
- I(null);
561
- let e = await Promise.allSettled(J.map((e) => Oe({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
562
- R(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), H(null);
606
+ z(null);
607
+ let e = await Promise.allSettled(J.map((e) => je({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
608
+ B(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), U(null);
563
609
  },
564
610
  title: b("devportal.publishSelectedVersions", "Publish selected versions"),
565
611
  description: `${b("devportal.publish", "Publish")} ${J.length} selected version${J.length === 1 ? "" : "s"}?`,
@@ -568,15 +614,15 @@ var ve = () => {
568
614
  variant: "success"
569
615
  }),
570
616
  /* @__PURE__ */ v(o, {
571
- open: V === "deprecate",
617
+ open: Te === "deprecate",
572
618
  onOpenChange: (e) => {
573
- e || H(null);
619
+ e || U(null);
574
620
  },
575
621
  onConfirm: async () => {
576
622
  if (Y.length === 0) return;
577
- I(null);
578
- let e = await Promise.allSettled(Y.map((e) => ke({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
579
- R(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), H(null);
623
+ z(null);
624
+ let e = await Promise.allSettled(Y.map((e) => Me({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
625
+ B(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), U(null);
580
626
  },
581
627
  title: b("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
582
628
  description: `${b("devportal.deprecate", "Deprecate")} ${Y.length} selected version${Y.length === 1 ? "" : "s"}? ${b("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,