Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade uuid #1124

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"request": ">=2.9.0",
"sax": ">=0.6",
"strip-bom": "^3.0.0",
"uuid": "^3.1.0",
"uuid": "^8.3.0",
"xml-crypto": "^1.4.0"
},
"repository": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"@types/node": "^11.11.0",
"@types/request": "^2.48.1",
"@types/sax": "^1.0.1",
"@types/uuid": "^3.4.4",
"@types/uuid": "^8.3.0",
"body-parser": "^1.15.2",
"colors": "^1.3.3",
"coveralls": "^3.0.5",
Expand Down
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import getStream = require('get-stream');
import { IncomingHttpHeaders } from 'http';
import * as _ from 'lodash';
import * as request from 'request';
import { v4 as uuid4 } from 'uuid';
import { v4 as uuidv4 } from 'uuid';
import { HttpClient, Request } from './http';
import { IHeaders, IOptions, ISecurity, SoapMethod } from './types';
import { findPrefix } from './utils';
Expand Down Expand Up @@ -443,7 +443,7 @@ export class Client extends EventEmitter {
this.lastRequest = xml;
this.lastEndpoint = location;

const eid: string = options.exchangeId || uuid4();
const eid: string = options.exchangeId || uuidv4();

this.emit('message', message, eid);
this.emit('request', xml, eid);
Expand Down
6 changes: 3 additions & 3 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as httpNtlm from 'httpntlm';
import * as _ from 'lodash';
import * as req from 'request';
import * as url from 'url';
import * as uuid from 'uuid/v4';
import {v4 as uuidv4} from 'uuid';
import { IHeaders, IOptions } from './types';

const debug = debugBuilder('node-soap');
Expand Down Expand Up @@ -86,7 +86,7 @@ export class HttpClient {
};

if (exoptions.forceMTOM || attachments.length > 0) {
const start = uuid();
const start = uuidv4();
let action = null;
if (headers['Content-Type'].indexOf('action') > -1) {
for (const ct of headers['Content-Type'].split('; ')) {
Expand All @@ -96,7 +96,7 @@ export class HttpClient {
}
}
headers['Content-Type'] =
'multipart/related; type="application/xop+xml"; start="<' + start + '>"; start-info="text/xml"; boundary=' + uuid();
'multipart/related; type="application/xop+xml"; start="<' + start + '>"; start-info="text/xml"; boundary=' + uuidv4();
if (action) {
headers['Content-Type'] = headers['Content-Type'] + '; ' + action;
}
Expand Down
4 changes: 2 additions & 2 deletions src/security/WSSecurityCert.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { v4 as uuid4 } from 'uuid';
import { v4 as uuidv4 } from 'uuid';
import { SignedXml } from 'xml-crypto';
import { ISecurity } from '../types';

Expand All @@ -25,7 +25,7 @@ function insertStr(src: string, dst: string, pos: number): string {
}

function generateId(): string {
return uuid4().replace(/-/gm, '');
return uuidv4().replace(/-/gm, '');
}

const oasisBaseUri = 'http://docs.oasis-open.org/wss/2004/01';
Expand Down