Add publish to jsr scripts (#3614)

* Add publish to jsr scripts

* Remove tsc logic for jsr build and publish
This commit is contained in:
wendrul
2024-04-25 17:58:42 +02:00
committed by GitHub
parent 770f4471b5
commit 03b1abc840
3 changed files with 26 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
set -eou pipefail
script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
rm -rf "${script_dirpath}/dist"
npx --yes @hey-api/openapi-ts --input "${script_dirpath}/../backend/windmill-api/openapi.yaml" --output "${script_dirpath}/dist" --useOptions --schemas false
# Add explicit type as it's missing in the client source code. This will be unnecessary in newer openapi-ts versions
sed -i 's/get \[Symbol\.toStringTag\]() {/get \[Symbol\.toStringTag\]() : string {/g' "${script_dirpath}/dist/core/CancelablePromise.ts"
+8
View File
@@ -0,0 +1,8 @@
{
"name": "@windmill-labs/windmill",
"version": "1.317.1",
"exports": "./dist/index.ts",
"publish": {
"exclude": ["!dist"]
}
}
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
set -eou pipefail
script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
args=${1:-}
npx jsr publish ${args}