1 |
|
2 | import type { SpawnOptions } from 'node:child_process';
|
3 | import { SevereServiceError } from 'webdriverio';
|
4 | import type { Capabilities, Options, Services } from '@wdio/types';
|
5 | import { CompilerOptions } from './constants.js';
|
6 | import type { OnCompleteResult, ParsedAnswers, ProjectProps, Questionnair, ReplCommandArguments, SupportedPackage } from './types.js';
|
7 | export declare const renderFile: (path: string, data: Record<string, any>) => Promise<string>;
|
8 | export declare class HookError extends SevereServiceError {
|
9 | origin: string;
|
10 | constructor(message: string, origin: string);
|
11 | }
|
12 | /**
|
13 | * run service launch sequences
|
14 | */
|
15 | export declare function runServiceHook(launcher: Services.ServiceInstance[], hookName: keyof Services.HookFunctions, ...args: any[]): Promise<undefined>;
|
16 | /**
|
17 | * Run hook in service launcher
|
18 | * @param {Array|Function} hook - can be array of functions or single function
|
19 | * @param {object} config
|
20 | * @param {object} capabilities
|
21 | */
|
22 | export declare function runLauncherHook(hook: Function | Function[], ...args: any[]): Promise<void | any[]>;
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare function runOnCompleteHook(onCompleteHook: Function | Function[], config: Options.Testrunner, capabilities: Capabilities.RemoteCapabilities, exitCode: number, results: OnCompleteResult): Promise<(0 | 1)[]>;
|
32 |
|
33 |
|
34 |
|
35 | export declare function getRunnerName(caps?: Capabilities.DesiredCapabilities): string;
|
36 | export declare function findInConfig(config: string, type: string): RegExpMatchArray | null;
|
37 | export declare function replaceConfig(config: string, type: string, name: string): string | undefined;
|
38 | export declare function addServiceDeps(names: SupportedPackage[], packages: string[], update?: boolean): void;
|
39 |
|
40 |
|
41 |
|
42 | export declare function convertPackageHashToObject(pkg: string, hash?: string): SupportedPackage;
|
43 | export declare function getSerenityPackages(answers: Questionnair): string[];
|
44 | export declare function getCapabilities(arg: ReplCommandArguments): Promise<{
|
45 | capabilities: {
|
46 | deviceName: string;
|
47 | platformVersion: string;
|
48 | udid: string;
|
49 | platformName: string;
|
50 | automationName: string;
|
51 | app: string;
|
52 | browserName?: undefined;
|
53 | };
|
54 | } | {
|
55 | capabilities: {
|
56 | deviceName: string;
|
57 | platformVersion: string;
|
58 | udid: string;
|
59 | platformName: string;
|
60 | automationName: string;
|
61 | browserName: string;
|
62 | };
|
63 | } | {
|
64 | capabilities: {
|
65 | alwaysMatch: WebdriverIO.Capabilities;
|
66 | firstMatch: WebdriverIO.Capabilities[];
|
67 | browserName?: undefined;
|
68 | };
|
69 | } | {
|
70 | capabilities: {
|
71 | browserName: string;
|
72 | };
|
73 | }>;
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | export declare function hasBabelConfig(rootDir: string): Promise<boolean>;
|
80 |
|
81 |
|
82 |
|
83 | export declare function detectCompiler(answers: Questionnair): Promise<CompilerOptions>;
|
84 |
|
85 |
|
86 |
|
87 |
|
88 | export declare function hasPackage(pkg: string): Promise<boolean>;
|
89 |
|
90 |
|
91 |
|
92 | export declare function generateTestFiles(answers: ParsedAnswers): Promise<void>;
|
93 | export declare function generateBrowserRunnerTestFiles(answers: ParsedAnswers): Promise<void>;
|
94 | export declare function getAnswers(yes: boolean): Promise<Questionnair>;
|
95 | export declare function getPathForFileGeneration(answers: Questionnair, projectRootDir: string): {
|
96 | destSpecRootPath: string;
|
97 | destStepRootPath: string;
|
98 | destPageObjectRootPath: string;
|
99 | destSerenityLibRootPath: string;
|
100 | relativePath: string;
|
101 | };
|
102 | export declare function getDefaultFiles(answers: Questionnair, pattern: string): Promise<string>;
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | export declare function specifyVersionIfNeeded(packagesToInstall: string[], version: string, npmTag: string): string[];
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | export declare function getProjectProps(cwd?: string): Promise<ProjectProps | undefined>;
|
116 | export declare function runProgram(command: string, args: string[], options: SpawnOptions): Promise<void>;
|
117 |
|
118 |
|
119 |
|
120 | export declare function createPackageJSON(parsedAnswers: ParsedAnswers): Promise<false | undefined>;
|
121 | export declare function npmInstall(parsedAnswers: ParsedAnswers, npmTag: string): Promise<void>;
|
122 |
|
123 |
|
124 |
|
125 | export declare function detectPackageManager(argv?: string[]): "npm" | "yarn" | "pnpm" | "bun";
|
126 |
|
127 |
|
128 |
|
129 | export declare function setupTypeScript(parsedAnswers: ParsedAnswers): Promise<void>;
|
130 |
|
131 |
|
132 |
|
133 | export declare function setupBabel(parsedAnswers: ParsedAnswers): Promise<void>;
|
134 | export declare function createWDIOConfig(parsedAnswers: ParsedAnswers): Promise<void>;
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | export declare function getProjectRoot(parsedAnswers?: Questionnair): Promise<string>;
|
142 | export declare function createWDIOScript(parsedAnswers: ParsedAnswers): Promise<boolean>;
|
143 | export declare function runAppiumInstaller(parsedAnswers: ParsedAnswers): Promise<void | import("execa").ExecaReturnValue<string>>;
|
144 |
|
\ | No newline at end of file |