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