@empathyco/x-adapter
Advanced tools
Comparing version 7.0.0-alpha.6 to 7.0.0-alpha.7
@@ -31,3 +31,5 @@ "use strict"; | ||
EmpathyAdapterBuilder.prototype.enableCache = function (_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.storageService, storageService = _c === void 0 ? typeof localStorage !== 'undefined' ? new x_storage_service_1.StorageService(localStorage) : undefined : _c, _d = _b.cacheService, cacheService = _d === void 0 ? empathy_cache_service_1.EmpathyCacheService : _d; | ||
var _b = _a === void 0 ? {} : _a, _c = _b.storageService, storageService = _c === void 0 ? typeof localStorage !== 'undefined' | ||
? new x_storage_service_1.BrowserStorageService(localStorage) | ||
: undefined : _c, _d = _b.cacheService, cacheService = _d === void 0 ? empathy_cache_service_1.EmpathyCacheService : _d; | ||
if (storageService && cacheService) { | ||
@@ -189,3 +191,6 @@ this.container.bind(container_const_1.DEPENDENCIES.storageService).toConstantValue(storageService); | ||
if (feature) { | ||
this.container.bind(container_const_1.DEPENDENCIES.Hooks[hookName]).toFunction(hook).whenInjectedInto(container_const_1.DEPENDENCIES.Requestors[feature]); | ||
this.container | ||
.bind(container_const_1.DEPENDENCIES.Hooks[hookName]) | ||
.toFunction(hook) | ||
.whenInjectedInto(container_const_1.DEPENDENCIES.Requestors[feature]); | ||
} | ||
@@ -192,0 +197,0 @@ else { |
@@ -5,3 +5,2 @@ "use strict"; | ||
var tslib_1 = require("tslib"); | ||
var x_storage_service_1 = require("@empathyco/x-storage-service"); | ||
var inversify_1 = require("inversify"); | ||
@@ -38,3 +37,3 @@ var container_const_1 = require("../container/container.const"); | ||
// tslint:disable-next-line:no-bitwise | ||
h = Math.imul(31, h) + key.charCodeAt(i) | 0; | ||
h = (Math.imul(31, h) + key.charCodeAt(i)) | 0; | ||
} | ||
@@ -49,3 +48,3 @@ return h.toString(); | ||
tslib_1.__param(0, inversify_1.inject(container_const_1.DEPENDENCIES.storageService)), | ||
tslib_1.__metadata("design:paramtypes", [x_storage_service_1.StorageService]) | ||
tslib_1.__metadata("design:paramtypes", [Object]) | ||
], EmpathyCacheService); | ||
@@ -52,0 +51,0 @@ return EmpathyCacheService; |
@@ -1,2 +0,2 @@ | ||
import { StorageService } from '@empathyco/x-storage-service'; | ||
import { BrowserStorageService } from '@empathyco/x-storage-service'; | ||
import { deepMerge } from '@empathyco/x-deep-merge'; | ||
@@ -28,3 +28,5 @@ import { Container, injectable } from 'inversify'; | ||
EmpathyAdapterBuilder.prototype.enableCache = function (_a) { | ||
var _b = _a === void 0 ? {} : _a, _c = _b.storageService, storageService = _c === void 0 ? typeof localStorage !== 'undefined' ? new StorageService(localStorage) : undefined : _c, _d = _b.cacheService, cacheService = _d === void 0 ? EmpathyCacheService : _d; | ||
var _b = _a === void 0 ? {} : _a, _c = _b.storageService, storageService = _c === void 0 ? typeof localStorage !== 'undefined' | ||
? new BrowserStorageService(localStorage) | ||
: undefined : _c, _d = _b.cacheService, cacheService = _d === void 0 ? EmpathyCacheService : _d; | ||
if (storageService && cacheService) { | ||
@@ -186,3 +188,6 @@ this.container.bind(DEPENDENCIES.storageService).toConstantValue(storageService); | ||
if (feature) { | ||
this.container.bind(DEPENDENCIES.Hooks[hookName]).toFunction(hook).whenInjectedInto(DEPENDENCIES.Requestors[feature]); | ||
this.container | ||
.bind(DEPENDENCIES.Hooks[hookName]) | ||
.toFunction(hook) | ||
.whenInjectedInto(DEPENDENCIES.Requestors[feature]); | ||
} | ||
@@ -189,0 +194,0 @@ else { |
import { __decorate, __metadata, __param } from "tslib"; | ||
import { StorageService } from '@empathyco/x-storage-service'; | ||
import { inject, injectable } from 'inversify'; | ||
@@ -34,3 +33,3 @@ import { DEPENDENCIES } from '../container/container.const'; | ||
// tslint:disable-next-line:no-bitwise | ||
h = Math.imul(31, h) + key.charCodeAt(i) | 0; | ||
h = (Math.imul(31, h) + key.charCodeAt(i)) | 0; | ||
} | ||
@@ -45,3 +44,3 @@ return h.toString(); | ||
__param(0, inject(DEPENDENCIES.storageService)), | ||
__metadata("design:paramtypes", [StorageService]) | ||
__metadata("design:paramtypes", [Object]) | ||
], EmpathyCacheService); | ||
@@ -48,0 +47,0 @@ return EmpathyCacheService; |
{ | ||
"name": "@empathyco/x-adapter", | ||
"version": "7.0.0-alpha.6", | ||
"version": "7.0.0-alpha.7", | ||
"description": "A search client for the Empathy search API ", | ||
@@ -43,7 +43,7 @@ "author": "Empathy Systems Corporation S.L.", | ||
"dependencies": { | ||
"@empathyco/x-deep-merge": "^1.3.0-alpha.0", | ||
"@empathyco/x-get-safe-property-chain": "^1.3.0-alpha.0", | ||
"@empathyco/x-deep-merge": "^1.3.0-alpha.1", | ||
"@empathyco/x-get-safe-property-chain": "^1.3.0-alpha.1", | ||
"@empathyco/x-logger": "^1.1.0", | ||
"@empathyco/x-storage-service": "^1.4.0-alpha.0", | ||
"@empathyco/x-types": "^10.0.0-alpha.11", | ||
"@empathyco/x-storage-service": "^2.0.0-alpha.0", | ||
"@empathyco/x-types": "^10.0.0-alpha.12", | ||
"inversify": "~5.0.1", | ||
@@ -54,9 +54,9 @@ "reflect-metadata": "~0.1.13", | ||
"devDependencies": { | ||
"@empathyco/x-jest-utils": "^1.4.0-alpha.0", | ||
"@empathyco/x-jest-utils": "^1.4.0-alpha.1", | ||
"@microsoft/api-documenter": "~7.13.33", | ||
"@microsoft/api-extractor": "~7.18.4", | ||
"@types/jest": "~24.0.13", | ||
"@types/jest": "~27.0.3", | ||
"@types/node": "~12.7.5", | ||
"jest": "~24.7.1", | ||
"ts-jest": "~24.0.2", | ||
"jest": "~27.3.1", | ||
"ts-jest": "~27.0.7", | ||
"typescript": "~4.3.5" | ||
@@ -67,3 +67,3 @@ }, | ||
}, | ||
"gitHead": "86cecedd0d76dc5db810bba830adea137154e33d" | ||
"gitHead": "7de21ba09dc79c4cd968dab38a0e934439a47490" | ||
} |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.18.16" | ||
"packageVersion": "7.18.19" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1554418
30191