@burdenoff/microfe-devportal 2026.624.16 → 2026.624.18

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