@forge/cli-shared 7.1.0-next.1 → 7.1.0-next.3
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/CHANGELOG.md +16 -0
- package/out/auth/personal/me-graphql-client.d.ts +3 -0
- package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
- package/out/auth/personal/me-graphql-client.js +10 -1
- package/out/graphql/graphql-types.d.ts +571 -104
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +98 -25
- package/out/ui/text.d.ts +3 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @forge/cli-shared
|
|
2
2
|
|
|
3
|
+
## 7.1.0-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c3df542: Add an error for scoped token usage
|
|
8
|
+
- Updated dependencies [b44a5b3]
|
|
9
|
+
- @forge/manifest@9.5.0-next.2
|
|
10
|
+
|
|
11
|
+
## 7.1.0-next.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [73a88f6]
|
|
16
|
+
- Updated dependencies [97255de]
|
|
17
|
+
- @forge/manifest@9.5.0-next.1
|
|
18
|
+
|
|
3
19
|
## 7.1.0-next.1
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -3,6 +3,9 @@ import { UserError } from '../../shared';
|
|
|
3
3
|
import { Logger } from '../../ui';
|
|
4
4
|
export declare class UserNotFoundError extends UserError {
|
|
5
5
|
}
|
|
6
|
+
export declare class ScopedTokenError extends UserError {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
6
9
|
export declare class MeGraphqlClient {
|
|
7
10
|
private readonly graphqlClient;
|
|
8
11
|
private readonly logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,MAAM,EAAQ,MAAM,UAAU,CAAC;AAEtD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AAEnD,qBAAa,gBAAiB,SAAQ,SAAS;;CAI9C;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM;IAGpB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CA6BtC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MeGraphqlClient = exports.UserNotFoundError = void 0;
|
|
3
|
+
exports.MeGraphqlClient = exports.ScopedTokenError = exports.UserNotFoundError = void 0;
|
|
4
4
|
const shared_1 = require("../../shared");
|
|
5
5
|
const ui_1 = require("../../ui");
|
|
6
6
|
class UserNotFoundError extends shared_1.UserError {
|
|
7
7
|
}
|
|
8
8
|
exports.UserNotFoundError = UserNotFoundError;
|
|
9
|
+
class ScopedTokenError extends shared_1.UserError {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(ui_1.Text.login.scopedToken.error);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ScopedTokenError = ScopedTokenError;
|
|
9
15
|
class MeGraphqlClient {
|
|
10
16
|
graphqlClient;
|
|
11
17
|
logger;
|
|
@@ -32,6 +38,9 @@ class MeGraphqlClient {
|
|
|
32
38
|
}
|
|
33
39
|
catch (error) {
|
|
34
40
|
this.logger.debug((0, ui_1.errorMessage)(error));
|
|
41
|
+
if ((0, ui_1.errorMessage)(error).includes('This request does not contain the right authorisation scopes')) {
|
|
42
|
+
throw new ScopedTokenError();
|
|
43
|
+
}
|
|
35
44
|
}
|
|
36
45
|
throw new UserNotFoundError();
|
|
37
46
|
}
|