@@ -2,7 +2,7 @@ export interface SlsFunction {
2
2
name : string ;
3
3
logForwarding ?: {
4
4
enabled ?: boolean ;
5
- }
5
+ } ;
6
6
}
7
7
8
8
export interface PluginConfig {
@@ -14,75 +14,91 @@ export interface PluginConfig {
14
14
destinationARN : string ;
15
15
}
16
16
17
- /**
18
- * If your plugin adds new properties to any level in the serverless.yml
19
- * you can use these functions to add JSON ajv based schema validation for
20
- * those properties
21
- *
22
- * @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration
23
- */
17
+ /**
18
+ * If your plugin adds new properties to any level in the serverless.yml
19
+ * you can use these functions to add JSON ajv based schema validation for
20
+ * those properties
21
+ *
22
+ * @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration
23
+ */
24
24
export interface ConfigSchemaHandler {
25
25
/**
26
- * If your plugin requires additional top-level properties (like provider, custom, service...), you can use the defineTopLevelProperty helper to add their definition.
26
+ * If your plugin requires additional top-level properties (like provider, custom, service...)
27
+ * you can use the defineTopLevelProperty helper to add their definition.
27
28
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#top-level-properties-via-definetoplevelproperty
28
29
*/
29
- defineTopLevelProperty ( providerName : string , schema : Record < string , unknown > ) : void ;
30
+ defineTopLevelProperty (
31
+ providerName : string ,
32
+ schema : Record < string , unknown >
33
+ ) : void ;
30
34
/**
31
- * If your plugin depends on properties defined in the custom: section, you can use the defineCustomProperties helper
35
+ * If your plugin depends on properties defined in the custom: section, you can use the
36
+ * defineCustomProperties helper
32
37
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#properties-in-custom-via-definecustomproperties
33
38
*/
34
- defineCustomProperties ( jsonSchema : object ) : void ,
39
+ defineCustomProperties ( jsonSchema : object ) : void ;
35
40
/**
36
- * If your plugin adds support to a new function event, you can use the defineFunctionEvent helper
41
+ * If your plugin adds support to a new function event, you can use the
42
+ * defineFunctionEvent helper
37
43
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#function-events-via-definefunctionevent
38
44
*/
39
- defineFunctionEvent ( providerName : string , event : string , jsonSchema : Record < string , object > ) : void
45
+ defineFunctionEvent (
46
+ providerName : string ,
47
+ event : string ,
48
+ jsonSchema : Record < string , object >
49
+ ) : void ;
40
50
/**
41
- * If your plugin adds new properties to a function event, you can use the defineFunctionEventProperties helper
51
+ * If your plugin adds new properties to a function event, you can use the
52
+ * defineFunctionEventProperties helper
42
53
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#function-event-properties-via-definefunctioneventproperties
43
54
*/
44
- defineFunctionEventProperties ( providerName : string , existingEvent : string , jsonSchema : object ) : void ;
55
+ defineFunctionEventProperties (
56
+ providerName : string ,
57
+ existingEvent : string ,
58
+ jsonSchema : object
59
+ ) : void ;
45
60
/**
46
- * If your plugin adds new properties to functions, you can use the defineFunctionProperties helper.
61
+ * If your plugin adds new properties to functions, you can use the
62
+ * defineFunctionProperties helper.
47
63
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#function-properties-via-definefunctionproperties
48
64
*/
49
- defineFunctionProperties ( providerName : string , schema : object ) : void ;
65
+ defineFunctionProperties ( providerName : string , schema : object ) : void ;
50
66
/**
51
67
* If your plugin provides support for a new provider, register it via defineProvider
52
68
* @see https://www.serverless.com/framework/docs/guides/plugins/custom-configuration#new-provider-via-defineprovider
53
69
*/
54
- defineProvider ( providerName : string , options ?: Record < string , unknown > ) : void ;
70
+ defineProvider ( providerName : string , options ?: Record < string , unknown > ) : void ;
55
71
}
56
72
57
73
export interface ServerlessInstance {
58
74
service : {
59
- service : string
75
+ service : string ;
60
76
resources : {
61
- Resources : ResourcesCF
62
- } ,
77
+ Resources : ResourcesCF ;
78
+ } ;
63
79
provider : {
64
- stage : string ,
65
- region : string
66
- } ,
80
+ stage : string ;
81
+ region : string ;
82
+ } ;
67
83
functions : {
68
84
name : unknown [ ] ;
69
- } ,
70
- getFunction ( name : string ) : SlsFunction ,
85
+ } ;
86
+ getFunction ( name : string ) : SlsFunction ;
71
87
custom : {
72
- logForwarding : PluginConfig
73
- } ,
74
- } ,
88
+ logForwarding : PluginConfig ;
89
+ } ;
90
+ } ;
75
91
providers : {
76
92
aws : {
77
- getRegion ( ) : string ,
78
- } ,
79
- } ,
80
- getProvider ( name : string ) : AWSProvider ,
81
- configSchemaHandler : ConfigSchemaHandler ,
93
+ getRegion ( ) : string ;
94
+ } ;
95
+ } ;
96
+ getProvider ( name : string ) : AWSProvider ;
97
+ configSchemaHandler : ConfigSchemaHandler ;
82
98
cli : {
83
- log ( str : string , entity ?: string ) : void ,
84
- consoleLog ( str : string ) : void ,
85
- }
99
+ log ( str : string , entity ?: string ) : void ;
100
+ consoleLog ( str : string ) : void ;
101
+ } ;
86
102
}
87
103
88
104
export interface ServerlessConfig {
@@ -93,10 +109,10 @@ export interface ServerlessConfig {
93
109
94
110
export interface AWSProvider {
95
111
naming : {
96
- getLogGroupName ( name : string ) : string ,
97
- getNormalizedFunctionName ( name : string ) : string ,
98
- getLogGroupLogicalId ( name : string ) : string
99
- }
112
+ getLogGroupName ( name : string ) : string ;
113
+ getNormalizedFunctionName ( name : string ) : string ;
114
+ getLogGroupLogicalId ( name : string ) : string ;
115
+ } ;
100
116
}
101
117
102
118
export interface ObjectCF < TProps > {
0 commit comments