@dishantlangayan/solace-cloud-cli 0.2.1 → 0.4.0

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.
Files changed (37) hide show
  1. package/README.md +214 -145
  2. package/dist/commands/account/list.d.ts +10 -0
  3. package/dist/commands/account/list.js +36 -0
  4. package/dist/commands/account/login.d.ts +43 -0
  5. package/dist/commands/account/login.js +231 -0
  6. package/dist/commands/account/logout.d.ts +15 -0
  7. package/dist/commands/account/logout.js +113 -0
  8. package/dist/commands/missionctrl/broker/create.d.ts +2 -0
  9. package/dist/commands/missionctrl/broker/create.js +15 -2
  10. package/dist/commands/missionctrl/broker/delete.d.ts +2 -0
  11. package/dist/commands/missionctrl/broker/delete.js +15 -2
  12. package/dist/commands/missionctrl/broker/display.d.ts +2 -0
  13. package/dist/commands/missionctrl/broker/display.js +18 -3
  14. package/dist/commands/missionctrl/broker/list.d.ts +2 -0
  15. package/dist/commands/missionctrl/broker/list.js +15 -5
  16. package/dist/commands/missionctrl/broker/opstatus.d.ts +2 -0
  17. package/dist/commands/missionctrl/broker/opstatus.js +15 -2
  18. package/dist/commands/missionctrl/broker/state.d.ts +2 -0
  19. package/dist/commands/missionctrl/broker/state.js +15 -2
  20. package/dist/commands/missionctrl/broker/update.d.ts +2 -0
  21. package/dist/commands/missionctrl/broker/update.js +15 -3
  22. package/dist/commands/platform/env/create.d.ts +2 -0
  23. package/dist/commands/platform/env/create.js +16 -3
  24. package/dist/commands/platform/env/delete.d.ts +2 -0
  25. package/dist/commands/platform/env/delete.js +15 -2
  26. package/dist/commands/platform/env/display.d.ts +2 -0
  27. package/dist/commands/platform/env/display.js +15 -2
  28. package/dist/commands/platform/env/list.d.ts +2 -0
  29. package/dist/commands/platform/env/list.js +15 -3
  30. package/dist/commands/platform/env/update.d.ts +2 -0
  31. package/dist/commands/platform/env/update.js +16 -3
  32. package/dist/lib/org-utils.d.ts +24 -0
  33. package/dist/lib/org-utils.js +73 -0
  34. package/oclif.manifest.json +727 -224
  35. package/package.json +3 -3
  36. package/dist/config/env-vars.d.ts +0 -44
  37. package/dist/config/env-vars.js +0 -47
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dishantlangayan/solace-cloud-cli",
3
3
  "description": "The Solace Cloud CLI",
4
- "version": "0.2.1",
4
+ "version": "0.4.0",
5
5
  "author": "Dishant Langayan",
6
6
  "bin": {
7
7
  "sc": "./bin/run.js"
8
8
  },
9
9
  "bugs": "https://github.com/dishantlangayan/solace-cloud-cli/issues",
10
10
  "dependencies": {
11
- "@dishantlangayan/sc-cli-core": "^0.1.0",
12
- "@dishantlangayan/sc-plugin-queue": "^0.1.1",
11
+ "@dishantlangayan/sc-cli-core": "^0.5.1",
12
+ "@inquirer/prompts": "^8.3.0",
13
13
  "@oclif/core": "^4",
14
14
  "@oclif/plugin-autocomplete": "^3.2.40",
15
15
  "@oclif/plugin-commands": "^4.1.40",
@@ -1,44 +0,0 @@
1
- export declare enum EnvironmentVariable {
2
- 'SC_ACCESS_TOKEN' = "SC_ACCESS_TOKEN",
3
- 'SC_API_VERSION' = "SC_API_VERSION",
4
- 'SC_BASE_URL' = "SC_BASE_URL"
5
- }
6
- export declare const DefaultBaseUrl = "https://api.solace.cloud";
7
- /**
8
- * An injectable abstraction on top of `process.env` with various convenience functions
9
- * for accessing environment variables.
10
- */
11
- export declare class EnvVars {
12
- private env;
13
- constructor(env?: NodeJS.ProcessEnv);
14
- /**
15
- * Gets a `string` value for a given key.
16
- *
17
- * @param key The name of the envar.
18
- */
19
- getString(key: string): string | undefined;
20
- /**
21
- * Gets a `string` value for a given key.
22
- *
23
- * @param key The name of the envar.
24
- * @param def A default value.
25
- */
26
- getString(key: string, def: string): string;
27
- /**
28
- * Sets a `string` value for a given key, or removes the current value when no value is given.
29
- *
30
- * @param key The name of the envar.
31
- * @param value The value to set.
32
- */
33
- setString(key: string, value: string): void;
34
- /**
35
- * Un-sets a value for a given key.
36
- *
37
- * @param key The name of the environment variable.
38
- */
39
- unset(key: string): void;
40
- }
41
- /**
42
- * The default `EnvVars` instance, which wraps `process.env`.
43
- */
44
- export declare const envVars: EnvVars;
@@ -1,47 +0,0 @@
1
- export var EnvironmentVariable;
2
- (function (EnvironmentVariable) {
3
- EnvironmentVariable["SC_ACCESS_TOKEN"] = "SC_ACCESS_TOKEN";
4
- EnvironmentVariable["SC_API_VERSION"] = "SC_API_VERSION";
5
- EnvironmentVariable["SC_BASE_URL"] = "SC_BASE_URL";
6
- })(EnvironmentVariable || (EnvironmentVariable = {}));
7
- export const DefaultBaseUrl = 'https://api.solace.cloud';
8
- /**
9
- * An injectable abstraction on top of `process.env` with various convenience functions
10
- * for accessing environment variables.
11
- */
12
- export class EnvVars {
13
- env;
14
- constructor(env = process.env || {}) {
15
- this.env = env;
16
- this.env = env;
17
- }
18
- // underlying method
19
- getString(key, def) {
20
- return this.env[key] ?? def;
21
- }
22
- /**
23
- * Sets a `string` value for a given key, or removes the current value when no value is given.
24
- *
25
- * @param key The name of the envar.
26
- * @param value The value to set.
27
- */
28
- setString(key, value) {
29
- if (value === '') {
30
- this.unset(key);
31
- return;
32
- }
33
- this.env[key] = value;
34
- }
35
- /**
36
- * Un-sets a value for a given key.
37
- *
38
- * @param key The name of the environment variable.
39
- */
40
- unset(key) {
41
- delete this.env[key];
42
- }
43
- }
44
- /**
45
- * The default `EnvVars` instance, which wraps `process.env`.
46
- */
47
- export const envVars = new EnvVars();