1 | import { Configuration } from '@nuxt/types'
|
2 | import { RequestPromiseOptions } from 'request-promise-native'
|
3 |
|
4 | export type BeforeNuxtReadyFn = (nuxt: any ) => Promise<void>
|
5 |
|
6 | export const init: (
|
7 | config: Configuration,
|
8 | options?: { beforeNuxtReady?: BeforeNuxtReadyFn }
|
9 | ) => Promise<any >
|
10 |
|
11 | export const build: (
|
12 | config: Configuration,
|
13 | options?: {
|
14 | waitFor?: number
|
15 | beforeNuxtReady?: BeforeNuxtReadyFn
|
16 | }
|
17 | ) => Promise<{ nuxt: any ; builder: any }>
|
18 |
|
19 | export const generate: (
|
20 | config: Configuration,
|
21 | options?: { build?: boolean; init?: boolean },
|
22 | initOptions?: { beforeNuxtReady?: BeforeNuxtReadyFn }
|
23 | ) => Promise<{
|
24 | nuxt: any
|
25 | builder: any
|
26 | generator: any
|
27 | }>
|
28 |
|
29 | export const loadConfig: (
|
30 | dir: string,
|
31 | fixture?: string,
|
32 | override?: Configuration,
|
33 | options?: { merge?: boolean }
|
34 | ) => Configuration
|
35 |
|
36 | export const setup: (
|
37 | config: Configuration,
|
38 | options?: {
|
39 | port?: number
|
40 | waitFor?: number
|
41 | beforeNuxtReady?: BeforeNuxtReadyFn
|
42 | }
|
43 | ) => Promise<{ nuxt: any ; builder: any }>
|
44 |
|
45 | export const generatePort: (port?: number) => Promise<number>
|
46 |
|
47 | export type GetRequest<T = any> = (path: string, options?: RequestPromiseOptions) => Promise<T>
|
48 | export const get: GetRequest
|
49 |
|
50 | export const url: (path?: string) => string
|