mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
refactor: update dependencies
This commit is contained in:
@@ -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]!);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user