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

koatty_cli

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_cli - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

lib/template/config/plugin.ts

2

lib/index.js

@@ -188,2 +188,3 @@ #!/usr/bin/env node

copyFile('config' + path.sep + 'router.ts', APP_PATH + path.sep + 'config' + path.sep + 'router.ts');
copyFile('config' + path.sep + 'plugin.ts', APP_PATH + path.sep + 'config' + path.sep + 'plugin.ts');
copyFile('config' + path.sep + 'middleware.ts', APP_PATH + path.sep + 'config' + path.sep + 'middleware.ts');

@@ -434,2 +435,3 @@

copyFile('plugin' + path.sep + 'NewPlugin.ts', APP_PATH + path.sep + 'plugin' + path.sep + plugin + 'Plugin.ts', {
'<Path>': '..',
'<PLUG>': plugin + 'Plugin'

@@ -436,0 +438,0 @@ });

4

lib/template/middleware/NewMiddleware.ts

@@ -7,3 +7,3 @@ /**

*/
import { Middleware, IMiddleware, Helper } from "koatty";
import { Middleware, IMiddleware, KoattyContext, Helper } from "koatty";
import { App } from '<Path>/App';

@@ -24,3 +24,3 @@

return function (ctx: any, next: any) {
return function (ctx: KoattyContext, next: Function) {
return next();

@@ -27,0 +27,0 @@ };

@@ -7,3 +7,3 @@ /**

*/
import { Middleware, IMiddleware, Helper } from "koatty";
import { Middleware, IMiddleware, KoattyContext, Helper } from "koatty";
import { createConnection, Connection } from "typeorm";

@@ -38,6 +38,5 @@ import { App } from '<Path>/App';

//应用启动执行一次
app.once('appReady', async () => {
await conn();
});
return async function (ctx: any, next: any) {
await conn();
return async function (ctx: KoattyContext, next: Function) {
if (!app.connection) {

@@ -44,0 +43,0 @@ await conn();

{
"name": "koatty_cli",
"version": "2.5.0",
"version": "2.5.1",
"description": "Koatty command line tool.",

@@ -5,0 +5,0 @@ "scripts": {

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