remove mali as it is not needed any more because we publish the module with type definitions

This commit is contained in:
Bojan Djurkovic 2018-10-23 20:08:20 -03:00
parent b32edf9453
commit d7b9199894
6 changed files with 6 additions and 138 deletions

View File

@ -930,6 +930,12 @@
"sourceRepoURL": "https://github.com/blakeembrey/lower-case-first",
"asOfVersion": "1.0.1"
},
{
"libraryName": "mali",
"typingsPackageName": "mali",
"sourceRepoURL": "https://github.com/malijs/mali",
"asOfVersion": "0.9.2"
},
{
"libraryName": "maquette",
"typingsPackageName": "maquette",

95
types/mali/index.d.ts vendored
View File

@ -1,95 +0,0 @@
// Type definitions for mali 0.9
// Project: https://github.com/malijs/mali
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Bojan D. <https://github.com/bojand>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/// <reference types="node" />
import { EventEmitter } from "events";
import { Stream } from "stream";
import * as grpc from "grpc";
type GrpcRequest =
| grpc.ServerUnaryCall<any>
| grpc.ServerReadableStream<any>
| grpc.ServerWriteableStream<any>
| grpc.ServerDuplexStream<any, any>;
type GrpcResponse =
| grpc.ClientUnaryCall
| grpc.ClientReadableStream<any>
| grpc.ClientWritableStream<any>
| grpc.ClientDuplexStream<any, any>;
declare class Mali extends EventEmitter {
constructor(path: any, name?: string | ReadonlyArray<string>, options?: any);
name: string;
env: string;
ports: ReadonlyArray<number>;
silent: boolean;
addService(
path: any,
name: string | ReadonlyArray<string>,
options?: any
): void;
use(service?: any, name?: any, fns?: any): void;
start(port: number | string, creds?: any, options?: any): grpc.Server;
toJSON(): any;
close(): Promise<void>;
inspect(): any;
}
declare namespace Mali {
interface Context {
name: string;
fullName: string;
service: string;
package: string;
app: Mali;
call: any;
request: Request;
response: Response;
req: GrpcRequest;
res: GrpcResponse;
type: string;
metadata: any;
get(field: string): any;
set(field: any, val?: any): void;
sendMetadata(md: any): void;
getStatus(field: string): any;
setStatus(field: any, val?: any): void;
}
class Request {
constructor(call: any, type: string);
call: any;
type: string;
metadata: any;
req: GrpcRequest;
getMetadata(): grpc.Metadata;
get(field: string): any;
}
class Response {
constructor(call: any, type: string);
call: any;
type: string;
metadata: any;
status: any;
res: GrpcResponse;
set(field: any, val?: any): void;
get(field: string): any;
getMetadata(): grpc.Metadata;
sendMetadata(md?: any): void;
getStatus(field: string): any;
setStatus(field: any, val?: any): void;
}
function exec(ctx: Context, handler: any, cb?: any): void;
}
export = Mali;

View File

@ -1,16 +0,0 @@
// example from https://github.com/malijs/mali#example
import Mali = require('mali');
import path = require('path');
const PROTO_PATH = path.resolve(__dirname, '../protos/helloworld.proto');
async function sayHello(ctx: Mali.Context) {
ctx.res = { message: 'Hello '.concat(ctx.req.name) };
}
const app = new Mali(PROTO_PATH);
// $ExpectType void
app.use({sayHello});
// $ExpectType any
app.start('127.0.0.1:50051');

View File

@ -1,5 +0,0 @@
{
"dependencies": {
"grpc": "^1.0.0"
}
}

View File

@ -1,19 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"mali-tests.ts"
]
}

View File

@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}