mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-04-18 04:09:11 +00:00
feat: migrate to esm
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {asyncPool} from '@krlwlfrt/async-pool/lib/async-pool';
|
||||
import {asyncPool} from '@krlwlfrt/async-pool/lib/async-pool.js';
|
||||
import {
|
||||
isThing,
|
||||
SCAssociatedThingWithoutReferences,
|
||||
@@ -28,9 +28,9 @@ import {
|
||||
import moment from 'moment';
|
||||
import clone = require('rfdc');
|
||||
import {v5} from 'uuid';
|
||||
import {Bulk} from './bulk';
|
||||
import {Client} from './client';
|
||||
import {EmptyBulkError, NamespaceNotDefinedError} from './errors';
|
||||
import {Bulk} from './bulk.js';
|
||||
import {Client} from './client.js';
|
||||
import {EmptyBulkError, NamespaceNotDefinedError} from './errors.js';
|
||||
|
||||
/**
|
||||
* StApps-API client
|
||||
@@ -187,7 +187,7 @@ export class ConnectorClient extends Client {
|
||||
*/
|
||||
async bulk<T extends SCThings>(type: SCThingType, source: string, timeout?: number): Promise<Bulk<T>> {
|
||||
// set default value for timeout to one hour
|
||||
const bulkTimeout = typeof timeout !== 'number' ? ConnectorClient.BULK_TIMEOUT : timeout;
|
||||
const bulkTimeout = typeof timeout === 'number' ? timeout : ConnectorClient.BULK_TIMEOUT;
|
||||
|
||||
const bulkData = await this.invokeRoute<SCBulkResponse>(this.bulkRoute, undefined, {
|
||||
expiration: moment().add(bulkTimeout, 'seconds').format(),
|
||||
|
||||
Reference in New Issue
Block a user