2
0

🐛 Fix bot not proceeding when embedded

This commit is contained in:
Baptiste Arnaud
2023-02-22 07:46:30 +01:00
parent 4efe2c48bb
commit bdf088bd95
11 changed files with 24 additions and 19 deletions

View File

@ -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

View File

@ -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:

View File

@ -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`

View File

@ -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",

View File

@ -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<ChatReply>({
method: 'POST',
url: `${isEmpty(apiHost) ? getViewerUrl() : apiHost}/api/v1/sendMessage`,
url: `${isNotEmpty(apiHost) ? apiHost : guessApiHost()}/api/v1/sendMessage`,
body,
})

View File

@ -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",

View File

@ -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",

View File

@ -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'"
}
}

View File

@ -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

View File

@ -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)) {

View File

@ -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()
{