lexmount 0.5.7 → 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 +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -165,6 +165,10 @@ interface SessionCreateOptions {
|
|
|
165
165
|
* Optional custom browser image identifier to use for this session.
|
|
166
166
|
*/
|
|
167
167
|
customImageId?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Optional ACE browser window size. Format: "width,height", for example "1920,1080".
|
|
170
|
+
*/
|
|
171
|
+
windowSize?: string;
|
|
168
172
|
/**
|
|
169
173
|
* Optional persistent context configuration.
|
|
170
174
|
*/
|
|
@@ -705,6 +709,7 @@ declare class SessionsResource {
|
|
|
705
709
|
*/
|
|
706
710
|
_getWebSocketDebuggerUrl(sessionId: string): Promise<string | null>;
|
|
707
711
|
private normalizeProxy;
|
|
712
|
+
private normalizeWindowSize;
|
|
708
713
|
private handleAsyncCreateFailed;
|
|
709
714
|
private handleCreateError;
|
|
710
715
|
private handleGetError;
|
|
@@ -842,6 +847,6 @@ declare class TimeoutError extends LexmountError {
|
|
|
842
847
|
/**
|
|
843
848
|
* Lexmount Node.js SDK.
|
|
844
849
|
*/
|
|
845
|
-
declare const VERSION = "0.5.
|
|
850
|
+
declare const VERSION = "0.5.8";
|
|
846
851
|
|
|
847
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
|
@@ -165,6 +165,10 @@ interface SessionCreateOptions {
|
|
|
165
165
|
* Optional custom browser image identifier to use for this session.
|
|
166
166
|
*/
|
|
167
167
|
customImageId?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Optional ACE browser window size. Format: "width,height", for example "1920,1080".
|
|
170
|
+
*/
|
|
171
|
+
windowSize?: string;
|
|
168
172
|
/**
|
|
169
173
|
* Optional persistent context configuration.
|
|
170
174
|
*/
|
|
@@ -705,6 +709,7 @@ declare class SessionsResource {
|
|
|
705
709
|
*/
|
|
706
710
|
_getWebSocketDebuggerUrl(sessionId: string): Promise<string | null>;
|
|
707
711
|
private normalizeProxy;
|
|
712
|
+
private normalizeWindowSize;
|
|
708
713
|
private handleAsyncCreateFailed;
|
|
709
714
|
private handleCreateError;
|
|
710
715
|
private handleGetError;
|
|
@@ -842,6 +847,6 @@ declare class TimeoutError extends LexmountError {
|
|
|
842
847
|
/**
|
|
843
848
|
* Lexmount Node.js SDK.
|
|
844
849
|
*/
|
|
845
|
-
declare const VERSION = "0.5.
|
|
850
|
+
declare const VERSION = "0.5.8";
|
|
846
851
|
|
|
847
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
|
@@ -573,6 +573,10 @@ var SessionsResource = class {
|
|
|
573
573
|
if (options.customImageId) {
|
|
574
574
|
payload.custom_image_id = options.customImageId;
|
|
575
575
|
}
|
|
576
|
+
const windowSize = this.normalizeWindowSize(options.windowSize);
|
|
577
|
+
if (windowSize) {
|
|
578
|
+
payload.window_size = windowSize;
|
|
579
|
+
}
|
|
576
580
|
if (options.context) {
|
|
577
581
|
const contextPayload = {
|
|
578
582
|
id: options.context.id,
|
|
@@ -800,6 +804,20 @@ var SessionsResource = class {
|
|
|
800
804
|
}
|
|
801
805
|
return normalizedProxy;
|
|
802
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
|
+
}
|
|
803
821
|
handleAsyncCreateFailed(payload) {
|
|
804
822
|
const context = asRecord(payload.context);
|
|
805
823
|
const contextId = getString(context.id);
|
|
@@ -1738,7 +1756,7 @@ var Lexmount = class {
|
|
|
1738
1756
|
};
|
|
1739
1757
|
|
|
1740
1758
|
// src/index.ts
|
|
1741
|
-
var VERSION = "0.5.
|
|
1759
|
+
var VERSION = "0.5.8";
|
|
1742
1760
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1743
1761
|
0 && (module.exports = {
|
|
1744
1762
|
APIError,
|