create-wdio 9.0.0 → 9.17.0

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.
Files changed (83) hide show
  1. package/README.md +12 -7
  2. package/assets/demo.gif +0 -0
  3. package/build/cli/config.d.ts +51 -0
  4. package/build/cli/config.d.ts.map +1 -0
  5. package/build/cli/install.d.ts +12 -0
  6. package/build/cli/install.d.ts.map +1 -0
  7. package/build/cli/utils.d.ts +18 -0
  8. package/build/cli/utils.d.ts.map +1 -0
  9. package/build/config/cli.d.ts +2 -0
  10. package/build/config/cli.d.ts.map +1 -0
  11. package/build/config/cli.js +1632 -0
  12. package/build/constants.d.ts +248 -0
  13. package/build/constants.d.ts.map +1 -0
  14. package/build/index.d.ts +4 -0
  15. package/build/index.d.ts.map +1 -0
  16. package/build/index.js +1018 -54
  17. package/build/install/cli.d.ts +2 -0
  18. package/build/install/cli.d.ts.map +1 -0
  19. package/build/install/cli.js +1719 -0
  20. package/build/install.d.ts +4 -0
  21. package/build/install.d.ts.map +1 -0
  22. package/build/templates/EjsHelpers.d.ts +18 -0
  23. package/build/templates/EjsHelpers.d.ts.map +1 -0
  24. package/build/templates/exampleFiles/browser/Component.css.ejs +121 -0
  25. package/build/templates/exampleFiles/browser/Component.lit.ejs +154 -0
  26. package/build/templates/exampleFiles/browser/Component.lit.test.ejs +24 -0
  27. package/build/templates/exampleFiles/browser/Component.preact.ejs +28 -0
  28. package/build/templates/exampleFiles/browser/Component.preact.test.ejs +59 -0
  29. package/build/templates/exampleFiles/browser/Component.react.ejs +29 -0
  30. package/build/templates/exampleFiles/browser/Component.react.test.ejs +58 -0
  31. package/build/templates/exampleFiles/browser/Component.solid.ejs +28 -0
  32. package/build/templates/exampleFiles/browser/Component.solid.test.ejs +58 -0
  33. package/build/templates/exampleFiles/browser/Component.stencil.ejs +43 -0
  34. package/build/templates/exampleFiles/browser/Component.stencil.test.ejs +45 -0
  35. package/build/templates/exampleFiles/browser/Component.svelte.ejs +47 -0
  36. package/build/templates/exampleFiles/browser/Component.svelte.test.ejs +58 -0
  37. package/build/templates/exampleFiles/browser/Component.vue.ejs +34 -0
  38. package/build/templates/exampleFiles/browser/Component.vue.test.ejs +62 -0
  39. package/build/templates/exampleFiles/browser/standalone.test.ejs +13 -0
  40. package/build/templates/exampleFiles/cucumber/features/login.feature +12 -0
  41. package/build/templates/exampleFiles/cucumber/step_definitions/steps.js.ejs +55 -0
  42. package/build/templates/exampleFiles/mochaJasmine/test.e2e.js.ejs +11 -0
  43. package/build/templates/exampleFiles/pageobjects/login.page.js.ejs +45 -0
  44. package/build/templates/exampleFiles/pageobjects/page.js.ejs +17 -0
  45. package/build/templates/exampleFiles/pageobjects/secure.page.js.ejs +20 -0
  46. package/build/templates/exampleFiles/serenity-js/common/config/serenity.properties.ejs +1 -0
  47. package/build/templates/exampleFiles/serenity-js/common/serenity/github-api/GitHubStatus.ts.ejs +41 -0
  48. package/build/templates/exampleFiles/serenity-js/common/serenity/todo-list-app/TodoList.ts.ejs +100 -0
  49. package/build/templates/exampleFiles/serenity-js/common/serenity/todo-list-app/TodoListItem.ts.ejs +36 -0
  50. package/build/templates/exampleFiles/serenity-js/cucumber/step-definitions/steps.ts.ejs +37 -0
  51. package/build/templates/exampleFiles/serenity-js/cucumber/support/parameter.config.ts.ejs +18 -0
  52. package/build/templates/exampleFiles/serenity-js/cucumber/todo-list/completing_items.feature.ejs +23 -0
  53. package/build/templates/exampleFiles/serenity-js/cucumber/todo-list/narrative.md.ejs +17 -0
  54. package/build/templates/exampleFiles/serenity-js/jasmine/example.spec.ts.ejs +86 -0
  55. package/build/templates/exampleFiles/serenity-js/mocha/example.spec.ts.ejs +88 -0
  56. package/build/templates/snippets/afterTest.ejs +20 -0
  57. package/build/templates/snippets/capabilities.ejs +57 -0
  58. package/build/templates/snippets/cucumber.ejs +50 -0
  59. package/build/templates/snippets/electronTest.js.ejs +7 -0
  60. package/build/templates/snippets/jasmine.ejs +20 -0
  61. package/build/templates/snippets/macosTest.js.ejs +11 -0
  62. package/build/templates/snippets/mocha.ejs +14 -0
  63. package/build/templates/snippets/reporters.ejs +14 -0
  64. package/build/templates/snippets/serenity.ejs +18 -0
  65. package/build/templates/snippets/services.ejs +18 -0
  66. package/build/templates/snippets/testWithPO.js.ejs +22 -0
  67. package/build/templates/snippets/testWithoutPO.js.ejs +19 -0
  68. package/build/templates/snippets/vscodeTest.js.ejs +9 -0
  69. package/build/templates/wdio.conf.tpl.ejs +412 -0
  70. package/build/types.d.ts +99 -0
  71. package/build/types.d.ts.map +1 -0
  72. package/build/utils/index.d.ts +2 -0
  73. package/build/utils/index.d.ts.map +1 -0
  74. package/build/utils/index.js +849 -0
  75. package/build/utils.d.ts +78 -0
  76. package/build/utils.d.ts.map +1 -0
  77. package/package.json +60 -41
  78. package/.eslintrc.cjs +0 -37
  79. package/__mocks__/commander.ts +0 -18
  80. package/build/constants.js +0 -51
  81. package/build/types.js +0 -1
  82. package/build/utils.js +0 -38
  83. package/vitest.config.ts +0 -23
