@empathyco/x-utils
Advanced tools
Comparing version 1.0.3-alpha.0 to 1.0.3-alpha.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DefaultSessionService = void 0; | ||
const nanoid_1 = require("nanoid"); | ||
const x_storage_service_1 = require("@empathyco/x-storage-service"); | ||
@@ -28,3 +27,3 @@ /** | ||
var _a; | ||
const sessionId = (_a = this.storageService.getItem(DefaultSessionService.SESSION_ID_KEY)) !== null && _a !== void 0 ? _a : (0, nanoid_1.nanoid)(); | ||
const sessionId = (_a = this.storageService.getItem(DefaultSessionService.SESSION_ID_KEY)) !== null && _a !== void 0 ? _a : self.crypto.randomUUID(); | ||
this.storageService.setItem(DefaultSessionService.SESSION_ID_KEY, sessionId, this.ttlMs); | ||
@@ -31,0 +30,0 @@ return sessionId; |
@@ -1,2 +0,1 @@ | ||
import { nanoid } from 'nanoid'; | ||
import { BrowserStorageService, InMemoryStorageService } from '@empathyco/x-storage-service'; | ||
@@ -25,3 +24,3 @@ /** | ||
var _a; | ||
const sessionId = (_a = this.storageService.getItem(DefaultSessionService.SESSION_ID_KEY)) !== null && _a !== void 0 ? _a : nanoid(); | ||
const sessionId = (_a = this.storageService.getItem(DefaultSessionService.SESSION_ID_KEY)) !== null && _a !== void 0 ? _a : self.crypto.randomUUID(); | ||
this.storageService.setItem(DefaultSessionService.SESSION_ID_KEY, sessionId, this.ttlMs); | ||
@@ -28,0 +27,0 @@ return sessionId; |
{ | ||
"name": "@empathyco/x-utils", | ||
"version": "1.0.3-alpha.0", | ||
"version": "1.0.3-alpha.1", | ||
"description": "A utility package for Empathy search", | ||
@@ -38,3 +38,2 @@ "author": "Empathy Systems Corporation S.L.", | ||
"@empathyco/x-storage-service": "^2.0.3-alpha.0", | ||
"nanoid": "~3.3.0", | ||
"tslib": "~2.6.0" | ||
@@ -52,3 +51,3 @@ }, | ||
}, | ||
"gitHead": "7a6825669246e5975ecee4a9ed615f018236e70c" | ||
"gitHead": "217bcad29251fc880b421caf2dcb48e89f52d26f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2
111606
1143
- Removednanoid@~3.3.0
- Removednanoid@3.3.7(transitive)