@appium/types
Advanced tools
Comparing version 0.8.3 to 0.9.0
"use strict"; | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
@@ -4,0 +4,0 @@ * This file was automatically generated by json-schema-to-typescript. |
@@ -1,5 +0,5 @@ | ||
import type { Capabilities as WdioCaps } from '@wdio/types'; | ||
import { StandardCapabilities } from './standard-caps'; | ||
import { StringRecord, Constraint, Constraints } from '.'; | ||
import { BaseDriverCapConstraints } from './constraints'; | ||
export declare type StandardCapabilities = WdioCaps.Capabilities; | ||
export { StandardCapabilities }; | ||
export declare type W3C_APPIUM_PREFIX = 'appium'; | ||
@@ -15,11 +15,2 @@ /** | ||
/** | ||
* These may (or should) be reused by drivers. | ||
*/ | ||
export declare type AppiumAndroidCapabilities = WdioCaps.AppiumAndroidCapabilities; | ||
export declare type AppiumIOSCapabilities = WdioCaps.AppiumIOSCapabilities; | ||
export declare type AppiumXCUICommandTimeouts = WdioCaps.AppiumXCUICommandTimeouts; | ||
export declare type AppiumXCUIProcessArguments = WdioCaps.AppiumXCUIProcessArguments; | ||
export declare type AppiumXCUISafariGlobalPreferences = WdioCaps.AppiumXCUISafariGlobalPreferences; | ||
export declare type AppiumXCUITestCapabilities = WdioCaps.AppiumXCUITestCapabilities; | ||
/** | ||
* Given a {@linkcode Constraint} `C` and a type `T`, see if `inclusion`/`inclusionCaseInsensitive` is present, and create a union of its allowed literals; otherwise just use `T`. | ||
@@ -126,3 +117,2 @@ */ | ||
export declare type NSDriverCaps<C extends Constraints, Extra extends StringRecord | void = void> = NSCapabilities<BaseDriverCapConstraints & C, Extra>; | ||
export {}; | ||
//# sourceMappingURL=capabilities.d.ts.map |
@@ -10,2 +10,4 @@ /// <reference types="node" /> | ||
import { ServerArgs } from './config'; | ||
import { Driver } from './driver'; | ||
import { Plugin, PluginCommand } from './plugin'; | ||
export * from './action'; | ||
@@ -79,7 +81,7 @@ export * from './appium-config'; | ||
*/ | ||
export interface MethodDef<Ext> { | ||
export interface MethodDef<Ext extends Plugin | Driver> { | ||
/** | ||
* Name of the command. | ||
*/ | ||
readonly command?: keyof ConditionalPick<Required<Ext>, DriverCommand>; | ||
readonly command?: keyof ConditionalPick<Required<Ext>, Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never>; | ||
/** | ||
@@ -94,2 +96,10 @@ * If true, this `Method` will never proxy. | ||
} | ||
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 declare type ExecuteMethodMap<Ext extends Driver | Plugin> = Readonly<Record<string, Readonly<ExecuteMethodDef<Ext>>>>; | ||
/** | ||
@@ -115,3 +125,3 @@ * An instance method of a driver class, whose name may be referenced by {@linkcode MethodDef.command}, and serves as an Appium command. | ||
*/ | ||
export declare type MethodMap<Ext = any> = Readonly<Record<string, { | ||
export declare type MethodMap<Ext extends Plugin | Driver> = Readonly<Record<string, { | ||
GET?: MethodDef<Ext>; | ||
@@ -118,0 +128,0 @@ POST?: MethodDef<Ext>; |
@@ -1,3 +0,3 @@ | ||
import { MethodMap, UpdateServerCallback, Class, AppiumLogger } from '.'; | ||
import { Driver, ExternalDriver } from './driver'; | ||
import { AppiumLogger, Class, ExecuteMethodMap, MethodMap, UpdateServerCallback } from '.'; | ||
import { ExternalDriver } from './driver'; | ||
/** | ||
@@ -23,2 +23,3 @@ * The interface describing the constructor and static properties of a Plugin. | ||
newMethodMap?: MethodMap<P>; | ||
executeMethodMap?: ExecuteMethodMap<P>; | ||
} | ||
@@ -46,3 +47,3 @@ /** | ||
*/ | ||
onUnexpectedShutdown?: (driver: Driver, cause: Error | string) => Promise<void>; | ||
onUnexpectedShutdown?: (driver: ExternalDriver, cause: Error | string) => Promise<void>; | ||
/** | ||
@@ -52,3 +53,3 @@ * Handle an Appium command, optionally running and using or throwing away the value of the | ||
*/ | ||
handle?: (next: NextPluginCallback, driver: Driver, cmdName: string, ...args: any[]) => Promise<void>; | ||
handle?: PluginCommand<ExternalDriver, [cmdName: string, ...args: any[]], void>; | ||
} | ||
@@ -55,0 +56,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
@@ -3,0 +3,0 @@ * This file was automatically generated by json-schema-to-typescript. |
@@ -1,6 +0,7 @@ | ||
import type {Capabilities as WdioCaps} from '@wdio/types'; | ||
import {StandardCapabilities} from './standard-caps'; | ||
import {StringRecord, Constraint, Constraints} from '.'; | ||
import {BaseDriverCapConstraints} from './constraints'; | ||
export type StandardCapabilities = WdioCaps.Capabilities; | ||
export {StandardCapabilities}; | ||
export type W3C_APPIUM_PREFIX = 'appium'; | ||
@@ -19,12 +20,2 @@ | ||
/** | ||
* These may (or should) be reused by drivers. | ||
*/ | ||
export type AppiumAndroidCapabilities = WdioCaps.AppiumAndroidCapabilities; | ||
export type AppiumIOSCapabilities = WdioCaps.AppiumIOSCapabilities; | ||
export type AppiumXCUICommandTimeouts = WdioCaps.AppiumXCUICommandTimeouts; | ||
export type AppiumXCUIProcessArguments = WdioCaps.AppiumXCUIProcessArguments; | ||
export type AppiumXCUISafariGlobalPreferences = WdioCaps.AppiumXCUISafariGlobalPreferences; | ||
export type AppiumXCUITestCapabilities = WdioCaps.AppiumXCUITestCapabilities; | ||
/** | ||
* Given a {@linkcode Constraint} `C` and a type `T`, see if `inclusion`/`inclusionCaseInsensitive` is present, and create a union of its allowed literals; otherwise just use `T`. | ||
@@ -31,0 +22,0 @@ */ |
@@ -15,2 +15,3 @@ import type {EventEmitter} from 'events'; | ||
Capabilities, | ||
ExecuteMethodMap, | ||
} from '.'; | ||
@@ -189,10 +190,2 @@ import {ServerArgs} from './config'; | ||
export interface ExecuteMethodDef<D> { | ||
command: keyof ConditionalPick<Required<D>, DriverCommand>; | ||
params?: { | ||
required?: ReadonlyArray<string>; | ||
optional?: ReadonlyArray<string>; | ||
}; | ||
} | ||
export type ExecuteMethodMap<D> = Readonly<Record<string, Readonly<ExecuteMethodDef<D>>>>; | ||
export interface MultiSessionData< | ||
@@ -199,0 +192,0 @@ C extends Constraints = BaseDriverCapConstraints, |
@@ -8,2 +8,4 @@ import type {Express} from 'express'; | ||
import {ServerArgs} from './config'; | ||
import {Driver} from './driver'; | ||
import {Plugin, PluginCommand} from './plugin'; | ||
@@ -86,7 +88,10 @@ export * from './action'; | ||
*/ | ||
export interface MethodDef<Ext> { | ||
export interface MethodDef<Ext extends Plugin | Driver> { | ||
/** | ||
* Name of the command. | ||
*/ | ||
readonly command?: keyof ConditionalPick<Required<Ext>, DriverCommand>; | ||
readonly command?: keyof ConditionalPick< | ||
Required<Ext>, | ||
Ext extends Plugin ? PluginCommand : Ext extends Driver ? DriverCommand : never | ||
>; | ||
/** | ||
@@ -102,2 +107,16 @@ * If true, this `Method` will never proxy. | ||
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>>> | ||
>; | ||
/** | ||
@@ -124,3 +143,3 @@ * An instance method of a driver class, whose name may be referenced by {@linkcode MethodDef.command}, and serves as an Appium command. | ||
*/ | ||
export type MethodMap<Ext = any> = Readonly< | ||
export type MethodMap<Ext extends Plugin | Driver> = Readonly< | ||
Record< | ||
@@ -127,0 +146,0 @@ string, |
@@ -1,3 +0,3 @@ | ||
import {MethodMap, UpdateServerCallback, Class, AppiumLogger} from '.'; | ||
import {Driver, ExternalDriver} from './driver'; | ||
import {AppiumLogger, Class, ExecuteMethodMap, MethodMap, UpdateServerCallback} from '.'; | ||
import {ExternalDriver} from './driver'; | ||
@@ -24,2 +24,3 @@ /** | ||
newMethodMap?: MethodMap<P>; | ||
executeMethodMap?: ExecuteMethodMap<P>; | ||
} | ||
@@ -48,3 +49,3 @@ | ||
*/ | ||
onUnexpectedShutdown?: (driver: Driver, cause: Error | string) => Promise<void>; | ||
onUnexpectedShutdown?: (driver: ExternalDriver, cause: Error | string) => Promise<void>; | ||
/** | ||
@@ -54,8 +55,3 @@ * Handle an Appium command, optionally running and using or throwing away the value of the | ||
*/ | ||
handle?: ( | ||
next: NextPluginCallback, | ||
driver: Driver, | ||
cmdName: string, | ||
...args: any[] | ||
) => Promise<void>; | ||
handle?: PluginCommand<ExternalDriver, [cmdName: string, ...args: any[]], void>; | ||
} | ||
@@ -62,0 +58,0 @@ |
{ | ||
"name": "@appium/types", | ||
"version": "0.8.3", | ||
"version": "0.9.0", | ||
"description": "Various type declarations used across Appium", | ||
@@ -44,4 +44,3 @@ "keywords": [ | ||
"@types/ws": "8.5.4", | ||
"@wdio/types": "7.26.0", | ||
"type-fest": "3.5.1" | ||
"type-fest": "3.5.3" | ||
}, | ||
@@ -55,3 +54,3 @@ "engines": { | ||
}, | ||
"gitHead": "67c9bdfbceeb049aa134bf1d9b107543ff0a80b0", | ||
"gitHead": "f1e0a46712b76564cd44c37657882308a7bac706", | ||
"typedoc": { | ||
@@ -58,0 +57,0 @@ "entryPoint": "./lib/index.ts" |
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 not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307588
6
67
6230
+ Addedtype-fest@3.5.3(transitive)
- Removed@wdio/types@7.26.0
- Removed@sindresorhus/is@4.6.0(transitive)
- Removed@szmarczak/http-timer@4.0.6(transitive)
- Removed@types/cacheable-request@6.0.3(transitive)
- Removed@types/http-cache-semantics@4.0.4(transitive)
- Removed@types/keyv@3.1.4(transitive)
- Removed@types/node@18.19.68(transitive)
- Removed@types/responselike@1.0.3(transitive)
- Removed@wdio/types@7.26.0(transitive)
- Removedcacheable-lookup@5.0.4(transitive)
- Removedcacheable-request@7.0.4(transitive)
- Removedclone-response@1.0.3(transitive)
- Removeddecompress-response@6.0.0(transitive)
- Removeddefer-to-connect@2.0.1(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedgot@11.8.6(transitive)
- Removedhttp-cache-semantics@4.1.1(transitive)
- Removedhttp2-wrapper@1.0.3(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlowercase-keys@2.0.0(transitive)
- Removedmimic-response@1.0.13.1.0(transitive)
- Removednormalize-url@6.1.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-cancelable@2.1.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedquick-lru@5.1.1(transitive)
- Removedresolve-alpn@1.2.1(transitive)
- Removedresponselike@2.0.1(transitive)
- Removedtype-fest@3.5.1(transitive)
- Removedundici-types@5.26.5(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedtype-fest@3.5.3