@komaci/prefetch 240.1.4 → 242.0.0
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.
|
@@ -43,7 +43,8 @@ export function prefetch(routes = [], pageReferences = [], config) {
|
|
|
43
43
|
|
|
44
44
|
if (config && config.onStateChanged) config.onStateChanged(status);
|
|
45
45
|
},
|
|
46
|
-
instrumentationContext: config?.instrumentationContext
|
|
46
|
+
instrumentationContext: config?.instrumentationContext,
|
|
47
|
+
downloadImage: config?.downloadImage
|
|
47
48
|
};
|
|
48
49
|
getPrefetchService(router, pageReferences, wrappedConfig);
|
|
49
50
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ERROR_PREFIX, PrefetchStatusStates as STATE } from 'komaci/prefetchTypes';
|
|
2
2
|
import { getInstrumentation } from 'o11y/client';
|
|
3
3
|
import { getBulkAdgResolver } from 'komaci/resolver';
|
|
4
|
-
import ResolverConfig from 'komaci/resolverConfig';
|
|
5
4
|
import { InstrumentedAction } from 'komaci/instrumentedAction';
|
|
6
5
|
import { bulkResolveSchema, prefetchSchema, prefetchServiceSchema, totalRoutingSchema } from 'o11y_schema/sf_komaci';
|
|
7
6
|
const NO_ADG_MODULE_FOUND = 'No ADG module found for given address.';
|
|
@@ -36,17 +35,7 @@ export class PrefetchService {
|
|
|
36
35
|
this._activity = this._instrumentation.startActivity('prefetch', this.apiOptions);
|
|
37
36
|
this._size = addresses.length; //FIXME: to use o11y.startActivity() when o11y available
|
|
38
37
|
|
|
39
|
-
this._startTime = Date.now();
|
|
40
|
-
// access the rootActivityId to enable multiple root activity instrumentation
|
|
41
|
-
|
|
42
|
-
if (this.config?.instrumentationContext && ResolverConfig) {
|
|
43
|
-
ResolverConfig.InstrumentationContext = this.config.instrumentationContext;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (this.config?.downloadImage && ResolverConfig) {
|
|
47
|
-
ResolverConfig.DownloadImage = this.config.downloadImage;
|
|
48
|
-
}
|
|
49
|
-
|
|
38
|
+
this._startTime = Date.now();
|
|
50
39
|
this.prefetch(addresses);
|
|
51
40
|
}
|
|
52
41
|
/**
|
|
@@ -301,7 +290,18 @@ export class PrefetchService {
|
|
|
301
290
|
resolverInputStatus
|
|
302
291
|
};
|
|
303
292
|
bulkResolutionGroup.adgInputs = adgInputs;
|
|
304
|
-
|
|
293
|
+
const bulkResolutionStatusCbs = {
|
|
294
|
+
bulkResolutionStatusCb: this.onBulkResolutionStatus.bind(this, bulkResolutionGroup, action),
|
|
295
|
+
overallBulkResolutionStatusCb: undefined
|
|
296
|
+
};
|
|
297
|
+
const environmentCfg = {
|
|
298
|
+
instrumentationCtx: this.apiOptions.instrumentationContext,
|
|
299
|
+
downloadImageFunc: this.config.downloadImage,
|
|
300
|
+
MaxResolutionDepth: 512,
|
|
301
|
+
WireTimeout: 180 * 1000,
|
|
302
|
+
WireSlowRunningTimeout: 30 * 1000
|
|
303
|
+
};
|
|
304
|
+
bulkResolutionGroup.bulkResolver = getBulkAdgResolver(adgFn, adgInputs, bulkResolutionStatusCbs, environmentCfg);
|
|
305
305
|
this.resolutionGroups.push(bulkResolutionGroup);
|
|
306
306
|
bulkResolutionGroup.bulkResolver.start();
|
|
307
307
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/prefetch",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "242.0.0",
|
|
4
4
|
"description": "Komaci prefetch service.",
|
|
5
5
|
"homepage": "https://komaci.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"build/**/*.d.ts"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@komaci/module-shared": "
|
|
30
|
-
"@komaci/resolver": "
|
|
29
|
+
"@komaci/module-shared": "242.0.0",
|
|
30
|
+
"@komaci/resolver": "242.0.0",
|
|
31
31
|
"@lwrjs/router": "0.6.0-alpha.15",
|
|
32
32
|
"o11y": "^240.7.0",
|
|
33
33
|
"o11y_schema": "^240.11.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@komaci/types": "
|
|
36
|
+
"@komaci/types": "242.0.0",
|
|
37
37
|
"wait-for-expect": "^3.0.2"
|
|
38
38
|
}
|
|
39
39
|
}
|