refactor: update dependencies

This commit is contained in:
Rainer Killinger
2021-04-26 13:19:14 +02:00
parent 9566f7aa0a
commit a599c87384
3 changed files with 354 additions and 541 deletions

View File

@@ -27,23 +27,11 @@ import {
} from '@openstapps/core';
import clone = require('fast-clone');
import moment from 'moment';
import {v5} from 'uuid';
import {Bulk} from './bulk';
import {Client} from './client';
import {EmptyBulkError, NamespaceNotDefinedError} from './errors';
const V5_VERSION = 0x50;
/* tslint:disable:no-var-requires */
/**
* The package @types/uuid unfortunately doesn't expose the browser versions of the hashing functions.
* That's why we need to use a little trickery to get to it.
*/
const v35 = require('uuid/lib/v35');
const sha1Browser = require('uuid/lib/sha1-browser');
const v5 = v35('v5', V5_VERSION, sha1Browser);
/* tslint:enable:no-var-requires */
/**
* StApps-API client
*/
@@ -81,7 +69,7 @@ export class ConnectorClient extends Client {
throw new NamespaceNotDefinedError(namespaceId);
}
return v5(uid.toString(), SCNamespaces[namespaceId]);
return v5(uid.toString(), SCNamespaces[namespaceId]!);
}
/**