@acceleratxr/core_sdk
Advanced tools
Comparing version
@@ -22,3 +22,3 @@ "use strict"; | ||
constructor(config) { | ||
this.cookies = []; | ||
this.cookies = new Map(); | ||
this.config = config; | ||
@@ -42,3 +42,3 @@ this.axios = axios_1.default.create({ | ||
clearCookies() { | ||
this.cookies = []; | ||
this.cookies = new Map(); | ||
} | ||
@@ -219,10 +219,10 @@ /** | ||
// Add any stored cookies | ||
if (this.cookies.length > 0) { | ||
if (this.cookies.size > 0) { | ||
let value = ""; | ||
for (const cookie of this.cookies) { | ||
for (const cookie of this.cookies.entries()) { | ||
if (value.length === 0) { | ||
value = cookie; | ||
value = `${cookie[0]}=${cookie[1]}`; | ||
} | ||
else { | ||
value += `; ${cookie}`; | ||
value += `; ${cookie[0]}=${cookie[1]}`; | ||
} | ||
@@ -300,10 +300,10 @@ } | ||
// Add any stored cookies | ||
if (this.cookies.length > 0) { | ||
if (this.cookies.size > 0) { | ||
let value = ""; | ||
for (const cookie of this.cookies) { | ||
for (const cookie of this.cookies.entries()) { | ||
if (value.length === 0) { | ||
value = cookie; | ||
value = `${cookie[0]}=${cookie[1]}`; | ||
} | ||
else { | ||
value += `; ${cookie}`; | ||
value += `; ${cookie[0]}=${cookie[1]}`; | ||
} | ||
@@ -396,10 +396,10 @@ } | ||
// Add any stored cookies | ||
if (this.cookies.length > 0) { | ||
if (this.cookies.size > 0) { | ||
let value = ""; | ||
for (const cookie of this.cookies) { | ||
for (const cookie of this.cookies.entries()) { | ||
if (value.length === 0) { | ||
value = cookie; | ||
value = `${cookie[0]}=${cookie[1]}`; | ||
} | ||
else { | ||
value += `; ${cookie}`; | ||
value += `; ${cookie[0]}=${cookie[1]}`; | ||
} | ||
@@ -467,7 +467,5 @@ } | ||
for (const cookie of cookies) { | ||
// We only care about the value up to the first `;` | ||
const value = cookie.substr(0, cookie.indexOf(";")); | ||
if (!this.cookies.includes(value)) { | ||
this.cookies.push(value); | ||
} | ||
// Extract the cookie's key name | ||
const parts = cookie.split("="); | ||
this.cookies.set(parts[0], parts[1]); | ||
} | ||
@@ -474,0 +472,0 @@ } |
@@ -101,2 +101,5 @@ "use strict"; | ||
} | ||
if (!this.baseServicePaths.has(services_1.LaunchProfileService.uuid)) { | ||
this.baseServicePaths.set(services_1.LaunchProfileService.uuid, "/launch-profiles"); | ||
} | ||
if (!this.baseServicePaths.has(services_1.PaymentService.uuid)) { | ||
@@ -103,0 +106,0 @@ this.baseServicePaths.set(services_1.PaymentService.uuid, "/payments"); |
@@ -21,2 +21,3 @@ "use strict"; | ||
__export(require("./Item")); | ||
__export(require("./LaunchProfile")); | ||
__export(require("./Leaderboard")); | ||
@@ -23,0 +24,0 @@ __export(require("./LeaderboardRecord")); |
@@ -124,2 +124,14 @@ "use strict"; | ||
this.data = undefined; | ||
/** | ||
* The featured display index of the product, if any. If product is not featured, index is set to -1. | ||
*/ | ||
this.featured = -1; | ||
/** | ||
* The default LaunchProfile uid to launch the product with. | ||
*/ | ||
this.defaultLaunchProfile = ""; | ||
/** | ||
* The list of LaunchProfiles available to the product. | ||
*/ | ||
this.launchProfiles = []; | ||
if (other) { | ||
@@ -148,2 +160,5 @@ this.name = "name" in other ? other.name : this.name; | ||
this.data = "data" in other ? other.data : this.data; | ||
this.featured = "featured" in other ? other.featured : this.featured; | ||
this.defaultLaunchProfile = "defaultLaunchProfile" in other ? other.defaultLaunchProfile : this.defaultLaunchProfile; | ||
this.launchProfiles = "launchProfiles" in other ? other.launchProfiles : this.launchProfiles; | ||
} | ||
@@ -150,0 +165,0 @@ } |
@@ -23,2 +23,3 @@ "use strict"; | ||
__export(require("./ItemService")); | ||
__export(require("./LaunchProfileService")); | ||
__export(require("./LeaderboardRecordService")); | ||
@@ -25,0 +26,0 @@ __export(require("./LeaderboardService")); |
@@ -16,2 +16,3 @@ export * from "./Achievement"; | ||
export * from "./Item"; | ||
export * from "./LaunchProfile"; | ||
export * from "./Leaderboard"; | ||
@@ -18,0 +19,0 @@ export * from "./LeaderboardRecord"; |
@@ -106,3 +106,15 @@ import { Currency } from "./Currency"; | ||
data: any; | ||
/** | ||
* The featured display index of the product, if any. If product is not featured, index is set to -1. | ||
*/ | ||
featured: number; | ||
/** | ||
* The default LaunchProfile uid to launch the product with. | ||
*/ | ||
defaultLaunchProfile: string; | ||
/** | ||
* The list of LaunchProfiles available to the product. | ||
*/ | ||
launchProfiles: Array<string>; | ||
constructor(other?: any); | ||
} |
@@ -18,2 +18,3 @@ export * from "./AchievementService"; | ||
export * from "./ItemService"; | ||
export * from "./LaunchProfileService"; | ||
export * from "./LeaderboardRecordService"; | ||
@@ -20,0 +21,0 @@ export * from "./LeaderboardService"; |
{ | ||
"name": "@acceleratxr/core_sdk", | ||
"version": "1.51.0", | ||
"version": "1.51.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Jean-Philippe Steinmetz <info@acceleratxr.com>", |
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 not supported yet
Sorry, the diff of this file is too big to display
4286126
0.36%543
1.12%18968
1.51%