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