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

koatty_core

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_core - npm Package Compare versions

Comparing version 1.8.6 to 1.9.0-0

12

CHANGELOG.md

@@ -5,2 +5,14 @@ # Changelog

## [1.9.0-0](https://github.com/koatty/koatty_core/compare/v1.8.6...v1.9.0-0) (2024-01-15)
### Features
* ctx增加requestParam、requestBody ([165e2de](https://github.com/koatty/koatty_core/commit/165e2de87a72e7d7bdb9b918883f107ed26ba03d))
### Bug Fixes
* 修改路由定义 ([7a3b0a7](https://github.com/koatty/koatty_core/commit/7a3b0a76d43b9d9a18db286f4ae3c9a47df4561f))
### [1.8.6](https://github.com/koatty/koatty_core/compare/v1.8.5...v1.8.6) (2024-01-04)

@@ -7,0 +19,0 @@

67

dist/index.d.ts
/*!
* @Author: richen
* @Date: 2024-01-04 21:35:52
* @Date: 2024-01-15 21:13:23
* @License: BSD (3-Clause)

@@ -20,2 +20,4 @@ * @Copyright (c) - <richenlin(at)gmail.com>

import { ServerWritableStream } from '@grpc/grpc-js';
import { ServiceDefinition } from '@grpc/grpc-js';
import { UntypedHandleCall } from '@grpc/grpc-js';
import { WebSocket } from 'ws';

@@ -57,2 +59,12 @@

/**
* Implementation
*
* @export
* @interface Implementation
*/
export declare interface Implementation {
[methodName: string]: UntypedHandleCall;
}
/**
* InitOptions

@@ -265,2 +277,13 @@ *

setMetaData: (key: string, value: unknown) => void;
/**
* Get parsed query-string and path variable(koa ctx.query and ctx.params),
* and set as an object.
* @returns unknown
*/
requestParam?: () => unknown;
/**
* Get parsed body(form variable and file object).
* @returns Promise<unknown> ex: {post: {...}, file: {...}}
*/
requestBody?: () => Promise<unknown>;
}

@@ -350,8 +373,29 @@

export declare interface KoattyRouter {
app: Koatty;
/**
* router options
*/
options: any;
/**
* KoaRouter or custom router
*/
router: any;
SetRouter: (path: string, func: Function, method?: any) => void;
LoadRouter: (list: any[]) => void;
ListRouter?: () => any;
/**
* set router map
* @param name
* @param impl
* @returns
*/
readonly SetRouter: (name: string, impl?: RouterImplementation) => void;
/**
* load router list and register handler
* @param app
* @param list
* @returns
*/
readonly LoadRouter: (app: Koatty, list: any[]) => Promise<void>;
/**
* return router list
* @returns
*/
readonly ListRouter?: () => Map<string, RouterImplementation>;
}

@@ -366,3 +410,2 @@

export declare interface KoattyServer {
app: Koatty;
options: any;

@@ -380,2 +423,14 @@ server: unknownServer;

/**
* RouterImplementation
*
* @export
* @interface RouterImplementation
*/
export declare interface RouterImplementation {
path?: string;
service?: ServiceDefinition;
implementation?: Function | Implementation;
}
declare type unknownServer = unknown;

@@ -382,0 +437,0 @@

2

dist/index.js
/*!
* @Author: richen
* @Date: 2024-01-04 21:35:39
* @Date: 2024-01-15 21:13:12
* @License: BSD (3-Clause)

@@ -5,0 +5,0 @@ * @Copyright (c) - <richenlin(at)gmail.com>

{
"name": "koatty_core",
"version": "1.8.6",
"version": "1.9.0-0",
"description": "Koatty framework core",

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

{
"name": "koatty_core",
"version": "1.8.6",
"version": "1.9.0-0",
"description": "Koatty framework core",

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

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