@swell/cli 2.9.12 → 2.9.13

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.
@@ -46,6 +46,10 @@ have available for logging in to.
46
46
  const [sessionId, storeId] = await getSessionIdOrLoginInBrowser(store);
47
47
  await this.api.setStoreEnv(storeId);
48
48
  user = await this.api.get({ adminPath: 'user' }, { sessionId });
49
+ const authorization = user?.authorizations?.find((authorization) => authorization.client_id === storeId);
50
+ if (authorization?.client_inactive === true) {
51
+ this.error(`Store "${storeId}" has been deactivated and cannot be used with the CLI. Reactivate it in the dashboard or run \`swell login --force\` to choose another store.`, { exit: 1 });
52
+ }
49
53
  await this.getAndSetStoreConfig({ sessionId, storeId });
50
54
  await modifyDefaultStore({ currentStoreId, storeId }, force);
51
55
  config.setUser(user);
@@ -32,6 +32,7 @@ function createServer(onSessionId, storeId) {
32
32
  },
33
33
  async onStart(loginUrl) {
34
34
  spinner.start([
35
+ 'Complete login in your browser. Press Ctrl+C to cancel.',
35
36
  "Open this link if your browser doesn't launch it automatically:",
36
37
  `${style.link(loginUrl)}`,
37
38
  ].join(' '));
@@ -72,6 +72,7 @@ export interface User {
72
72
  export interface UserAuthorization {
73
73
  client_id: string;
74
74
  client_name: string;
75
+ client_inactive?: boolean;
75
76
  }
76
77
  export interface App {
77
78
  id: string;
@@ -3594,5 +3594,5 @@
3594
3594
  ]
3595
3595
  }
3596
3596
  },
3597
- "version": "2.9.12"
3597
+ "version": "2.9.13"
3598
3598
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swell/cli",
3
- "version": "2.9.12",
3
+ "version": "2.9.13",
4
4
  "type": "module",
5
5
  "description": "Swell's command line interface/utility",
6
6
  "keywords": [