@dishantlangayan/sc-cli-core 0.5.0 → 0.5.1
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/lib/sc-command.js +0 -11
- package/package.json +1 -1
package/lib/sc-command.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Command, Flags } from '@oclif/core';
|
|
2
2
|
import { BrokerAuthManager } from './auth/auth-manager.js';
|
|
3
3
|
import { OrgManager } from './auth/org-manager.js';
|
|
4
|
-
import { DefaultBaseUrl, EnvironmentVariable, envVars } from './config/env-vars.js';
|
|
5
4
|
/**
|
|
6
5
|
* A base command that provided common functionality for all sc commands.
|
|
7
6
|
*
|
|
@@ -66,15 +65,5 @@ export class ScCommand extends Command {
|
|
|
66
65
|
});
|
|
67
66
|
this.flags = flags;
|
|
68
67
|
this.args = args;
|
|
69
|
-
// set base url if not defined in environment variables
|
|
70
|
-
if (!envVars.getString(EnvironmentVariable.SC_BASE_URL)) {
|
|
71
|
-
this.debug(`Environment variable '${EnvironmentVariable.SC_BASE_URL}' not set, using default '${DefaultBaseUrl}'`);
|
|
72
|
-
envVars.setString(EnvironmentVariable.SC_BASE_URL, DefaultBaseUrl);
|
|
73
|
-
}
|
|
74
|
-
// Check if Access Token is set
|
|
75
|
-
const value = envVars.getString(EnvironmentVariable.SC_ACCESS_TOKEN);
|
|
76
|
-
if (!value) {
|
|
77
|
-
this.error(`Environment variable ${EnvironmentVariable.SC_ACCESS_TOKEN} is not set and required for any API operations.`);
|
|
78
|
-
}
|
|
79
68
|
}
|
|
80
69
|
}
|