@leverege/imaginarium-ui 1.11.8 → 1.11.9
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/lib/{PluginSetup-DX7-Ws6I.js → PluginSetup--o-4Ihya.js} +25 -35
- package/lib/PluginSetup--o-4Ihya.js.map +1 -0
- package/lib/{PluginSetup-B0arJsVW.cjs → PluginSetup-Cy4MFfdN.cjs} +3 -3
- package/lib/PluginSetup-Cy4MFfdN.cjs.map +1 -0
- package/lib/imp/release/CreateReleaseModal.d.ts.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/release.cjs +1 -1
- package/lib/release.js +1 -1
- package/package.json +1 -1
- package/src/imp/release/CreateReleaseModal.tsx +46 -48
- package/src/imp/release/ReleaseDetail.tsx +2 -2
- package/lib/PluginSetup-B0arJsVW.cjs.map +0 -1
- package/lib/PluginSetup-DX7-Ws6I.js.map +0 -1
|
@@ -223,41 +223,31 @@ function gr({ open: t, onOpenChange: n, onCreated: s }) {
|
|
|
223
223
|
(T) => T.includes(g) ? T.filter((D) => D !== g) : [...T, g]
|
|
224
224
|
);
|
|
225
225
|
}, S = le({
|
|
226
|
-
mutationFn:
|
|
227
|
-
|
|
226
|
+
mutationFn: () => l(e, {
|
|
227
|
+
method: "POST",
|
|
228
|
+
body: JSON.stringify({
|
|
229
|
+
name: c.trim(),
|
|
230
|
+
description: m.trim() || null,
|
|
231
|
+
originConfigId: x,
|
|
232
|
+
targetConfigIds: h
|
|
233
|
+
})
|
|
234
|
+
}),
|
|
235
|
+
onSuccess: (g) => {
|
|
236
|
+
a.invalidateQueries({ queryKey: C }), bs(g.id, Date.now(), null), n(!1), y(), s(g.id), l(`${e}/${g.id}/snapshot-from-compare`, {
|
|
228
237
|
method: "POST",
|
|
229
|
-
body: JSON.stringify({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
238
|
+
body: JSON.stringify({})
|
|
239
|
+
}).catch((T) => {
|
|
240
|
+
ms(T) || (xs(g.id, Date.now()), i({
|
|
241
|
+
title: "Error",
|
|
242
|
+
description: T instanceof Error ? T.message : "Snapshot failed",
|
|
243
|
+
variant: "destructive"
|
|
244
|
+
}));
|
|
245
|
+
}).finally(() => {
|
|
246
|
+
a.invalidateQueries({ queryKey: C });
|
|
235
247
|
});
|
|
236
|
-
bs(g.id, Date.now(), null);
|
|
237
|
-
try {
|
|
238
|
-
return await l(`${e}/${g.id}/snapshot-from-compare`, {
|
|
239
|
-
method: "POST",
|
|
240
|
-
body: JSON.stringify({})
|
|
241
|
-
}), { created: g, stillRunning: !1 };
|
|
242
|
-
} catch (T) {
|
|
243
|
-
if (ms(T))
|
|
244
|
-
return { created: g, stillRunning: !0 };
|
|
245
|
-
throw xs(g.id, Date.now()), T;
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
onSuccess: ({ created: g, stillRunning: T }) => {
|
|
249
|
-
a.invalidateQueries({ queryKey: C }), i(T ? {
|
|
250
|
-
title: "Snapshot still running",
|
|
251
|
-
description: "This is taking longer than the request allows. The release page updates when it finishes."
|
|
252
|
-
} : { title: "Success", description: "Release created and snapshotted" }), n(!1), y(), s(g.id);
|
|
253
248
|
},
|
|
254
249
|
onError: (g) => {
|
|
255
250
|
i({ title: "Error", description: g.message, variant: "destructive" });
|
|
256
|
-
},
|
|
257
|
-
// Refetch regardless of outcome: if create succeeds but snapshot fails, the
|
|
258
|
-
// new release would otherwise be orphaned and missing from the list.
|
|
259
|
-
onSettled: () => {
|
|
260
|
-
a.invalidateQueries({ queryKey: C });
|
|
261
251
|
}
|
|
262
252
|
}), B = (g) => {
|
|
263
253
|
g || y(), n(g);
|
|
@@ -265,7 +255,7 @@ function gr({ open: t, onOpenChange: n, onCreated: s }) {
|
|
|
265
255
|
return /* @__PURE__ */ r(Ne, { open: t, onOpenChange: B, children: /* @__PURE__ */ d(we, { children: [
|
|
266
256
|
/* @__PURE__ */ d(je, { children: [
|
|
267
257
|
/* @__PURE__ */ r(Ce, { children: "New Release" }),
|
|
268
|
-
/* @__PURE__ */ r(Be, { children: "Create a release from an origin cluster and snapshot the diff against its targets. Snapshotting several targets can take a few minutes; you
|
|
258
|
+
/* @__PURE__ */ r(Be, { children: "Create a release from an origin cluster and snapshot the diff against its targets. Snapshotting several targets can take a few minutes; you'll be taken to the release page while it runs." })
|
|
269
259
|
] }),
|
|
270
260
|
/* @__PURE__ */ d("div", { className: "space-y-4 py-4", children: [
|
|
271
261
|
/* @__PURE__ */ d("div", { className: "space-y-2", children: [
|
|
@@ -353,7 +343,7 @@ function gr({ open: t, onOpenChange: n, onCreated: s }) {
|
|
|
353
343
|
] }),
|
|
354
344
|
/* @__PURE__ */ r(H, { onClick: () => S.mutate(), disabled: !v || S.isPending, children: S.isPending ? /* @__PURE__ */ d(be, { children: [
|
|
355
345
|
/* @__PURE__ */ r(Fe, { className: "w-4 h-4 mr-2 animate-spin" }),
|
|
356
|
-
"
|
|
346
|
+
"Creating…"
|
|
357
347
|
] }) : /* @__PURE__ */ d(be, { children: [
|
|
358
348
|
/* @__PURE__ */ r(as, { className: "w-4 h-4 mr-2" }),
|
|
359
349
|
"Create & snapshot"
|
|
@@ -4437,7 +4427,7 @@ function ca({ releaseId: t, onBack: n }) {
|
|
|
4437
4427
|
return E ? /* @__PURE__ */ r("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }) : P ? /* @__PURE__ */ d("div", { className: "space-y-4", children: [
|
|
4438
4428
|
ue && /* @__PURE__ */ r("div", { className: "bg-muted text-muted-foreground rounded-md px-3 py-2 text-sm", children: "This release was pushed and is read-only." }),
|
|
4439
4429
|
/* @__PURE__ */ d("div", { className: "space-y-3", children: [
|
|
4440
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
4430
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
4441
4431
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
4442
4432
|
/* @__PURE__ */ d(H, { variant: "ghost", size: "sm", onClick: n, children: [
|
|
4443
4433
|
/* @__PURE__ */ r(Zt, {}),
|
|
@@ -4446,7 +4436,7 @@ function ca({ releaseId: t, onBack: n }) {
|
|
|
4446
4436
|
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold", children: _i(P.name) }),
|
|
4447
4437
|
/* @__PURE__ */ r(ys, { status: P.status })
|
|
4448
4438
|
] }),
|
|
4449
|
-
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
4439
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
4450
4440
|
!ue && (L ?? []).some((b) => b.carriedOver) && /* @__PURE__ */ r(
|
|
4451
4441
|
kr,
|
|
4452
4442
|
{
|
|
@@ -5783,4 +5773,4 @@ export {
|
|
|
5783
5773
|
Ui as t,
|
|
5784
5774
|
qe as u
|
|
5785
5775
|
};
|
|
5786
|
-
//# sourceMappingURL=PluginSetup-
|
|
5776
|
+
//# sourceMappingURL=PluginSetup--o-4Ihya.js.map
|