@bragduck/cli 2.38.1 → 2.38.2
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/bragduck.js +14 -1
- package/dist/bin/bragduck.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/bin/bragduck.js
CHANGED
|
@@ -63,7 +63,7 @@ var init_constants = __esm({
|
|
|
63
63
|
CLIENT_ID: "kJlsd66DLTnENE8p7Ru2JwqZg1Sie4yZ",
|
|
64
64
|
AUTH_URL: "https://auth.atlassian.com/authorize",
|
|
65
65
|
AUDIENCE: "api.atlassian.com",
|
|
66
|
-
SCOPES: "read:jira-work read:jira-user read:
|
|
66
|
+
SCOPES: "read:jira-work read:jira-user read:confluence-content.all read:confluence-user offline_access",
|
|
67
67
|
ACCESSIBLE_RESOURCES_URL: "https://api.atlassian.com/oauth/token/accessible-resources",
|
|
68
68
|
API_GATEWAY_URL: "https://api.atlassian.com"
|
|
69
69
|
};
|
|
@@ -1891,6 +1891,19 @@ var AtlassianAuthService = class {
|
|
|
1891
1891
|
callbackResult = await resultPromise;
|
|
1892
1892
|
} catch (error) {
|
|
1893
1893
|
storageService.deleteOAuthState();
|
|
1894
|
+
const rawMessage = error?.message ?? String(error);
|
|
1895
|
+
if (/invalid_scope/i.test(rawMessage)) {
|
|
1896
|
+
throw new AtlassianError(
|
|
1897
|
+
"Atlassian rejected the requested scopes. The app must list all of these classic scopes: read:jira-work, read:jira-user, read:confluence-content.all, read:confluence-user, offline_access.",
|
|
1898
|
+
{ originalError: rawMessage }
|
|
1899
|
+
);
|
|
1900
|
+
}
|
|
1901
|
+
if (/redirect_uri|invalid_request/i.test(rawMessage)) {
|
|
1902
|
+
throw new AtlassianError(
|
|
1903
|
+
"Atlassian rejected the redirect URI. All of http://127.0.0.1:8000/callback through http://127.0.0.1:8004/callback must be registered in the Atlassian app callback URL list.",
|
|
1904
|
+
{ originalError: rawMessage }
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1894
1907
|
throw error;
|
|
1895
1908
|
}
|
|
1896
1909
|
storageService.deleteOAuthState();
|