@chatopera/sdk
Advanced tools
Comparing version 2.7.9 to 2.8.0
@@ -0,0 +0,0 @@ const debug = require("debug")("chatopera:sdk:cli"); |
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -0,0 +0,0 @@ const inquirer = require("inquirer"); |
@@ -0,0 +0,0 @@ const debug = require("debug")("chatopera:sdk:cli"); |
@@ -0,0 +0,0 @@ const Bot = require("../index.js").Chatbot; |
@@ -0,0 +0,0 @@ const inquirer = require("inquirer"); |
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -0,0 +0,0 @@ const inquirer = require("inquirer"); |
@@ -0,0 +0,0 @@ const inquirer = require("inquirer"); |
@@ -0,0 +0,0 @@ const debug = require("debug")("chatopera:sdk:cli"); |
@@ -0,0 +0,0 @@ # 2.5.2 |
const debug = require('debug')('chatopera:sdk:chatopera'); | ||
const request = require('superagent'); | ||
const utils = require('./lib/utils'); | ||
@@ -89,4 +90,6 @@ const BASE_PATH = '/api/v1'; | ||
} | ||
static utils = utils; | ||
} | ||
module.exports = exports = Chatopera; |
@@ -0,0 +0,0 @@ declare interface ResponseResult { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -13,2 +13,3 @@ /** | ||
const fs = require("fs"); | ||
const yaml = require('js-yaml'); | ||
@@ -59,1 +60,36 @@ exports.sleep = function (seconds = 3) { | ||
}; | ||
exports.mapFaqFromYaml = function (yamlSource) { | ||
const data = yaml.load(yamlSource); | ||
const result = {}; | ||
for (const repoFullName in data) { | ||
const repoFaq = data[repoFullName]; | ||
const questions = []; | ||
for (const post in repoFaq) { | ||
const value = repoFaq[post]; | ||
const categoryTexts = value.categories && value.categories.split('/'); | ||
const replies = value.answers.map((a) => { | ||
return { | ||
rtype: 'plain', | ||
content: a, | ||
enabled: true, | ||
}; | ||
}); | ||
questions.push({ | ||
post, | ||
categoryTexts, | ||
replies, | ||
extends: value.extends, | ||
enabled: true, | ||
}); | ||
} | ||
result[repoFullName] = questions; | ||
} | ||
return result; | ||
}; |
{ | ||
"name": "@chatopera/sdk", | ||
"version": "2.7.9", | ||
"version": "2.8.0", | ||
"description": "低代码上线智能对话机器人,https://bot.chatopera.com", | ||
@@ -41,2 +41,3 @@ "main": "index.js", | ||
"inquirer-command-prompt": "0.0.28", | ||
"js-yaml": "^4.1.0", | ||
"lodash": "^4.17.21", | ||
@@ -43,0 +44,0 @@ "moment-timezone": "^0.5.31", |
@@ -0,0 +0,0 @@ # Chatopera CLI & Node.js SDK |
@@ -0,0 +0,0 @@ #!/usr/bin/env node |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ require("dotenv").config(); |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3145
328936
12
1
+ Addedjs-yaml@^4.1.0
+ Addedargparse@2.0.1(transitive)
+ Addedjs-yaml@4.1.0(transitive)