diff --git a/.github/change-versions.sh b/.github/change-versions.sh index 0810a2029e..ff0dbee68b 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -8,6 +8,7 @@ sed -i -e "/^export const VERSION =/s/= .*/= \"v$VERSION\";/" cli/main.ts sed -i -e "/^export const VERSION =/s/= .*/= \"v$VERSION\";/" benchmarks/main.ts sed -i -e "/version: /s/: .*/: $VERSION/" backend/windmill-api/openapi.yaml sed -i -e "/version: /s/: .*/: $VERSION/" openflow.openapi.yaml +sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" typescript-client/package.json sed -i -e "/\"version\": /s/: .*,/: \"$VERSION\",/" frontend/package.json sed -i -e "/^version =/s/= .*/= \"$VERSION\"/" python-client/wmill/pyproject.toml sed -i -e "/^windmill-api =/s/= .*/= \"\\^$VERSION\"/" python-client/wmill/pyproject.toml diff --git a/.github/workflows/npm_on_release.yml b/.github/workflows/npm_on_release.yml new file mode 100644 index 0000000000..d6141e532e --- /dev/null +++ b/.github/workflows/npm_on_release.yml @@ -0,0 +1,18 @@ +name: Publish deno-client +on: + push: + tags: + - "v*" + +jobs: + build_npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "16.x" + registry-url: "https://registry.npmjs.org" + - run: cd typescript-client && npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/benchmarks/pulumi/.gitignore b/benchmarks/pulumi/.gitignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/benchmarks/pulumi/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/frontend/src/lib/components/EditorBar.svelte b/frontend/src/lib/components/EditorBar.svelte index 8f0d9a52d1..71aba49917 100644 --- a/frontend/src/lib/components/EditorBar.svelte +++ b/frontend/src/lib/components/EditorBar.svelte @@ -263,16 +263,12 @@ editor.insertAtCursor(`(await wmill.getVariable('${path}'))`) } else if (lang === 'bun') { const code = editor.getCode() - if (!code.includes('import { setClient, getVariable } from "windmill-client@0.3.15')) { + if (!code.includes('import { getVariable } from "windmill-client@0.3.15')) { editor.insertAtBeginning( - `import { setClient, getVariable } from "windmill-client@0.3.15"\n` + `import { getVariable } from "windmill-client@0.3.15"\n` ) } - if (!code.includes('setClient()')) { - editor.insertAtCursor(`setClient()\n(await getVariable('${path}'))`) - } else { - editor.insertAtCursor(`(await getVariable('${path}'))`) - } + editor.insertAtCursor(`(await getVariable('${path}'))`) } else if (lang == 'python3') { if (!editor.getCode().includes('import wmill')) { editor.insertAtBeginning('import wmill\n') @@ -325,16 +321,12 @@ editor.insertAtCursor(`(await wmill.getResource('${path}'))`) } else if (lang === 'bun') { const code = editor.getCode() - if (!code.includes('import { setClient, getResource } from "windmill-client@0.3.15')) { + if (!code.includes('import { getResource } from "windmill-client@0.3.15')) { editor.insertAtBeginning( - `import { setClient, getResource } from "windmill-client@0.3.15"\n` + `import { getResource } from "windmill-client@0.3.15"\n` ) } - if (!code.includes('setClient()')) { - editor.insertAtCursor(`setClient()\n(await getResource('${path}'))`) - } else { - editor.insertAtCursor(`(await getResource('${path}'))`) - } + editor.insertAtCursor(`(await getResource('${path}'))`) } else if (lang == 'python3') { if (!editor.getCode().includes('import wmill')) { editor.insertAtBeginning('import wmill\n') diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index b7bad71987..e6b1d39b02 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -45,7 +45,7 @@ export async function main( ` export const BUN_INIT_CODE = `// import { toWords } from "number-to-words@1" -import { setClient, getVariable } from "windmill-client@0.3.15" +import { getVariable } from "windmill-client@${__pkg__.version}" // fill the type, or use the +Resource type to get a type-safe reference to a resource // type Postgresql = object @@ -57,7 +57,6 @@ export async function main( d = "inferred type string from default arg", e = { nested: "object" }, ) { - // setClient() // let x = await getVariable('u/user/foo') return { foo: a }; }