Socket
Socket
Sign inDemoInstall

@applitools/nml-client

Package Overview
Dependencies
Maintainers
33
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/nml-client - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

4

dist/broker.js

@@ -10,2 +10,3 @@ "use strict";

headers: { 'Content-Type': 'application/json' },
proxy: options.proxy,
hooks: {

@@ -27,6 +28,7 @@ afterResponse: async (response) => {

exports.publishMessageRequest = publishMessageRequest;
async function broker(url, request) {
async function broker(url, request, options) {
const response = await publishMessageRequest({
url,
payload: request,
...options,
});

@@ -33,0 +35,0 @@ const { payload } = await response.json();

@@ -30,2 +30,4 @@ "use strict";

async function takeScreenshot(url, options) {
if (options && options.logger)
options.logger.log('[nml-client]: takeScreenshot called with', url, options);
const request = {

@@ -35,5 +37,5 @@ protocolVersion: '1.0',

key: utils.general.guid(),
payload: options,
payload: options && options.settings,
};
const { screenshotURL } = await (0, broker_1.broker)(url, request);
const { screenshotURL } = await (0, broker_1.broker)(url, request, { proxy: options && options.proxy });
return screenshotURL;

@@ -43,2 +45,4 @@ }

async function takeSnapshot(url, options) {
if (options && options.logger)
options.logger.log('[nml-client]: takeSnapshot called with', url, options);
const request = {

@@ -48,7 +52,7 @@ protocolVersion: '1.0',

key: utils.general.guid(),
payload: options,
payload: options && options.settings,
};
const result = await (0, broker_1.broker)(url, request);
const result = await (0, broker_1.broker)(url, request, { proxy: options && options.proxy });
return result;
}
exports.takeSnapshot = takeSnapshot;
{
"name": "@applitools/nml-client",
"version": "1.0.4",
"version": "1.1.0",
"description": "Client to integrate the SDKs to the Native Mobile Library (NML)",

@@ -56,2 +56,3 @@ "homepage": "https://applitools.com",

"@applitools/spec-driver-selenium": "^1.3.17",
"@applitools/test-server": "^1.1.4",
"@applitools/test-utils": "^1.5.1",

@@ -58,0 +59,0 @@ "@types/mocha": "^9.1.1",

export declare function publishMessageRequest(options: {
url: string;
payload: any;
proxy?: any;
}): Promise<any>;

@@ -33,3 +34,3 @@ declare type CommonSelector = {

}
export declare function broker(url: string, request: BrokerRequest): Promise<any>;
export declare function broker(url: string, request: BrokerRequest, options?: any): Promise<any>;
export {};
import { ScreenshotSettings, SnapshotSettings } from './broker';
export declare function takeScreenshot(url: any, options?: ScreenshotSettings): Promise<string>;
export declare function takeSnapshot(url: string, options?: SnapshotSettings): Promise<any>;
export declare function takeScreenshot(url: any, options?: {
settings?: ScreenshotSettings;
proxy?: any;
logger?: any;
}): Promise<string>;
export declare function takeSnapshot(url: string, options?: {
settings?: SnapshotSettings;
proxy?: any;
logger?: any;
}): Promise<any>;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc