mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 04:29:16 +00:00
fix rollup
This commit is contained in:
@@ -20,9 +20,19 @@ const createFlow = (args) => {
|
||||
return new FlowClass(args)
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear instancia de clase Provider
|
||||
* @param {*} args
|
||||
* @returns
|
||||
*/
|
||||
const createProvider = (args) => {
|
||||
return new FlowClass(args)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createBot,
|
||||
createFlow,
|
||||
createProvider,
|
||||
addKeyword,
|
||||
addAnswer,
|
||||
ProviderClass,
|
||||
|
||||
@@ -5,7 +5,7 @@ const { join } = require('path')
|
||||
const PATH = join(__dirname, 'lib', 'bundle.bot.cjs')
|
||||
|
||||
module.exports = {
|
||||
input: 'index.js',
|
||||
input: join(__dirname, 'index.js'),
|
||||
output: {
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
|
||||
@@ -5,7 +5,7 @@ const { join } = require('path')
|
||||
const PATH = join(__dirname, 'lib', 'cli', 'bundle.cli.cjs')
|
||||
|
||||
module.exports = {
|
||||
input: 'index.js',
|
||||
input: join(__dirname, 'index.js'),
|
||||
output: {
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
|
||||
@@ -5,7 +5,7 @@ const { join } = require('path')
|
||||
const PATH = join(__dirname, 'lib', 'database', 'bundle.database.cjs')
|
||||
|
||||
module.exports = {
|
||||
input: 'index.js',
|
||||
input: join(__dirname, 'index.js'),
|
||||
output: {
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
const MockProvider = require('./mock')
|
||||
const WebWhatsappProvider = require('./web-whatsapp')
|
||||
const TwilioProvider = require('./twilio')
|
||||
const { ProviderClass } = require('@bot-whatsapp/bot')
|
||||
|
||||
module.exports = {
|
||||
WebWhatsappProvider,
|
||||
MockProvider,
|
||||
TwilioProvider,
|
||||
ProviderClass,
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@bot-whatsapp/provider",
|
||||
"version": "0.0.1",
|
||||
"description": "Esto es el conector a Twilio, Meta, etc...",
|
||||
"main": "./lib/bundle.provider.cjs",
|
||||
"main": "./lib/bundle.mock.cjs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test.unit": "cross-env NODE_ENV=test node ../../node_modules/uvu/bin.js tests"
|
||||
@@ -15,9 +15,6 @@
|
||||
"qr-image": "^3.2.0"
|
||||
},
|
||||
"files": [
|
||||
"./lib/bundle.provider.cjs",
|
||||
"./mock/*",
|
||||
"./twilio/*",
|
||||
"./web-whatsapp/*"
|
||||
"./lib/*"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
const { join } = require('path')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
|
||||
const PATH = join(__dirname, 'lib', 'bundle.provider.cjs')
|
||||
|
||||
module.exports = {
|
||||
input: 'index.js',
|
||||
output: {
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'web-whatsapp', 'index.js'),
|
||||
output: {
|
||||
file: join(__dirname, 'lib', 'bundle.web-whatsapp.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
}
|
||||
{
|
||||
input: join(__dirname, 'twilio', 'index.js'),
|
||||
output: {
|
||||
file: join(__dirname, 'lib', 'bundle.twilio.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
},
|
||||
{
|
||||
input: join(__dirname, 'mock', 'index.js'),
|
||||
output: {
|
||||
file: join(__dirname, 'lib', 'bundle.mock.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user