Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koishi-plugin-adapter-repl

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-plugin-adapter-repl - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

lib/adapter.d.ts

@@ -6,4 +6,4 @@ /// <reference types="node" />

rl: import("readline/promises").Interface;
start(): Promise<void>;
start(bot: ReplBot): Promise<void>;
stop(): Promise<void>;
}

@@ -6,14 +6,11 @@ "use strict";

class ReplAdapter extends koishi_1.Adapter.Server {
constructor() {
super(...arguments);
this.rl = (0, promises_1.createInterface)({
input: process.stdin,
// output: process.stdout,
});
}
async start() {
rl = (0, promises_1.createInterface)({
input: process.stdin,
// output: process.stdout,
});
async start(bot) {
process.stdout.write('> ');
this.rl.on('line', (line) => {
process.stdout.write('> ');
const session = this.bots[0].session({
const session = bot.session({
type: 'message',

@@ -31,3 +28,3 @@ subtype: 'private',

});
this.bots[0].dispatch(session);
bot.dispatch(session);
});

@@ -34,0 +31,0 @@ }

@@ -10,5 +10,7 @@ "use strict";

class ReplBot extends koishi_1.Bot {
hidden = true;
constructor(ctx, config) {
super(ctx, config);
this.hidden = true;
this.platform = 'repl';
this.selfId = 'koishi';
ctx.plugin(adapter_1.default, this);

@@ -15,0 +17,0 @@ }

{
"name": "koishi-plugin-adapter-repl",
"version": "0.1.4",
"version": "0.1.5",
"description": "REPL adapter for Koishi",

@@ -47,3 +47,3 @@ "main": "lib/index.js",

"esbuild-register": "^3.4.2",
"koishi": "^4.14.0",
"koishi": "^4.14.1",
"typescript": "^5.1.6",

@@ -53,4 +53,4 @@ "yml-register": "^1.1.0"

"peerDependencies": {
"koishi": "^4.14.0"
"koishi": "^4.14.1"
}
}
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