New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koishi-plugin-teach

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-plugin-teach - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

7

dist/database.js

@@ -22,2 +22,3 @@ "use strict";

else {
// TODO: support dialogue.keyword in mysql
if (test.question)

@@ -86,2 +87,8 @@ conditionals.push('`question` = ' + this.escape(test.question));

}
else if (data.flag & DialogueFlag.keyword) {
if (test.question && !test.question.includes(data.question))
return;
if (test.answer && !test.question.includes(data.answer))
return;
}
else {

@@ -88,0 +95,0 @@ if (test.question && data.question !== test.question)

12

dist/update.js

@@ -63,7 +63,15 @@ "use strict";

if (options.frozen) {
newFlag = newFlag - (newFlag & database_1.DialogueFlag.frozen) + database_1.DialogueFlag.frozen;
newFlag |= database_1.DialogueFlag.frozen;
}
else if (options.noFrozen) {
newFlag = newFlag - (newFlag & database_1.DialogueFlag.frozen);
newFlag &= ~database_1.DialogueFlag.frozen;
}
if (options.keyword) {
newFlag |= database_1.DialogueFlag.keyword;
}
else if (options.noKeyword) {
newFlag &= ~database_1.DialogueFlag.keyword;
}
if (newFlag !== dialogue.flag)
updates.flag = newFlag;
if (parsedOptions.envMode) {

@@ -70,0 +78,0 @@ const oldGroups = utils_1.splitIds(dialogue.groups.replace(/^\*/, ''));

23

package.json
{
"name": "koishi-plugin-teach",
"version": "0.1.1",
"description": "Teach plugin for Koishi",
"version": "0.1.2",
"main": "dist/index.js",

@@ -20,11 +21,23 @@ "typings": "dist/index.d.ts",

"homepage": "https://github.com/koishijs/koishi/packages/plugin-teach#readme",
"keywords": [
"bot",
"qqbot",
"cqhttp",
"coolq",
"chatbot",
"koishi",
"plugin",
"teach",
"dialogue",
"conversation"
],
"devDependencies": {
"koishi-database-level": "^1.0.0-alpha.5",
"koishi-database-mysql": "^1.0.0-alpha.5"
"koishi-database-level": "^1.0.0-alpha.6",
"koishi-database-mysql": "^1.0.0-alpha.6"
},
"dependencies": {
"fast-deep-equal": "^3.1.1",
"koishi-core": "^1.0.0-alpha.5",
"koishi-utils": "^1.0.0-alpha.1"
"koishi-core": "^1.0.0-alpha.6",
"koishi-utils": "^1.0.0-alpha.2"
}
}

@@ -72,2 +72,3 @@ import { injectMethods, extendUser, Activity } from 'koishi-core'

} else {
// TODO: support dialogue.keyword in mysql
if (test.question) conditionals.push('`question` = ' + this.escape(test.question))

@@ -133,2 +134,5 @@ if (test.answer) conditionals.push('`answer` = ' + this.escape(test.answer))

if (test.answer && !data.question.includes(test.answer)) return
} else if (data.flag & DialogueFlag.keyword) {
if (test.question && !test.question.includes(data.question)) return
if (test.answer && !test.question.includes(data.answer)) return
} else {

@@ -135,0 +139,0 @@ if (test.question && data.question !== test.question) return

@@ -70,7 +70,15 @@ import { Dialogue, DialogueFlag } from './database'

if (options.frozen) {
newFlag = newFlag - (newFlag & DialogueFlag.frozen) + DialogueFlag.frozen
newFlag |= DialogueFlag.frozen
} else if (options.noFrozen) {
newFlag = newFlag - (newFlag & DialogueFlag.frozen)
newFlag &= ~DialogueFlag.frozen
}
if (options.keyword) {
newFlag |= DialogueFlag.keyword
} else if (options.noKeyword) {
newFlag &= ~DialogueFlag.keyword
}
if (newFlag !== dialogue.flag) updates.flag = newFlag
if (parsedOptions.envMode) {

@@ -77,0 +85,0 @@ const oldGroups = splitIds(dialogue.groups.replace(/^\*/, ''))

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc