@bunshin-cc/bunshin 0.1.0 → 0.1.1
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.
- package/dist/bin.js +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -957,7 +957,7 @@ async function connectionProfile(apiUrl, apiKey) {
|
|
|
957
957
|
if (!response.ok) throw new Error(`Bunshin returned HTTP ${response.status}. No connection settings were changed.`);
|
|
958
958
|
const body = await response.json();
|
|
959
959
|
const profile = body.profile;
|
|
960
|
-
if (!profile || ![profile.orgId, profile.userId, profile.role
|
|
960
|
+
if (!profile || ![profile.orgId, profile.userId, profile.role].every((value) => typeof value === "string" && value.length > 0) || typeof profile.orgUnit !== "string" || !["public", "org", "department", "team", "leadership", "csuite", "private"].includes(profile.clearance) || !Array.isArray(profile.responsibilities) || !profile.responsibilities.every((value) => typeof value === "string")) {
|
|
961
961
|
throw new Error("Bunshin returned an incomplete profile. No connection settings were changed.");
|
|
962
962
|
}
|
|
963
963
|
return profile;
|