From 226fa4961bd93b1eab1657a94e8ef9f0eb9d4c75 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Fri, 7 Feb 2025 00:50:07 -0500 Subject: [PATCH] chore: update workflows for main branch, enhance npm publish checks, and increment package version to 0.1.2 --- .github/workflows/gcr-publish.yml | 2 +- .github/workflows/npm-publish.yml | 25 ++++++++++--------------- build.ts | 4 ++-- bun.lockb | Bin 96375 -> 102127 bytes jsr.json | 2 +- package.json | 4 ++-- src/index.ts | 6 +++--- 7 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/gcr-publish.yml b/.github/workflows/gcr-publish.yml index e13b471..279de53 100644 --- a/.github/workflows/gcr-publish.yml +++ b/.github/workflows/gcr-publish.yml @@ -5,7 +5,7 @@ name: Node.js Package on: push: - branches: [dev] + branches: [main] release: types: [created] diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 648b278..5f4ad19 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -26,20 +26,15 @@ jobs: - uses: oven-sh/setup-bun@v2 - run: bun install - run: bun run build - - run: | + - name: Check if version is already published + run: | + PACKAGE_VERSION=$(node -p "require('./package.json').version") PACKAGE_NAME=$(jq -r '.name' package.json) - PACKAGE_VERSION=$(jq -r '.version' package.json) - - # Get the version from npm registry - REGISTRY_VERSION=$(npm show "$PACKAGE_NAME" version) - - # Compare versions - if [ "$PACKAGE_VERSION" == "$REGISTRY_VERSION" ]; then - echo "Version $PACKAGE_VERSION already exists in the npm registry." - exit 0 - else - echo "Version $PACKAGE_VERSION does not exist in the npm registry. Proceeding..." - npm publish --provenance --access public - fi + npm view $PACKAGE_NAME@$PACKAGE_VERSION + continue-on-error: true + id: check_version + - name: Publish + if: steps.check_version.outcome != 'success' + run: npm publish --provenance --access public env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/build.ts b/build.ts index 6a7ba8f..b1bf3e2 100644 --- a/build.ts +++ b/build.ts @@ -1,11 +1,11 @@ import { watch } from "fs" import { join } from "path" -import { refreshTemplateWorkerExtension } from "@kksh/api/dev" +import { refreshTemplateWorkerCommand } from "@kksh/api/dev" import { $ } from "bun" async function build() { await $`bun build --minify --target=browser --outdir=./dist ./src/index.ts` - await refreshTemplateWorkerExtension() + await refreshTemplateWorkerCommand() } const srcDir = join(import.meta.dir, "src") diff --git a/bun.lockb b/bun.lockb index 4b19bd567fb5ccfc856a69add7a8da75e2f91d55..0712a67e8cb8a18c4b07440aad34c86776d4c2aa 100755 GIT binary patch delta 22710 zcmeHvcX(9A*Z0XfU6slbjieSdL#>t3VYAmS^L(N`{L59$U!LZ+UeuHda?3gc8Z;D;7viq>|wR*41=&M_Bem{qDz zU^U6_0o8$yg0LOvHBfToQ&2C^VJIg(Wv0S%eq7^S`5UCj<2#_XpjTwt)n29Y2mcJz z2lO^5Md({lQk>{0HMks<6q-vjO!=lvb0~N+z#Y^X)DD#7&!Qf+Q(?-_&n+!em6{6% znM+iasz?-2XkF_`p}mOO6!IsaPN0s^LKSa;hc3%{@D$n*7s(@MP>S5U$R`?#Fd)m4 zR|=C5t7Edh?EIqsrurn!H4Hu4KfDUj#`Zx}!oY(UAwk5BtIEJrWZKu4zdnFY-LV^T?p@0U79Xg&oqX9tq zro2I-#Xo{aFIg^tiVc}c%kXQ2^iC&cHQBWEab^%g^#)DFXj?4TIP>NtdMZSr;m-@Va zg-UfeP>R4_P>O6xkW_DX5aLf6{Yy+4X4D7|mI}&2NztdER9;{%$u>tpAu3YDa!d83 zTeUSrl21oIbzyv{6ruJqKOHw=lw!53jdR$>=u$!vZ9xI#=;;P4igQM10!VW z&{7IYCMb>bVpCa;egNNCt3l-lh#SQ#xV1{<2WksS{qSRwwEk9u(j0mpl*%WAQh5<5 z&9!czSQjh_pq`+fpgy3Bp_iH}9c0cg!@%0zPBLjdD8*tSC``4r%#bsBx8o^RK9!@v zQhyBrr5N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og-*+8z|D&nXhtnpA?Fx|-LOLt6{NvYux@Tzc=z!XSzKvs~ZRjiB=q%j? z4Wz67bhuod(c+2ur5VaPkadV%q^K5<(C++?A5rw6-Keqspo_krU|+I#lO{ky)Hc)+ z-7Dc@ympCy-3Lp`SLa>I#aD_1EG?XM@8N|8ZBYwa51!LvUvgWt#9)h!iAqqz<2EA# z-_7xyiI9quSPH(H(If3lV$qF`;|pXx^nNWN?i?Fi|H%VY_Qn|LQ4*WyN-sB}%Cg5v zPt%yMl$gxwNuRc34Ww3P7AVb0W&YBQWPGhRBr_kW(#+hYUdgN>$+eUU+CzAXnR&4y z$Ws4kPLrM9#6^Z}(LZPj+ z%!>bCLZr1A$g&of*-E7y$#|m>orbZxz>@k(jv|NK%B+Zqw4fUckWxA@vve($8KnMX z*v0lNT?%f`5~-nq)FOp7S6Y+Pn41)t#!`s2NnZ`eY&Bx9%VcrVv~?3}c;2aA=gb6B$j17@+mGimA^jJkdT^N?*V846or!*FRq2Zj?N6;{g` z{mKlJ63om)%1&YF2f`+@D^4^WrpsYIa66sh{Xm~?Y~6t;-I!EI^2>oyZ}(sin0|O} uVQcx{tQFA@`Y=}}`S)Ynq)mAcs_w_|e^MBh!5+9tDRY_bz{xo*lKlsZm(9fh diff --git a/jsr.json b/jsr.json index 591fdbf..70cee6e 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@kunkun/kunkun-ext-ip-info", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "exports": "./mod.ts", "publish": { diff --git a/package.json b/package.json index 3dd03a7..398fc52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.kunkun.sh/", "name": "kunkun-ext-ip-info", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "module": "index.ts", "repository": "https://github.com/kunkunsh/kunkun-ext-ip-info", @@ -43,7 +43,7 @@ "mod.ts" ], "dependencies": { - "@kksh/api": "^0.0.52" + "@kksh/api": "^0.1.1" }, "devDependencies": { "@types/bun": "latest", diff --git a/src/index.ts b/src/index.ts index 1de75c6..bdb3ecc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,8 +9,8 @@ import { log, toast, ui, - WorkerExtension -} from "@kksh/api/ui/worker" + TemplateUiCommand +} from "@kksh/api/ui/template" import { boolean, number, object, parse, safeParse, string, type InferOutput } from "valibot" const IpApiJsonSchema = object({ @@ -68,7 +68,7 @@ function mapIpInfoToListItem(ip: IpListItem): List.Item { }) } -class IpInfo extends WorkerExtension { +class IpInfo extends TemplateUiCommand { ip?: InferOutput listitems: List.Item[] = []