@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.
- package/dist/commands/login.js +4 -0
- package/dist/lib/sessions.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/commands/login.js
CHANGED
|
@@ -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);
|
package/dist/lib/sessions.js
CHANGED
|
@@ -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(' '));
|
package/dist/types/index.d.ts
CHANGED
package/oclif.manifest.json
CHANGED