@comunica/statistic-link-discovery 3.3.0 → 4.0.1
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.
|
@@ -2,7 +2,7 @@ import type { ActionContextKey } from '@comunica/core';
|
|
|
2
2
|
import { StatisticBase } from '@comunica/statistic-base';
|
|
3
3
|
import type { IDiscoverEventData, ILink, IStatisticBase } from '@comunica/types';
|
|
4
4
|
export declare class StatisticLinkDiscovery extends StatisticBase<IDiscoverEventData> {
|
|
5
|
-
key: ActionContextKey<IStatisticBase<
|
|
5
|
+
key: ActionContextKey<IStatisticBase<IDiscoverEventData>>;
|
|
6
6
|
count: number;
|
|
7
7
|
metadata: Record<string, Record<any, any>[]>;
|
|
8
8
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatisticLinkDiscovery.js","sourceRoot":"","sources":["StatisticLinkDiscovery.ts"],"names":[],"mappings":";;;AAAA,+DAA2D;AAE3D,6DAAyD;AAGzD,MAAa,sBAAuB,SAAQ,8BAAiC;IAY3E;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,gCAAc,CAAC,eAAe,CAAC;IAC5C,CAAC;IAEM,eAAe,CAAC,IAAW,EAAE,MAAa;QAC/C,MAAM,sBAAsB,GAAG;YAC7B,GAAG,IAAI,CAAC,QAAQ;YAChB,mBAAmB,EAAE,WAAW,CAAC,GAAG,EAAE;YACtC,aAAa,EAAE,IAAI,CAAC,KAAK;SAC1B,CAAC;QACF,6GAA6G;QAC7G,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,CAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,sBAAsB,CAAE,CAAC,CAAC;YACxD,CAAE,sBAAsB,CAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,CAAE,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAE;YAC9B,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;YACtC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;SAC1C,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArCD,wDAqCC","sourcesContent":["import { KeysStatistics } from '@comunica/context-entries';\nimport type { ActionContextKey } from '@comunica/core';\nimport { StatisticBase } from '@comunica/statistic-base';\nimport type { IDiscoverEventData, ILink, IStatisticBase } from '@comunica/types';\n\nexport class StatisticLinkDiscovery extends StatisticBase<IDiscoverEventData> {\n // Key this statistic tracker should be saved under in context\n public key: ActionContextKey<IStatisticBase<
|
|
1
|
+
{"version":3,"file":"StatisticLinkDiscovery.js","sourceRoot":"","sources":["StatisticLinkDiscovery.ts"],"names":[],"mappings":";;;AAAA,+DAA2D;AAE3D,6DAAyD;AAGzD,MAAa,sBAAuB,SAAQ,8BAAiC;IAY3E;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,GAAG,gCAAc,CAAC,eAAe,CAAC;IAC5C,CAAC;IAEM,eAAe,CAAC,IAAW,EAAE,MAAa;QAC/C,MAAM,sBAAsB,GAAG;YAC7B,GAAG,IAAI,CAAC,QAAQ;YAChB,mBAAmB,EAAE,WAAW,CAAC,GAAG,EAAE;YACtC,aAAa,EAAE,IAAI,CAAC,KAAK;SAC1B,CAAC;QACF,6GAA6G;QAC7G,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,CAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,sBAAsB,CAAE,CAAC,CAAC;YACxD,CAAE,sBAAsB,CAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC;YACR,IAAI,EAAE,CAAE,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAE;YAC9B,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;YACtC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;SAC1C,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArCD,wDAqCC","sourcesContent":["import { KeysStatistics } from '@comunica/context-entries';\nimport type { ActionContextKey } from '@comunica/core';\nimport { StatisticBase } from '@comunica/statistic-base';\nimport type { IDiscoverEventData, ILink, IStatisticBase } from '@comunica/types';\n\nexport class StatisticLinkDiscovery extends StatisticBase<IDiscoverEventData> {\n // Key this statistic tracker should be saved under in context\n public key: ActionContextKey<IStatisticBase<IDiscoverEventData>>;\n\n // Number of discover events tracked\n public count: number;\n\n // Metadata is saved as follows: First key indicates what url this metadata belongs to, while value is\n // a list of all metadata objects recorded. This list can contain multiple Records as links can be discovered from\n // multiple data sources.\n public metadata: Record<string, Record<any, any>[]>;\n\n public constructor() {\n super();\n this.count = 0;\n this.metadata = {};\n this.key = KeysStatistics.discoveredLinks;\n }\n\n public updateStatistic(link: ILink, parent: ILink): boolean {\n const discoveredLinkMetadata = {\n ...link.metadata,\n discoveredTimestamp: performance.now(),\n discoverOrder: this.count,\n };\n // Retain previous metadata if this link has already been discovered, and add any metadata in the passed link\n this.metadata[link.url] = this.metadata[link.url] ?\n [ ...this.metadata[link.url], discoveredLinkMetadata ] :\n [ discoveredLinkMetadata ];\n this.emit({\n edge: [ parent.url, link.url ],\n metadataChild: this.metadata[link.url],\n metadataParent: this.metadata[parent.url],\n });\n this.count++;\n return true;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/statistic-link-discovery",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Comunica package that defines the statistic tracking link discovery events",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"funding": {
|
|
7
|
+
"type": "opencollective",
|
|
8
|
+
"url": "https://opencollective.com/comunica-association"
|
|
9
|
+
},
|
|
6
10
|
"homepage": "https://comunica.dev/",
|
|
7
11
|
"repository": {
|
|
8
12
|
"type": "git",
|
|
@@ -35,10 +39,10 @@
|
|
|
35
39
|
"build": "node \"../../node_modules/typescript/bin/tsc\""
|
|
36
40
|
},
|
|
37
41
|
"dependencies": {
|
|
38
|
-
"@comunica/context-entries": "^
|
|
39
|
-
"@comunica/core": "^
|
|
40
|
-
"@comunica/statistic-base": "^
|
|
41
|
-
"@comunica/types": "^
|
|
42
|
+
"@comunica/context-entries": "^4.0.1",
|
|
43
|
+
"@comunica/core": "^4.0.1",
|
|
44
|
+
"@comunica/statistic-base": "^4.0.1",
|
|
45
|
+
"@comunica/types": "^4.0.1"
|
|
42
46
|
},
|
|
43
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "67831ba79e45ea1ced41fe3f83c5d6e8802dbeaa"
|
|
44
48
|
}
|