@liiift-studio/deploy-vercel-from-sanity 1.0.6 → 1.0.8

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.js CHANGED
@@ -35,6 +35,7 @@ var import_icons5 = require("@sanity/icons");
35
35
 
36
36
  // src/components/DeployItem.tsx
37
37
  var import_react2 = require("react");
38
+ var import_react_dom = require("react-dom");
38
39
  var import_ui3 = require("@sanity/ui");
39
40
  var import_icons2 = require("@sanity/icons");
40
41
 
@@ -357,8 +358,10 @@ function DeployItem({ target, token, onDelete, onEdit }) {
357
358
  };
358
359
  }, [isActive, latest?.created]);
359
360
  const deploy = (0, import_react2.useCallback)(() => {
360
- setDeployError(null);
361
- setTriggering(true);
361
+ (0, import_react_dom.flushSync)(() => {
362
+ setDeployError(null);
363
+ setTriggering(true);
364
+ });
362
365
  void (async () => {
363
366
  try {
364
367
  await triggerDeploy(target.url);
@@ -693,7 +696,6 @@ function DeployItem({ target, token, onDelete, onEdit }) {
693
696
  {
694
697
  text: "Deploy",
695
698
  tone: "primary",
696
- loading: triggering,
697
699
  disabled: isActive,
698
700
  onClick: deploy,
699
701
  style: {
@@ -934,7 +936,7 @@ function DeployTargetForm({ initial, onSaved, onClose }) {
934
936
  }
935
937
 
936
938
  // src/version.ts
937
- var VERSION = "1.0.6";
939
+ var VERSION = "1.0.8";
938
940
 
939
941
  // src/components/DeployTool.tsx
940
942
  var import_jsx_runtime6 = require("react/jsx-runtime");
package/dist/index.mjs CHANGED
@@ -21,6 +21,7 @@ import { TokenIcon, TrashIcon as TrashIcon2, WarningOutlineIcon as WarningOutlin
21
21
 
22
22
  // src/components/DeployItem.tsx
23
23
  import { useState as useState2, useEffect as useEffect2, useCallback as useCallback2, useRef } from "react";
24
+ import { flushSync } from "react-dom";
24
25
  import {
25
26
  Card as Card2,
26
27
  Box as Box2,
@@ -379,8 +380,10 @@ function DeployItem({ target, token, onDelete, onEdit }) {
379
380
  };
380
381
  }, [isActive, latest?.created]);
381
382
  const deploy = useCallback2(() => {
382
- setDeployError(null);
383
- setTriggering(true);
383
+ flushSync(() => {
384
+ setDeployError(null);
385
+ setTriggering(true);
386
+ });
384
387
  void (async () => {
385
388
  try {
386
389
  await triggerDeploy(target.url);
@@ -715,7 +718,6 @@ function DeployItem({ target, token, onDelete, onEdit }) {
715
718
  {
716
719
  text: "Deploy",
717
720
  tone: "primary",
718
- loading: triggering,
719
721
  disabled: isActive,
720
722
  onClick: deploy,
721
723
  style: {
@@ -967,7 +969,7 @@ function DeployTargetForm({ initial, onSaved, onClose }) {
967
969
  }
968
970
 
969
971
  // src/version.ts
970
- var VERSION = "1.0.6";
972
+ var VERSION = "1.0.8";
971
973
 
972
974
  // src/components/DeployTool.tsx
973
975
  import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/deploy-vercel-from-sanity",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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",
@@ -1,5 +1,6 @@
1
1
  // Per-deploy-target card — shows status, build timer, history, cancel, deploy, copy URL, and error logs
2
2
  import { useState, useEffect, useCallback, useRef } from 'react'
3
+ import { flushSync } from 'react-dom'
3
4
  import {
4
5
  Card, Box, Stack, Flex, Text, Button, Tooltip, Badge, Spinner,
5
6
  MenuButton, Menu, MenuItem, Code, useToast,
@@ -111,8 +112,10 @@ export function DeployItem({ target, token, onDelete, onEdit }: DeployItemProps)
111
112
 
112
113
  // ── Actions ───────────────────────────────────────────────────────────────
113
114
  const deploy = useCallback(() => {
114
- setDeployError(null)
115
- setTriggering(true)
115
+ flushSync(() => {
116
+ setDeployError(null)
117
+ setTriggering(true)
118
+ })
116
119
  void (async () => {
117
120
  try {
118
121
  await triggerDeploy(target.url)
@@ -559,7 +562,6 @@ export function DeployItem({ target, token, onDelete, onEdit }: DeployItemProps)
559
562
  <Button
560
563
  text="Deploy"
561
564
  tone="primary"
562
- loading={triggering}
563
565
  disabled={isActive}
564
566
  onClick={deploy}
565
567
  style={{
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Package version — keep in sync with package.json
2
- export const VERSION = '1.0.6'
2
+ export const VERSION = '1.0.8'