@safetech/inheriti-cli 0.0.16-dev.0 → 0.0.17-dev.0
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/main.js +16 -0
- package/dist/main.js.map +3 -3
- package/dist/native/inheriti-window +0 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -164317,6 +164317,21 @@ async function login(context, terminal) {
|
|
|
164317
164317
|
if (await context.sessions.load()) await context.keyVault?.clear();
|
|
164318
164318
|
const callbackUrl = await waitForCallback(context, terminal);
|
|
164319
164319
|
await context.core.auth.completeAuthorizationCode(callbackUrl);
|
|
164320
|
+
if (context.keyOwner === "Organisation") {
|
|
164321
|
+
try {
|
|
164322
|
+
await context.core.listOrganizations();
|
|
164323
|
+
} catch (error2) {
|
|
164324
|
+
if (error2?.status === 403 && error2.code === "integration_tester_required") {
|
|
164325
|
+
try {
|
|
164326
|
+
await context.core.auth.clear();
|
|
164327
|
+
} finally {
|
|
164328
|
+
await context.sessions.clear();
|
|
164329
|
+
}
|
|
164330
|
+
throw new Error("integration_tester_required");
|
|
164331
|
+
}
|
|
164332
|
+
throw error2;
|
|
164333
|
+
}
|
|
164334
|
+
}
|
|
164320
164335
|
if (!await context.sessions.load()) throw new SessionStoreUnreadable("session_file_unreadable");
|
|
164321
164336
|
terminal.write("Signed in.");
|
|
164322
164337
|
return 0;
|
|
@@ -173807,6 +173822,7 @@ var RECONSTRUCTION_MESSAGES = {
|
|
|
173807
173822
|
unexpected_ssdp_v2_worker_response: "The local SSDP+ reconstruction worker returned an invalid response."
|
|
173808
173823
|
};
|
|
173809
173824
|
var MESSAGES = {
|
|
173825
|
+
integration_tester_required: "You are not an integration tester. Contact developer support.",
|
|
173810
173826
|
operator_not_signed_in: "Not signed in. Run `inheriti login` first.",
|
|
173811
173827
|
business_context_required: "Set business: true in the CLI configuration to use organizations.",
|
|
173812
173828
|
automation_disabled: "Automation is unavailable.",
|