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

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 +41 -39
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # @faasjs/func
2
2
 
3
- 云函数模块。
4
-
5
3
  [![License: MIT](https://img.shields.io/npm/l/@faasjs/func.svg)](https://github.com/faasjs/faasjs/blob/main/packages/faasjs/func/LICENSE)
6
4
  [![NPM Stable Version](https://img.shields.io/npm/v/@faasjs/func/stable.svg)](https://www.npmjs.com/package/@faasjs/func)
7
5
  [![NPM Beta Version](https://img.shields.io/npm/v/@faasjs/func/beta.svg)](https://www.npmjs.com/package/@faasjs/func)
8
6
 
9
- https://faasjs.com/doc/
7
+ FaasJS's function module.
8
+
9
+ ## Install
10
+
11
+ npm install @faasjs/func
10
12
 
11
13
  ## Modules
12
14
 
@@ -16,23 +18,23 @@ https://faasjs.com/doc/
16
18
 
17
19
  ### Type aliases
18
20
 
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)
21
+ - [Config](#config)
22
+ - [DeployData](#deploydata)
23
+ - [ExportedHandler](#exportedhandler)
24
+ - [FuncConfig](#funcconfig)
25
+ - [Handler](#handler)
26
+ - [InvokeData](#invokedata)
27
+ - [LifeCycleKey](#lifecyclekey)
28
+ - [MountData](#mountdata)
29
+ - [Next](#next)
30
+ - [Plugin](#plugin)
31
+ - [ProviderConfig](#providerconfig)
32
+ - [UseifyPlugin](#useifyplugin)
31
33
 
32
34
  ### Functions
33
35
 
34
- - [useFunc](modules.md#usefunc)
35
- - [usePlugin](modules.md#useplugin)
36
+ - [useFunc](#usefunc)
37
+ - [usePlugin](#useplugin)
36
38
 
37
39
  ## Type aliases
38
40
 
@@ -48,8 +50,8 @@ https://faasjs.com/doc/
48
50
 
49
51
  | Name | Type |
50
52
  | :------ | :------ |
51
- | `plugins?` | `Object` |
52
- | `providers?` | `Object` |
53
+ | `plugins?` | { [key: string]: { [key: string]: `any`; `config?`: { [key: string]: `any`; } ; `provider?`: `string` \| [`ProviderConfig`](#providerconfig) ; `type`: `string` }; } |
54
+ | `providers?` | { [key: string]: [`ProviderConfig`](#providerconfig); } |
53
55
 
54
56
  ___
55
57
 
@@ -65,13 +67,13 @@ ___
65
67
 
66
68
  | Name | Type |
67
69
  | :------ | :------ |
68
- | `config?` | [`Config`](modules.md#config) |
69
- | `dependencies` | `Object` |
70
+ | `config?` | [`Config`](#config) |
71
+ | `dependencies` | { [name: string]: `string`; } |
70
72
  | `env?` | `string` |
71
73
  | `filename` | `string` |
72
74
  | `logger?` | `Logger` |
73
75
  | `name?` | `string` |
74
- | `plugins?` | `Object` |
76
+ | `plugins?` | { [name: string]: { [key: string]: `any`; `config`: { [key: string]: `any`; } ; `name?`: `string` ; `plugin`: [`Plugin`](#plugin) ; `provider?`: `string` ; `type`: `string` }; } |
75
77
  | `root` | `string` |
76
78
  | `version?` | `string` |
77
79
 
@@ -123,14 +125,14 @@ ___
123
125
 
124
126
  | Name | Type |
125
127
  | :------ | :------ |
126
- | `handler?` | [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
127
- | `plugins?` | [`Plugin`](modules.md#plugin)[] |
128
+ | `handler?` | [`Handler`](#handler)<`TEvent`, `TContext`, `TResult`\> |
129
+ | `plugins?` | [`Plugin`](#plugin)[] |
128
130
 
129
131
  ___
130
132
 
131
133
  ### Handler
132
134
 
133
- Ƭ **Handler**<`TEvent`, `TContext`, `TResult`\>: (`data`: [`InvokeData`](modules.md#invokedata)<`TEvent`, `TContext`\>) => `Promise`<`TResult`\>
135
+ Ƭ **Handler**<`TEvent`, `TContext`, `TResult`\>: (`data`: [`InvokeData`](#invokedata)<`TEvent`, `TContext`\>) => `Promise`<`TResult`\>
134
136
 
135
137
  #### Type parameters
136
138
 
@@ -148,7 +150,7 @@ ___
148
150
 
149
151
  | Name | Type |
150
152
  | :------ | :------ |
151
- | `data` | [`InvokeData`](modules.md#invokedata)<`TEvent`, `TContext`\> |
153
+ | `data` | [`InvokeData`](#invokedata)<`TEvent`, `TContext`\> |
152
154
 
153
155
  ##### Returns
154
156
 
@@ -177,10 +179,10 @@ ___
177
179
  | Name | Type |
178
180
  | :------ | :------ |
179
181
  | `callback` | `any` |
180
- | `config` | [`Config`](modules.md#config) |
182
+ | `config` | [`Config`](#config) |
181
183
  | `context` | `TContext` |
182
184
  | `event` | `TEvent` |
183
- | `handler?` | [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
185
+ | `handler?` | [`Handler`](#handler)<`TEvent`, `TContext`, `TResult`\> |
184
186
  | `logger` | `Logger` |
185
187
  | `response` | `any` |
186
188
 
@@ -204,7 +206,7 @@ ___
204
206
 
205
207
  | Name | Type |
206
208
  | :------ | :------ |
207
- | `config` | [`Config`](modules.md#config) |
209
+ | `config` | [`Config`](#config) |
208
210
  | `context` | `any` |
209
211
  | `event` | `any` |
210
212
 
@@ -238,9 +240,9 @@ ___
238
240
  | :------ | :------ |
239
241
  | `name` | `string` |
240
242
  | `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`\> |
243
+ | `onDeploy?` | (`data`: [`DeployData`](#deploydata), `next`: [`Next`](#next)) => `void` \| `Promise`<`void`\> |
244
+ | `onInvoke?` | (`data`: [`InvokeData`](#invokedata)<`any`, `any`, `any`\>, `next`: [`Next`](#next)) => `void` \| `Promise`<`void`\> |
245
+ | `onMount?` | (`data`: [`MountData`](#mountdata), `next`: [`Next`](#next)) => `void` \| `Promise`<`void`\> |
244
246
 
245
247
  ___
246
248
 
@@ -252,7 +254,7 @@ ___
252
254
 
253
255
  | Name | Type |
254
256
  | :------ | :------ |
255
- | `config` | `Object` |
257
+ | `config` | { [key: string]: `any`; } |
256
258
  | `type` | `string` |
257
259
 
258
260
  ___
@@ -265,7 +267,7 @@ ___
265
267
 
266
268
  | Name | Type |
267
269
  | :------ | :------ |
268
- | `mount?` | (`data`: { `config`: [`Config`](modules.md#config) }) => `Promise`<`void`\> |
270
+ | `mount?` | (`data`: { `config`: [`Config`](#config) }) => `Promise`<`void`\> |
269
271
 
270
272
  ## Functions
271
273
 
@@ -285,7 +287,7 @@ ___
285
287
 
286
288
  | Name | Type |
287
289
  | :------ | :------ |
288
- | `handler` | () => [`Handler`](modules.md#handler)<`TEvent`, `TContext`, `TResult`\> |
290
+ | `handler` | () => [`Handler`](#handler)<`TEvent`, `TContext`, `TResult`\> |
289
291
 
290
292
  #### Returns
291
293
 
@@ -295,20 +297,20 @@ ___
295
297
 
296
298
  ### usePlugin
297
299
 
298
- ▸ **usePlugin**<`T`\>(`plugin`): `T` & [`UseifyPlugin`](modules.md#useifyplugin)
300
+ ▸ **usePlugin**<`T`\>(`plugin`): `T` & [`UseifyPlugin`](#useifyplugin)
299
301
 
300
302
  #### Type parameters
301
303
 
302
304
  | Name | Type |
303
305
  | :------ | :------ |
304
- | `T` | extends [`Plugin`](modules.md#plugin) |
306
+ | `T` | extends [`Plugin`](#plugin) |
305
307
 
306
308
  #### Parameters
307
309
 
308
310
  | Name | Type |
309
311
  | :------ | :------ |
310
- | `plugin` | `T` & [`UseifyPlugin`](modules.md#useifyplugin) |
312
+ | `plugin` | `T` & [`UseifyPlugin`](#useifyplugin) |
311
313
 
312
314
  #### Returns
313
315
 
314
- `T` & [`UseifyPlugin`](modules.md#useifyplugin)
316
+ `T` & [`UseifyPlugin`](#useifyplugin)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/func",
3
- "version": "0.0.2-beta.362",
3
+ "version": "0.0.2-beta.366",
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.362",
26
- "@faasjs/logger": "^0.0.2-beta.362"
25
+ "@faasjs/deep_merge": "^0.0.2-beta.366",
26
+ "@faasjs/logger": "^0.0.2-beta.366"
27
27
  },
28
28
  "devDependencies": {
29
29
  "tsup": "*",