From 3137e903cac019ec6a8d7c5256f98c73cdea0f4d Mon Sep 17 00:00:00 2001 From: lisonge Date: Sun, 3 Sep 2023 18:32:45 +0800 Subject: [PATCH] feat: sync --- package.json | 3 ++- scripts/sync.ps1 | 6 ------ scripts/sync.ts | 8 ++++++++ 3 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 scripts/sync.ps1 create mode 100644 scripts/sync.ts diff --git a/package.json b/package.json index 171dd473..b42255a5 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ ], "scripts": { "build": "tsc --noEmit && tsx ./scripts/build.ts", - "check": "tsc --noEmit && tsx ./scripts/check.ts" + "check": "tsc --noEmit && tsx ./scripts/check.ts", + "sync": "tsx ./scripts/sync.ts" }, "devDependencies": { "@gkd-kit/selector": "0.0.11", diff --git a/scripts/sync.ps1 b/scripts/sync.ps1 deleted file mode 100644 index 21ed190b..00000000 --- a/scripts/sync.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -git add '.' -git commit -m 'chore: sync' -git push -npm publish -sleep 1s -curl -X PUT 'https://registry-direct.npmmirror.com/@gkd-kit/subscription/sync' diff --git a/scripts/sync.ts b/scripts/sync.ts new file mode 100644 index 00000000..0c84eb42 --- /dev/null +++ b/scripts/sync.ts @@ -0,0 +1,8 @@ +await fetch( + `https://registry-direct.npmmirror.com/@gkd-kit/subscription/sync`, + { + method: 'PUT', + }, +); + +export {};