diff --git a/examples/cloudflare-workers/web-sdk/package-lock.json b/examples/cloudflare-workers/web-sdk/package-lock.json index 1e500da67..49fac5c90 100644 --- a/examples/cloudflare-workers/web-sdk/package-lock.json +++ b/examples/cloudflare-workers/web-sdk/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@gomomento/sdk-core": "^1.40.0", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "xhr4sw": "^0.0.5" }, "devDependencies": { @@ -518,9 +518,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -553,12 +553,12 @@ } }, "node_modules/@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "dependencies": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", diff --git a/examples/cloudflare-workers/web-sdk/package.json b/examples/cloudflare-workers/web-sdk/package.json index f8dd2a0b7..b7ef3e2a8 100644 --- a/examples/cloudflare-workers/web-sdk/package.json +++ b/examples/cloudflare-workers/web-sdk/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@gomomento/sdk-core": "^1.40.0", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "xhr4sw": "^0.0.5" } } diff --git a/examples/nodejs/access-control/package-lock.json b/examples/nodejs/access-control/package-lock.json index c1932c259..3cf957813 100644 --- a/examples/nodejs/access-control/package-lock.json +++ b/examples/nodejs/access-control/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "devDependencies": { "@types/node": "^16.11.4", @@ -66,12 +66,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -82,9 +82,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3261,12 +3261,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3274,9 +3274,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/access-control/package.json b/examples/nodejs/access-control/package.json index 23de47d9e..de08a7b76 100644 --- a/examples/nodejs/access-control/package.json +++ b/examples/nodejs/access-control/package.json @@ -26,6 +26,6 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" } } diff --git a/examples/nodejs/aws/package-lock.json b/examples/nodejs/aws/package-lock.json index 6d64be0fa..5ccbba6f1 100644 --- a/examples/nodejs/aws/package-lock.json +++ b/examples/nodejs/aws/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "^3.370.0", - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "devDependencies": { "@types/node": "^16.11.4", @@ -643,12 +643,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -659,9 +659,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -4972,12 +4972,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -4985,9 +4985,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/aws/package.json b/examples/nodejs/aws/package.json index 0bd6a6dd9..e9e90286b 100644 --- a/examples/nodejs/aws/package.json +++ b/examples/nodejs/aws/package.json @@ -27,6 +27,6 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "^3.370.0", - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" } } diff --git a/examples/nodejs/cache/doc-example-files/doc-examples-js-apis.ts b/examples/nodejs/cache/doc-example-files/doc-examples-js-apis.ts index 0d7ca2257..d7b7ddeba 100644 --- a/examples/nodejs/cache/doc-example-files/doc-examples-js-apis.ts +++ b/examples/nodejs/cache/doc-example-files/doc-examples-js-apis.ts @@ -92,8 +92,8 @@ import { PutWebhook, RotateWebhookSecret, GetWebhookSecret, - // GetBatch, - // SetBatch, + CacheGetBatch, + CacheSetBatch, ReadConcern, CacheSetSample, CacheKeyExists, @@ -385,37 +385,37 @@ async function example_API_SetIfAbsentOrEqual(cacheClient: CacheClient, cacheNam } } -// async function example_API_SetBatch(cacheClient: CacheClient, cacheName: string) { -// const values = new Map([ -// ['abc', '123'], -// ['xyz', '321'], -// ['123', 'xyz'], -// ['321', 'abc'], -// ]); -// const result = await cacheClient.setBatch(cacheName, values); -// if (result instanceof SetBatch.Success) { -// console.log('Keys and values stored successfully'); -// } else if (result instanceof SetBatch.Error) { -// throw new Error( -// `An error occurred while attempting to batch set in cache '${cacheName}': ${result.errorCode()}: ${result.toString()}` -// ); -// } -// } - -// async function example_API_GetBatch(cacheClient: CacheClient, cacheName: string) { -// const keys = ['abc', 'xyz', '123', '321']; -// const result = await cacheClient.getBatch(cacheName, keys); -// if (result instanceof GetBatch.Success) { -// const values = result.values(); -// for (const key of keys) { -// console.log(`Retrieved value for key '${key}': ${values[key]}`); -// } -// } else if (result instanceof GetBatch.Error) { -// throw new Error( -// `An error occurred while attempting to batch get in cache '${cacheName}': ${result.errorCode()}: ${result.toString()}` -// ); -// } -// } +async function example_API_SetBatch(cacheClient: CacheClient, cacheName: string) { + const values = new Map([ + ['abc', '123'], + ['xyz', '321'], + ['123', 'xyz'], + ['321', 'abc'], + ]); + const result = await cacheClient.setBatch(cacheName, values); + if (result instanceof CacheSetBatch.Success) { + console.log('Keys and values stored successfully'); + } else if (result instanceof CacheSetBatch.Error) { + throw new Error( + `An error occurred while attempting to batch set in cache '${cacheName}': ${result.errorCode()}: ${result.toString()}` + ); + } +} + +async function example_API_GetBatch(cacheClient: CacheClient, cacheName: string) { + const keys = ['abc', 'xyz', '123', '321']; + const result = await cacheClient.getBatch(cacheName, keys); + if (result instanceof CacheGetBatch.Success) { + const values = result.values(); + for (const key of keys) { + console.log(`Retrieved value for key '${key}': ${values[key]}`); + } + } else if (result instanceof CacheGetBatch.Error) { + throw new Error( + `An error occurred while attempting to batch get in cache '${cacheName}': ${result.errorCode()}: ${result.toString()}` + ); + } +} async function example_API_ListFetch(cacheClient: CacheClient, cacheName: string) { await cacheClient.listConcatenateBack(cacheName, 'test-list', ['a', 'b', 'c']); @@ -1568,8 +1568,8 @@ async function main() { await example_API_SetIfNotEqual(cacheClient, cacheName); await example_API_SetIfPresentAndNotEqual(cacheClient, cacheName); await example_API_SetIfAbsentOrEqual(cacheClient, cacheName); - // await example_API_SetBatch(cacheClient, cacheName); - // await example_API_GetBatch(cacheClient, cacheName); + await example_API_SetBatch(cacheClient, cacheName); + await example_API_GetBatch(cacheClient, cacheName); await example_API_ListFetch(cacheClient, cacheName); await example_API_ListConcatenateBack(cacheClient, cacheName); @@ -1663,6 +1663,7 @@ async function main() { await example_API_LeaderboardUpsertPagination(leaderboard, 10); } finally { await example_API_DeleteCache(cacheClient, cacheName); + cacheClient.close(); } } diff --git a/examples/nodejs/cache/package-lock.json b/examples/nodejs/cache/package-lock.json index 328ee4efa..bf53f6a92 100644 --- a/examples/nodejs/cache/package-lock.json +++ b/examples/nodejs/cache/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "devDependencies": { "@types/node": "16.11.4", @@ -71,12 +71,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -87,9 +87,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3681,12 +3681,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3694,9 +3694,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/cache/package.json b/examples/nodejs/cache/package.json index 075450004..0e1411df8 100644 --- a/examples/nodejs/cache/package.json +++ b/examples/nodejs/cache/package.json @@ -33,7 +33,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "engines": { "node": ">=10.4.0" diff --git a/examples/nodejs/compression/package-lock.json b/examples/nodejs/compression/package-lock.json index 1bb88f70f..cc2f9b6bb 100644 --- a/examples/nodejs/compression/package-lock.json +++ b/examples/nodejs/compression/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "@gomomento/sdk-nodejs-compression": "^0.74.0" }, "devDependencies": { @@ -72,12 +72,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -88,9 +88,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/compression/package.json b/examples/nodejs/compression/package.json index 6eb0b49ae..4a147c28d 100644 --- a/examples/nodejs/compression/package.json +++ b/examples/nodejs/compression/package.json @@ -26,7 +26,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "@gomomento/sdk-nodejs-compression": "^0.74.0" }, "engines": { diff --git a/examples/nodejs/get-set-batch-perf-test/package-lock.json b/examples/nodejs/get-set-batch-perf-test/package-lock.json index 864d602af..6737d716c 100644 --- a/examples/nodejs/get-set-batch-perf-test/package-lock.json +++ b/examples/nodejs/get-set-batch-perf-test/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "hdr-histogram-js": "3.0.0" }, "devDependencies": { @@ -65,12 +65,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -81,9 +81,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3499,12 +3499,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3512,9 +3512,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/get-set-batch-perf-test/package.json b/examples/nodejs/get-set-batch-perf-test/package.json index 770896239..56ea818f3 100644 --- a/examples/nodejs/get-set-batch-perf-test/package.json +++ b/examples/nodejs/get-set-batch-perf-test/package.json @@ -6,7 +6,7 @@ "scripts": { "prebuild": "eslint . --ext .ts", "build": "tsc", - "start-test": "tsc && node dist/perf-test.js", + "start-test": "tsc && node --heapsnapshot-signal=SIGUSR2 dist/perf-test.js", "test": "jest", "lint": "eslint . --ext .ts", "format": "eslint . --ext .ts --fix" @@ -26,7 +26,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "hdr-histogram-js": "3.0.0" } } diff --git a/examples/nodejs/get-set-batch-perf-test/perf-test.ts b/examples/nodejs/get-set-batch-perf-test/perf-test.ts index db3f64dbc..ac64c0e98 100644 --- a/examples/nodejs/get-set-batch-perf-test/perf-test.ts +++ b/examples/nodejs/get-set-batch-perf-test/perf-test.ts @@ -1,6 +1,8 @@ import { CacheClient, + CacheGetBatch, CacheSet, + CacheSetBatch, DefaultMomentoLoggerFactory, DefaultMomentoLoggerLevel, MomentoLogger, @@ -32,6 +34,14 @@ class PerfTest { this.testConfiguration = testConfiguration; } + private logMemoryUsage(): NodeJS.Timer { + return setInterval(() => { + for (const [key, value] of Object.entries(process.memoryUsage())) { + // this.logger.info(`Memory usage by ${key}, ${value / 1000000}MB `); + } + }, 5000); // Log memory usage every 5 seconds + } + async run(): Promise { const momento = await getCacheClient( this.options.loggerFactory, @@ -40,63 +50,134 @@ class PerfTest { ); await createCache(momento, this.cacheName, this.logger); - this.logger.info('Starting async set requests'); - await this.runAsyncSetRequests(momento); + const memoryUsageLogger = this.logMemoryUsage(); + + try { + this.logger.info('Starting async set requests'); + await this.runAsyncSetRequests(momento); - this.logger.info('Starting async get requests'); - await this.runAsyncGetRequests(momento); + this.logger.info('Starting async get requests'); + await this.runAsyncGetRequests(momento); - this.logger.info('Starting set batch requests'); - await this.runSetBatchTests(momento); + this.logger.info('Starting set batch requests'); + await this.runSetBatchTests(momento); - this.logger.info('Starting get batch requests'); - await this.runGetBatchTests(momento); + this.logger.info('Starting get batch requests'); + await this.runGetBatchTests(momento); - // flush the cache - await flushCache(momento, this.cacheName, this.logger); + // flush the cache + await flushCache(momento, this.cacheName, this.logger); + } finally { + clearInterval(memoryUsageLogger); + } } async runAsyncSetRequests(momento: CacheClient): Promise { for (const setConfig of this.testConfiguration.sets) { + this.logger.info( + `Beginning run for ASYNC_SETS, batch size ${setConfig.batchSize}, item size ${setConfig.itemSizeBytes}` + ); + let numLoops = 0; const context = initiatePerfTestContext(); while (getElapsedMillis(context.startTime) < this.testConfiguration.minimumRunDurationSecondsForTests * 1000) { + numLoops++; await this.sendAsyncSetRequests(momento, context, setConfig); } calculateSummary(context, setConfig.batchSize, setConfig.itemSizeBytes, RequestType.ASYNC_SETS, this.logger); + this.logger.info( + `Completed run for ASYNC_SETS, batch size ${setConfig.batchSize}, item size ${ + setConfig.itemSizeBytes + }; num loops: ${numLoops}, elapsed duration: ${getElapsedMillis(context.startTime)}ms` + ); } } async runAsyncGetRequests(momento: CacheClient): Promise { for (const getConfig of this.testConfiguration.gets) { + this.logger.info( + `Populating cache for ASYNC_GETS, batch size ${getConfig.batchSize}, item size ${getConfig.itemSizeBytes}` + ); + const cachePopulationStartTime = process.hrtime(); // ensure that the cache is populated with the keys await this.ensureCacheIsPopulated(momento, getConfig); + this.logger.info( + `Populated cache for ASYNC_GETS, batch size ${getConfig.batchSize}, item size ${ + getConfig.itemSizeBytes + } in ${getElapsedMillis(cachePopulationStartTime)}ms` + ); + this.logger.info( + `Beginning run for ASYNC_GETS, batch size ${getConfig.batchSize}, item size ${getConfig.itemSizeBytes}` + ); + let numLoops = 0; const context = initiatePerfTestContext(); while (getElapsedMillis(context.startTime) < this.testConfiguration.minimumRunDurationSecondsForTests * 1000) { + // this.logger.info(`Looping; elapsed millis: ${getElapsedMillis(context.startTime)}`); + numLoops++; await this.sendAsyncGetRequests(momento, context, getConfig); } calculateSummary(context, getConfig.batchSize, getConfig.itemSizeBytes, RequestType.ASYNC_GETS, this.logger); + this.logger.info( + `Completed run for ASYNC_GETS, batch size ${getConfig.batchSize}, item size ${ + getConfig.itemSizeBytes + }; num loops: ${numLoops}, elapsed duration: ${getElapsedMillis(context.startTime)}ms` + ); } } async runSetBatchTests(momento: CacheClient): Promise { for (const setConfig of this.testConfiguration.sets) { + if (setConfig.batchSize * setConfig.itemSizeBytes >= 5 * 1024 * 1024) { + this.logger.info( + `Skipping run for SET_BATCH, batch size ${setConfig.batchSize}, item size ${setConfig.itemSizeBytes} would exceed max request size of 5MB` + ); + continue; + } + this.logger.info( + `Beginning run for SET_BATCH, batch size ${setConfig.batchSize}, item size ${setConfig.itemSizeBytes}` + ); + let numLoops = 0; const context = initiatePerfTestContext(); while (getElapsedMillis(context.startTime) < this.testConfiguration.minimumRunDurationSecondsForTests * 1000) { + numLoops++; await this.sendSetBatchRequests(momento, context, setConfig); } calculateSummary(context, setConfig.batchSize, setConfig.itemSizeBytes, RequestType.SET_BATCH, this.logger); + this.logger.info( + `Completed run for SET_BATCH, batch size ${setConfig.batchSize}, item size ${ + setConfig.itemSizeBytes + }; num loops: ${numLoops}, elapsed duration: ${getElapsedMillis(context.startTime)}ms` + ); } } async runGetBatchTests(momento: CacheClient): Promise { for (const getConfig of this.testConfiguration.gets) { + this.logger.info( + `Populating cache for GET_BATCH, batch size ${getConfig.batchSize}, item size ${getConfig.itemSizeBytes}` + ); + const cachePopulationStartTime = process.hrtime(); // ensure that the cache is populated with the keys await this.ensureCacheIsPopulated(momento, getConfig); + this.logger.info( + `Populated cache for GET_BATCH, batch size ${getConfig.batchSize}, item size ${ + getConfig.itemSizeBytes + } in ${getElapsedMillis(cachePopulationStartTime)}ms` + ); + this.logger.info( + `Beginning run for GET_BATCH, batch size ${getConfig.batchSize}, item size ${getConfig.itemSizeBytes}` + ); + let numLoops = 0; const context = initiatePerfTestContext(); while (getElapsedMillis(context.startTime) < this.testConfiguration.minimumRunDurationSecondsForTests * 1000) { + numLoops++; await this.sendGetBatchRequests(momento, context, getConfig); } calculateSummary(context, getConfig.batchSize, getConfig.itemSizeBytes, RequestType.GET_BATCH, this.logger); + this.logger.info( + `Completed run for GET_BATCH, batch size ${getConfig.batchSize}, item size ${ + getConfig.itemSizeBytes + }; num loops: ${numLoops}, elapsed duration: ${getElapsedMillis(context.startTime)}ms` + ); } } @@ -114,10 +195,13 @@ class PerfTest { setPromises.push(setPromise); context.totalItemSizeBytes += setConfig.itemSizeBytes; } - await Promise.all(setPromises).then(() => { - const setDuration = getElapsedMillis(setStartTime); - context.asyncSetLatencies.recordValue(setDuration); - }); + const setResponses = await Promise.all(setPromises); + const setDuration = getElapsedMillis(setStartTime); + const error = setResponses.find(response => response instanceof CacheSet.Error); + if (error !== undefined) { + throw new Error(`Error in async sets: ${error.toString()}`); + } + context.asyncSetLatencies.recordValue(setDuration); } private async sendAsyncGetRequests( @@ -133,10 +217,13 @@ class PerfTest { getPromises.push(getPromise); context.totalItemSizeBytes += getConfig.itemSizeBytes; } - await Promise.all(getPromises).then(() => { - const setDuration = getElapsedMillis(getStartTime); - context.asyncGetLatencies.recordValue(setDuration); - }); + const getResponses = await Promise.all(getPromises); + const getDuration = getElapsedMillis(getStartTime); + const error = getResponses.find(response => response instanceof CacheSet.Error); + if (error !== undefined) { + throw new Error(`Error in async gets: ${error.toString()}`); + } + context.asyncGetLatencies.recordValue(getDuration); } private async sendSetBatchRequests( @@ -153,12 +240,14 @@ class PerfTest { const setBatchStartTime = process.hrtime(); const setBatchPromise = momento.setBatch(this.cacheName, items); - void setBatchPromise.then(() => { - const setBatchDuration = getElapsedMillis(setBatchStartTime); - context.setBatchLatencies.recordValue(setBatchDuration); - }); context.totalItemSizeBytes += setConfig.batchSize * setConfig.itemSizeBytes; - await setBatchPromise; + const setBatchResponse = await setBatchPromise; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (setBatchResponse instanceof CacheSetBatch.Error) { + throw new Error(`Error setting batch: ${setBatchResponse.toString()}`); + } + const setBatchDuration = getElapsedMillis(setBatchStartTime); + context.setBatchLatencies.recordValue(setBatchDuration); } private async sendGetBatchRequests( @@ -169,12 +258,14 @@ class PerfTest { const keys = Array.from({length: getConfig.batchSize}, (_, i) => `key-${i}`); const getBatchStartTime = process.hrtime(); const getBatchPromise = momento.getBatch(this.cacheName, keys); - void getBatchPromise.then(() => { - const getBatchDuration = getElapsedMillis(getBatchStartTime); - context.getBatchLatencies.recordValue(getBatchDuration); - }); context.totalItemSizeBytes += getConfig.batchSize * getConfig.itemSizeBytes; - await getBatchPromise; + const getBatchResponse = await getBatchPromise; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (getBatchResponse instanceof CacheGetBatch.Error) { + throw new Error(`Error getting batch: ${getBatchResponse.toString()}`); + } + const getBatchDuration = getElapsedMillis(getBatchStartTime); + context.getBatchLatencies.recordValue(getBatchDuration); } private async ensureCacheIsPopulated(momento: CacheClient, getConfig: GetSetConfig) { @@ -205,7 +296,11 @@ function generateConfigurations(batchSizes: number[], itemSizes: number[]): GetS const configurations: GetSetConfig[] = []; for (const batchSize of batchSizes) { for (const itemSize of itemSizes) { - configurations.push({batchSize, itemSizeBytes: itemSize}); + // exclude permutations where the total payload is greater than 1GB, they are not realistic and + // will cause memory issues + if (batchSize * itemSize < 1024 * 1024 * 1024) { + configurations.push({batchSize, itemSizeBytes: itemSize}); + } } } return configurations; diff --git a/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package-lock.json b/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package-lock.json index e635e4a8d..987b81d55 100644 --- a/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package-lock.json +++ b/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "3.470.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" }, "devDependencies": { @@ -666,12 +666,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -682,9 +682,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -5470,12 +5470,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -5483,9 +5483,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package.json b/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package.json index b93fa0baa..5021d2d42 100644 --- a/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package.json +++ b/examples/nodejs/lambda-examples/cloudwatch-metrics/docker/ecs-code/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "3.470.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" } } diff --git a/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package-lock.json b/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package-lock.json index cd3f8ca6a..f000ba4c6 100644 --- a/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package-lock.json +++ b/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "3.468.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" }, "devDependencies": { @@ -666,12 +666,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -682,9 +682,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -5470,12 +5470,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -5483,9 +5483,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package.json b/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package.json index 93614e82e..8b1f046f9 100644 --- a/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package.json +++ b/examples/nodejs/lambda-examples/cloudwatch-metrics/lambda/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "3.468.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" } } diff --git a/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package-lock.json b/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package-lock.json index f6f415db6..a611f2c7a 100644 --- a/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package-lock.json +++ b/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "3.470.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" }, "devDependencies": { @@ -666,12 +666,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -682,9 +682,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -5470,12 +5470,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -5483,9 +5483,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package.json b/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package.json index 1a6198163..c85bb28ef 100644 --- a/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package.json +++ b/examples/nodejs/lambda-examples/simple-get/lambda/simple-get/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "3.470.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" } } diff --git a/examples/nodejs/lambda-examples/topics-microservice/package-lock.json b/examples/nodejs/lambda-examples/topics-microservice/package-lock.json index 8531d2319..8c54f591d 100644 --- a/examples/nodejs/lambda-examples/topics-microservice/package-lock.json +++ b/examples/nodejs/lambda-examples/topics-microservice/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@aws-sdk/client-lambda": "^3.352.0", "@aws-sdk/client-secrets-manager": "^3.352.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-cdk-lib": "^2.85.0", "aws-lambda": "^1.0.7", "constructs": "^10.0.0", @@ -668,12 +668,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -684,9 +684,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3720,12 +3720,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3733,9 +3733,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/lambda-examples/topics-microservice/package.json b/examples/nodejs/lambda-examples/topics-microservice/package.json index 983a1420b..2d91fcbd5 100644 --- a/examples/nodejs/lambda-examples/topics-microservice/package.json +++ b/examples/nodejs/lambda-examples/topics-microservice/package.json @@ -23,7 +23,7 @@ "dependencies": { "@aws-sdk/client-lambda": "^3.352.0", "@aws-sdk/client-secrets-manager": "^3.352.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-cdk-lib": "^2.85.0", "aws-lambda": "^1.0.7", "constructs": "^10.0.0", diff --git a/examples/nodejs/load-gen/package-lock.json b/examples/nodejs/load-gen/package-lock.json index 864d602af..6737d716c 100644 --- a/examples/nodejs/load-gen/package-lock.json +++ b/examples/nodejs/load-gen/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "hdr-histogram-js": "3.0.0" }, "devDependencies": { @@ -65,12 +65,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -81,9 +81,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3499,12 +3499,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3512,9 +3512,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/load-gen/package.json b/examples/nodejs/load-gen/package.json index 59e043bc2..bcebad5ab 100644 --- a/examples/nodejs/load-gen/package.json +++ b/examples/nodejs/load-gen/package.json @@ -27,7 +27,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "hdr-histogram-js": "3.0.0" } } diff --git a/examples/nodejs/mongodb-examples/simple-read-aside/package-lock.json b/examples/nodejs/mongodb-examples/simple-read-aside/package-lock.json index 201d3f534..85b7059e5 100644 --- a/examples/nodejs/mongodb-examples/simple-read-aside/package-lock.json +++ b/examples/nodejs/mongodb-examples/simple-read-aside/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache 2.0", "dependencies": { "@aws-sdk/client-secrets-manager": "^3.369.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "mongodb": "^5.8.0" }, "devDependencies": { @@ -1332,12 +1332,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -1348,9 +1348,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -8656,12 +8656,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -8669,9 +8669,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/mongodb-examples/simple-read-aside/package.json b/examples/nodejs/mongodb-examples/simple-read-aside/package.json index 0469762e7..e8e57bae3 100644 --- a/examples/nodejs/mongodb-examples/simple-read-aside/package.json +++ b/examples/nodejs/mongodb-examples/simple-read-aside/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "^3.369.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "mongodb": "^5.8.0" }, "devDependencies": { diff --git a/examples/nodejs/observability/package-lock.json b/examples/nodejs/observability/package-lock.json index 3c3371ff7..952d1152a 100644 --- a/examples/nodejs/observability/package-lock.json +++ b/examples/nodejs/observability/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "@opentelemetry/api": "1.4.1", "@opentelemetry/exporter-prometheus": "0.39.1", "@opentelemetry/exporter-zipkin": "1.13.0", @@ -82,12 +82,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -98,9 +98,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -4127,12 +4127,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -4140,9 +4140,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/observability/package.json b/examples/nodejs/observability/package.json index a452c3748..f6ebde9e7 100644 --- a/examples/nodejs/observability/package.json +++ b/examples/nodejs/observability/package.json @@ -29,7 +29,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "@opentelemetry/api": "1.4.1", "@opentelemetry/exporter-prometheus": "0.39.1", "@opentelemetry/exporter-zipkin": "1.13.0", diff --git a/examples/nodejs/rate-limiter/package-lock.json b/examples/nodejs/rate-limiter/package-lock.json index 0effe8c55..8ef95f506 100644 --- a/examples/nodejs/rate-limiter/package-lock.json +++ b/examples/nodejs/rate-limiter/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "devDependencies": { "@types/node": "16.18.60", @@ -204,12 +204,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -220,9 +220,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3937,12 +3937,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3950,9 +3950,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/rate-limiter/package.json b/examples/nodejs/rate-limiter/package.json index f0590a9e9..117efc128 100644 --- a/examples/nodejs/rate-limiter/package.json +++ b/examples/nodejs/rate-limiter/package.json @@ -26,7 +26,7 @@ "typescript": "4.9.5" }, "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "engines": { "node": ">=10.4.0" diff --git a/examples/nodejs/token-vending-machine/lambda/authorizer/package-lock.json b/examples/nodejs/token-vending-machine/lambda/authorizer/package-lock.json index b5541b361..f58ace709 100644 --- a/examples/nodejs/token-vending-machine/lambda/authorizer/package-lock.json +++ b/examples/nodejs/token-vending-machine/lambda/authorizer/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "3.485.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" }, "devDependencies": { @@ -657,12 +657,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -673,9 +673,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/token-vending-machine/lambda/authorizer/package.json b/examples/nodejs/token-vending-machine/lambda/authorizer/package.json index ada564ff5..5e497ae46 100644 --- a/examples/nodejs/token-vending-machine/lambda/authorizer/package.json +++ b/examples/nodejs/token-vending-machine/lambda/authorizer/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "3.485.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" } } diff --git a/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package-lock.json b/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package-lock.json index 323cdcdd4..614b203e9 100644 --- a/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package-lock.json +++ b/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@aws-sdk/client-secrets-manager": "3.485.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" }, "devDependencies": { @@ -657,12 +657,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -673,9 +673,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package.json b/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package.json index bffd0e81a..bde9e194d 100644 --- a/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package.json +++ b/examples/nodejs/token-vending-machine/lambda/token-vending-machine/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@aws-sdk/client-secrets-manager": "3.485.0", - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "aws-lambda": "1.0.7" } } diff --git a/examples/nodejs/topics/package-lock.json b/examples/nodejs/topics/package-lock.json index 2a23d3fef..d32d3ba98 100644 --- a/examples/nodejs/topics/package-lock.json +++ b/examples/nodejs/topics/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" }, "devDependencies": { "@types/node": "^16.11.4", @@ -59,12 +59,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -75,9 +75,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3470,12 +3470,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3483,9 +3483,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/topics/package.json b/examples/nodejs/topics/package.json index f54099116..02ab45980 100644 --- a/examples/nodejs/topics/package.json +++ b/examples/nodejs/topics/package.json @@ -27,6 +27,6 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1" + "@gomomento/sdk": "^1.79.0" } } diff --git a/examples/nodejs/vector-index/package-lock.json b/examples/nodejs/vector-index/package-lock.json index 230dc113d..85a963181 100644 --- a/examples/nodejs/vector-index/package-lock.json +++ b/examples/nodejs/vector-index/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "jsdom": "22.1.0" }, "devDependencies": { @@ -93,12 +93,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -109,9 +109,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -3898,12 +3898,12 @@ } }, "@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "requires": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -3911,9 +3911,9 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" diff --git a/examples/nodejs/vector-index/package.json b/examples/nodejs/vector-index/package.json index dfeb38f99..648133315 100644 --- a/examples/nodejs/vector-index/package.json +++ b/examples/nodejs/vector-index/package.json @@ -26,7 +26,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", + "@gomomento/sdk": "^1.79.0", "jsdom": "22.1.0" } } diff --git a/examples/web/cache/package-lock.json b/examples/web/cache/package-lock.json index d26ebe8fd..ee97c87e9 100644 --- a/examples/web/cache/package-lock.json +++ b/examples/web/cache/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jsdom": "22.1.0" }, "devDependencies": { @@ -91,9 +91,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -103,12 +103,12 @@ } }, "node_modules/@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "dependencies": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", @@ -3475,21 +3475,21 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" } }, "@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "requires": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", diff --git a/examples/web/cache/package.json b/examples/web/cache/package.json index d8e9f01ee..5c78c7168 100644 --- a/examples/web/cache/package.json +++ b/examples/web/cache/package.json @@ -29,7 +29,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jsdom": "22.1.0" } } diff --git a/examples/web/nextjs-chat/package-lock.json b/examples/web/nextjs-chat/package-lock.json index 0dc7fdd1d..5a90cccec 100644 --- a/examples/web/nextjs-chat/package-lock.json +++ b/examples/web/nextjs-chat/package-lock.json @@ -8,8 +8,8 @@ "name": "momento-nextjs-chat", "version": "0.1.0", "dependencies": { - "@gomomento/sdk": "^1.77.1", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk": "^1.79.0", + "@gomomento/sdk-web": "^1.79.0", "autoprefixer": "10.4.14", "next": "^13.5.6", "next-auth": "^4.24.5", @@ -145,12 +145,12 @@ } }, "node_modules/@gomomento/sdk": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.77.1.tgz", - "integrity": "sha512-P8KhHXMO4gSRlc4wCIiXVdzhraB+Jw7eEMMFnqXI9R1iebYZHqD2ZZtKA1YyJn/QComXTokKkyNoSHoGsv7HdQ==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk/-/sdk-1.79.0.tgz", + "integrity": "sha512-dBXWJDGL9neJrzEmnmVc5KmYt35DGLtvNLz7EinaqV3Zye7cMWvC8ODgHkYUyNt+0fdAbC8Kd2CgzFqjXrOUiw==", "dependencies": { "@gomomento/generated-types": "0.108.2", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@grpc/grpc-js": "1.10.5", "@types/google-protobuf": "3.15.10", "google-protobuf": "3.21.2", @@ -161,9 +161,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -173,12 +173,12 @@ } }, "node_modules/@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "dependencies": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", diff --git a/examples/web/nextjs-chat/package.json b/examples/web/nextjs-chat/package.json index 723f2e53a..af23df124 100644 --- a/examples/web/nextjs-chat/package.json +++ b/examples/web/nextjs-chat/package.json @@ -9,8 +9,8 @@ "lint": "next lint" }, "dependencies": { - "@gomomento/sdk": "^1.77.1", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk": "^1.79.0", + "@gomomento/sdk-web": "^1.79.0", "autoprefixer": "10.4.14", "next": "^13.5.6", "next-auth": "^4.24.5", diff --git a/examples/web/vector-index/package-lock.json b/examples/web/vector-index/package-lock.json index 219f4591d..e66e3f1fd 100644 --- a/examples/web/vector-index/package-lock.json +++ b/examples/web/vector-index/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jsdom": "22.1.0" }, "devDependencies": { @@ -91,9 +91,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -103,12 +103,12 @@ } }, "node_modules/@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "dependencies": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", @@ -3323,21 +3323,21 @@ } }, "@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "requires": { "buffer": "6.0.3", "jwt-decode": "3.1.2" } }, "@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "requires": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", diff --git a/examples/web/vector-index/package.json b/examples/web/vector-index/package.json index 652528d69..b7b0d7d1a 100644 --- a/examples/web/vector-index/package.json +++ b/examples/web/vector-index/package.json @@ -26,7 +26,7 @@ "typescript": "4.4.3" }, "dependencies": { - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jsdom": "22.1.0" } } diff --git a/examples/web/vite-chat-app/package-lock.json b/examples/web/vite-chat-app/package-lock.json index 6ac07d40a..ae88a9ffe 100644 --- a/examples/web/vite-chat-app/package-lock.json +++ b/examples/web/vite-chat-app/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@aws-sdk/client-cognito-identity-provider": "^3.378.0", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jwt-decode": "^3.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -1481,9 +1481,9 @@ } }, "node_modules/@gomomento/sdk-core": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.77.1.tgz", - "integrity": "sha512-PZDfZ2KuNh9g2/8CfDJ21PDcacWaQIxwMIK1JElD/nQepXvojDhBUuYi6/sc4ZV8jo8Q/NAwknGQ0zNaXtHewg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-core/-/sdk-core-1.79.0.tgz", + "integrity": "sha512-rCuf8HvWvVBoaOrto/VOFhvUAriMIEdqA5jSuZhjT6Q/N+hN/4grfJz1ypNjM8xSJZTxzB/Z8hLethCde5ojuA==", "dependencies": { "buffer": "6.0.3", "jwt-decode": "3.1.2" @@ -1493,12 +1493,12 @@ } }, "node_modules/@gomomento/sdk-web": { - "version": "1.77.1", - "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.77.1.tgz", - "integrity": "sha512-FZfZF+PwvA8I9BIPVE75jaFGcsw94u8TQXraW9LMp+0RxYFzmAHIwoDLIGtXvfgGFGfdjyQuIDd4+5izTU9ogg==", + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@gomomento/sdk-web/-/sdk-web-1.79.0.tgz", + "integrity": "sha512-ND+bQSsk2IyXp+j59S6yPCYXTDtF1AmVoeqv7n2xlLPhQU6y35Qy+mqlftCxGYRFNAPeauTfLNO40iINYlcA8A==", "dependencies": { "@gomomento/generated-types-webtext": "0.107.4", - "@gomomento/sdk-core": "1.77.1", + "@gomomento/sdk-core": "1.79.0", "@types/google-protobuf": "3.15.6", "google-protobuf": "3.21.2", "grpc-web": "1.4.2", diff --git a/examples/web/vite-chat-app/package.json b/examples/web/vite-chat-app/package.json index 0f6051ab2..df44a9b33 100644 --- a/examples/web/vite-chat-app/package.json +++ b/examples/web/vite-chat-app/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@aws-sdk/client-cognito-identity-provider": "^3.378.0", - "@gomomento/sdk-web": "^1.77.1", + "@gomomento/sdk-web": "^1.79.0", "jwt-decode": "^3.1.2", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/packages/client-sdk-nodejs/src/cache-client.ts b/packages/client-sdk-nodejs/src/cache-client.ts index 155f11af9..5064a823a 100644 --- a/packages/client-sdk-nodejs/src/cache-client.ts +++ b/packages/client-sdk-nodejs/src/cache-client.ts @@ -13,7 +13,7 @@ import {CacheClientProps, EagerCacheClientProps} from './cache-client-props'; import { range, Semaphore, - validateConcurrentRequestsLimit, + validateMaxConcurrentRequests, validateTimeout, validateTtlSeconds, } from '@gomomento/sdk-core/dist/src/internal/utils'; @@ -35,7 +35,7 @@ export class CacheClient extends AbstractCacheClient implements ICacheClient { private readonly logger: MomentoLogger; private readonly notYetAbstractedControlClient: CacheControlClient; private readonly _configuration: Configuration; - private dataRequestConcurrencySemaphore: Semaphore; + private dataRequestConcurrencySemaphore: Semaphore | undefined = undefined; /** * Creates an instance of CacheClient. @@ -50,12 +50,15 @@ export class CacheClient extends AbstractCacheClient implements ICacheClient { configuration: configuration, }; + let semaphore: Semaphore | undefined = undefined; const numConcurrentRequests = configuration .getTransportStrategy() .getGrpcConfig() - .getConcurrentRequestsLimit(); - validateConcurrentRequestsLimit(numConcurrentRequests); - const semaphore = new Semaphore(numConcurrentRequests); + .getMaxConcurrentRequests(); + if (numConcurrentRequests !== null && numConcurrentRequests !== undefined) { + validateMaxConcurrentRequests(numConcurrentRequests); + semaphore = new Semaphore(numConcurrentRequests); + } const controlClient = new CacheControlClient({ configuration: configuration, @@ -79,7 +82,9 @@ export class CacheClient extends AbstractCacheClient implements ICacheClient { } public close() { - this.dataRequestConcurrencySemaphore.purge(); + if (this.dataRequestConcurrencySemaphore !== undefined) { + this.dataRequestConcurrencySemaphore.purge(); + } this.controlClient.close(); this.dataClients.map(dc => dc.close()); this._configuration.getMiddlewares().map(m => { diff --git a/packages/client-sdk-nodejs/src/config/transport/grpc-configuration.ts b/packages/client-sdk-nodejs/src/config/transport/grpc-configuration.ts index 441ac5ea0..474e8a33c 100644 --- a/packages/client-sdk-nodejs/src/config/transport/grpc-configuration.ts +++ b/packages/client-sdk-nodejs/src/config/transport/grpc-configuration.ts @@ -22,7 +22,7 @@ export interface GrpcConfigurationProps { * number of requests that will be made concurrently across all of the internal clients. * If this is not set, it will default to the defaultRequestConcurrencyLimit. */ - concurrentRequestsLimit?: number; + maxConcurrentRequests?: number; /** * Indicates if it permissible to send keepalive pings from the client without any outstanding streams. @@ -162,16 +162,14 @@ export interface GrpcConfiguration { withNumClients(numClients: number): GrpcConfiguration; /** - * @returns {number} the maximum number of concurrent requests that can be made to the server. + * returns the maximum number of concurrent requests that can be made to the server. */ - getConcurrentRequestsLimit(): number; + getMaxConcurrentRequests(): number | undefined; /** * Copy constructor for overriding the maximum number of concurrent requests - * @param {number} concurrentRequestsLimit the maximum number of concurrent requests that can be made to the server + * @param {number} maxConcurrentRequests the maximum number of concurrent requests that can be made to the server * @returns {GrpcConfiguration} a new GrpcConfiguration with the specified maximum number of concurrent requests */ - withConcurrentRequestsLimit( - concurrentRequestsLimit: number - ): GrpcConfiguration; + withMaxConcurrentRequests(maxConcurrentRequests: number): GrpcConfiguration; } diff --git a/packages/client-sdk-nodejs/src/config/transport/transport-strategy.ts b/packages/client-sdk-nodejs/src/config/transport/transport-strategy.ts index 3b46111d7..db4bbf29a 100644 --- a/packages/client-sdk-nodejs/src/config/transport/transport-strategy.ts +++ b/packages/client-sdk-nodejs/src/config/transport/transport-strategy.ts @@ -1,7 +1,5 @@ import {GrpcConfiguration, GrpcConfigurationProps} from './grpc-configuration'; -const defaultRequestConcurrencyLimit = 100; - export interface TransportStrategy { /** * Configures the low-level gRPC settings for the Momento client's communication @@ -55,18 +53,16 @@ export interface TransportStrategy { withMaxClientAgeMillis(maxClientAgeMillis: number): TransportStrategy; /** - * @returns {number} the maximum number of concurrent requests that can be made by the client. + * returns the maximum number of concurrent requests that can be made by the client. */ - getConcurrentRequestsLimit(): number; + getMaxConcurrentRequests(): number | undefined; /** * Copy constructor to update the maximum number of concurrent requests that can be made by the client. - * @param {number} concurrentRequestsLimit + * @param {number} maxConcurrentRequests * @returns {TransportStrategy} a new TransportStrategy with the specified concurrent requests limit. */ - withConcurrentRequestsLimit( - concurrentRequestsLimit: number - ): TransportStrategy; + withMaxConcurrentRequests(maxConcurrentRequests: number): TransportStrategy; } export interface TransportStrategyProps { @@ -95,7 +91,7 @@ export class StaticGrpcConfiguration implements GrpcConfiguration { private readonly deadlineMillis: number; private readonly maxSessionMemoryMb: number; private readonly numClients: number; - private readonly concurrentRequestsLimit: number; + private readonly maxConcurrentRequests?: number; private readonly keepAlivePermitWithoutCalls?: number; private readonly keepAliveTimeoutMs?: number; private readonly keepAliveTimeMs?: number; @@ -111,14 +107,7 @@ export class StaticGrpcConfiguration implements GrpcConfiguration { // This is the previously hardcoded value and a safe default for most environments. this.numClients = 6; } - if ( - props.concurrentRequestsLimit !== undefined && - props.concurrentRequestsLimit !== null - ) { - this.concurrentRequestsLimit = props.concurrentRequestsLimit; - } else { - this.concurrentRequestsLimit = defaultRequestConcurrencyLimit; - } + this.maxConcurrentRequests = props.maxConcurrentRequests; this.keepAliveTimeMs = props.keepAliveTimeMs; this.keepAliveTimeoutMs = props.keepAliveTimeoutMs; this.keepAlivePermitWithoutCalls = props.keepAlivePermitWithoutCalls; @@ -182,18 +171,16 @@ export class StaticGrpcConfiguration implements GrpcConfiguration { }); } - getConcurrentRequestsLimit(): number { - return this.concurrentRequestsLimit; + getMaxConcurrentRequests(): number | undefined { + return this.maxConcurrentRequests; } - withConcurrentRequestsLimit( - concurrentRequestsLimit: number - ): GrpcConfiguration { + withMaxConcurrentRequests(maxConcurrentRequests: number): GrpcConfiguration { return new StaticGrpcConfiguration({ deadlineMillis: this.deadlineMillis, maxSessionMemoryMb: this.maxSessionMemoryMb, numClients: this.numClients, - concurrentRequestsLimit: concurrentRequestsLimit, + maxConcurrentRequests: maxConcurrentRequests, }); } } @@ -252,16 +239,16 @@ export class StaticTransportStrategy implements TransportStrategy { }); } - getConcurrentRequestsLimit(): number { - return this.grpcConfig.getConcurrentRequestsLimit(); + getMaxConcurrentRequests(): number | undefined { + return this.grpcConfig.getMaxConcurrentRequests(); } - withConcurrentRequestsLimit( - concurrentRequestsLimit: number + withMaxConcurrentRequests( + maxConcurrentRequests: number ): StaticTransportStrategy { return new StaticTransportStrategy({ - grpcConfiguration: this.grpcConfig.withConcurrentRequestsLimit( - concurrentRequestsLimit + grpcConfiguration: this.grpcConfig.withMaxConcurrentRequests( + maxConcurrentRequests ), maxIdleMillis: this.maxIdleMillis, }); diff --git a/packages/client-sdk-nodejs/src/internal/cache-data-client.ts b/packages/client-sdk-nodejs/src/internal/cache-data-client.ts index 35048a88a..97ce0fddd 100644 --- a/packages/client-sdk-nodejs/src/internal/cache-data-client.ts +++ b/packages/client-sdk-nodejs/src/internal/cache-data-client.ts @@ -147,7 +147,7 @@ export class CacheDataClient implements IDataClient { private readonly interceptors: Interceptor[]; private readonly streamingInterceptors: Interceptor[]; private readonly valueCompressor?: ICompression; - private requestConcurrencySemaphore: Semaphore; + private requestConcurrencySemaphore: Semaphore | undefined; /** * @param {CacheClientProps} props @@ -156,7 +156,7 @@ export class CacheDataClient implements IDataClient { constructor( props: CacheClientPropsWithConfig, dataClientID: string, - semaphore: Semaphore + semaphore: Semaphore | undefined ) { this.configuration = props.configuration; this.credentialProvider = props.credentialProvider; @@ -226,6 +226,7 @@ export class CacheDataClient implements IDataClient { ); this.streamingInterceptors = this.initializeStreamingInterceptors(headers); } + close() { this.logger.debug('Closing cache data client'); this.clientWrapper.getClient().close(); @@ -347,6 +348,20 @@ export class CacheDataClient implements IDataClient { } } + // If maxConcurrentRequests is set, use the semaphore to limit the number of concurrent requests. + // Otherwise, execute the cache operation without any rate limiting. + private async rateLimited(cacheOperation: () => Promise): Promise { + try { + if (this.requestConcurrencySemaphore !== undefined) + await this.requestConcurrencySemaphore.acquire(); + + return await cacheOperation(); + } finally { + if (this.requestConcurrencySemaphore !== undefined) + this.requestConcurrencySemaphore.release(); + } + } + public async set( cacheName: string, key: string | Uint8Array, @@ -385,17 +400,14 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'set' request; key: ${key.toString()}, value length: ${ value.length }, ttl: ${ttlToUse.toString()}` ); return await this.sendSet(cacheName, encodedKey, encodedValue, ttlToUse); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSet( @@ -447,12 +459,9 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendSetFetch(cacheName, this.convert(setName)); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetFetch( @@ -504,8 +513,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendSetAddElements( cacheName, this.convert(setName), @@ -513,9 +521,7 @@ export class CacheDataClient implements IDataClient { ttl.ttlMilliseconds() || this.defaultTtlSeconds * 1000, ttl.refreshTtl() ); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetAddElements( @@ -570,16 +576,13 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendSetRemoveElements( cacheName, this.convert(setName), this.convertArray(elements) ); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetRemoveElements( @@ -637,12 +640,9 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendSetSample(cacheName, this.convert(setName), limit); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetSample( @@ -700,8 +700,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfNotExists' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -717,9 +716,7 @@ export class CacheDataClient implements IDataClient { `'setIfNotExists' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfNotExists( @@ -794,8 +791,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfAbsent' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -830,9 +826,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'setIfAbsent' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfAbsent( @@ -906,8 +900,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfPresent' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -921,9 +914,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'setIfPresent' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfPresent( @@ -998,8 +989,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfEqual' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -1014,9 +1004,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'setIfEqual' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfEqual( @@ -1092,8 +1080,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfNotEqual' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -1108,9 +1095,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'setIfNotEqual' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfNotEqual( @@ -1186,8 +1171,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfPresentAndNotEqual' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -1204,9 +1188,7 @@ export class CacheDataClient implements IDataClient { `'setIfPresentAndNotEqual' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfPresentAndNotEqual( @@ -1283,8 +1265,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'setIfAbsentOrEqual' request; key: ${key.toString()}, field: ${value.toString()}, ttlSeconds: ${ ttl?.toString() ?? 'null' @@ -1301,9 +1282,7 @@ export class CacheDataClient implements IDataClient { `'setIfAbsentOrEqual' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetIfAbsentOrEqual( @@ -1373,13 +1352,10 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace(`Issuing 'delete' request; key: ${key.toString()}`); return await this.sendDelete(cacheName, this.convert(key)); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDelete( @@ -1427,15 +1403,12 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace(`Issuing 'get' request; key: ${key.toString()}`); const result = await this.sendGet(cacheName, this.convert(key), options); this.logger.trace(`'get' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendGet( @@ -1525,8 +1498,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace(`Issuing 'getBatch' request; keys: ${keys.toString()}`); const result = await this.sendGetBatch( cacheName, @@ -1534,9 +1506,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'getBatch' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendGetBatch( @@ -1611,8 +1581,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { const itemsToUse = this.convertSetBatchElements(items); const ttlToUse = ttl || this.defaultTtlSeconds; this.logger.trace( @@ -1621,9 +1590,7 @@ export class CacheDataClient implements IDataClient { }, ttl: ${ttlToUse.toString()}` ); return await this.sendSetBatch(cacheName, itemsToUse, ttlToUse); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSetBatch( @@ -1697,8 +1664,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'listConcatenateBack' request; listName: ${listName}, values length: ${ values.length @@ -1719,9 +1685,7 @@ export class CacheDataClient implements IDataClient { `'listConcatenateBack' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListConcatenateBack( @@ -1781,8 +1745,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'listConcatenateFront' request; listName: ${listName}, values length: ${ values.length @@ -1803,9 +1766,7 @@ export class CacheDataClient implements IDataClient { `'listConcatenateFront' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListConcatenateFront( @@ -1865,8 +1826,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'listFetch' request; listName: %s, startIndex: %s, endIndex: %s", listName, @@ -1881,9 +1841,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace("'listFetch' request result: %s", result.toString()); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListFetch( @@ -1950,8 +1908,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'listRetain' request; listName: %s, startIndex: %s, endIndex: %s, ttl: %s", listName, @@ -1969,9 +1926,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace("'listRetain' request result: %s", result.toString()); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListRetain( @@ -2036,8 +1991,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace(`Issuing 'listLength' request; listName: ${listName}`); const result = await this.sendListLength( cacheName, @@ -2045,9 +1999,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'listLength' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListLength( @@ -2098,8 +2050,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'listPopBack' request"); const result = await this.sendListPopBack( cacheName, @@ -2107,9 +2058,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'listPopBack' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListPopBack( @@ -2160,8 +2109,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'listPopFront' request"); const result = await this.sendListPopFront( cacheName, @@ -2169,9 +2117,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'listPopFront' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListPopFront( @@ -2225,8 +2171,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'listPushBack' request; listName: ${listName}, value length: ${ value.length @@ -2245,9 +2190,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'listPushBack' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListPushBack( @@ -2306,8 +2249,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'listPushFront' request; listName: ${listName}, value length: ${ value.length @@ -2326,9 +2268,7 @@ export class CacheDataClient implements IDataClient { ); this.logger.trace(`'listPushFront' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListPushFront( @@ -2385,8 +2325,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'listRemoveValue' request; listName: ${listName}, value length: ${value.length}` ); @@ -2400,9 +2339,7 @@ export class CacheDataClient implements IDataClient { `'listRemoveValue' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendListRemoveValue( @@ -2452,8 +2389,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryFetch' request; dictionaryName: ${dictionaryName}` ); @@ -2465,9 +2401,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryFetch' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryFetch( @@ -2520,8 +2454,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionarySetField' request; field: ${field.toString()}, value length: ${ value.length @@ -2540,9 +2473,7 @@ export class CacheDataClient implements IDataClient { `'dictionarySetField' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionarySetField( @@ -2602,8 +2533,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionarySetFields' request; elements: ${elements.toString()}, ttl: ${ ttl.ttlSeconds.toString() ?? 'null' @@ -2623,9 +2553,7 @@ export class CacheDataClient implements IDataClient { `'dictionarySetFields' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionarySetFields( @@ -2681,8 +2609,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryGetField' request; field: ${field.toString()}` ); @@ -2695,9 +2622,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryGetField' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryGetField( @@ -2772,8 +2697,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryGetFields' request; fields: ${fields.toString()}` ); @@ -2786,9 +2710,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryGetFields' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryGetFields( @@ -2847,8 +2769,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryRemoveField' request; field: ${field.toString()}` ); @@ -2861,9 +2782,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryRemoveField' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryRemoveField( @@ -2917,8 +2836,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryRemoveFields' request; fields: ${fields.toString()}` ); @@ -2931,9 +2849,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryRemoveFields' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryRemoveFields( @@ -2986,8 +2902,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryLength' request; dictionaryName: ${dictionaryName}` ); @@ -2999,9 +2914,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryLength' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryLength( @@ -3056,8 +2969,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'increment' request; field: ${field.toString()}, amount : ${amount}, ttl: ${ ttl?.toString() ?? 'null' @@ -3068,13 +2980,11 @@ export class CacheDataClient implements IDataClient { cacheName, this.convert(field), amount, - ttl || this.defaultTtlSeconds * 1000 + (ttl || this.defaultTtlSeconds) * 1000 ); this.logger.trace(`'increment' request result: ${result.toString()}`); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendIncrement( @@ -3134,8 +3044,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( `Issuing 'dictionaryIncrement' request; field: ${field.toString()}, amount : ${amount}, ttl: ${ ttl.ttlSeconds.toString() ?? 'null' @@ -3154,9 +3063,7 @@ export class CacheDataClient implements IDataClient { `'dictionaryIncrement' request result: ${result.toString()}` ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDictionaryIncrement( @@ -3220,8 +3127,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetPutElement' request; value: %s, score : %s, ttl: %s", truncateString(value.toString()), @@ -3242,9 +3148,7 @@ export class CacheDataClient implements IDataClient { result.toString() ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetPutElement( @@ -3305,8 +3209,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetPutElements' request; elements : %s, ttl: %s", elements.toString(), @@ -3328,9 +3231,7 @@ export class CacheDataClient implements IDataClient { result.toString() ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetPutElements( @@ -3389,8 +3290,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetFetchByRank' request; startRank: %s, endRank : %s, order: %s", startRank.toString() ?? 'null', @@ -3410,9 +3310,7 @@ export class CacheDataClient implements IDataClient { result.toString() ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetFetchByRank( @@ -3520,8 +3418,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetFetchByScore' request; minScore: %s, maxScore : %s, order: %s, offset: %s, count: %s", minScore?.toString() ?? 'null', @@ -3546,9 +3443,7 @@ export class CacheDataClient implements IDataClient { result.toString() ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetFetchByScore( @@ -3661,8 +3556,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetGetRank' request; value: %s", truncateString(value.toString()) @@ -3679,9 +3573,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetGetRank( @@ -3766,8 +3658,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetGetScores' request; values: %s", truncateString(values.toString()) @@ -3784,9 +3675,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetGetScores( @@ -3846,8 +3735,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetIncrementScore' request; value: %s", truncateString(value.toString()) @@ -3867,9 +3755,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetIncrementScore( @@ -3931,8 +3817,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'sortedSetRemoveElement' request"); const result = await this.sendSortedSetRemoveElement( @@ -3946,9 +3831,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetRemoveElement( @@ -4003,8 +3886,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'sortedSetRemoveElements' request"); const result = await this.sendSortedSetRemoveElements( @@ -4018,9 +3900,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetRemoveElements( @@ -4074,8 +3954,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'sortedSetLength' request"); const result = await this.sendSortedSetLength( @@ -4088,9 +3967,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetLength( @@ -4148,8 +4025,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'sortedSetLengthByScore' request; minScore: %s, maxScore: %s", minScore?.toString() ?? 'null', @@ -4168,9 +4044,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendSortedSetLengthByScore( @@ -4354,12 +4228,9 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendItemGetType(cacheName, this.convert(key)); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendItemGetType( @@ -4398,6 +4269,7 @@ export class CacheDataClient implements IDataClient { ); }); } + public async itemGetTtl( cacheName: string, key: string | Uint8Array @@ -4411,12 +4283,9 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { return await this.sendItemGetTtl(cacheName, this.convert(key)); - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendItemGetTtl( @@ -4465,8 +4334,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'keyExists' request"); const result = await this.sendKeyExists(cacheName, this.convert(key)); @@ -4476,9 +4344,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendKeyExists( @@ -4527,8 +4393,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'updateTtl' request; ttlMilliseconds: %s", ttlMilliseconds?.toString() ?? 'null' @@ -4545,9 +4410,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendUpdateTtl( @@ -4598,8 +4461,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace("Issuing 'keysExist' request"); const result = await this.sendKeysExist( @@ -4612,9 +4474,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendKeysExist( @@ -4663,8 +4523,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'increaseTtl' request; ttlMilliseconds: %s", ttlMilliseconds?.toString() ?? 'null' @@ -4681,9 +4540,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendIncreaseTtl( @@ -4736,8 +4593,7 @@ export class CacheDataClient implements IDataClient { ); } - try { - await this.requestConcurrencySemaphore.acquire(); + return await this.rateLimited(async () => { this.logger.trace( "Issuing 'decreaseTtl' request; ttlMilliseconds: %s", ttlMilliseconds?.toString() ?? 'null' @@ -4754,9 +4610,7 @@ export class CacheDataClient implements IDataClient { truncateString(result.toString()) ); return result; - } finally { - this.requestConcurrencySemaphore.release(); - } + }); } private async sendDecreaseTtl( diff --git a/packages/client-sdk-nodejs/test/unit/cache-client.test.ts b/packages/client-sdk-nodejs/test/unit/cache-client.test.ts index a8f8022e1..51802868a 100644 --- a/packages/client-sdk-nodejs/test/unit/cache-client.test.ts +++ b/packages/client-sdk-nodejs/test/unit/cache-client.test.ts @@ -116,7 +116,7 @@ describe('CacheClient', () => { it('cannot create a client with concurrent requests limit below 1', async () => { try { const negativeLimitConfig = configuration.withTransportStrategy( - configuration.getTransportStrategy().withConcurrentRequestsLimit(-1) + configuration.getTransportStrategy().withMaxConcurrentRequests(-1) ); await CacheClient.create({ configuration: negativeLimitConfig, @@ -132,7 +132,7 @@ describe('CacheClient', () => { try { const zeroLimitConfig = configuration.withTransportStrategy( - configuration.getTransportStrategy().withConcurrentRequestsLimit(0) + configuration.getTransportStrategy().withMaxConcurrentRequests(0) ); await CacheClient.create({ configuration: zeroLimitConfig, diff --git a/packages/client-sdk-web/src/internal/cache-data-client.ts b/packages/client-sdk-web/src/internal/cache-data-client.ts index c4c848ee0..656a3f20a 100644 --- a/packages/client-sdk-web/src/internal/cache-data-client.ts +++ b/packages/client-sdk-web/src/internal/cache-data-client.ts @@ -1208,7 +1208,7 @@ export class CacheDataClient< cacheName, convertToB64String(field), amount, - ttl || this.defaultTtlSeconds * 1000 + (ttl || this.defaultTtlSeconds) * 1000 ); this.logger.trace(`'increment' request result: ${result.toString()}`); return result; diff --git a/packages/common-integration-tests/src/get-set-delete.ts b/packages/common-integration-tests/src/get-set-delete.ts index 2c47f4bea..c6f0fd8f6 100644 --- a/packages/common-integration-tests/src/get-set-delete.ts +++ b/packages/common-integration-tests/src/get-set-delete.ts @@ -544,6 +544,29 @@ export function runGetSetDeleteTests( MomentoErrorCode.INVALID_ARGUMENT_ERROR ); }); + + it('expires after ttl duration', async () => { + const field = v4(); + await cacheClient.set(integrationTestCacheName, field, '10'); + const response = await cacheClient.increment( + integrationTestCacheName, + field, + 10, + {ttl: 1} + ); + expectWithMessage(() => { + expect(response).toBeInstanceOf(CacheIncrement.Success); + }, `expected SUCCESS but got ${response.toString()}`); + + await sleep(3000); + const getResponse = await cacheClient.get( + integrationTestCacheName, + field + ); + expectWithMessage(() => { + expect(getResponse).toBeInstanceOf(CacheGet.Miss); + }, `expected MISS but got ${getResponse.toString()}`); + }); }); describe('#setIfNotExists', () => { diff --git a/packages/core/src/internal/utils/validators.ts b/packages/core/src/internal/utils/validators.ts index 851149c0e..f349dbd40 100644 --- a/packages/core/src/internal/utils/validators.ts +++ b/packages/core/src/internal/utils/validators.ts @@ -220,7 +220,7 @@ export function validateLeaderboardNumberOfElements(numElements: number) { } } -export function validateConcurrentRequestsLimit(limit: number) { +export function validateMaxConcurrentRequests(limit: number) { if (limit < 1) { throw new InvalidArgumentError( 'concurrent requests limit must be strictly positive (> 0)'