Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): integrations removed #1292

Merged
merged 1 commit into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/botonic-core/src/core-bot.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Inspector } from './debug/inspector'
import { getString } from './i18n'
import { getNLU } from './nlu'
import { loadPlugins, runPlugins } from './plugins'
import { Router } from './router'
import { isFunction } from './utils'
Expand All @@ -10,7 +9,6 @@ export class CoreBot {
renderer,
routes,
locales,
integrations,
theme,
plugins,
appId,
Expand All @@ -26,7 +24,6 @@ export class CoreBot {
typeof defaultTyping !== 'undefined' ? defaultTyping : 0.6
this.defaultDelay = typeof defaultDelay !== 'undefined' ? defaultDelay : 0.4
this.locales = locales
this.integrations = integrations
if (appId) {
this.appId = appId
return
Expand Down Expand Up @@ -57,11 +54,6 @@ export class CoreBot {

if (this.plugins) {
await runPlugins(this.plugins, 'pre', input, session, lastRoutePath)
} else if (this.integrations && input.type == 'text') {
try {
const nlu = await getNLU(input, this.integrations)
Object.assign(input, nlu)
} catch (e) {}
}

if (isFunction(this.routes)) {
Expand Down
2 changes: 0 additions & 2 deletions packages/botonic-core/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export interface BotOptions {
defaultRoutes?: Route[]
defaultTyping?: number
inspector?: Inspector
integrations?: { [id: string]: any }
locales: Locales
routes: Routes
theme?: string
Expand All @@ -291,7 +290,6 @@ export interface BotOptions {
export class CoreBot {
defaultDelay: number
defaultTyping: number
integrations?: { [id: string]: any }
locales: Locales
plugins: { [id: string]: Plugin }
routes: Routes
Expand Down
1 change: 0 additions & 1 deletion packages/botonic-core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export {
} from './handoff'
export { HubtypeService } from './hubtype-service'
export { getString } from './i18n'
export { getNLU } from './nlu'
export { Router } from './router'
export { isBrowser, isMobile, isNode, params2queryString } from './utils'

Expand Down
69 changes: 0 additions & 69 deletions packages/botonic-core/src/nlu.js

This file was deleted.