From 8f5aa595a49a6c119b2aa5b14027a14a2dbd5b8e Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:14:00 +0000 Subject: [PATCH] SDK regeneration --- .npmignore | 3 +- README.md | 25 +++- package.json | 2 +- reference.md | 71 ++++++++++ src/Client.ts | 6 +- src/api/resources/entities/client/Client.ts | 74 ++++++---- src/api/resources/objects/client/Client.ts | 71 ++++++---- .../client/requests/GetObjectRequest.ts | 8 +- .../client/requests/ListObjectsRequest.ts | 16 +-- src/api/resources/tasks/client/Client.ts | 62 ++++---- src/core/auth/AuthProvider.ts | 5 + src/core/auth/AuthRequest.ts | 9 ++ src/core/auth/index.ts | 2 + src/core/fetcher/Fetcher.ts | 6 +- src/core/fetcher/index.ts | 10 +- src/version.ts | 2 +- tests/mock-server/mockEndpointBuilder.ts | 6 + tests/mock-server/withJson.ts | 12 +- tests/unit/fetcher/Fetcher.test.ts | 2 +- tests/wire/objects.test.ts | 39 +++++ yarn.lock | 133 ++++++++++-------- 21 files changed, 385 insertions(+), 179 deletions(-) create mode 100644 src/core/auth/AuthProvider.ts create mode 100644 src/core/auth/AuthRequest.ts diff --git a/.npmignore b/.npmignore index 6db0876..383dd36 100644 --- a/.npmignore +++ b/.npmignore @@ -6,4 +6,5 @@ tests .fernignore .prettierrc.yml tsconfig.json -yarn.lock \ No newline at end of file +yarn.lock +pnpm-lock.yaml \ No newline at end of file diff --git a/README.md b/README.md index 4bc27ae..e7f3acf 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ ![](https://www.anduril.com/lattice-sdk/) +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fanduril%2Flattice-sdk-javascript) [![npm shield](https://img.shields.io/npm/v/@anduril-industries/lattice-sdk)](https://www.npmjs.com/package/@anduril-industries/lattice-sdk) -The Lattice SDK TypeScript library provides convenient access to the Lattice API from TypeScript. +The Anduril TypeScript library provides convenient access to the Anduril APIs from TypeScript. ## Documentation @@ -548,6 +549,18 @@ const response = await client.entities.longPollEntityEvents(..., { }); ``` +### Additional Query String Parameters + +If you would like to send additional query string parameters as part of the request, use the `queryParams` request option. + +```typescript +const response = await client.entities.longPollEntityEvents(..., { + queryParams: { + 'customQueryParamKey': 'custom query param value' + } +}); +``` + ### Retries The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long @@ -626,3 +639,13 @@ const client = new LatticeClient({ fetcher: // provide your implementation here }); ``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/package.json b/package.json index 73a2b9b..67d76ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@anduril-industries/lattice-sdk", - "version": "2.2.0", + "version": "2.3.0", "private": false, "repository": "github:anduril/lattice-sdk-javascript", "license": "See LICENSE", diff --git a/reference.md b/reference.md index b42843a..081aee7 100644 --- a/reference.md +++ b/reference.md @@ -801,6 +801,77 @@ while (page.hasNextPage()) { +
client.objects.getObject(objectPath, { ...params }) -> core.BinaryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fetches an object from your environment using the objectPath path parameter. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.objects.getObject("objectPath"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**objectPath:** `string` — The path of the object to fetch. + +
+
+ +
+
+ +**request:** `Lattice.GetObjectRequest` + +
+
+ +
+
+ +**requestOptions:** `Objects.RequestOptions` + +
+
+
+
+ +
+
+
+
client.objects.deleteObject(objectPath) -> void
diff --git a/src/Client.ts b/src/Client.ts index 8e96c0c..df2af39 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -26,6 +26,8 @@ export declare namespace LatticeClient { maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } @@ -44,8 +46,8 @@ export class LatticeClient { { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@anduril-industries/lattice-sdk", - "X-Fern-SDK-Version": "2.2.0", - "User-Agent": "@anduril-industries/lattice-sdk/2.2.0", + "X-Fern-SDK-Version": "2.3.0", + "User-Agent": "@anduril-industries/lattice-sdk/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/entities/client/Client.ts b/src/api/resources/entities/client/Client.ts index 060b8ac..198db42 100644 --- a/src/api/resources/entities/client/Client.ts +++ b/src/api/resources/entities/client/Client.ts @@ -25,6 +25,8 @@ export declare namespace Entities { maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } @@ -69,6 +71,11 @@ export class Entities { request: Lattice.Entity, requestOptions?: Entities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -77,12 +84,9 @@ export class Entities { "api/v1/entities", ), method: "PUT", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -147,6 +151,11 @@ export class Entities { entityId: string, requestOptions?: Entities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -155,11 +164,8 @@ export class Entities { `api/v1/entities/${encodeURIComponent(entityId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -240,6 +246,11 @@ export class Entities { request: Lattice.EntityOverride = {}, requestOptions?: Entities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -248,12 +259,9 @@ export class Entities { `api/v1/entities/${encodeURIComponent(entityId)}/override/${encodeURIComponent(fieldPath)}`, ), method: "PUT", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -327,6 +335,11 @@ export class Entities { fieldPath: string, requestOptions?: Entities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -335,11 +348,8 @@ export class Entities { `api/v1/entities/${encodeURIComponent(entityId)}/override/${encodeURIComponent(fieldPath)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -420,6 +430,11 @@ export class Entities { request: Lattice.EntityEventRequest, requestOptions?: Entities.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -428,12 +443,9 @@ export class Entities { "api/v1/entities/events", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -496,6 +508,11 @@ export class Entities { request: Lattice.EntityStreamRequest = {}, requestOptions?: Entities.RequestOptions, ): Promise>> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -504,12 +521,9 @@ export class Entities { "api/v1/entities/stream", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, responseType: "sse", diff --git a/src/api/resources/objects/client/Client.ts b/src/api/resources/objects/client/Client.ts index 74b2bbe..bc0f1e7 100644 --- a/src/api/resources/objects/client/Client.ts +++ b/src/api/resources/objects/client/Client.ts @@ -25,6 +25,8 @@ export declare namespace Objects { maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } @@ -73,6 +75,11 @@ export class Objects { if (allObjectsInMesh != null) { _queryParams["allObjectsInMesh"] = allObjectsInMesh.toString(); } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -81,12 +88,8 @@ export class Objects { "api/v1/objects", ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), - queryParameters: _queryParams, + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -166,6 +169,14 @@ export class Objects { requestOptions?: Objects.RequestOptions, ): Promise> { const { "Accept-Encoding": acceptEncoding } = request; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "Accept-Encoding": acceptEncoding != null ? acceptEncoding : undefined, + }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -174,14 +185,8 @@ export class Objects { `api/v1/objects/${encodeURIComponent(objectPath)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), - "Accept-Encoding": acceptEncoding != null ? acceptEncoding : undefined, - }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, responseType: "binary-response", timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, @@ -254,6 +259,12 @@ export class Objects { requestOptions?: Objects.RequestOptions, ): Promise> { const _binaryUploadRequest = await core.file.toBinaryUploadRequest(uploadable); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + _binaryUploadRequest.headers, + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -262,13 +273,9 @@ export class Objects { `api/v1/objects/${encodeURIComponent(objectPath)}`, ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - _binaryUploadRequest.headers, - requestOptions?.headers, - ), + headers: _headers, contentType: "application/octet-stream", + queryParameters: requestOptions?.queryParams, requestType: "bytes", duplex: "half", body: _binaryUploadRequest.body, @@ -342,6 +349,11 @@ export class Objects { objectPath: string, requestOptions?: Objects.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -350,11 +362,8 @@ export class Objects { `api/v1/objects/${encodeURIComponent(objectPath)}`, ), method: "DELETE", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -425,6 +434,11 @@ export class Objects { objectPath: string, requestOptions?: Objects.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -433,11 +447,8 @@ export class Objects { `api/v1/objects/${encodeURIComponent(objectPath)}`, ), method: "HEAD", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/api/resources/objects/client/requests/GetObjectRequest.ts b/src/api/resources/objects/client/requests/GetObjectRequest.ts index 025dbd6..fde7950 100644 --- a/src/api/resources/objects/client/requests/GetObjectRequest.ts +++ b/src/api/resources/objects/client/requests/GetObjectRequest.ts @@ -4,9 +4,11 @@ import * as Lattice from "../../../../index.js"; +/** + * @example + * {} + */ export interface GetObjectRequest { - /** - * If set, Lattice will compress the response using the specified compression method. If the header is not defined, or the compression method is set to `identity`, no compression will be applied to the response. - */ + /** If set, Lattice will compress the response using the specified compression method. If the header is not defined, or the compression method is set to `identity`, no compression will be applied to the response. */ "Accept-Encoding"?: Lattice.GetObjectRequestAcceptEncoding; } diff --git a/src/api/resources/objects/client/requests/ListObjectsRequest.ts b/src/api/resources/objects/client/requests/ListObjectsRequest.ts index 73d77b9..f6b970f 100644 --- a/src/api/resources/objects/client/requests/ListObjectsRequest.ts +++ b/src/api/resources/objects/client/requests/ListObjectsRequest.ts @@ -7,20 +7,12 @@ * {} */ export interface ListObjectsRequest { - /** - * Filters the objects based on the specified prefix path. If no path is specified, all objects are returned. - */ + /** Filters the objects based on the specified prefix path. If no path is specified, all objects are returned. */ prefix?: string; - /** - * Sets the age for the oldest objects to query across the environment. - */ + /** Sets the age for the oldest objects to query across the environment. */ sinceTimestamp?: string; - /** - * Base64 and URL-encoded cursor returned by the service to continue paging. - */ + /** Base64 and URL-encoded cursor returned by the service to continue paging. */ pageToken?: string; - /** - * Lists objects across all environment nodes in a Lattice Mesh. - */ + /** Lists objects across all environment nodes in a Lattice Mesh. */ allObjectsInMesh?: boolean; } diff --git a/src/api/resources/tasks/client/Client.ts b/src/api/resources/tasks/client/Client.ts index c6080cc..ea34cd9 100644 --- a/src/api/resources/tasks/client/Client.ts +++ b/src/api/resources/tasks/client/Client.ts @@ -25,6 +25,8 @@ export declare namespace Tasks { maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } @@ -64,6 +66,11 @@ export class Tasks { request: Lattice.TaskCreation = {}, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -72,12 +79,9 @@ export class Tasks { "api/v1/tasks", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -139,6 +143,11 @@ export class Tasks { taskId: string, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -147,11 +156,8 @@ export class Tasks { `api/v1/tasks/${encodeURIComponent(taskId)}`, ), method: "GET", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, + queryParameters: requestOptions?.queryParams, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -221,6 +227,11 @@ export class Tasks { request: Lattice.TaskStatusUpdate = {}, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -229,12 +240,9 @@ export class Tasks { `api/v1/tasks/${encodeURIComponent(taskId)}/status`, ), method: "PUT", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -305,6 +313,11 @@ export class Tasks { request: Lattice.TaskQuery = {}, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -313,12 +326,9 @@ export class Tasks { "api/v1/tasks/query", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, @@ -388,6 +398,11 @@ export class Tasks { request: Lattice.AgentListener = {}, requestOptions?: Tasks.RequestOptions, ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + requestOptions?.headers, + ); const _response = await core.fetcher({ url: core.url.join( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -396,12 +411,9 @@ export class Tasks { "api/v1/agent/listen", ), method: "POST", - headers: mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - requestOptions?.headers, - ), + headers: _headers, contentType: "application/json", + queryParameters: requestOptions?.queryParams, requestType: "json", body: request, timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, diff --git a/src/core/auth/AuthProvider.ts b/src/core/auth/AuthProvider.ts new file mode 100644 index 0000000..07e0d6a --- /dev/null +++ b/src/core/auth/AuthProvider.ts @@ -0,0 +1,5 @@ +import { AuthRequest } from "./AuthRequest.js"; + +export interface AuthProvider { + getAuthRequest(): Promise; +} diff --git a/src/core/auth/AuthRequest.ts b/src/core/auth/AuthRequest.ts new file mode 100644 index 0000000..f6218b4 --- /dev/null +++ b/src/core/auth/AuthRequest.ts @@ -0,0 +1,9 @@ +/** + * Request parameters for authentication requests. + */ +export interface AuthRequest { + /** + * The headers to be included in the request. + */ + headers: Record; +} diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts index 59c0fe7..7faab9d 100644 --- a/src/core/auth/index.ts +++ b/src/core/auth/index.ts @@ -1,2 +1,4 @@ +export { AuthProvider } from "./AuthProvider.js"; +export { type AuthRequest } from "./AuthRequest.js"; export { BasicAuth } from "./BasicAuth.js"; export { BearerToken } from "./BearerToken.js"; diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index dd9a40f..9e58ba7 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -1,14 +1,14 @@ import { toJson } from "../json.js"; import { APIResponse } from "./APIResponse.js"; -import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; -import { Supplier } from "./Supplier.js"; import { createRequestUrl } from "./createRequestUrl.js"; import { getErrorResponseBody } from "./getErrorResponseBody.js"; import { getFetchFn } from "./getFetchFn.js"; import { getRequestBody } from "./getRequestBody.js"; import { getResponseBody } from "./getResponseBody.js"; import { makeRequest } from "./makeRequest.js"; +import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; import { requestWithRetries } from "./requestWithRetries.js"; +import { Supplier } from "./Supplier.js"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -18,7 +18,7 @@ export declare namespace Fetcher { method: string; contentType?: string; headers?: Record | undefined>; - queryParameters?: Record; + queryParameters?: Record; body?: unknown; timeoutMs?: number; maxRetries?: number; diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts index 49e1393..a131e34 100644 --- a/src/core/fetcher/index.ts +++ b/src/core/fetcher/index.ts @@ -1,9 +1,9 @@ export type { APIResponse } from "./APIResponse.js"; -export { fetcher } from "./Fetcher.js"; +export type { BinaryResponse } from "./BinaryResponse.js"; export type { Fetcher, FetchFunction } from "./Fetcher.js"; +export { fetcher } from "./Fetcher.js"; export { getHeader } from "./getHeader.js"; -export { Supplier } from "./Supplier.js"; -export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; -export type { RawResponse, WithRawResponse } from "./RawResponse.js"; export { HttpResponsePromise } from "./HttpResponsePromise.js"; -export { BinaryResponse } from "./BinaryResponse.js"; +export type { RawResponse, WithRawResponse } from "./RawResponse.js"; +export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; +export { Supplier } from "./Supplier.js"; diff --git a/src/version.ts b/src/version.ts index 13d9985..af160ad 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.2.0"; +export const SDK_VERSION = "2.3.0"; diff --git a/tests/mock-server/mockEndpointBuilder.ts b/tests/mock-server/mockEndpointBuilder.ts index 76ed83c..0b069b2 100644 --- a/tests/mock-server/mockEndpointBuilder.ts +++ b/tests/mock-server/mockEndpointBuilder.ts @@ -128,6 +128,9 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta } jsonBody(body: unknown): ResponseStage { + if (body === undefined) { + throw new Error("Undefined is not valid JSON. Do not call jsonBody if you want an empty body."); + } this.predicates.push((resolver) => withJson(body, resolver)); return this; } @@ -179,6 +182,9 @@ class ResponseBuilder implements ResponseStatusStage, ResponseHeaderStage, Respo } public jsonBody(body: unknown): BuildStage { + if (body === undefined) { + throw new Error("Undefined is not valid JSON. Do not call jsonBody if you expect an empty body."); + } this.responseBody = toJson(body); return this; } diff --git a/tests/mock-server/withJson.ts b/tests/mock-server/withJson.ts index 44e3eb8..03f585d 100644 --- a/tests/mock-server/withJson.ts +++ b/tests/mock-server/withJson.ts @@ -12,17 +12,23 @@ export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): const { request } = args; let clonedRequest: Request; + let bodyText: string | undefined; let actualBody: unknown; try { clonedRequest = request.clone(); - actualBody = fromJson(await clonedRequest.text()); + bodyText = await clonedRequest.text(); + if (bodyText === "") { + console.error("Request body is empty, expected a JSON object."); + return passthrough(); + } + actualBody = fromJson(bodyText); } catch (error) { - console.error("Error processing request body:", error); + console.error(`Error processing request body:\n\tError: ${error}\n\tBody: ${bodyText}`); return passthrough(); } const mismatches = findMismatches(actualBody, expectedBody); - if (Object.keys(mismatches).length > 0) { + if (Object.keys(mismatches).filter((key) => !key.startsWith("pagination.")).length > 0) { console.error("JSON body mismatch:", toJson(mismatches, undefined, 2)); return passthrough(); } diff --git a/tests/unit/fetcher/Fetcher.test.ts b/tests/unit/fetcher/Fetcher.test.ts index a9bd945..f983f08 100644 --- a/tests/unit/fetcher/Fetcher.test.ts +++ b/tests/unit/fetcher/Fetcher.test.ts @@ -3,7 +3,7 @@ import stream from "stream"; import { join } from "path"; import { Fetcher, fetcherImpl } from "../../../src/core/fetcher/Fetcher"; -import { BinaryResponse } from "../../../src/core"; +import type { BinaryResponse } from "../../../src/core"; describe("Test fetcherImpl", () => { it("should handle successful request", async () => { diff --git a/tests/wire/objects.test.ts b/tests/wire/objects.test.ts index bd24205..1eb7daf 100644 --- a/tests/wire/objects.test.ts +++ b/tests/wire/objects.test.ts @@ -6,6 +6,45 @@ import { mockServerPool } from "../mock-server/MockServerPool"; import { LatticeClient } from "../../src/Client"; describe("Objects", () => { + test("listObjects", async () => { + const server = mockServerPool.createServer(); + const client = new LatticeClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + path_metadatas: [ + { + content_identifier: { path: "path", checksum: "checksum" }, + size_bytes: 1000000, + last_updated_at: "2024-01-15T09:30:00Z", + expiry_time: "2024-01-15T09:30:00Z", + }, + ], + next_page_token: "next_page_token", + }; + server.mockEndpoint().get("/api/v1/objects").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const expected = { + path_metadatas: [ + { + content_identifier: { + path: "path", + checksum: "checksum", + }, + size_bytes: 1000000, + last_updated_at: "2024-01-15T09:30:00Z", + expiry_time: "2024-01-15T09:30:00Z", + }, + ], + next_page_token: "next_page_token", + }; + const page = await client.objects.listObjects(); + expect(expected.path_metadatas).toEqual(page.data); + + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.path_metadatas).toEqual(nextPage.data); + }); + test("deleteObject", async () => { const server = mockServerPool.createServer(); const client = new LatticeClient({ token: "test", environment: server.baseUrl }); diff --git a/yarn.lock b/yarn.lock index 9016e56..b112282 100644 --- a/yarn.lock +++ b/yarn.lock @@ -292,26 +292,18 @@ dependencies: statuses "^2.0.1" -"@bundled-es-modules/tough-cookie@^0.1.6": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@bundled-es-modules/tough-cookie/-/tough-cookie-0.1.6.tgz#fa9cd3cedfeecd6783e8b0d378b4a99e52bde5d3" - integrity sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw== - dependencies: - "@types/tough-cookie" "^4.0.5" - tough-cookie "^4.1.4" - "@inquirer/confirm@^5.0.0": - version "5.1.15" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.15.tgz#c502d5c642fdba0669b17442b40794c97bdbccb4" - integrity sha512-SwHMGa8Z47LawQN0rog0sT+6JpiL0B7eW9p1Bb7iCeKDGTI5Ez25TSc2l8kw52VV7hA4sX/C78CGkMrKXfuspA== + version "5.1.16" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.16.tgz#4f99603e5c8a1b471b819343f708c75e8abd2b88" + integrity sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag== dependencies: - "@inquirer/core" "^10.1.15" + "@inquirer/core" "^10.2.0" "@inquirer/type" "^3.0.8" -"@inquirer/core@^10.1.15": - version "10.1.15" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.15.tgz#8feb69fd536786181a2b6bfb84d8674faa9d2e59" - integrity sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA== +"@inquirer/core@^10.2.0": + version "10.2.0" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.2.0.tgz#19ff527dbe0956891d825e320ecbc890bd6a1550" + integrity sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA== dependencies: "@inquirer/figures" "^1.0.13" "@inquirer/type" "^3.0.8" @@ -736,16 +728,16 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "24.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec" - integrity sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow== + version "24.3.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.1.tgz#b0a3fb2afed0ef98e8d7f06d46ef6349047709f3" + integrity sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g== dependencies: undici-types "~7.10.0" "@types/node@^18.19.70": - version "18.19.123" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.123.tgz#08a3e4f5e0c73b8840c677b7635ce59d5dc1f76d" - integrity sha512-K7DIaHnh0mzVxreCR9qwgNxp3MH9dltPNIEddW9MYUlcKAzm+3grKNSTe2vCJHI1FaLpvpL5JGJrz1UZDKYvDg== + version "18.19.124" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.124.tgz#6f49e4fab8274910691a900e8a14316cbf3c7a31" + integrity sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ== dependencies: undici-types "~5.26.4" @@ -759,7 +751,7 @@ resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa" integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA== -"@types/tough-cookie@*", "@types/tough-cookie@^4.0.5": +"@types/tough-cookie@*": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== @@ -932,7 +924,7 @@ acorn-walk@^8.0.2: dependencies: acorn "^8.11.0" -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.14.0, acorn@^8.15.0, acorn@^8.8.1: +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.8.1: version "8.15.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== @@ -1096,12 +1088,12 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.25.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.2.tgz#90c1507143742d743544ae6e92bca3348adff667" - integrity sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA== + version "4.25.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.4.tgz#ebdd0e1d1cf3911834bab3a6cd7b917d9babf5af" + integrity sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg== dependencies: - caniuse-lite "^1.0.30001733" - electron-to-chromium "^1.5.199" + caniuse-lite "^1.0.30001737" + electron-to-chromium "^1.5.211" node-releases "^2.0.19" update-browserslist-db "^1.1.3" @@ -1147,10 +1139,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001733: - version "1.0.30001735" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz#ba658fd3fd24a4106fd68d5ce472a2c251494dbe" - integrity sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w== +caniuse-lite@^1.0.30001737: + version "1.0.30001739" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001739.tgz#b34ce2d56bfc22f4352b2af0144102d623a124f4" + integrity sha512-y+j60d6ulelrNSwpPyrHdl+9mJnQzHBr08xm48Qno0nSk4h3Qojh+ziv2qE6rXf4k3tadF4o1J/1tAbVm1NtnA== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1304,9 +1296,9 @@ decimal.js@^10.4.2: integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== dedent@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.6.0.tgz#79d52d6389b1ffa67d2bcef59ba51847a9d503b2" - integrity sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA== + version "1.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" + integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== deepmerge@^4.2.2: version "4.3.1" @@ -1344,10 +1336,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.199: - version "1.5.203" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.203.tgz#ef7fc2f7e1b816fa4535c861d1ec1348204142b6" - integrity sha512-uz4i0vLhfm6dLZWbz/iH88KNDV+ivj5+2SA+utpgjKaj9Q0iDLuwk6Idhe9BTxciHudyx6IvTvijhkPvFGUQ0g== +electron-to-chromium@^1.5.211: + version "1.5.214" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.214.tgz#f7bbdc0796124292d4b8a34a49e968c5e6430763" + integrity sha512-TpvUNdha+X3ybfU78NoQatKvQEm1oq3lf2QbnmCEdw+Bd9RuIAY+hJTvq1avzHM0f7EJfnH3vbCnbzKzisc/9Q== emittery@^0.13.1: version "0.13.1" @@ -1514,9 +1506,9 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.0.6" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.6.tgz#88f130b77cfaea2378d56bf970dea21257a68748" - integrity sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== fb-watchman@^2.0.0: version "2.0.2" @@ -2407,13 +2399,12 @@ ms@^2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msw@^2.8.4: - version "2.10.5" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.10.5.tgz#3e43f12e97581c260bf38d8817732b9fec3bfdb0" - integrity sha512-0EsQCrCI1HbhpBWd89DvmxY6plmvrM96b0sCIztnvcNHQbXn5vqwm1KlXslo6u4wN9LFGLC1WFjjgljcQhe40A== + version "2.11.1" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.1.tgz#77f7c5c60ffd08e4bc351cca4608418db15e5ac2" + integrity sha512-dGSRx0AJmQVQfpGXTsAAq4JFdwdhOBdJ6sJS/jnN0ac3s0NZB6daacHF1z5Pefx+IejmvuiLWw260RlyQOf3sQ== dependencies: "@bundled-es-modules/cookie" "^2.0.1" "@bundled-es-modules/statuses" "^1.0.1" - "@bundled-es-modules/tough-cookie" "^0.1.6" "@inquirer/confirm" "^5.0.0" "@mswjs/interceptors" "^0.39.1" "@open-draft/deferred-promise" "^2.2.0" @@ -2427,6 +2418,7 @@ msw@^2.8.4: path-to-regexp "^6.3.0" picocolors "^1.1.1" strict-event-emitter "^0.5.1" + tough-cookie "^6.0.0" type-fest "^4.26.1" yargs "^17.7.2" @@ -2866,9 +2858,9 @@ symbol-tree@^3.2.4: integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== tapable@^2.1.1, tapable@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.2.tgz#ab4984340d30cb9989a490032f086dbb8b56d872" - integrity sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg== + version "2.2.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.3.tgz#4b67b635b2d97578a06a2713d2f04800c237e99b" + integrity sha512-ZL6DDuAlRlLGghwcfmSn9sK3Hr6ArtyudlSAiCqQ6IfE+b+HHbydbYDIG15IfS5do+7XQQBdBiubF/cV2dnDzg== terser-webpack-plugin@^5.3.11: version "5.3.14" @@ -2882,12 +2874,12 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.43.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.43.1.tgz#88387f4f9794ff1a29e7ad61fb2932e25b4fdb6d" - integrity sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg== + version "5.44.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.0.tgz#ebefb8e5b8579d93111bfdfc39d2cf63879f4a82" + integrity sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w== dependencies: "@jridgewell/source-map" "^0.3.3" - acorn "^8.14.0" + acorn "^8.15.0" commander "^2.20.0" source-map-support "~0.5.20" @@ -2900,6 +2892,18 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +tldts-core@^7.0.12: + version "7.0.12" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.12.tgz#b471e773dc23ff881a9d187ec145e36edde57c27" + integrity sha512-3K76aXywJFduGRsOYoY5JzINLs/WMlOkeDwPL+8OCPq2Rh39gkSDtWAxdJQlWjpun/xF/LHf29yqCi6VC/rHDA== + +tldts@^7.0.5: + version "7.0.12" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.12.tgz#e11008e9a3f27448e7aecb8d0fa51f929ec9549d" + integrity sha512-M9ZQBPp6FyqhMcl233vHYyYRkxXOA1SKGlnq13S0mJdUhRSwr2w6I8rlchPL73wBwRlyIZpFvpu2VcdSMWLYXw== + dependencies: + tldts-core "^7.0.12" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -2912,7 +2916,7 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -tough-cookie@^4.1.2, tough-cookie@^4.1.4: +tough-cookie@^4.1.2: version "4.1.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== @@ -2922,6 +2926,13 @@ tough-cookie@^4.1.2, tough-cookie@^4.1.4: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5" + integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w== + dependencies: + tldts "^7.0.5" + tr46@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" @@ -2945,9 +2956,9 @@ ts-jest@^29.3.4: yargs-parser "^21.1.1" ts-loader@^9.5.1: - version "9.5.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.2.tgz#1f3d7f4bb709b487aaa260e8f19b301635d08020" - integrity sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw== + version "9.5.4" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.4.tgz#44b571165c10fb5a90744aa5b7e119233c4f4585" + integrity sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -3195,6 +3206,6 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yoctocolors-cjs@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz#f4b905a840a37506813a7acaa28febe97767a242" - integrity sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa" + integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==