lexmount 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -161,6 +161,14 @@ interface SessionCreateOptions {
|
|
|
161
161
|
* Browser mode to start.
|
|
162
162
|
*/
|
|
163
163
|
browserMode?: BrowserMode;
|
|
164
|
+
/**
|
|
165
|
+
* Optional custom browser image identifier to use for this session.
|
|
166
|
+
*/
|
|
167
|
+
customImageId?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Optional ACE browser window size. Format: "width,height", for example "1920,1080".
|
|
170
|
+
*/
|
|
171
|
+
windowSize?: string;
|
|
164
172
|
/**
|
|
165
173
|
* Optional persistent context configuration.
|
|
166
174
|
*/
|
|
@@ -701,6 +709,7 @@ declare class SessionsResource {
|
|
|
701
709
|
*/
|
|
702
710
|
_getWebSocketDebuggerUrl(sessionId: string): Promise<string | null>;
|
|
703
711
|
private normalizeProxy;
|
|
712
|
+
private normalizeWindowSize;
|
|
704
713
|
private handleAsyncCreateFailed;
|
|
705
714
|
private handleCreateError;
|
|
706
715
|
private handleGetError;
|
|
@@ -838,6 +847,6 @@ declare class TimeoutError extends LexmountError {
|
|
|
838
847
|
/**
|
|
839
848
|
* Lexmount Node.js SDK.
|
|
840
849
|
*/
|
|
841
|
-
declare const VERSION = "0.5.
|
|
850
|
+
declare const VERSION = "0.5.8";
|
|
842
851
|
|
|
843
852
|
export { APIError, AuthenticationError, type BrowserMode, CDPClient, type CDPEventMessage, type CatalogInfo, type ContextAccessMode, type ContextCreateOptions, ContextInfo, type ContextListOptions, ContextListResponse, ContextLockedError, type ContextMetadata, ContextNotFoundError, type ContextStatus, ContextsResource, ExtensionInfo, type ExtensionInfoShape, type ExtensionListOptions, type ExtensionUploadOptions, ExtensionsResource, type ForceReleaseResponse, type IntegratedAuthCallback, type IntegratedAuthCallbackResult, Lexmount, type LexmountConfig, LexmountError, LexmountLogger, type LogLevel, NetworkError, PaginationInfo, type PaginationInfoShape, type RegionCatalogEntry, type RegionInfo, type SessionContext, type SessionCreateOptions, type SessionCreateResponse, type SessionDeleteOptions, SessionDownloadInfo, type SessionDownloadInfoShape, SessionDownloadsDeleteResponse, type SessionDownloadsDeleteResponseShape, SessionDownloadsListResponse, type SessionDownloadsListResponseShape, SessionDownloadsResource, SessionInfo, type SessionListOptions, SessionListResponse, SessionNotFoundError, type SessionProxyConfig, type SessionStatus, SessionTargetInfo, type SessionTargetInfoShape, SessionsResource, TimeoutError, VERSION, ValidationError, connectOverCDP, Lexmount as default, deregisterIntegratedAuthCallback, disableLogging, enableLogging, getLogger, registerIntegratedAuthCallback, setLogLevel };
|
package/dist/index.d.ts
CHANGED
|
@@ -161,6 +161,14 @@ interface SessionCreateOptions {
|
|
|
161
161
|
* Browser mode to start.
|
|
162
162
|
*/
|
|
163
163
|
browserMode?: BrowserMode;
|
|
164
|
+
/**
|
|
165
|
+
* Optional custom browser image identifier to use for this session.
|
|
166
|
+
*/
|
|
167
|
+
customImageId?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Optional ACE browser window size. Format: "width,height", for example "1920,1080".
|
|
170
|
+
*/
|
|
171
|
+
windowSize?: string;
|
|
164
172
|
/**
|
|
165
173
|
* Optional persistent context configuration.
|
|
166
174
|
*/
|
|
@@ -701,6 +709,7 @@ declare class SessionsResource {
|
|
|
701
709
|
*/
|
|
702
710
|
_getWebSocketDebuggerUrl(sessionId: string): Promise<string | null>;
|
|
703
711
|
private normalizeProxy;
|
|
712
|
+
private normalizeWindowSize;
|
|
704
713
|
private handleAsyncCreateFailed;
|
|
705
714
|
private handleCreateError;
|
|
706
715
|
private handleGetError;
|
|
@@ -838,6 +847,6 @@ declare class TimeoutError extends LexmountError {
|
|
|
838
847
|
/**
|
|
839
848
|
* Lexmount Node.js SDK.
|
|
840
849
|
*/
|
|
841
|
-
declare const VERSION = "0.5.
|
|
850
|
+
declare const VERSION = "0.5.8";
|
|
842
851
|
|
|
843
852
|
export { APIError, AuthenticationError, type BrowserMode, CDPClient, type CDPEventMessage, type CatalogInfo, type ContextAccessMode, type ContextCreateOptions, ContextInfo, type ContextListOptions, ContextListResponse, ContextLockedError, type ContextMetadata, ContextNotFoundError, type ContextStatus, ContextsResource, ExtensionInfo, type ExtensionInfoShape, type ExtensionListOptions, type ExtensionUploadOptions, ExtensionsResource, type ForceReleaseResponse, type IntegratedAuthCallback, type IntegratedAuthCallbackResult, Lexmount, type LexmountConfig, LexmountError, LexmountLogger, type LogLevel, NetworkError, PaginationInfo, type PaginationInfoShape, type RegionCatalogEntry, type RegionInfo, type SessionContext, type SessionCreateOptions, type SessionCreateResponse, type SessionDeleteOptions, SessionDownloadInfo, type SessionDownloadInfoShape, SessionDownloadsDeleteResponse, type SessionDownloadsDeleteResponseShape, SessionDownloadsListResponse, type SessionDownloadsListResponseShape, SessionDownloadsResource, SessionInfo, type SessionListOptions, SessionListResponse, SessionNotFoundError, type SessionProxyConfig, type SessionStatus, SessionTargetInfo, type SessionTargetInfoShape, SessionsResource, TimeoutError, VERSION, ValidationError, connectOverCDP, Lexmount as default, deregisterIntegratedAuthCallback, disableLogging, enableLogging, getLogger, registerIntegratedAuthCallback, setLogLevel };
|
package/dist/index.js
CHANGED
|
@@ -570,6 +570,13 @@ var SessionsResource = class {
|
|
|
570
570
|
project_id: options.projectId ?? this.client.projectId,
|
|
571
571
|
browser_mode: options.browserMode ?? "normal"
|
|
572
572
|
};
|
|
573
|
+
if (options.customImageId) {
|
|
574
|
+
payload.custom_image_id = options.customImageId;
|
|
575
|
+
}
|
|
576
|
+
const windowSize = this.normalizeWindowSize(options.windowSize);
|
|
577
|
+
if (windowSize) {
|
|
578
|
+
payload.window_size = windowSize;
|
|
579
|
+
}
|
|
573
580
|
if (options.context) {
|
|
574
581
|
const contextPayload = {
|
|
575
582
|
id: options.context.id,
|
|
@@ -797,6 +804,20 @@ var SessionsResource = class {
|
|
|
797
804
|
}
|
|
798
805
|
return normalizedProxy;
|
|
799
806
|
}
|
|
807
|
+
normalizeWindowSize(windowSize) {
|
|
808
|
+
if (!windowSize) {
|
|
809
|
+
return void 0;
|
|
810
|
+
}
|
|
811
|
+
const normalized = windowSize.trim();
|
|
812
|
+
if (!normalized) {
|
|
813
|
+
return void 0;
|
|
814
|
+
}
|
|
815
|
+
const match = normalized.match(/^(\d+),(\d+)$/);
|
|
816
|
+
if (!match || Number(match[1]) <= 0 || Number(match[2]) <= 0) {
|
|
817
|
+
throw new ValidationError("windowSize must use width,height format, for example 1920,1080");
|
|
818
|
+
}
|
|
819
|
+
return normalized;
|
|
820
|
+
}
|
|
800
821
|
handleAsyncCreateFailed(payload) {
|
|
801
822
|
const context = asRecord(payload.context);
|
|
802
823
|
const contextId = getString(context.id);
|
|
@@ -1735,7 +1756,7 @@ var Lexmount = class {
|
|
|
1735
1756
|
};
|
|
1736
1757
|
|
|
1737
1758
|
// src/index.ts
|
|
1738
|
-
var VERSION = "0.5.
|
|
1759
|
+
var VERSION = "0.5.8";
|
|
1739
1760
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1740
1761
|
0 && (module.exports = {
|
|
1741
1762
|
APIError,
|