@faasjs/func 0.0.2-beta.358 → 0.0.2-beta.362

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 (2) hide show
  1. package/README.md +305 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -7,3 +7,308 @@
7
7
  [![NPM Beta Version](https://img.shields.io/npm/v/@faasjs/func/beta.svg)](https://www.npmjs.com/package/@faasjs/func)
8
8
 
9
9
  https://faasjs.com/doc/
10
+
11
+ ## Modules
12
+
13
+ ### Classes
14
+
15
+ - [Func](classes/Func.md)
16
+
17
+ ### Type aliases
18
+
19
+ - [Config](modules.md#config)
20
+ - [DeployData](modules.md#deploydata)
21
+ - [ExportedHandler](modules.md#exportedhandler)
22
+ - [FuncConfig](modules.md#funcconfig)
23
+ - [Handler](modules.md#handler)
24
+ - [InvokeData](modules.md#invokedata)
25
+ - [LifeCycleKey](modules.md#lifecyclekey)
26
+ - [MountData](modules.md#mountdata)
27
+ - [Next](modules.md#next)
28
+ - [Plugin](modules.md#plugin)
29
+ - [ProviderConfig](modules.md#providerconfig)
30
+ - [UseifyPlugin](modules.md#useifyplugin)
31
+
32
+ ### Functions
33
+
34
+ - [useFunc](modules.md#usefunc)
35
+ - [usePlugin](modules.md#useplugin)
36
+
37
+ ## Type aliases
38
+
39
+ ### Config
40
+
41
+ Ƭ **Config**: `Object`
42
+
43
+ #### Index signature
44
+
45
+ ▪ [key: `string`]: `any`
46
+
47
+ #### Type declaration
48
+
49
+ | Name | Type |
50
+ | :------ | :------ |
51
+ | `plugins?` | `Object` |
52
+ | `providers?` | `Object` |
53
+
54
+ ___
55
+
56
+ ### DeployData
57
+
58
+ Ƭ **DeployData**: `Object`
59
+
60
+ #### Index signature
61
+
62
+ ▪ [key: `string`]: `any`
63
+
64
+ #### Type declaration
65
+
66
+ | Name | Type |
67
+ | :------ | :------ |
68
+ | `config?` | [`Config`](modules.md#config) |
69
+ | `dependencies` | `Object` |
70
+ | `env?` | `string` |
71
+ | `filename` | `string` |
72
+ | `logger?` | `Logger` |
73
+ | `name?` | `string` |
74
+ | `plugins?` | `Object` |
75
+ | `root` | `string` |
76
+ | `version?` | `string` |
77
+
78
+ ___
79
+
80
+ ### ExportedHandler
81
+
82
+ Ƭ **ExportedHandler**<`TEvent`, `TContext`, `TResult`\>: (`event`: `TEvent`, `context?`: `TContext`, `callback?`: (...`args`: `any`) => `any`) => `Promise`<`TResult`\>
83
+
84
+ #### Type parameters
85
+
86
+ | Name | Type |
87
+ | :------ | :------ |
88
+ | `TEvent` | `any` |
89
+ | `TContext` | `any` |
90
+ | `TResult` | `any` |
91
+
92
+ #### Type declaration
93
+
94
+ ▸ (`event`, `context?`, `callback?`): `Promise`<`TResult`\>
95
+
96
+ ##### Parameters
97
+
98
+ | Name | Type |
99
+ | :------ | :------ |
100
+ | `event` | `TEvent` |
101
+ | `context?` | `TContext` |
102
+ | `callback?` | (...`args`: `any`) => `any` |
103
+
104
+ ##### Returns
105
+
106
+ `Promise`<`TResult`\>
107
+
108
+ ___
109
+
110
+ ### FuncConfig
111
+
112
+ Ƭ **FuncConfig**<`TEvent`, `TContext`, `TResult`\>: `Object`
113
+
114
+ #### Type parameters
115
+
116
+ | Name | Type |
117
+ | :------ | :------ |
118
+ | `TEvent` | `any` |
119
+ | `TContext` | `any` |
120
+ | `TResult` | `any` |
121
+
122
+ #### Type declaration
123
+
124
+ | Name | Type |
125
+ | :------ | :------ |
126
+ | `handler?` | [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
127
+ | `plugins?` | [`Plugin`](modules.md#plugin)[] |
128
+
129
+ ___
130
+
131
+ ### Handler
132
+
133
+ Ƭ **Handler**<`TEvent`, `TContext`, `TResult`\>: (`data`: [`InvokeData`](modules.md#invokedata)<`TEvent`, `TContext`\>) => `Promise`<`TResult`\>
134
+
135
+ #### Type parameters
136
+
137
+ | Name | Type |
138
+ | :------ | :------ |
139
+ | `TEvent` | `any` |
140
+ | `TContext` | `any` |
141
+ | `TResult` | `any` |
142
+
143
+ #### Type declaration
144
+
145
+ ▸ (`data`): `Promise`<`TResult`\>
146
+
147
+ ##### Parameters
148
+
149
+ | Name | Type |
150
+ | :------ | :------ |
151
+ | `data` | [`InvokeData`](modules.md#invokedata)<`TEvent`, `TContext`\> |
152
+
153
+ ##### Returns
154
+
155
+ `Promise`<`TResult`\>
156
+
157
+ ___
158
+
159
+ ### InvokeData
160
+
161
+ Ƭ **InvokeData**<`TEvent`, `TContext`, `TResult`\>: `Object`
162
+
163
+ #### Type parameters
164
+
165
+ | Name | Type |
166
+ | :------ | :------ |
167
+ | `TEvent` | `any` |
168
+ | `TContext` | `any` |
169
+ | `TResult` | `any` |
170
+
171
+ #### Index signature
172
+
173
+ ▪ [key: `string`]: `any`
174
+
175
+ #### Type declaration
176
+
177
+ | Name | Type |
178
+ | :------ | :------ |
179
+ | `callback` | `any` |
180
+ | `config` | [`Config`](modules.md#config) |
181
+ | `context` | `TContext` |
182
+ | `event` | `TEvent` |
183
+ | `handler?` | [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
184
+ | `logger` | `Logger` |
185
+ | `response` | `any` |
186
+
187
+ ___
188
+
189
+ ### LifeCycleKey
190
+
191
+ Ƭ **LifeCycleKey**: ``"onDeploy"`` \| ``"onMount"`` \| ``"onInvoke"``
192
+
193
+ ___
194
+
195
+ ### MountData
196
+
197
+ Ƭ **MountData**: `Object`
198
+
199
+ #### Index signature
200
+
201
+ ▪ [key: `string`]: `any`
202
+
203
+ #### Type declaration
204
+
205
+ | Name | Type |
206
+ | :------ | :------ |
207
+ | `config` | [`Config`](modules.md#config) |
208
+ | `context` | `any` |
209
+ | `event` | `any` |
210
+
211
+ ___
212
+
213
+ ### Next
214
+
215
+ Ƭ **Next**: () => `Promise`<`void`\>
216
+
217
+ #### Type declaration
218
+
219
+ ▸ (): `Promise`<`void`\>
220
+
221
+ ##### Returns
222
+
223
+ `Promise`<`void`\>
224
+
225
+ ___
226
+
227
+ ### Plugin
228
+
229
+ Ƭ **Plugin**: `Object`
230
+
231
+ #### Index signature
232
+
233
+ ▪ [key: `string`]: `any`
234
+
235
+ #### Type declaration
236
+
237
+ | Name | Type |
238
+ | :------ | :------ |
239
+ | `name` | `string` |
240
+ | `type` | `string` |
241
+ | `onDeploy?` | (`data`: [`DeployData`](modules.md#deploydata), `next`: [`Next`](modules.md#next)) => `void` \| `Promise`<`void`\> |
242
+ | `onInvoke?` | (`data`: [`InvokeData`](modules.md#invokedata)<`any`, `any`, `any`\>, `next`: [`Next`](modules.md#next)) => `void` \| `Promise`<`void`\> |
243
+ | `onMount?` | (`data`: [`MountData`](modules.md#mountdata), `next`: [`Next`](modules.md#next)) => `void` \| `Promise`<`void`\> |
244
+
245
+ ___
246
+
247
+ ### ProviderConfig
248
+
249
+ Ƭ **ProviderConfig**: `Object`
250
+
251
+ #### Type declaration
252
+
253
+ | Name | Type |
254
+ | :------ | :------ |
255
+ | `config` | `Object` |
256
+ | `type` | `string` |
257
+
258
+ ___
259
+
260
+ ### UseifyPlugin
261
+
262
+ Ƭ **UseifyPlugin**: `Object`
263
+
264
+ #### Type declaration
265
+
266
+ | Name | Type |
267
+ | :------ | :------ |
268
+ | `mount?` | (`data`: { `config`: [`Config`](modules.md#config) }) => `Promise`<`void`\> |
269
+
270
+ ## Functions
271
+
272
+ ### useFunc
273
+
274
+ ▸ **useFunc**<`TEvent`, `TContext`, `TResult`\>(`handler`): [`Func`](classes/Func.md)<`TEvent`, `TContext`, `TResult`\>
275
+
276
+ #### Type parameters
277
+
278
+ | Name | Type |
279
+ | :------ | :------ |
280
+ | `TEvent` | `any` |
281
+ | `TContext` | `any` |
282
+ | `TResult` | `any` |
283
+
284
+ #### Parameters
285
+
286
+ | Name | Type |
287
+ | :------ | :------ |
288
+ | `handler` | () => [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
289
+
290
+ #### Returns
291
+
292
+ [`Func`](classes/Func.md)<`TEvent`, `TContext`, `TResult`\>
293
+
294
+ ___
295
+
296
+ ### usePlugin
297
+
298
+ ▸ **usePlugin**<`T`\>(`plugin`): `T` & [`UseifyPlugin`](modules.md#useifyplugin)
299
+
300
+ #### Type parameters
301
+
302
+ | Name | Type |
303
+ | :------ | :------ |
304
+ | `T` | extends [`Plugin`](modules.md#plugin) |
305
+
306
+ #### Parameters
307
+
308
+ | Name | Type |
309
+ | :------ | :------ |
310
+ | `plugin` | `T` & [`UseifyPlugin`](modules.md#useifyplugin) |
311
+
312
+ #### Returns
313
+
314
+ `T` & [`UseifyPlugin`](modules.md#useifyplugin)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/func",
3
- "version": "0.0.2-beta.358",
3
+ "version": "0.0.2-beta.362",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,8 +22,8 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@faasjs/deep_merge": "^0.0.2-beta.358",
26
- "@faasjs/logger": "^0.0.2-beta.358"
25
+ "@faasjs/deep_merge": "^0.0.2-beta.362",
26
+ "@faasjs/logger": "^0.0.2-beta.362"
27
27
  },
28
28
  "devDependencies": {
29
29
  "tsup": "*",