@mozilla/rally
Advanced tools
Comparing version
{ | ||
"name": "@mozilla/rally", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "The Rally partner support library.", | ||
@@ -5,0 +5,0 @@ "main": "rally.js", |
23
rally.js
@@ -58,2 +58,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
this._enableDevMode = Boolean(enableDevMode); | ||
this._rallyId = null; | ||
@@ -111,9 +112,19 @@ let hasRally = await this._checkRallyCore().then(() => { | ||
if (!response | ||
|| response.type !== "core-check-response" | ||
|| response.data.enrolled !== true) { | ||
throw new Error(`Rally._checkRallyCore - unexpected response returned ${response}`); | ||
} | ||
if (response | ||
&& response.type == "core-check-response") { | ||
if (response.data | ||
&& "enrolled" in response.data | ||
&& response.data.enrolled === true | ||
&& "rallyId" in response.data | ||
&& response.data.rallyId !== null) { | ||
this._rallyId = response.data.rallyId; | ||
} else { | ||
throw new Error(`Rally._checkRallyCore - core addon present, but not enrolled in Rally`); | ||
} | ||
} else{ | ||
throw new Error(`Rally._checkRallyCore - unexpected response returned ${response}`); | ||
} | ||
} catch (ex) { | ||
throw new Error("Rally._checkRallyCore - core addon not found"); | ||
throw new Error(`Rally._checkRallyCore - core addon check failed with: ${ex}`); | ||
} | ||
@@ -120,0 +131,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11619
3.96%239
4.37%1
Infinity%