-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathServerless.d.ts
79 lines (70 loc) · 1.45 KB
/
Serverless.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
declare namespace Serverless {
interface Instance {
cli: {
log(str: string): void
}
config: {
servicePath: string
}
service: {
provider: {
name: string
runtime?: string
}
functions: {
[key: string]: Serverless.Function
}
layers: { [key: string]: Serverless.Layer }
package: Serverless.Package
getAllFunctions(): string[]
getAllLayers(): string[]
custom?: {
serverlessPluginTypescript?: {
tsConfigFileLocation: string,
paths?: boolean
}
}
}
pluginManager: PluginManager
}
interface Options {
function?: string
watch?: boolean
extraServicePath?: string
}
interface Function {
handler: string
package: Serverless.Package
runtime?: string
}
interface Layer {
handler: string
package: Serverless.Package
}
interface Package {
include: string[]
exclude: string[]
patterns: string[]
artifact?: string
individually?: boolean
}
type CommandsDefinition = Record<
string,
{
lifecycleEvents?: string[]
commands?: CommandsDefinition
usage?: string
options?: {
[name: string]: {
type: string
usage: string
required?: boolean
shortcut?: string
}
}
}
>
interface PluginManager {
spawn(command: string): Promise<void>
}
}