@openfin/node-adapter 43.102.2 → 43.103.3
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/out/node-adapter.js +45 -14
- package/package.json +2 -2
package/out/node-adapter.js
CHANGED
|
@@ -5261,6 +5261,48 @@ class System extends base_1$m.EmitterBase {
|
|
|
5261
5261
|
clearCache(options) {
|
|
5262
5262
|
return this.wire.sendAction('clear-cache', options).then(() => undefined);
|
|
5263
5263
|
}
|
|
5264
|
+
/**
|
|
5265
|
+
* Clears only the HTTP cache (browser cache for HTML, CSS, JS, images).
|
|
5266
|
+
* Service workers and other storage data are preserved.
|
|
5267
|
+
*
|
|
5268
|
+
* This is useful when you need to clear stale content without breaking offline functionality.
|
|
5269
|
+
*
|
|
5270
|
+
* @example
|
|
5271
|
+
* ```js
|
|
5272
|
+
* // Clear HTTP cache without affecting service workers
|
|
5273
|
+
* await fin.System.clearHTTPCache();
|
|
5274
|
+
* ```
|
|
5275
|
+
*/
|
|
5276
|
+
clearHTTPCache() {
|
|
5277
|
+
return this.wire.sendAction('clear-http-cache').then(() => undefined);
|
|
5278
|
+
}
|
|
5279
|
+
/**
|
|
5280
|
+
* Clears browsing data with granular control over what to clear and which origins to target.
|
|
5281
|
+
*
|
|
5282
|
+
* @param options - Optional configuration for what data to clear
|
|
5283
|
+
*
|
|
5284
|
+
* @example
|
|
5285
|
+
* ```js
|
|
5286
|
+
* // Clear only cookies and localStorage for a specific origin
|
|
5287
|
+
* await fin.System.clearCacheData({
|
|
5288
|
+
* dataTypes: ['cookies', 'localStorage'],
|
|
5289
|
+
* origins: ['http://localhost:8081']
|
|
5290
|
+
* });
|
|
5291
|
+
*
|
|
5292
|
+
* // Clear everything except for a specific origin
|
|
5293
|
+
* await fin.System.clearCacheData({
|
|
5294
|
+
* excludeOrigins: ['http://example.com']
|
|
5295
|
+
* });
|
|
5296
|
+
*
|
|
5297
|
+
* // Clear all service workers across all origins
|
|
5298
|
+
* await fin.System.clearCacheData({
|
|
5299
|
+
* dataTypes: ['serviceWorkers']
|
|
5300
|
+
* });
|
|
5301
|
+
* ```
|
|
5302
|
+
*/
|
|
5303
|
+
clearCacheData(options) {
|
|
5304
|
+
return this.wire.sendAction('clear-cache-data', options || {}).then(() => undefined);
|
|
5305
|
+
}
|
|
5264
5306
|
/**
|
|
5265
5307
|
* Clears all cached data when OpenFin Runtime exits.
|
|
5266
5308
|
*
|
|
@@ -16071,7 +16113,6 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
|
|
|
16071
16113
|
// Generate an ID to make a session context group with. We will pass that ID to the Broker.
|
|
16072
16114
|
// The broker will then setContext on that session context group later with our Intent Result,
|
|
16073
16115
|
const guid = (0, utils_1.generateId)(); // TODO make this undefined in web
|
|
16074
|
-
let isPromiseSettled = false;
|
|
16075
16116
|
// Adding the intentResolutionResultId to the intentObj. Because fireIntent only accepts a single arg, we have to slap it in here.
|
|
16076
16117
|
const metadata = app ? { target: app, intentResolutionResultId: guid } : { intentResolutionResultId: guid };
|
|
16077
16118
|
const intentObj = intent ? { name: intent, context, metadata } : { ...context, metadata };
|
|
@@ -16087,21 +16128,11 @@ fdc3Channels2_0.createV2Channel = createV2Channel;
|
|
|
16087
16128
|
reject(new Error('getResult is not supported in this environment'));
|
|
16088
16129
|
});
|
|
16089
16130
|
});
|
|
16090
|
-
getResultPromise
|
|
16091
|
-
.then(() => {
|
|
16092
|
-
isPromiseSettled = true;
|
|
16093
|
-
})
|
|
16094
|
-
.catch(() => {
|
|
16095
|
-
isPromiseSettled = true;
|
|
16096
|
-
});
|
|
16097
16131
|
// Set up the getResult call.
|
|
16098
16132
|
const getResult = async () => {
|
|
16099
|
-
// All this mumbo jumbo is needed to make sure that getResult resolves correctly and conforms to the FDC3 spec.
|
|
16100
|
-
if (!isPromiseSettled) {
|
|
16101
|
-
return undefined;
|
|
16102
|
-
}
|
|
16103
16133
|
let intentResult = await getResultPromise;
|
|
16104
|
-
|
|
16134
|
+
// void / no payload, or web path where subscribe resolves undefined (see getResultPromise above)
|
|
16135
|
+
if (intentResult == null) {
|
|
16105
16136
|
return undefined;
|
|
16106
16137
|
}
|
|
16107
16138
|
if (typeof intentResult !== 'object') {
|
|
@@ -18394,7 +18425,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
|
|
|
18394
18425
|
};
|
|
18395
18426
|
}
|
|
18396
18427
|
getAdapterVersionSync() {
|
|
18397
|
-
return "43.
|
|
18428
|
+
return "43.103.3";
|
|
18398
18429
|
}
|
|
18399
18430
|
observeBounds(element, onChange) {
|
|
18400
18431
|
throw new Error('Method not implemented.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/node-adapter",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.103.3",
|
|
4
4
|
"description": "See README.md",
|
|
5
5
|
"main": "out/node-adapter.js",
|
|
6
6
|
"types": "out/node-adapter.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "OpenFin",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node": "^20.14.2",
|
|
27
|
-
"@openfin/core": "43.
|
|
27
|
+
"@openfin/core": "43.103.3",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"ws": "^7.3.0"
|
|
30
30
|
}
|