@player-ui/partial-match-fingerprint-plugin 0.15.2 → 0.15.3--canary.836.34713
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.
|
@@ -18,10 +18,6 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
18
18
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
19
19
|
return Constructor;
|
|
20
20
|
}
|
|
21
|
-
function _type_of(obj) {
|
|
22
|
-
"@swc/helpers - typeof";
|
|
23
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
24
|
-
}
|
|
25
21
|
var PartialMatchFingerprintPlugin = function() {
|
|
26
22
|
var __defProp = Object.defineProperty;
|
|
27
23
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -34,7 +30,7 @@ var PartialMatchFingerprintPlugin = function() {
|
|
|
34
30
|
});
|
|
35
31
|
};
|
|
36
32
|
var __copyProps = function(to, from, except, desc) {
|
|
37
|
-
if (from &&
|
|
33
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
34
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
39
35
|
try {
|
|
40
36
|
var _loop = function() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
1
|
+
{"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2674/execroot/_main/bazel-out/k8-fastbuild/bin/plugins/partial-match-fingerprint/core/dist/index.global.js","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/partial-match-fingerprint/core/src/index.ts"],"names":["PartialMatchFingerprintPlugin","__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","src_exports","registry","mapping","Map","apply","player","hooks","viewController","tap","view","resolver","afterResolve","resolved","node","type","set","id","register","match","assetId"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,gCAAgC,AAAC;IACnC,IAAIC,YAAYC,OAAOC,cAAc;IACrC,IAAIC,mBAAmBF,OAAOG,wBAAwB;IACtD,IAAIC,oBAAoBJ,OAAOK,mBAAmB;IAClD,IAAIC,eAAeN,OAAOO,SAAS,CAACC,cAAc;IAClD,IAAIC,WAAW,SAACC,QAAQC;QACtB,IAAK,IAAIC,QAAQD,IACfZ,UAAUW,QAAQE,MAAM;YAAEC,KAAKF,GAAG,CAACC,KAAK;YAAEE,YAAY;QAAK;IAC/D;IACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;QACnC,IAAIF,QAAQ,OAAOA,SAAS,YAAY,OAAOA,SAAS,YAAY;gBAC7D,kCAAA,2BAAA;;;oBAAA,IAAIG,MAAJ;oBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCnB,UAAUiB,IAAII,KAAK;wBAAEP,KAAK;mCAAMI,IAAI,CAACG,IAAI;;wBAAEN,YAAY,CAAEK,CAAAA,OAAOjB,iBAAiBe,MAAMG,IAAG,KAAMD,KAAKL,UAAU;oBAAC;;gBAFpH,QAAK,YAAWV,kBAAkBa,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;gBAAA;gBAAA;;;yBAAA,6BAAA;wBAAA;;;wBAAA;8BAAA;;;;QAGP;QACA,OAAOD;IACT;IACA,IAAIM,eAAe,SAACC;eAAQR,YAAYhB,UAAU,CAAC,GAAG,cAAc;YAAEyB,OAAO;QAAK,IAAID;;IAEtF,iIAAiI;ICpBnI,IAAAE,cAAA,CAAA;IAAAhB,SAAAgB,aAAA;QAAA3B,+BAAA;mBAAAA;;IAAA;IAQO,IAAMA,8CAAN;iBAAMA,8BAKC4B,QAAA;;YAJZ,IAAA,CAAAd,IAAA,GAAO;YAKL,IAAA,CAAKc,QAAA,GAAWA;YAChB,IAAA,CAAKC,OAAA,GAAU,aAAA,GAAA,IAAIC;;;;gBAGrBC,KAAAA;uBAAAA,SAAAA,MAAMC,MAAA;;oBACJA,OAAOC,KAAA,CAAMC,cAAA,CAAeC,GAAA,CAAI,IAAA,CAAKrB,IAAA,EAAM,SAACoB;wBAC1CA,eAAeD,KAAA,CAAMG,IAAA,CAAKD,GAAA,CAAI,MAAKrB,IAAA,EAAM,SAACsB;4BACxCA,KAAKH,KAAA,CAAMI,QAAA,CAASF,GAAA,CAAI,MAAKrB,IAAA,EAAM,SAACuB;gCAClCA,SAASJ,KAAA,CAAMK,YAAA,CAAaH,GAAA,CAAI,MAAKrB,IAAA,EAAM,SAACyB,UAAUC;oCACpD,IACGD,YAAYC,QAAQA,KAAKC,IAAA,KAAS,WACnCD,KAAKC,IAAA,KAAS,QACd;wCACA,MAAKZ,OAAA,CAAQa,GAAA,CACVH,SAAmBI,EAAA,EACpB,MAAKf,QAAA,CAASb,GAAA,CAAIwB;oCAEtB;gCACF;4BACF;wBACF;oBACF;gBACF;;;gBAEAK,KAAAA;uBAAAA,SAAAA,SAASC,KAAA,EAAYnB,KAAA;oBACnB,IAAA,CAAKE,QAAA,CAASc,GAAA,CAAIG,OAAOnB;gBAC3B;;;gBAEAX,KAAAA;uBAAAA,SAAAA,IAAI+B,OAAA;oBACF,OAAO,IAAA,CAAKjB,OAAA,CAAQd,GAAA,CAAI+B;gBAC1B;;;;;IDUA,OAAOtB,aAAaG;AACtB","sourcesContent":["\"use strict\";\nvar PartialMatchFingerprintPlugin = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/partial-match-fingerprint/core/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n PartialMatchFingerprintPlugin: () => PartialMatchFingerprintPlugin\n });\n var PartialMatchFingerprintPlugin = class {\n constructor(registry) {\n this.name = \"partial-match-fingerprint\";\n this.registry = registry;\n this.mapping = /* @__PURE__ */ new Map();\n }\n apply(player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver) => {\n resolver.hooks.afterResolve.tap(this.name, (resolved, node) => {\n if (resolved && node && node.type === \"asset\" || node.type === \"view\") {\n this.mapping.set(\n resolved.id,\n this.registry.get(resolved)\n );\n }\n });\n });\n });\n });\n }\n register(match, value) {\n this.registry.set(match, value);\n }\n get(assetId) {\n return this.mapping.get(assetId);\n }\n };\n return __toCommonJS(src_exports);\n})();\n","import type { Player, PlayerPlugin, Asset } from \"@player-ui/player\";\nimport type { Registry } from \"@player-ui/partial-match-registry\";\n\n/**\n * A player plugin to manage partial-match-mappings by asset id\n * Automatically keeps track of all resolved asset id's and the value they match to in\n * the partial match registry\n */\nexport class PartialMatchFingerprintPlugin implements PlayerPlugin {\n name = \"partial-match-fingerprint\";\n private registry: Registry<any>;\n private mapping: Map<string, any>;\n\n constructor(registry: Registry<any>) {\n this.registry = registry;\n this.mapping = new Map<string, any>();\n }\n\n apply(player: Player) {\n player.hooks.viewController.tap(this.name, (viewController) => {\n viewController.hooks.view.tap(this.name, (view) => {\n view.hooks.resolver.tap(this.name, (resolver) => {\n resolver.hooks.afterResolve.tap(this.name, (resolved, node) => {\n if (\n (resolved && node && node.type === \"asset\") ||\n node.type === \"view\"\n ) {\n this.mapping.set(\n (resolved as Asset).id,\n this.registry.get(resolved as Asset),\n );\n }\n });\n });\n });\n });\n }\n\n register(match: any, value: any) {\n this.registry.set(match, value);\n }\n\n get(assetId: string) {\n return this.mapping.get(assetId);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"types"
|
|
7
7
|
],
|
|
8
8
|
"name": "@player-ui/partial-match-fingerprint-plugin",
|
|
9
|
-
"version": "0.15.
|
|
9
|
+
"version": "0.15.3--canary.836.34713",
|
|
10
10
|
"main": "dist/cjs/index.cjs",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@player-ui/partial-match-registry": "0.15.
|
|
12
|
+
"@player-ui/partial-match-registry": "0.15.3--canary.836.34713",
|
|
13
13
|
"tapable-ts": "^0.2.3",
|
|
14
14
|
"tslib": "^2.6.2"
|
|
15
15
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@player-ui/make-flow": "workspace:^"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@player-ui/player": "0.15.
|
|
20
|
+
"@player-ui/player": "0.15.3--canary.836.34713"
|
|
21
21
|
},
|
|
22
22
|
"module": "dist/index.legacy-esm.js",
|
|
23
23
|
"types": "types/index.d.ts",
|