From f2b00ee45f084997a87aafc3efa444236b92afab Mon Sep 17 00:00:00 2001 From: oleiade Date: Mon, 29 Jul 2024 12:05:10 +0200 Subject: [PATCH] Use k6-utils' uuidv4 function in SecretsManagerClient --- src/internal/secrets-manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/secrets-manager.ts b/src/internal/secrets-manager.ts index b84a24d..150e07f 100644 --- a/src/internal/secrets-manager.ts +++ b/src/internal/secrets-manager.ts @@ -1,7 +1,7 @@ import { JSONArray, JSONObject } from 'k6' import http, { RefinedResponse, ResponseType } from 'k6/http' +import { uuidv4 } from 'https://jslib.k6.io/k6-utils/1.4.0/index.js' -import { v4 as uuidv4 } from 'uuid' import { AWSClient } from './client' import { AWSConfig } from './config' import { AMZ_TARGET_HEADER } from './constants' @@ -133,7 +133,7 @@ export class SecretsManagerClient extends AWSClient { versionID?: string, tags?: Array ): Promise { - versionID = versionID || uuidv4() + versionID = versionID ?? uuidv4(true) const signedRequest = this.signature.sign( { @@ -179,7 +179,7 @@ export class SecretsManagerClient extends AWSClient { * @throws {InvalidSignatureError} */ async putSecretValue(id: string, secret: string, versionID?: string): Promise { - versionID = versionID || uuidv4() + versionID = versionID ?? uuidv4(true) const signedRequest = this.signature.sign( {