@liiift-studio/deploy-vercel-from-sanity 1.0.1 → 1.0.2
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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
- package/src/components/DeployItem.tsx +6 -4
- package/src/types.ts +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -19,8 +19,10 @@ interface VercelDeployment {
|
|
|
19
19
|
/** Preview hostname, e.g. my-project-abc123.vercel.app */
|
|
20
20
|
url: string;
|
|
21
21
|
state: VercelDeployState;
|
|
22
|
-
/** Unix ms timestamp */
|
|
22
|
+
/** Unix ms timestamp — when the deployment was created */
|
|
23
23
|
created: number;
|
|
24
|
+
/** Unix ms timestamp — when the deployment became ready */
|
|
25
|
+
ready?: number;
|
|
24
26
|
/** Link to the Vercel dashboard page for this deployment */
|
|
25
27
|
inspectorUrl?: string;
|
|
26
28
|
creator?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ interface VercelDeployment {
|
|
|
19
19
|
/** Preview hostname, e.g. my-project-abc123.vercel.app */
|
|
20
20
|
url: string;
|
|
21
21
|
state: VercelDeployState;
|
|
22
|
-
/** Unix ms timestamp */
|
|
22
|
+
/** Unix ms timestamp — when the deployment was created */
|
|
23
23
|
created: number;
|
|
24
|
+
/** Unix ms timestamp — when the deployment became ready */
|
|
25
|
+
ready?: number;
|
|
24
26
|
/** Link to the Vercel dashboard page for this deployment */
|
|
25
27
|
inspectorUrl?: string;
|
|
26
28
|
creator?: {
|
package/dist/index.js
CHANGED
|
@@ -446,10 +446,7 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
446
446
|
style: { cursor: "pointer" }
|
|
447
447
|
}
|
|
448
448
|
),
|
|
449
|
-
isActive && elapsed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
450
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui3.Spinner, { muted: true }),
|
|
451
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui3.Text, { size: 1, muted: true, children: formatDuration(elapsed) })
|
|
452
|
-
] }) : !isActive && deployedAt ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui3.Text, { size: 1, muted: true, children: deployedAt }) : null
|
|
449
|
+
isActive && elapsed > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui3.Text, { size: 1, muted: true, children: formatDuration(elapsed) }) : !isActive && deployedAt ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui3.Text, { size: 1, muted: true, children: deployedAt }) : null
|
|
453
450
|
] })
|
|
454
451
|
] }),
|
|
455
452
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -547,6 +544,10 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
547
544
|
"by ",
|
|
548
545
|
creator
|
|
549
546
|
] }),
|
|
547
|
+
latest?.state === "READY" && latest.ready && latest.created && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ui3.Text, { size: 1, muted: true, children: [
|
|
548
|
+
"\xB7 ",
|
|
549
|
+
formatDuration(Math.floor((latest.ready - latest.created) / 1e3))
|
|
550
|
+
] }),
|
|
550
551
|
latest?.url && latest.state === "READY" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
551
552
|
import_ui3.Tooltip,
|
|
552
553
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -468,10 +468,7 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
468
468
|
style: { cursor: "pointer" }
|
|
469
469
|
}
|
|
470
470
|
),
|
|
471
|
-
isActive && elapsed > 0 ? /* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */ jsx3(Spinner3, { muted: true }),
|
|
473
|
-
/* @__PURE__ */ jsx3(Text2, { size: 1, muted: true, children: formatDuration(elapsed) })
|
|
474
|
-
] }) : !isActive && deployedAt ? /* @__PURE__ */ jsx3(Text2, { size: 1, muted: true, children: deployedAt }) : null
|
|
471
|
+
isActive && elapsed > 0 ? /* @__PURE__ */ jsx3(Text2, { size: 1, muted: true, children: formatDuration(elapsed) }) : !isActive && deployedAt ? /* @__PURE__ */ jsx3(Text2, { size: 1, muted: true, children: deployedAt }) : null
|
|
475
472
|
] })
|
|
476
473
|
] }),
|
|
477
474
|
/* @__PURE__ */ jsx3(
|
|
@@ -569,6 +566,10 @@ function DeployItem({ target, token, onDelete, onEdit }) {
|
|
|
569
566
|
"by ",
|
|
570
567
|
creator
|
|
571
568
|
] }),
|
|
569
|
+
latest?.state === "READY" && latest.ready && latest.created && /* @__PURE__ */ jsxs3(Text2, { size: 1, muted: true, children: [
|
|
570
|
+
"\xB7 ",
|
|
571
|
+
formatDuration(Math.floor((latest.ready - latest.created) / 1e3))
|
|
572
|
+
] }),
|
|
572
573
|
latest?.url && latest.state === "READY" && /* @__PURE__ */ jsx3(Fragment, { children: /* @__PURE__ */ jsx3(
|
|
573
574
|
Tooltip,
|
|
574
575
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liiift-studio/deploy-vercel-from-sanity",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Sanity Studio plugin — trigger and monitor Vercel deployments with full status, history, and build logs. Supports v3, v4, and v5.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Liiift Studio",
|
|
@@ -231,10 +231,7 @@ export function DeployItem({ target, token, onDelete, onEdit }: DeployItemProps)
|
|
|
231
231
|
/>
|
|
232
232
|
)}
|
|
233
233
|
{isActive && elapsed > 0 ? (
|
|
234
|
-
<
|
|
235
|
-
<Spinner muted />
|
|
236
|
-
<Text size={1} muted>{formatDuration(elapsed)}</Text>
|
|
237
|
-
</Flex>
|
|
234
|
+
<Text size={1} muted>{formatDuration(elapsed)}</Text>
|
|
238
235
|
) : (!isActive && deployedAt) ? (
|
|
239
236
|
<Text size={1} muted>{deployedAt}</Text>
|
|
240
237
|
) : null}
|
|
@@ -355,6 +352,11 @@ export function DeployItem({ target, token, onDelete, onEdit }: DeployItemProps)
|
|
|
355
352
|
{/* Creator */}
|
|
356
353
|
{creator && <Text size={1} muted>by {creator}</Text>}
|
|
357
354
|
|
|
355
|
+
{/* Build duration — only shown when READY and ready timestamp is available */}
|
|
356
|
+
{latest?.state === 'READY' && latest.ready && latest.created && (
|
|
357
|
+
<Text size={1} muted>· {formatDuration(Math.floor((latest.ready - latest.created) / 1000))}</Text>
|
|
358
|
+
)}
|
|
359
|
+
|
|
358
360
|
{/* Visit link + copy URL */}
|
|
359
361
|
{latest?.url && latest.state === 'READY' && (
|
|
360
362
|
<>
|
package/src/types.ts
CHANGED
|
@@ -28,8 +28,10 @@ export interface VercelDeployment {
|
|
|
28
28
|
/** Preview hostname, e.g. my-project-abc123.vercel.app */
|
|
29
29
|
url: string
|
|
30
30
|
state: VercelDeployState
|
|
31
|
-
/** Unix ms timestamp */
|
|
31
|
+
/** Unix ms timestamp — when the deployment was created */
|
|
32
32
|
created: number
|
|
33
|
+
/** Unix ms timestamp — when the deployment became ready */
|
|
34
|
+
ready?: number
|
|
33
35
|
/** Link to the Vercel dashboard page for this deployment */
|
|
34
36
|
inspectorUrl?: string
|
|
35
37
|
creator?: {
|