@twin.org/web 0.0.1-next.49 → 0.0.1-next.50
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/dist/cjs/index.cjs
CHANGED
|
@@ -686,6 +686,15 @@ class FetchHelper {
|
|
|
686
686
|
static async getCacheEntry(url) {
|
|
687
687
|
return core.AsyncCache.get(`${FetchHelper._CACHE_PREFIX}${url}`);
|
|
688
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* Set a cache entry.
|
|
691
|
+
* @param url The url for the request.
|
|
692
|
+
* @param value The value to cache.
|
|
693
|
+
* @returns The cache entry if it exists.
|
|
694
|
+
*/
|
|
695
|
+
static async setCacheEntry(url, value) {
|
|
696
|
+
core.AsyncCache.set(`${FetchHelper._CACHE_PREFIX}${url}`, value);
|
|
697
|
+
}
|
|
689
698
|
/**
|
|
690
699
|
* Remove a cache entry.
|
|
691
700
|
* @param url The url for the request.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -684,6 +684,15 @@ class FetchHelper {
|
|
|
684
684
|
static async getCacheEntry(url) {
|
|
685
685
|
return AsyncCache.get(`${FetchHelper._CACHE_PREFIX}${url}`);
|
|
686
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Set a cache entry.
|
|
689
|
+
* @param url The url for the request.
|
|
690
|
+
* @param value The value to cache.
|
|
691
|
+
* @returns The cache entry if it exists.
|
|
692
|
+
*/
|
|
693
|
+
static async setCacheEntry(url, value) {
|
|
694
|
+
AsyncCache.set(`${FetchHelper._CACHE_PREFIX}${url}`, value);
|
|
695
|
+
}
|
|
687
696
|
/**
|
|
688
697
|
* Remove a cache entry.
|
|
689
698
|
* @param url The url for the request.
|
|
@@ -44,6 +44,13 @@ export declare class FetchHelper {
|
|
|
44
44
|
* @returns The cache entry if it exists.
|
|
45
45
|
*/
|
|
46
46
|
static getCacheEntry<T>(url: string): Promise<T | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* Set a cache entry.
|
|
49
|
+
* @param url The url for the request.
|
|
50
|
+
* @param value The value to cache.
|
|
51
|
+
* @returns The cache entry if it exists.
|
|
52
|
+
*/
|
|
53
|
+
static setCacheEntry<T>(url: string, value: T): Promise<void>;
|
|
47
54
|
/**
|
|
48
55
|
* Remove a cache entry.
|
|
49
56
|
* @param url The url for the request.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @twin.org/web - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.50](https://github.com/twinfoundation/framework/compare/web-v0.0.1-next.49...web-v0.0.1-next.50) (2025-03-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/core bumped from 0.0.1-next.49 to 0.0.1-next.50
|
|
16
|
+
* @twin.org/crypto bumped from 0.0.1-next.49 to 0.0.1-next.50
|
|
17
|
+
|
|
3
18
|
## 0.0.1-next.49
|
|
4
19
|
|
|
5
20
|
- Initial Release
|
|
@@ -200,6 +200,38 @@ The cache entry if it exists.
|
|
|
200
200
|
|
|
201
201
|
***
|
|
202
202
|
|
|
203
|
+
### setCacheEntry()
|
|
204
|
+
|
|
205
|
+
> `static` **setCacheEntry**\<`T`\>(`url`, `value`): `Promise`\<`void`\>
|
|
206
|
+
|
|
207
|
+
Set a cache entry.
|
|
208
|
+
|
|
209
|
+
#### Type Parameters
|
|
210
|
+
|
|
211
|
+
• **T**
|
|
212
|
+
|
|
213
|
+
#### Parameters
|
|
214
|
+
|
|
215
|
+
##### url
|
|
216
|
+
|
|
217
|
+
`string`
|
|
218
|
+
|
|
219
|
+
The url for the request.
|
|
220
|
+
|
|
221
|
+
##### value
|
|
222
|
+
|
|
223
|
+
`T`
|
|
224
|
+
|
|
225
|
+
The value to cache.
|
|
226
|
+
|
|
227
|
+
#### Returns
|
|
228
|
+
|
|
229
|
+
`Promise`\<`void`\>
|
|
230
|
+
|
|
231
|
+
The cache entry if it exists.
|
|
232
|
+
|
|
233
|
+
***
|
|
234
|
+
|
|
203
235
|
### removeCacheEntry()
|
|
204
236
|
|
|
205
237
|
> `static` **removeCacheEntry**(`url`): `void`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/web",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.50",
|
|
4
4
|
"description": "Contains classes for use with web operations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "0.0.1-next.
|
|
18
|
-
"@twin.org/crypto": "0.0.1-next.
|
|
17
|
+
"@twin.org/core": "0.0.1-next.50",
|
|
18
|
+
"@twin.org/crypto": "0.0.1-next.50",
|
|
19
19
|
"@twin.org/nameof": "next",
|
|
20
20
|
"jose": "6.0.8"
|
|
21
21
|
},
|