Skip to content

Commit

Permalink
npmignore cleanup; adding some types to Client (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
andygreenegrass authored and jsdevel committed Feb 22, 2019
1 parent 9cb3bf0 commit e8306be
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions .npmignore
Expand Up @@ -6,3 +6,4 @@ History.md
PUBLISHING.md
.*
/src
/docs
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -27,8 +27,7 @@
"types": "./lib/soap.d.ts",
"directories": {
"lib": "./lib",
"test": "./test",
"example": "./src/examples"
"test": "./test"
},
"scripts": {
"prepare": "npm run build",
Expand Down
16 changes: 9 additions & 7 deletions src/client.ts
Expand Up @@ -8,7 +8,9 @@ import * as BluebirdPromise from 'bluebird';
import * as concatStream from 'concat-stream';
import * as debugBuilder from 'debug';
import { EventEmitter } from 'events';
import { IncomingHttpHeaders } from 'http';
import * as _ from 'lodash';
import * as request from 'request';
import { v4 as uuid4 } from 'uuid';
import { HttpClient, Request } from './http';
import { IHeaders, IOptions, ISecurity, SoapMethod } from './types';
Expand Down Expand Up @@ -46,7 +48,13 @@ export interface Client {
export class Client extends EventEmitter {
[method: string]: any;
/** contains last full soap request for client logging */
public lastRequest: string;
public lastRequest?: string;
public lastMessage?: string;
public lastEndpoint?: string;
public lastRequestHeaders?: request.Headers;
public lastResponse?: any;
public lastResponseHeaders?: IncomingHttpHeaders;
public lastElapsedTime?: number;

private wsdl: WSDL;
private httpClient: HttpClient;
Expand All @@ -58,12 +66,6 @@ export class Client extends EventEmitter {
private SOAPAction: string;
private streamAllowed: boolean;
private normalizeNames: boolean;
private lastMessage: string;
private lastEndpoint: string;
private lastRequestHeaders;
private lastResponse;
private lastResponseHeaders;
private lastElapsedTime: number;

constructor(wsdl: WSDL, endpoint?: string, options?: IOptions) {
super();
Expand Down
6 changes: 3 additions & 3 deletions src/soap.ts
Expand Up @@ -8,7 +8,7 @@ import * as debugBuilder from 'debug';
import { Client } from './client';
import * as _security from './security';
import { Server, ServerType } from './server';
import { IOptions, IServerOptions } from './types';
import { IOptions, IServerOptions, IServices } from './types';
import { open_wsdl, WSDL } from './wsdl';

const debug = debugBuilder('node-soap:soap');
Expand Down Expand Up @@ -98,9 +98,9 @@ export function createClientAsync(url: string, options: IOptions, endpoint?: str
});
}

export function listen(server: ServerType, path: string, services: any, wsdl: string): Server;
export function listen(server: ServerType, path: string, services: IServices, wsdl: string): Server;
export function listen(server: ServerType, options: IServerOptions): Server;
export function listen(server: ServerType, p2: string | IServerOptions, services?: any, xml?: string): Server {
export function listen(server: ServerType, p2: string | IServerOptions, services?: IServices, xml?: string): Server {
let options: IServerOptions;
let path: string;
let uri = '';
Expand Down

0 comments on commit e8306be

Please sign in to comment.