@botfabrik/engine-webclient 4.104.18-alpha.0 → 4.104.18-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -52,6 +52,8 @@ export default (clientName, environment, props) => async (bot) => {
52
52
  res.write(index(serverUrl.toString(), `${server}/embed/bundle.js`));
53
53
  res.end();
54
54
  });
55
+ console.log('fabVisible', props.fabVisible);
56
+ console.log('isFabAlwaysVisible', isFabAlwaysVisible(props));
55
57
  if (!isFabAlwaysVisible(props)) {
56
58
  bot.webserver.express.get(`/${clientName}/embed/bundle.js`, (req, res) => {
57
59
  const caller = req.query['caller'];
@@ -66,6 +68,8 @@ export default (clientName, environment, props) => async (bot) => {
66
68
  console.log('referer', referer);
67
69
  console.log('visibleUrls', visibleUrls);
68
70
  console.log('isFromVisibleUrl', isFromVisibleUrl);
71
+ console.log('baseUrl', bot.webserver.baseUrl);
72
+ console.log('isFromBaseUrl', isFromBaseUrl);
69
73
  if (caller === 'bookmarklet' || isFromBaseUrl || isFromVisibleUrl) {
70
74
  res.sendFile(`${__dirname}/embed/bundle.js`);
71
75
  }
@@ -133,7 +137,7 @@ const serveStaticOptions = {
133
137
  }
134
138
  },
135
139
  };
136
- const isFabAlwaysVisible = ({ fabVisible = true }) => typeof fabVisible === 'boolean' ? fabVisible : false;
140
+ const isFabAlwaysVisible = ({ fabVisible = true }) => fabVisible === true;
137
141
  const onTerminateSession = (socket, bot) => async ({ sessionId, // passed if the user wants to restart the chat
138
142
  }) => {
139
143
  const session = await bot.createSession(sessionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botfabrik/engine-webclient",
3
- "version": "4.104.18-alpha.0",
3
+ "version": "4.104.18-alpha.2",
4
4
  "description": "Webclient for Botfabriks Bot Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -50,5 +50,5 @@
50
50
  "tsx": "^4.21.0",
51
51
  "typescript": "5.9.3"
52
52
  },
53
- "gitHead": "01ba242091424bd04e574c807e33da12cb272238"
53
+ "gitHead": "e1f0ee90d27bb74ff651558dad1ba6f903ec6318"
54
54
  }