@@ -0,0 +1,412 @@
1
+ <%
2
+ if (answers.isUsingTypeScript && answers.purpose === 'electron') {
3
+ %>/// <reference types="wdio-electron-service" />
4
+ <% }
5
+
6
+ if (answers.isUsingTypeScript && answers.serenityAdapter) {
7
+ %>import type { WebdriverIOConfig } from '@serenity-js/webdriverio'
8
+ <% }
9
+
10
+ if (answers.isUsingTypeScript) {
11
+ %>export const config: <%= answers.serenityAdapter ? 'WebdriverIOConfig' : 'WebdriverIO.Config' %> = {<%
12
+ } else if (answers.esmSupport) {
13
+ %>export const config = {<%
14
+ } else {
15
+ %>exports.config = {<%
16
+ } %>
17
+ //
18
+ // ====================
19
+ // Runner Configuration
20
+ // ====================
21
+ // WebdriverIO supports running e2e tests as well as unit and component tests.
22
+ runner: <%
23
+ if (answers.runner === 'browser') {
24
+ if (answers.preset) {
25
+ %>['browser', {
26
+ preset: '<%- answers.preset %>',
27
+ // start browser window when `DEBUG` environment variable is set
28
+ headless: !Boolean(process.env.DEBUG)
29
+ }]<%
30
+ } else {
31
+ %>'browser'<%
32
+ }
33
+ } else {
34
+ %>'local'<%
35
+ }
36
+ %>,<%
37
+ if (answers.isUsingTypeScript) { %>
38
+ tsConfigPath: '<%- answers.tsProject %>',
39
+ <% }
40
+ if(answers.expEnvAccessKey){ %>
41
+ hostname: '<%- answers.expEnvHostname %>',
42
+ <% if (answers.expEnvPort === '443'){%>protocol: 'https',
43
+ <%} else if (answers.expEnvPort === '80'){%>protocol: 'http',
44
+ <%} else { %>protocol: '<%- answers.expEnvProtocol %>',<%}%>
45
+ port: <%- answers.expEnvPort %>,
46
+ path: '/wd/hub',
47
+ <% } else if(answers.hostname && answers.port) { %>//
48
+ // =====================
49
+ // Server Configurations
50
+ // =====================
51
+ // Host address of the running Selenium server. This information is usually obsolete as
52
+ // WebdriverIO automatically connects to localhost. Also, if you are using one of the
53
+ // supported cloud services like Sauce Labs, Browserstack, Testing Bot or LambdaTest you don't
54
+ // need to define host and port information because WebdriverIO can figure that out
55
+ // according to your user and key information. However, if you are using a private Selenium
56
+ // backend you should define the host address, port, and path here.
57
+ //
58
+ hostname: '<%- answers.hostname %>',
59
+ port: <%- answers.port %>,
60
+ path: '<%- answers.path %>',<% } else if (answers.services.includes('appium')) { %>
61
+ port: 4723,<% }
62
+
63
+ // Protocol: http | https
64
+ // protocol: 'http',
65
+ if(answers.env_user && answers.env_key) { %>
66
+ //
67
+ // =================
68
+ // Service Providers
69
+ // =================
70
+ // WebdriverIO supports Sauce Labs, Browserstack, Testing Bot and LambdaTest (other cloud providers
71
+ // should work too though). These services define specific user and key (or access key)
72
+ // values you need to put in here in order to connect to these services.
73
+ //
74
+ user: process.env.<%- answers.env_user %>,
75
+ key: process.env.<%- answers.env_key %>,
76
+ //
77
+ // If you run your tests on Sauce Labs you can specify the region you want to run your tests
78
+ // in via the `region` property. Available short handles for regions are `us` (default) and `eu`.
79
+ // These regions are used for the Sauce Labs VM cloud and the Sauce Labs Real Device Cloud.
80
+ // If you don't provide the region it will default for the `us`
81
+ <% }
82
+ if(answers.headless) { %>headless: true,<% }
83
+ if(answers.region) { %>region: '<%- answers.region %>',<% } %>
84
+ //
85
+ // ==================
86
+ // Specify Test Files
87
+ // ==================
88
+ // Define which test specs should run. The pattern is relative to the directory
89
+ // of the configuration file being run.
90
+ //
91
+ // The specs are defined as an array of spec files (optionally using wildcards
92
+ // that will be expanded). The test for each spec file will be run in a separate
93
+ // worker process. In order to have a group of spec files run in the same worker
94
+ // process simply enclose them in an array within the specs array.
95
+ //
96
+ // The path of the spec files will be resolved relative from the directory of
97
+ // of the config file unless it's absolute.
98
+ //
99
+ specs: [
100
+ <%- answers.specs ? `'${answers.specs}'` : '// ToDo: define location for spec files here' %>
101
+ ],
102
+ // Patterns to exclude.
103
+ exclude: [
104
+ // 'path/to/excluded/files'
105
+ ],
106
+ //
107
+ // ============
108
+ // Capabilities
109
+ // ============
110
+ // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
111
+ // time. Depending on the number of capabilities, WebdriverIO launches several test
112
+ // sessions. Within your capabilities you can overwrite the spec and exclude options in
113
+ // order to group specific specs to a specific capability.
114
+ //
115
+ // First, you can define how many instances should be started at the same time. Let's
116
+ // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
117
+ // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
118
+ // files and you set maxInstances to 10, all spec files will get tested at the same time
119
+ // and 30 processes will get spawned. The property handles how many capabilities
120
+ // from the same test should run tests.
121
+ //
122
+ maxInstances: 10,
123
+ //
124
+ // If you have trouble getting all important capabilities together, check out the
125
+ // Sauce Labs platform configurator - a great tool to configure your capabilities:
126
+ // https://saucelabs.com/platform/platform-configurator
127
+ //
128
+ <%- include('snippets/capabilities', { answers }) %>
129
+ //
130
+ // ===================
131
+ // Test Configurations
132
+ // ===================
133
+ // Define all options that are relevant for the WebdriverIO instance here
134
+ //
135
+ // Level of logging verbosity: trace | debug | info | warn | error | silent
136
+ logLevel: 'info',
137
+ //
138
+ // Set specific log levels per logger
139
+ // loggers:
140
+ // - webdriver, webdriverio
141
+ // - @wdio/browserstack-service, @wdio/lighthouse-service, @wdio/sauce-service
142
+ // - @wdio/mocha-framework, @wdio/jasmine-framework
143
+ // - @wdio/local-runner
144
+ // - @wdio/sumologic-reporter
145
+ // - @wdio/cli, @wdio/config, @wdio/utils
146
+ // Level of logging verbosity: trace | debug | info | warn | error | silent
147
+ // logLevels: {
148
+ // webdriver: 'info',
149
+ // '@wdio/appium-service': 'info'
150
+ // },
151
+ //
152
+ // If you only want to run your tests until a specific amount of tests have failed use
153
+ // bail (default is 0 - don't bail, run all tests).
154
+ bail: 0,
155
+ //
156
+ // Set a base URL in order to shorten url command calls. If your `url` parameter starts
157
+ // with `/`, the base url gets prepended, not including the path portion of your baseUrl.
158
+ // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
159
+ // gets prepended directly.
160
+ // baseUrl: 'http://localhost:8080',
161
+ //
162
+ // Default timeout for all waitFor* commands.
163
+ waitforTimeout: 10000,
164
+ //
165
+ // Default timeout in milliseconds for request
166
+ // if browser driver or grid doesn't send response
167
+ connectionRetryTimeout: 120000,
168
+ //
169
+ // Default request retries count
170
+ connectionRetryCount: 3,
171
+ //
172
+ // Test runner services
173
+ // Services take over a specific job you don't want to take care of. They enhance
174
+ // your test setup with almost no effort. Unlike plugins, they don't add new
175
+ // commands. Instead, they hook themselves up into the test process.
176
+ <% if(answers.services.length) {
177
+ %><%- include('snippets/services', { answers }) %><%
178
+ } else {
179
+ %>// services: [],
180
+ //<% } %>
181
+ // Framework you want to run your specs with.
182
+ // The following are supported: Mocha, Jasmine, and Cucumber
183
+ // see also: https://webdriver.io/docs/frameworks
184
+ //
185
+ // Make sure you have the wdio adapter package for the specific framework installed
186
+ // before running any tests.
187
+ framework: '<%- answers.framework %>',
188
+ <%- answers.framework === '@serenity-js/webdriverio' ? include('snippets/serenity', { answers }) : '' %>
189
+ //
190
+ // The number of times to retry the entire specfile when it fails as a whole
191
+ // specFileRetries: 1,
192
+ //
193
+ // Delay in seconds between the spec file retry attempts
194
+ // specFileRetriesDelay: 0,
195
+ //
196
+ // Whether or not retried spec files should be retried immediately or deferred to the end of the queue
197
+ // specFileRetriesDeferred: false,
198
+ //
199
+ <%- include('snippets/reporters', { reporters: answers.reporters })
200
+ %><%- _.if([ answers.serenityAdapter, answers.framework ].includes('mocha'), include('snippets/mocha', { answers }))
201
+ %><%- _.if([ answers.serenityAdapter, answers.framework ].includes('jasmine'), include('snippets/jasmine', { answers }))
202
+ %><%- _.if([ answers.serenityAdapter, answers.framework ].includes('cucumber'), include('snippets/cucumber', { answers }))
203
+ %>
204
+ //
205
+ // =====
206
+ // Hooks
207
+ // =====
208
+ // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
209
+ // it and to build services around it. You can either apply a single function or an array of
210
+ // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
211
+ // resolved to continue.
212
+ /**
213
+ * Gets executed once before all workers get launched.
214
+ * @param {object} config wdio configuration object
215
+ * @param {Array.<Object>} capabilities list of capabilities details
216
+ */
217
+ // onPrepare: function (config, capabilities) {
218
+ // },
219
+ /**
220
+ * Gets executed before a worker process is spawned and can be used to initialize specific service
221
+ * for that worker as well as modify runtime environments in an async fashion.
222
+ * @param {string} cid capability id (e.g 0-0)
223
+ * @param {object} caps object containing capabilities for session that will be spawn in the worker
224
+ * @param {object} specs specs to be run in the worker process
225
+ * @param {object} args object that will be merged with the main configuration once worker is initialized
226
+ * @param {object} execArgv list of string arguments passed to the worker process
227
+ */
228
+ // onWorkerStart: function (cid, caps, specs, args, execArgv) {
229
+ // },
230
+ /**
231
+ * Gets executed just after a worker process has exited.
232
+ * @param {string} cid capability id (e.g 0-0)
233
+ * @param {number} exitCode 0 - success, 1 - fail
234
+ * @param {object} specs specs to be run in the worker process
235
+ * @param {number} retries number of retries used
236
+ */
237
+ // onWorkerEnd: function (cid, exitCode, specs, retries) {
238
+ // },
239
+ /**
240
+ * Gets executed just before initialising the webdriver session and test framework. It allows you
241
+ * to manipulate configurations depending on the capability or spec.
242
+ * @param {object} config wdio configuration object
243
+ * @param {Array.<Object>} capabilities list of capabilities details
244
+ * @param {Array.<String>} specs List of spec file paths that are to be run
245
+ * @param {string} cid worker id (e.g. 0-0)
246
+ */
247
+ // beforeSession: function (config, capabilities, specs, cid) {
248
+ // },
249
+ /**
250
+ * Gets executed before test execution begins. At this point you can access to all global
251
+ * variables like `browser`. It is the perfect place to define custom commands.
252
+ * @param {Array.<Object>} capabilities list of capabilities details
253
+ * @param {Array.<String>} specs List of spec file paths that are to be run
254
+ * @param {object} browser instance of created browser/device session
255
+ */
256
+ // before: function (capabilities, specs) {
257
+ // },
258
+ /**
259
+ * Runs before a WebdriverIO command gets executed.
260
+ * @param {string} commandName hook command name
261
+ * @param {Array} args arguments that command would receive
262
+ */
263
+ // beforeCommand: function (commandName, args) {
264
+ // },<%
265
+ if(answers.framework === 'mocha' || answers.framework === 'jasmine') { %>
266
+ /**
267
+ * Hook that gets executed before the suite starts
268
+ * @param {object} suite suite details
269
+ */
270
+ // beforeSuite: function (suite) {
271
+ // },
272
+ /**
273
+ * Function to be executed before a test (in Mocha/Jasmine) starts.
274
+ */
275
+ // beforeTest: function (test, context) {
276
+ // },
277
+ /**
278
+ * Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
279
+ * beforeEach in Mocha)
280
+ */
281
+ // beforeHook: function (test, context, hookName) {
282
+ // },
283
+ /**
284
+ * Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
285
+ * afterEach in Mocha)
286
+ */
287
+ // afterHook: function (test, context, { error, result, duration, passed, retries }, hookName) {
288
+ // },
289
+ <%- include('snippets/afterTest', { reporters: answers.reporters }) %>
290
+ /**
291
+ * Hook that gets executed after the suite has ended
292
+ * @param {object} suite suite details
293
+ */
294
+ // afterSuite: function (suite) {
295
+ // },<% }
296
+ if(answers.framework === 'cucumber') { %>
297
+ /**
298
+ * Cucumber Hooks
299
+ *
300
+ * Runs before a Cucumber Feature.
301
+ * @param {string} uri path to feature file
302
+ * @param {GherkinDocument.IFeature} feature Cucumber feature object
303
+ */
304
+ // beforeFeature: function (uri, feature) {
305
+ // },
306
+ /**
307
+ *
308
+ * Runs before a Cucumber Scenario.
309
+ * @param {ITestCaseHookParameter} world world object containing information on pickle and test step
310
+ * @param {object} context Cucumber World object
311
+ */
312
+ // beforeScenario: function (world, context) {
313
+ // },
314
+ /**
315
+ *
316
+ * Runs before a Cucumber Step.
317
+ * @param {Pickle.IPickleStep} step step data
318
+ * @param {IPickle} scenario scenario pickle
319
+ * @param {object} context Cucumber World object
320
+ */
321
+ // beforeStep: function (step, scenario, context) {
322
+ // },
323
+ /**
324
+ *
325
+ * Runs after a Cucumber Step.
326
+ * @param {Pickle.IPickleStep} step step data
327
+ * @param {IPickle} scenario scenario pickle
328
+ * @param {object} result results object containing scenario results
329
+ * @param {boolean} result.passed true if scenario has passed
330
+ * @param {string} result.error error stack if scenario failed
331
+ * @param {number} result.duration duration of scenario in milliseconds
332
+ * @param {object} context Cucumber World object
333
+ */
334
+ // afterStep: function (step, scenario, result, context) {
335
+ // },
336
+ /**
337
+ *
338
+ * Runs after a Cucumber Scenario.
339
+ * @param {ITestCaseHookParameter} world world object containing information on pickle and test step
340
+ * @param {object} result results object containing scenario results
341
+ * @param {boolean} result.passed true if scenario has passed
342
+ * @param {string} result.error error stack if scenario failed
343
+ * @param {number} result.duration duration of scenario in milliseconds
344
+ * @param {object} context Cucumber World object
345
+ */
346
+ // afterScenario: function (world, result, context) {
347
+ // },
348
+ /**
349
+ *
350
+ * Runs after a Cucumber Feature.
351
+ * @param {string} uri path to feature file
352
+ * @param {GherkinDocument.IFeature} feature Cucumber feature object
353
+ */
354
+ // afterFeature: function (uri, feature) {
355
+ // },
356
+ <% } %>
357
+ /**
358
+ * Runs after a WebdriverIO command gets executed
359
+ * @param {string} commandName hook command name
360
+ * @param {Array} args arguments that command would receive
361
+ * @param {number} result 0 - command success, 1 - command error
362
+ * @param {object} error error object if any
363
+ */
364
+ // afterCommand: function (commandName, args, result, error) {
365
+ // },
366
+ /**
367
+ * Gets executed after all tests are done. You still have access to all global variables from
368
+ * the test.
369
+ * @param {number} result 0 - test pass, 1 - test fail
370
+ * @param {Array.<Object>} capabilities list of capabilities details
371
+ * @param {Array.<String>} specs List of spec file paths that ran
372
+ */
373
+ // after: function (result, capabilities, specs) {
374
+ // },
375
+ /**
376
+ * Gets executed right after terminating the webdriver session.
377
+ * @param {object} config wdio configuration object
378
+ * @param {Array.<Object>} capabilities list of capabilities details
379
+ * @param {Array.<String>} specs List of spec file paths that ran
380
+ */
381
+ // afterSession: function (config, capabilities, specs) {
382
+ // },
383
+ /**
384
+ * Gets executed after all workers got shut down and the process is about to exit. An error
385
+ * thrown in the onComplete hook will result in the test run failing.
386
+ * @param {object} exitCode 0 - success, 1 - fail
387
+ * @param {object} config wdio configuration object
388
+ * @param {Array.<Object>} capabilities list of capabilities details
389
+ * @param {<Object>} results object containing test results
390
+ */
391
+ // onComplete: function(exitCode, config, capabilities, results) {
392
+ // },
393
+ /**
394
+ * Gets executed when a refresh happens.
395
+ * @param {string} oldSessionId session ID of the old session
396
+ * @param {string} newSessionId session ID of the new session
397
+ */
398
+ // onReload: function(oldSessionId, newSessionId) {
399
+ // }
400
+ /**
401
+ * Hook that gets executed before a WebdriverIO assertion happens.
402
+ * @param {object} params information about the assertion to be executed
403
+ */
404
+ // beforeAssertion: function(params) {
405
+ // }
406
+ /**
407
+ * Hook that gets executed after a WebdriverIO assertion happened.
408
+ * @param {object} params information about the assertion that was executed, including its results
409
+ */
410
+ // afterAssertion: function(params) {
411
+ // }
412
+ }
@@ -0,0 +1,99 @@
1
+ import type { BackendChoice, RegionOptions, ElectronBuildToolChoice } from './constants.js';
2
+ import type { PackageJson as typeFestPackageJson } from 'type-fest';
3
+ import type { Package as normalizePackage } from 'normalize-package-data';
4
+ export type NormalizedPackageJson = PackageJson & normalizePackage;
5
+ export type PackageJson = typeFestPackageJson;
6
+ export interface ProgramOpts {
7
+ info: boolean;
8
+ dev: boolean;
9
+ yes: boolean;
10
+ npmTag: string;
11
+ }
12
+ export interface Questionnair {
13
+ runner: string;
14
+ preset?: string;
15
+ installTestingLibrary?: boolean;
16
+ electronAppBinaryPath?: string;
17
+ electronBuildTool?: ElectronBuildToolChoice;
18
+ electronBuilderConfigPath?: string;
19
+ backend?: BackendChoice;
20
+ hostname?: string;
21
+ port?: string;
22
+ path?: string;
23
+ expEnvAccessKey?: string;
24
+ expEnvHostname?: string;
25
+ expEnvPort?: string;
26
+ expEnvProtocol?: 'http' | 'https';
27
+ env_user?: string;
28
+ env_key?: string;
29
+ region?: RegionOptions;
30
+ useSauceConnect?: boolean;
31
+ framework: string;
32
+ specs?: string;
33
+ stepDefinitions?: string;
34
+ generateTestFiles: boolean;
35
+ usePageObjects?: boolean;
36
+ pages?: string;
37
+ isUsingTypeScript: boolean;
38
+ reporters: string[];
39
+ services: string[];
40
+ serenityLibPath?: string;
41
+ plugins: string[];
42
+ outputDir?: string;
43
+ includeVisualTesting: boolean;
44
+ npmInstall: boolean;
45
+ createPackageJSON?: boolean;
46
+ projectRootCorrect?: boolean;
47
+ projectRoot?: string;
48
+ e2eEnvironment?: 'web' | 'mobile';
49
+ mobileEnvironment?: 'android' | 'ios';
50
+ browserEnvironment?: ('chrome' | 'firefox' | 'safari' | 'microsoftedge')[];
51
+ }
52
+ export interface ParsedAnswers extends Omit<Questionnair, 'runner' | 'framework' | 'reporters' | 'services' | 'plugins'> {
53
+ rawAnswers: Questionnair;
54
+ runner: 'local' | 'browser';
55
+ projectName: string;
56
+ framework: string;
57
+ purpose: string;
58
+ reporters: string[];
59
+ plugins: string[];
60
+ services: string[];
61
+ packagesToInstall: string[];
62
+ isUsingTypeScript: boolean;
63
+ serenityAdapter: string | false;
64
+ esmSupport: boolean;
65
+ isSync: boolean;
66
+ _async: string;
67
+ _await: string;
68
+ projectRootDir: string;
69
+ destSpecRootPath: string;
70
+ destPageObjectRootPath: string;
71
+ destStepRootPath: string;
72
+ destSerenityLibRootPath: string;
73
+ relativePath: string;
74
+ hasRootTSConfig: boolean;
75
+ tsConfigFilePath: string;
76
+ tsProject: string;
77
+ wdioConfigPath: string;
78
+ }
79
+ export interface ConfigCommandArguments {
80
+ yarn: boolean;
81
+ yes: boolean;
82
+ npmTag: string;
83
+ }
84
+ export interface SupportedPackage {
85
+ package: string;
86
+ short: string;
87
+ purpose: string;
88
+ }
89
+ export interface ProjectProps {
90
+ esmSupported: boolean;
91
+ path: string;
92
+ packageJson: NormalizedPackageJson;
93
+ }
94
+ export interface InstallCommandArguments {
95
+ config?: string;
96
+ type: 'service' | 'reporter' | 'framework' | 'plugin';
97
+ name: string;
98
+ }
99
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,uBAAuB,EAAI,MAAM,gBAAgB,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,gBAAgB,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAA;AAE7C,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,iBAAiB,CAAC,EAAE,uBA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,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,qBAAqB,CAAA;CACrC;AAED,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAA;IACrD,IAAI,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,2 @@
1
+ export { SUPPORTED_PACKAGE_MANAGERS } from '../constants.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA"}