@vercel/functions 3.3.1 → 3.3.2
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.
package/CHANGELOG.md
CHANGED
package/addcachetag/index.js
CHANGED
|
@@ -23,9 +23,9 @@ __export(addcachetag_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(addcachetag_exports);
|
|
24
24
|
var import_get_context = require("../get-context");
|
|
25
25
|
const addCacheTag = (tag) => {
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
26
|
+
const addCacheTag2 = (0, import_get_context.getContext)().addCacheTag;
|
|
27
|
+
if (addCacheTag2) {
|
|
28
|
+
return addCacheTag2(tag);
|
|
29
29
|
}
|
|
30
30
|
return Promise.resolve();
|
|
31
31
|
};
|
package/addcachetag/types.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Vercel AddCacheTag API.
|
|
3
|
+
* A function that adds one or more tags to the cache content.
|
|
4
|
+
*
|
|
5
|
+
* @param tag One or more tags to add to the cache content.
|
|
6
|
+
* @returns A promise that resolves when the tag is added.
|
|
3
7
|
*/
|
|
4
|
-
export
|
|
5
|
-
/**
|
|
6
|
-
* Add one or more tags to the cache content
|
|
7
|
-
*
|
|
8
|
-
* @param tag One or more tags to add to the cache content.
|
|
9
|
-
* @returns A promise that resolves when the tag is added.
|
|
10
|
-
*/
|
|
11
|
-
addCacheTag: (tag: string | string[]) => Promise<void>;
|
|
12
|
-
}
|
|
8
|
+
export type AddCacheTagApi = (tag: string | string[]) => Promise<void>;
|
package/docs/modules/index.md
CHANGED
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
### Interfaces
|
|
6
6
|
|
|
7
|
-
- [AddCacheTagApi](../interfaces/index.AddCacheTagApi.md)
|
|
8
7
|
- [DangerouslyDeleteOptions](../interfaces/index.DangerouslyDeleteOptions.md)
|
|
9
8
|
- [Geo](../interfaces/index.Geo.md)
|
|
10
9
|
- [PurgeApi](../interfaces/index.PurgeApi.md)
|
|
11
10
|
- [Request](../interfaces/index.Request.md)
|
|
12
11
|
- [RuntimeCache](../interfaces/index.RuntimeCache.md)
|
|
13
12
|
|
|
13
|
+
### Type Aliases
|
|
14
|
+
|
|
15
|
+
- [AddCacheTagApi](index.md#addcachetagapi)
|
|
16
|
+
|
|
14
17
|
### Functions
|
|
15
18
|
|
|
16
19
|
- [addCacheTag](index.md#addcachetag)
|
|
@@ -28,6 +31,35 @@
|
|
|
28
31
|
- [rewrite](index.md#rewrite)
|
|
29
32
|
- [waitUntil](index.md#waituntil)
|
|
30
33
|
|
|
34
|
+
## Type Aliases
|
|
35
|
+
|
|
36
|
+
### AddCacheTagApi
|
|
37
|
+
|
|
38
|
+
Ƭ **AddCacheTagApi**: (`tag`: `string` \| `string`[]) => [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
39
|
+
|
|
40
|
+
#### Type declaration
|
|
41
|
+
|
|
42
|
+
▸ (`tag`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
43
|
+
|
|
44
|
+
Vercel AddCacheTag API.
|
|
45
|
+
A function that adds one or more tags to the cache content.
|
|
46
|
+
|
|
47
|
+
##### Parameters
|
|
48
|
+
|
|
49
|
+
| Name | Type | Description |
|
|
50
|
+
| :---- | :--------------------- | :-------------------------------------------- |
|
|
51
|
+
| `tag` | `string` \| `string`[] | One or more tags to add to the cache content. |
|
|
52
|
+
|
|
53
|
+
##### Returns
|
|
54
|
+
|
|
55
|
+
[`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
56
|
+
|
|
57
|
+
A promise that resolves when the tag is added.
|
|
58
|
+
|
|
59
|
+
#### Defined in
|
|
60
|
+
|
|
61
|
+
[packages/functions/src/addcachetag/types.ts:8](https://github.com/vercel/vercel/blob/main/packages/functions/src/addcachetag/types.ts#L8)
|
|
62
|
+
|
|
31
63
|
## Functions
|
|
32
64
|
|
|
33
65
|
### addCacheTag
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Interface: AddCacheTagApi
|
|
2
|
-
|
|
3
|
-
[index](../modules/index.md).AddCacheTagApi
|
|
4
|
-
|
|
5
|
-
Vercel AddCacheTag API.
|
|
6
|
-
|
|
7
|
-
## Table of contents
|
|
8
|
-
|
|
9
|
-
### Properties
|
|
10
|
-
|
|
11
|
-
- [addCacheTag](index.AddCacheTagApi.md#addcachetag)
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
### addCacheTag
|
|
16
|
-
|
|
17
|
-
• **addCacheTag**: (`tag`: `string` \| `string`[]) => [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
18
|
-
|
|
19
|
-
#### Type declaration
|
|
20
|
-
|
|
21
|
-
▸ (`tag`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
22
|
-
|
|
23
|
-
Add one or more tags to the cache content
|
|
24
|
-
|
|
25
|
-
##### Parameters
|
|
26
|
-
|
|
27
|
-
| Name | Type | Description |
|
|
28
|
-
| :---- | :--------------------- | :-------------------------------------------- |
|
|
29
|
-
| `tag` | `string` \| `string`[] | One or more tags to add to the cache content. |
|
|
30
|
-
|
|
31
|
-
##### Returns
|
|
32
|
-
|
|
33
|
-
[`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
|
|
34
|
-
|
|
35
|
-
A promise that resolves when the tag is added.
|
|
36
|
-
|
|
37
|
-
#### Defined in
|
|
38
|
-
|
|
39
|
-
[packages/functions/src/addcachetag/types.ts:11](https://github.com/vercel/vercel/blob/main/packages/functions/src/addcachetag/types.ts#L11)
|