diff --git a/.github/workflows/publish-lib-to-npm.yml b/.github/workflows/publish-lib-to-npm.yml index 532fe3e3d..197f2ab75 100644 --- a/.github/workflows/publish-lib-to-npm.yml +++ b/.github/workflows/publish-lib-to-npm.yml @@ -8,16 +8,16 @@ on: jobs: publish: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/typebot-js env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} steps: - uses: actions/checkout@v2 - uses: pnpm/action-setup@v2.2.2 - run: pnpm i --frozen-lockfile - - run: pnpm test - - run: pnpm build - - run: pnpm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - - run: pnpm publish --no-git-checks --access public + - run: pnpm turbo build --filter=typebot-js... + - name: Set NPM_TOKEN in config + run: pnpm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} + working-directory: ./packages/typebot-js + - name: Publish + run: pnpm publish --no-git-checks --access public + working-directory: ./packages/typebot-js diff --git a/.github/workflows/publish_docker_images.yml b/.github/workflows/publish_docker_images.yml index bc6580a15..e60eba80d 100644 --- a/.github/workflows/publish_docker_images.yml +++ b/.github/workflows/publish_docker_images.yml @@ -3,6 +3,7 @@ name: Build Docker images on: create: tags: ['v*'] + tags-ignore: ['js-v*', 'react-v*', 'js-lib-v*'] push: branches: [main] pull_request: diff --git a/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts b/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts index ad5cb9ae9..48bd9c8aa 100644 --- a/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts +++ b/apps/builder/src/features/publish/components/embeds/snippetParsers/shared.ts @@ -29,4 +29,4 @@ export const parseReactBotProps = ({ typebot, apiHost }: BotProps) => { return `${typebotLine} ${apiHostLine}` } -export const typebotImportUrl = `https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.13/dist/web.js` +export const typebotImportUrl = `https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.14/dist/web.js` diff --git a/packages/js/package.json b/packages/js/package.json index c23e06ac1..e92b54fa2 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.0.13", + "version": "0.0.14", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/js/src/queries/sendMessageQuery.ts b/packages/js/src/queries/sendMessageQuery.ts index 0d130d129..579610734 100644 --- a/packages/js/src/queries/sendMessageQuery.ts +++ b/packages/js/src/queries/sendMessageQuery.ts @@ -1,5 +1,6 @@ +import { guessApiHost } from '@/utils/guessApiHost' import type { ChatReply, SendMessageInput } from 'models' -import { getViewerUrl, isEmpty, sendRequest } from 'utils' +import { isNotEmpty, sendRequest } from 'utils' export async function sendMessageQuery({ apiHost, @@ -7,7 +8,7 @@ export async function sendMessageQuery({ }: SendMessageInput & { apiHost?: string }) { const response = await sendRequest({ method: 'POST', - url: `${isEmpty(apiHost) ? getViewerUrl() : apiHost}/api/v1/sendMessage`, + url: `${isNotEmpty(apiHost) ? apiHost : guessApiHost()}/api/v1/sendMessage`, body, }) diff --git a/packages/react/package.json b/packages/react/package.json index 142ff41f5..86ed73f1f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/react", - "version": "0.0.13", + "version": "0.0.14", "description": "React library to display typebots on your website", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/typebot-js/package.json b/packages/typebot-js/package.json index 0ef39f92f..ff47d7d4f 100644 --- a/packages/typebot-js/package.json +++ b/packages/typebot-js/package.json @@ -1,6 +1,6 @@ { "name": "typebot-js", - "version": "2.2.16", + "version": "2.2.17", "main": "dist/index.js", "unpkg": "dist/index.global.js", "license": "AGPL-3.0-or-later", diff --git a/packages/wordpress/package.json b/packages/wordpress/package.json index 94ba84273..941406d93 100644 --- a/packages/wordpress/package.json +++ b/packages/wordpress/package.json @@ -11,7 +11,7 @@ }, "scripts": { "deploy": "pnpm copy && pnpm commit", - "copy": "svn copy ./trunk ./tags/3.0.0", - "commit": "svn ci -m 'Introduce new bot engine'" + "copy": "svn copy ./trunk ./tags/3.0.1", + "commit": "svn ci -m 'Fix standard flow not proceeding'" } } diff --git a/packages/wordpress/trunk/README.txt b/packages/wordpress/trunk/README.txt index aef81f8c7..aabaf09d8 100644 --- a/packages/wordpress/trunk/README.txt +++ b/packages/wordpress/trunk/README.txt @@ -5,7 +5,7 @@ Requires at least: 5.0 Tested up to: 6.0 License: GPL 2.0 License URI: http://www.gnu.org/licenses/gpl-2.0.txt -Stable Tag: 3.0.0 +Stable Tag: 3.0.1 Build beautiful conversational forms @@ -26,6 +26,9 @@ This plugin relies on Typebot which is a tool that allows you to create conversa 3. Activate your Typebot with the "Typebot" admin button located in the sidebar == Changelog == += 3.0.1 = +* Fix flow not proceeding on unknown domains + = 3.0.0 = * Complete rework of the plugin. You are now required to generate a code snippet on https://app.typebot.io diff --git a/packages/wordpress/trunk/public/class-typebot-public.php b/packages/wordpress/trunk/public/class-typebot-public.php index ce72332d9..02cb71eb5 100644 --- a/packages/wordpress/trunk/public/class-typebot-public.php +++ b/packages/wordpress/trunk/public/class-typebot-public.php @@ -52,7 +52,7 @@ class Typebot_Public public function add_typebot_container($attributes = []) { - $lib_url = "https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.9/dist/web.js"; + $lib_url = "https://cdn.jsdelivr.net/npm/@typebot.io/js@0.0.14/dist/web.js"; $width = '100%'; $height = '500px'; if (array_key_exists('width', $attributes)) { diff --git a/packages/wordpress/trunk/typebot.php b/packages/wordpress/trunk/typebot.php index 41f6fb48f..7fc3c3511 100644 --- a/packages/wordpress/trunk/typebot.php +++ b/packages/wordpress/trunk/typebot.php @@ -3,7 +3,7 @@ /** * Plugin Name: Typebot * Description: Convert more with conversational forms - * Version: 3.0.0 + * Version: 3.0.1 * Author: Typebot * Author URI: http://typebot.io/ * License: GPL-2.0+ @@ -16,7 +16,7 @@ if (!defined('WPINC')) { die(); } -define('TYPEBOT_VERSION', '3.0.0'); +define('TYPEBOT_VERSION', '3.0.1'); function activate_typebot() {