Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appium/types

Package Overview
Dependencies
Maintainers
7
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appium/types - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

build/lib/command.d.ts

5

build/lib/action.d.ts
/**
* @module
* Portions Copyright (c) 2017 Igor Muchychka
* @see https://github.com/w3c-webdriver/w3c-webdriver
* @module
*/
/**
* A W3C or JSONWP element.
*/
export interface Element<Id extends string = string> {

@@ -7,0 +10,0 @@ ELEMENT?: Id;

2

build/lib/action.js
"use strict";
/**
* @module
* Portions Copyright (c) 2017 Igor Muchychka
* @see https://github.com/w3c-webdriver/w3c-webdriver
* @module
*/

@@ -7,0 +7,0 @@ Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,7 +7,6 @@ /// <reference types="node" />

import type { Logger } from 'npmlog';
import type { Class as _Class, ConditionalPick, MultidimensionalReadonlyArray } from 'type-fest';
import type { Class as _Class } from 'type-fest';
import type { Server as WSServer } from 'ws';
import { ServerArgs } from './config';
import { Driver } from './driver';
import { Plugin, PluginCommand } from './plugin';
export * from './command';
export * from './action';

@@ -78,56 +77,5 @@ export * from './appium-config';

/**
* The definition of an extension method, which will be provided via Appium's API.
*
*/
export interface MethodDef<Ext extends Plugin | Driver> {
/**
* Name of the command.
*/
readonly command?: keyof ConditionalPick<Required<Ext>, Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never>;
/**
* If true, this `Method` will never proxy.
*/
readonly neverProxy?: boolean;
/**
* Specifies shape of payload
*/
readonly payloadParams?: PayloadParams;
}
export interface ExecuteMethodDef<Ext extends Driver | Plugin> {
command: keyof ConditionalPick<Required<Ext>, Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never>;
params?: {
required?: ReadonlyArray<string>;
optional?: ReadonlyArray<string>;
};
}
export type ExecuteMethodMap<Ext extends Driver | Plugin> = Readonly<Record<string, Readonly<ExecuteMethodDef<Ext>>>>;
/**
* An instance method of a driver class, whose name may be referenced by {@linkcode MethodDef.command}, and serves as an Appium command.
*
* Note that this signature differs from a `PluginCommand`.
*/
export type DriverCommand<TArgs = any, TRetval = unknown> = (...args: TArgs[]) => Promise<TRetval>;
/**
* Defines the shape of a payload for a {@linkcode MethodDef}.
*/
export interface PayloadParams {
wrap?: string;
unwrap?: string;
required?: ReadonlyArray<string> | MultidimensionalReadonlyArray<string, 2>;
optional?: ReadonlyArray<string> | MultidimensionalReadonlyArray<string, 2>;
validate?: (obj: any, protocol: string) => boolean | string | undefined;
makeArgs?: (obj: any) => any;
}
/**
* A mapping of URL paths to HTTP methods to {@linkcode MethodDef}s.
*/
export type MethodMap<Ext extends Plugin | Driver> = Readonly<Record<string, {
GET?: MethodDef<Ext>;
POST?: MethodDef<Ext>;
DELETE?: MethodDef<Ext>;
}>>;
/**
* Wraps {@linkcode _Class `type-fest`'s `Class`} to include static members.
*/
export type Class<Proto, StaticMembers extends object = {}, Args extends unknown[] = any[]> = _Class<Proto, Args> & StaticMembers;
export type Class<Proto, StaticMembers extends object = object, Args extends unknown[] = any[]> = _Class<Proto, Args> & StaticMembers;
/**

@@ -134,0 +82,0 @@ * The string referring to a "driver"-type extension

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

exports.BASE_DESIRED_CAP_CONSTRAINTS = void 0;
__exportStar(require("./command"), exports);
__exportStar(require("./action"), exports);

@@ -20,0 +21,0 @@ __exportStar(require("./appium-config"), exports);

@@ -1,2 +0,3 @@

import { AppiumLogger, Class, ExecuteMethodMap, MethodMap, UpdateServerCallback } from '.';
import { AppiumLogger, Class, UpdateServerCallback } from '.';
import { ExecuteMethodMap, MethodMap } from './command';
import { ExternalDriver } from './driver';

@@ -3,0 +4,0 @@ /**

/**
* @module
* Portions Copyright (c) 2017 Igor Muchychka
* @see https://github.com/w3c-webdriver/w3c-webdriver
* @module
*/
/**
* A W3C or JSONWP element.
*/
export interface Element<Id extends string = string> {

@@ -8,0 +11,0 @@ ELEMENT?: Id;

@@ -5,8 +5,6 @@ import type {Express} from 'express';

import type {Logger} from 'npmlog';
import type {Class as _Class, ConditionalPick, MultidimensionalReadonlyArray} from 'type-fest';
import type {Class as _Class} from 'type-fest';
import type {Server as WSServer} from 'ws';
import {ServerArgs} from './config';
import {Driver} from './driver';
import {Plugin, PluginCommand} from './plugin';
export * from './command';
export * from './action';

@@ -85,70 +83,2 @@ export * from './appium-config';

/**
* The definition of an extension method, which will be provided via Appium's API.
*
*/
export interface MethodDef<Ext extends Plugin | Driver> {
/**
* Name of the command.
*/
readonly command?: keyof ConditionalPick<
Required<Ext>,
Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never
>;
/**
* If true, this `Method` will never proxy.
*/
readonly neverProxy?: boolean;
/**
* Specifies shape of payload
*/
readonly payloadParams?: PayloadParams;
}
export interface ExecuteMethodDef<Ext extends Driver | Plugin> {
command: keyof ConditionalPick<
Required<Ext>,
Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never
>;
params?: {
required?: ReadonlyArray<string>;
optional?: ReadonlyArray<string>;
};
}
export type ExecuteMethodMap<Ext extends Driver | Plugin> = Readonly<
Record<string, Readonly<ExecuteMethodDef<Ext>>>
>;
/**
* An instance method of a driver class, whose name may be referenced by {@linkcode MethodDef.command}, and serves as an Appium command.
*
* Note that this signature differs from a `PluginCommand`.
*/
export type DriverCommand<TArgs = any, TRetval = unknown> = (...args: TArgs[]) => Promise<TRetval>;
/**
* Defines the shape of a payload for a {@linkcode MethodDef}.
*/
export interface PayloadParams {
wrap?: string;
unwrap?: string;
required?: ReadonlyArray<string> | MultidimensionalReadonlyArray<string, 2>;
optional?: ReadonlyArray<string> | MultidimensionalReadonlyArray<string, 2>;
validate?: (obj: any, protocol: string) => boolean | string | undefined;
makeArgs?: (obj: any) => any;
}
/**
* A mapping of URL paths to HTTP methods to {@linkcode MethodDef}s.
*/
export type MethodMap<Ext extends Plugin | Driver> = Readonly<
Record<
string,
{
GET?: MethodDef<Ext>;
POST?: MethodDef<Ext>;
DELETE?: MethodDef<Ext>;
}
>
>;
/**
* Wraps {@linkcode _Class `type-fest`'s `Class`} to include static members.

@@ -158,3 +88,3 @@ */

Proto,
StaticMembers extends object = {},
StaticMembers extends object = object,
Args extends unknown[] = any[]

@@ -161,0 +91,0 @@ > = _Class<Proto, Args> & StaticMembers;

@@ -1,2 +0,3 @@

import {AppiumLogger, Class, ExecuteMethodMap, MethodMap, UpdateServerCallback} from '.';
import {AppiumLogger, Class, UpdateServerCallback} from '.';
import {ExecuteMethodMap, MethodMap} from './command';
import {ExternalDriver} from './driver';

@@ -3,0 +4,0 @@

{
"name": "@appium/types",
"version": "0.10.0",
"version": "0.10.1",
"description": "Various type declarations used across Appium",

@@ -40,3 +40,3 @@ "keywords": [

"dependencies": {
"@appium/schema": "^0.2.5",
"@appium/schema": "^0.2.6",
"@appium/tsconfig": "^0.2.4",

@@ -46,3 +46,3 @@ "@types/express": "4.17.17",

"@types/ws": "8.5.4",
"type-fest": "3.6.0"
"type-fest": "3.6.1"
},

@@ -56,3 +56,3 @@ "engines": {

},
"gitHead": "7b4935632222123a4fa7422461f6312f1f0dfbe4",
"gitHead": "872b924a97c13142bdb8bf4218a4db324f309ce4",
"typedoc": {

@@ -59,0 +59,0 @@ "entryPoint": "./lib/index.ts"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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