devhelm 0.1.2 → 0.1.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.
|
@@ -5,7 +5,7 @@ import { saveContext, resolveApiUrl } from '../../lib/auth.js';
|
|
|
5
5
|
import * as readline from 'node:readline';
|
|
6
6
|
export default class AuthLogin extends Command {
|
|
7
7
|
static description = 'Authenticate with the DevHelm API';
|
|
8
|
-
static examples = ['<%= config.bin %> auth login', '<%= config.bin %> auth login --token
|
|
8
|
+
static examples = ['<%= config.bin %> auth login', '<%= config.bin %> auth login --token dh_live_...'];
|
|
9
9
|
static flags = {
|
|
10
10
|
...globalFlags,
|
|
11
11
|
token: Flags.string({ description: 'API token (skips interactive prompt)' }),
|
|
@@ -20,14 +20,33 @@ export default class AuthLogin extends Command {
|
|
|
20
20
|
const apiUrl = flags['api-url'] || resolveApiUrl();
|
|
21
21
|
this.log('Validating token...');
|
|
22
22
|
const client = createApiClient({ baseUrl: apiUrl, token });
|
|
23
|
+
// Try /api/v1/auth/me first (API key — returns rich identity info).
|
|
24
|
+
// Falls back to /api/v1/dashboard/overview for non-API-key tokens (dev tokens, JWTs).
|
|
23
25
|
try {
|
|
24
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
-
const
|
|
27
|
+
const resp = await checkedFetch(client.GET('/api/v1/auth/me', {}));
|
|
26
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
const
|
|
29
|
+
const me = resp?.data ?? resp;
|
|
28
30
|
saveContext({ name: flags.name, apiUrl, token }, true);
|
|
29
|
-
this.log(
|
|
30
|
-
this.log(`
|
|
31
|
+
this.log('');
|
|
32
|
+
this.log(` Authenticated successfully.`);
|
|
33
|
+
this.log(` Organization: ${me.organization?.name ?? 'unknown'} (ID: ${me.organization?.id ?? '?'})`);
|
|
34
|
+
this.log(` Key: ${me.key?.name ?? 'unknown'}`);
|
|
35
|
+
this.log(` Plan: ${me.plan?.tier ?? 'unknown'}`);
|
|
36
|
+
this.log('');
|
|
37
|
+
this.log(` Context '${flags.name}' saved to ~/.devhelm/contexts.json`);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// /auth/me failed — might be a non-API-key token; try basic validation
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
await checkedFetch(client.GET('/api/v1/dashboard/overview', {}));
|
|
46
|
+
saveContext({ name: flags.name, apiUrl, token }, true);
|
|
47
|
+
this.log('');
|
|
48
|
+
this.log(` Authenticated successfully.`);
|
|
49
|
+
this.log(` Context '${flags.name}' saved to ~/.devhelm/contexts.json`);
|
|
31
50
|
}
|
|
32
51
|
catch {
|
|
33
52
|
this.error('Invalid token. Authentication failed.', { exit: 2 });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAC,eAAe,EAAE,YAAY,EAAC,MAAM,yBAAyB,CAAA;AACrE,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,OAAO;IAC5C,MAAM,CAAC,WAAW,GAAG,mCAAmC,CAAA;IACxD,MAAM,CAAC,QAAQ,GAAG,CAAC,8BAA8B,EAAE,kDAAkD,CAAC,CAAA;IACtG,MAAM,CAAC,KAAK,GAAG;QACb,GAAG,WAAW;QACd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,sCAAsC,EAAC,CAAC;QAC1E,IAAI,EAAE,KAAK,CAAC,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BAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;oBAAC,MAAM,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;oBAAC,OAAM;gBAAC,CAAC;gBACpE,OAAO,CAAC,OAAO,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import { globalFlags, buildClient } from '../../lib/base-command.js';
|
|
3
|
+
import { checkedFetch } from '../../lib/api-client.js';
|
|
4
|
+
import { formatOutput } from '../../lib/output.js';
|
|
5
|
+
export default class AuthMe extends Command {
|
|
6
|
+
static description = 'Show current API key identity, organization, plan, and rate limits';
|
|
7
|
+
static examples = ['<%= config.bin %> auth me', '<%= config.bin %> auth me --output json'];
|
|
8
|
+
static flags = { ...globalFlags };
|
|
9
|
+
async run() {
|
|
10
|
+
const { flags } = await this.parse(AuthMe);
|
|
11
|
+
const client = buildClient(flags);
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
const resp = await checkedFetch(client.GET('/api/v1/auth/me', {}));
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
const me = resp?.data ?? resp;
|
|
16
|
+
const format = flags.output;
|
|
17
|
+
if (format === 'json' || format === 'yaml') {
|
|
18
|
+
this.log(formatOutput(me, format));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const k = me.key ?? {};
|
|
22
|
+
const o = me.organization ?? {};
|
|
23
|
+
const p = me.plan ?? {};
|
|
24
|
+
const r = me.rateLimits ?? {};
|
|
25
|
+
this.log('');
|
|
26
|
+
this.log(' API Key');
|
|
27
|
+
this.log(` Name: ${k.name ?? '–'} ID: ${k.id ?? '–'}`);
|
|
28
|
+
this.log(` Created: ${k.createdAt ?? '–'} Expires: ${k.expiresAt ?? 'never'}`);
|
|
29
|
+
this.log(` Last used: ${k.lastUsedAt ?? 'never'}`);
|
|
30
|
+
this.log('');
|
|
31
|
+
this.log(' Organization');
|
|
32
|
+
this.log(` Name: ${o.name ?? '–'} ID: ${o.id ?? '–'}`);
|
|
33
|
+
this.log('');
|
|
34
|
+
this.log(' Plan');
|
|
35
|
+
this.log(` Tier: ${p.tier ?? '–'} Status: ${p.subscriptionStatus ?? '–'} Trial: ${p.trialActive ? `active (expires ${p.trialExpiresAt})` : 'no'}`);
|
|
36
|
+
this.log('');
|
|
37
|
+
this.log(' Rate Limits');
|
|
38
|
+
this.log(` Limit: ${r.requestsPerMinute ?? '–'} req/min Remaining: ${r.remaining ?? '–'} Window: ${r.windowMs ? `${r.windowMs / 1000}s` : '–'}`);
|
|
39
|
+
const usage = p.usage;
|
|
40
|
+
const entitlements = p.entitlements;
|
|
41
|
+
if (usage && entitlements) {
|
|
42
|
+
this.log('');
|
|
43
|
+
this.log(' Usage');
|
|
44
|
+
for (const [key, used] of Object.entries(usage)) {
|
|
45
|
+
const limit = entitlements[key]?.value;
|
|
46
|
+
const limitStr = limit != null && limit < Number.MAX_SAFE_INTEGER ? String(limit) : '∞';
|
|
47
|
+
const label = key.replace(/\./g, ' ').replace(/_/g, ' ');
|
|
48
|
+
this.log(` ${label}: ${used} / ${limitStr}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
this.log('');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=me.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"me.js","sourceRoot":"","sources":["../../../src/commands/auth/me.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAA;AACnC,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAA;AACpD,OAAO,EAAC,YAAY,EAAe,MAAM,qBAAqB,CAAA;AAE9D,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,IAAI,YAAY,EAAE,CAAC;YAC1B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YACZ,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YACnB,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChD,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,CAAA;gBACtC,MAAM,QAAQ,GAAG,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;gBACvF,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;gBACxD,IAAI,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,MAAM,QAAQ,EAAE,CAAC,CAAA;YACjD,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACd,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -950,7 +950,7 @@
|
|
|
950
950
|
"description": "Authenticate with the DevHelm API",
|
|
951
951
|
"examples": [
|
|
952
952
|
"<%= config.bin %> auth login",
|
|
953
|
-
"<%= config.bin %> auth login --token
|
|
953
|
+
"<%= config.bin %> auth login --token dh_live_..."
|
|
954
954
|
],
|
|
955
955
|
"flags": {
|
|
956
956
|
"output": {
|
|
@@ -1080,6 +1080,67 @@
|
|
|
1080
1080
|
"logout.js"
|
|
1081
1081
|
]
|
|
1082
1082
|
},
|
|
1083
|
+
"auth:me": {
|
|
1084
|
+
"aliases": [],
|
|
1085
|
+
"args": {},
|
|
1086
|
+
"description": "Show current API key identity, organization, plan, and rate limits",
|
|
1087
|
+
"examples": [
|
|
1088
|
+
"<%= config.bin %> auth me",
|
|
1089
|
+
"<%= config.bin %> auth me --output json"
|
|
1090
|
+
],
|
|
1091
|
+
"flags": {
|
|
1092
|
+
"output": {
|
|
1093
|
+
"char": "o",
|
|
1094
|
+
"description": "Output format",
|
|
1095
|
+
"name": "output",
|
|
1096
|
+
"default": "table",
|
|
1097
|
+
"hasDynamicHelp": false,
|
|
1098
|
+
"multiple": false,
|
|
1099
|
+
"options": [
|
|
1100
|
+
"table",
|
|
1101
|
+
"json",
|
|
1102
|
+
"yaml"
|
|
1103
|
+
],
|
|
1104
|
+
"type": "option"
|
|
1105
|
+
},
|
|
1106
|
+
"api-url": {
|
|
1107
|
+
"description": "Override API base URL",
|
|
1108
|
+
"name": "api-url",
|
|
1109
|
+
"hasDynamicHelp": false,
|
|
1110
|
+
"multiple": false,
|
|
1111
|
+
"type": "option"
|
|
1112
|
+
},
|
|
1113
|
+
"api-token": {
|
|
1114
|
+
"description": "Override API token",
|
|
1115
|
+
"name": "api-token",
|
|
1116
|
+
"hasDynamicHelp": false,
|
|
1117
|
+
"multiple": false,
|
|
1118
|
+
"type": "option"
|
|
1119
|
+
},
|
|
1120
|
+
"verbose": {
|
|
1121
|
+
"char": "v",
|
|
1122
|
+
"description": "Show verbose output",
|
|
1123
|
+
"name": "verbose",
|
|
1124
|
+
"allowNo": false,
|
|
1125
|
+
"type": "boolean"
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"hasDynamicHelp": false,
|
|
1129
|
+
"hiddenAliases": [],
|
|
1130
|
+
"id": "auth:me",
|
|
1131
|
+
"pluginAlias": "devhelm",
|
|
1132
|
+
"pluginName": "devhelm",
|
|
1133
|
+
"pluginType": "core",
|
|
1134
|
+
"strict": true,
|
|
1135
|
+
"enableJsonFlag": false,
|
|
1136
|
+
"isESM": true,
|
|
1137
|
+
"relativePath": [
|
|
1138
|
+
"dist",
|
|
1139
|
+
"commands",
|
|
1140
|
+
"auth",
|
|
1141
|
+
"me.js"
|
|
1142
|
+
]
|
|
1143
|
+
},
|
|
1083
1144
|
"auth:token": {
|
|
1084
1145
|
"aliases": [],
|
|
1085
1146
|
"args": {},
|
|
@@ -4745,18 +4806,18 @@
|
|
|
4745
4806
|
"update.js"
|
|
4746
4807
|
]
|
|
4747
4808
|
},
|
|
4748
|
-
"
|
|
4809
|
+
"data:services:status": {
|
|
4749
4810
|
"aliases": [],
|
|
4750
4811
|
"args": {
|
|
4751
|
-
"
|
|
4752
|
-
"description": "
|
|
4753
|
-
"name": "
|
|
4812
|
+
"slug": {
|
|
4813
|
+
"description": "Service slug",
|
|
4814
|
+
"name": "slug",
|
|
4754
4815
|
"required": true
|
|
4755
4816
|
}
|
|
4756
4817
|
},
|
|
4757
|
-
"description": "
|
|
4818
|
+
"description": "Get the current status of a service",
|
|
4758
4819
|
"examples": [
|
|
4759
|
-
"<%= config.bin %>
|
|
4820
|
+
"<%= config.bin %> data services status aws-ec2"
|
|
4760
4821
|
],
|
|
4761
4822
|
"flags": {
|
|
4762
4823
|
"output": {
|
|
@@ -4793,25 +4854,11 @@
|
|
|
4793
4854
|
"name": "verbose",
|
|
4794
4855
|
"allowNo": false,
|
|
4795
4856
|
"type": "boolean"
|
|
4796
|
-
},
|
|
4797
|
-
"token": {
|
|
4798
|
-
"description": "API token",
|
|
4799
|
-
"name": "token",
|
|
4800
|
-
"required": true,
|
|
4801
|
-
"hasDynamicHelp": false,
|
|
4802
|
-
"multiple": false,
|
|
4803
|
-
"type": "option"
|
|
4804
|
-
},
|
|
4805
|
-
"set-current": {
|
|
4806
|
-
"description": "Set as current context",
|
|
4807
|
-
"name": "set-current",
|
|
4808
|
-
"allowNo": false,
|
|
4809
|
-
"type": "boolean"
|
|
4810
4857
|
}
|
|
4811
4858
|
},
|
|
4812
4859
|
"hasDynamicHelp": false,
|
|
4813
4860
|
"hiddenAliases": [],
|
|
4814
|
-
"id": "
|
|
4861
|
+
"id": "data:services:status",
|
|
4815
4862
|
"pluginAlias": "devhelm",
|
|
4816
4863
|
"pluginName": "devhelm",
|
|
4817
4864
|
"pluginType": "core",
|
|
@@ -4821,23 +4868,24 @@
|
|
|
4821
4868
|
"relativePath": [
|
|
4822
4869
|
"dist",
|
|
4823
4870
|
"commands",
|
|
4824
|
-
"
|
|
4825
|
-
"
|
|
4826
|
-
"
|
|
4871
|
+
"data",
|
|
4872
|
+
"services",
|
|
4873
|
+
"status.js"
|
|
4827
4874
|
]
|
|
4828
4875
|
},
|
|
4829
|
-
"
|
|
4876
|
+
"data:services:uptime": {
|
|
4830
4877
|
"aliases": [],
|
|
4831
4878
|
"args": {
|
|
4832
|
-
"
|
|
4833
|
-
"description": "
|
|
4834
|
-
"name": "
|
|
4879
|
+
"slug": {
|
|
4880
|
+
"description": "Service slug",
|
|
4881
|
+
"name": "slug",
|
|
4835
4882
|
"required": true
|
|
4836
4883
|
}
|
|
4837
4884
|
},
|
|
4838
|
-
"description": "
|
|
4885
|
+
"description": "Get uptime data for a service",
|
|
4839
4886
|
"examples": [
|
|
4840
|
-
"<%= config.bin %>
|
|
4887
|
+
"<%= config.bin %> data services uptime aws-ec2",
|
|
4888
|
+
"<%= config.bin %> data services uptime aws-ec2 --period 30d"
|
|
4841
4889
|
],
|
|
4842
4890
|
"flags": {
|
|
4843
4891
|
"output": {
|
|
@@ -4874,11 +4922,26 @@
|
|
|
4874
4922
|
"name": "verbose",
|
|
4875
4923
|
"allowNo": false,
|
|
4876
4924
|
"type": "boolean"
|
|
4925
|
+
},
|
|
4926
|
+
"period": {
|
|
4927
|
+
"description": "Time period (7d, 30d, 90d)",
|
|
4928
|
+
"name": "period",
|
|
4929
|
+
"default": "30d",
|
|
4930
|
+
"hasDynamicHelp": false,
|
|
4931
|
+
"multiple": false,
|
|
4932
|
+
"type": "option"
|
|
4933
|
+
},
|
|
4934
|
+
"granularity": {
|
|
4935
|
+
"description": "Data granularity (hourly, daily)",
|
|
4936
|
+
"name": "granularity",
|
|
4937
|
+
"hasDynamicHelp": false,
|
|
4938
|
+
"multiple": false,
|
|
4939
|
+
"type": "option"
|
|
4877
4940
|
}
|
|
4878
4941
|
},
|
|
4879
4942
|
"hasDynamicHelp": false,
|
|
4880
4943
|
"hiddenAliases": [],
|
|
4881
|
-
"id": "
|
|
4944
|
+
"id": "data:services:uptime",
|
|
4882
4945
|
"pluginAlias": "devhelm",
|
|
4883
4946
|
"pluginName": "devhelm",
|
|
4884
4947
|
"pluginType": "core",
|
|
@@ -4888,17 +4951,23 @@
|
|
|
4888
4951
|
"relativePath": [
|
|
4889
4952
|
"dist",
|
|
4890
4953
|
"commands",
|
|
4891
|
-
"
|
|
4892
|
-
"
|
|
4893
|
-
"
|
|
4954
|
+
"data",
|
|
4955
|
+
"services",
|
|
4956
|
+
"uptime.js"
|
|
4894
4957
|
]
|
|
4895
4958
|
},
|
|
4896
|
-
"auth:context": {
|
|
4959
|
+
"auth:context:create": {
|
|
4897
4960
|
"aliases": [],
|
|
4898
|
-
"args": {
|
|
4899
|
-
|
|
4961
|
+
"args": {
|
|
4962
|
+
"name": {
|
|
4963
|
+
"description": "Context name",
|
|
4964
|
+
"name": "name",
|
|
4965
|
+
"required": true
|
|
4966
|
+
}
|
|
4967
|
+
},
|
|
4968
|
+
"description": "Create a new auth context",
|
|
4900
4969
|
"examples": [
|
|
4901
|
-
"<%= config.bin %> auth context"
|
|
4970
|
+
"<%= config.bin %> auth context create staging --api-url https://staging-api.devhelm.io --token sk_..."
|
|
4902
4971
|
],
|
|
4903
4972
|
"flags": {
|
|
4904
4973
|
"output": {
|
|
@@ -4935,11 +5004,25 @@
|
|
|
4935
5004
|
"name": "verbose",
|
|
4936
5005
|
"allowNo": false,
|
|
4937
5006
|
"type": "boolean"
|
|
5007
|
+
},
|
|
5008
|
+
"token": {
|
|
5009
|
+
"description": "API token",
|
|
5010
|
+
"name": "token",
|
|
5011
|
+
"required": true,
|
|
5012
|
+
"hasDynamicHelp": false,
|
|
5013
|
+
"multiple": false,
|
|
5014
|
+
"type": "option"
|
|
5015
|
+
},
|
|
5016
|
+
"set-current": {
|
|
5017
|
+
"description": "Set as current context",
|
|
5018
|
+
"name": "set-current",
|
|
5019
|
+
"allowNo": false,
|
|
5020
|
+
"type": "boolean"
|
|
4938
5021
|
}
|
|
4939
5022
|
},
|
|
4940
5023
|
"hasDynamicHelp": false,
|
|
4941
5024
|
"hiddenAliases": [],
|
|
4942
|
-
"id": "auth:context",
|
|
5025
|
+
"id": "auth:context:create",
|
|
4943
5026
|
"pluginAlias": "devhelm",
|
|
4944
5027
|
"pluginName": "devhelm",
|
|
4945
5028
|
"pluginType": "core",
|
|
@@ -4951,15 +5034,21 @@
|
|
|
4951
5034
|
"commands",
|
|
4952
5035
|
"auth",
|
|
4953
5036
|
"context",
|
|
4954
|
-
"
|
|
5037
|
+
"create.js"
|
|
4955
5038
|
]
|
|
4956
5039
|
},
|
|
4957
|
-
"auth:context:
|
|
5040
|
+
"auth:context:delete": {
|
|
4958
5041
|
"aliases": [],
|
|
4959
|
-
"args": {
|
|
4960
|
-
|
|
5042
|
+
"args": {
|
|
5043
|
+
"name": {
|
|
5044
|
+
"description": "Context name to delete",
|
|
5045
|
+
"name": "name",
|
|
5046
|
+
"required": true
|
|
5047
|
+
}
|
|
5048
|
+
},
|
|
5049
|
+
"description": "Delete an auth context",
|
|
4961
5050
|
"examples": [
|
|
4962
|
-
"<%= config.bin %> auth context
|
|
5051
|
+
"<%= config.bin %> auth context delete staging"
|
|
4963
5052
|
],
|
|
4964
5053
|
"flags": {
|
|
4965
5054
|
"output": {
|
|
@@ -5000,7 +5089,7 @@
|
|
|
5000
5089
|
},
|
|
5001
5090
|
"hasDynamicHelp": false,
|
|
5002
5091
|
"hiddenAliases": [],
|
|
5003
|
-
"id": "auth:context:
|
|
5092
|
+
"id": "auth:context:delete",
|
|
5004
5093
|
"pluginAlias": "devhelm",
|
|
5005
5094
|
"pluginName": "devhelm",
|
|
5006
5095
|
"pluginType": "core",
|
|
@@ -5012,21 +5101,15 @@
|
|
|
5012
5101
|
"commands",
|
|
5013
5102
|
"auth",
|
|
5014
5103
|
"context",
|
|
5015
|
-
"
|
|
5104
|
+
"delete.js"
|
|
5016
5105
|
]
|
|
5017
5106
|
},
|
|
5018
|
-
"auth:context
|
|
5107
|
+
"auth:context": {
|
|
5019
5108
|
"aliases": [],
|
|
5020
|
-
"args": {
|
|
5021
|
-
|
|
5022
|
-
"description": "Context name to activate",
|
|
5023
|
-
"name": "name",
|
|
5024
|
-
"required": true
|
|
5025
|
-
}
|
|
5026
|
-
},
|
|
5027
|
-
"description": "Switch to a different auth context",
|
|
5109
|
+
"args": {},
|
|
5110
|
+
"description": "Show the current auth context",
|
|
5028
5111
|
"examples": [
|
|
5029
|
-
"<%= config.bin %> auth context
|
|
5112
|
+
"<%= config.bin %> auth context"
|
|
5030
5113
|
],
|
|
5031
5114
|
"flags": {
|
|
5032
5115
|
"output": {
|
|
@@ -5067,7 +5150,7 @@
|
|
|
5067
5150
|
},
|
|
5068
5151
|
"hasDynamicHelp": false,
|
|
5069
5152
|
"hiddenAliases": [],
|
|
5070
|
-
"id": "auth:context
|
|
5153
|
+
"id": "auth:context",
|
|
5071
5154
|
"pluginAlias": "devhelm",
|
|
5072
5155
|
"pluginName": "devhelm",
|
|
5073
5156
|
"pluginType": "core",
|
|
@@ -5079,21 +5162,15 @@
|
|
|
5079
5162
|
"commands",
|
|
5080
5163
|
"auth",
|
|
5081
5164
|
"context",
|
|
5082
|
-
"
|
|
5165
|
+
"index.js"
|
|
5083
5166
|
]
|
|
5084
5167
|
},
|
|
5085
|
-
"
|
|
5168
|
+
"auth:context:list": {
|
|
5086
5169
|
"aliases": [],
|
|
5087
|
-
"args": {
|
|
5088
|
-
|
|
5089
|
-
"description": "Service slug",
|
|
5090
|
-
"name": "slug",
|
|
5091
|
-
"required": true
|
|
5092
|
-
}
|
|
5093
|
-
},
|
|
5094
|
-
"description": "Get the current status of a service",
|
|
5170
|
+
"args": {},
|
|
5171
|
+
"description": "List all auth contexts",
|
|
5095
5172
|
"examples": [
|
|
5096
|
-
"<%= config.bin %>
|
|
5173
|
+
"<%= config.bin %> auth context list"
|
|
5097
5174
|
],
|
|
5098
5175
|
"flags": {
|
|
5099
5176
|
"output": {
|
|
@@ -5134,7 +5211,7 @@
|
|
|
5134
5211
|
},
|
|
5135
5212
|
"hasDynamicHelp": false,
|
|
5136
5213
|
"hiddenAliases": [],
|
|
5137
|
-
"id": "
|
|
5214
|
+
"id": "auth:context:list",
|
|
5138
5215
|
"pluginAlias": "devhelm",
|
|
5139
5216
|
"pluginName": "devhelm",
|
|
5140
5217
|
"pluginType": "core",
|
|
@@ -5144,24 +5221,23 @@
|
|
|
5144
5221
|
"relativePath": [
|
|
5145
5222
|
"dist",
|
|
5146
5223
|
"commands",
|
|
5147
|
-
"
|
|
5148
|
-
"
|
|
5149
|
-
"
|
|
5224
|
+
"auth",
|
|
5225
|
+
"context",
|
|
5226
|
+
"list.js"
|
|
5150
5227
|
]
|
|
5151
5228
|
},
|
|
5152
|
-
"
|
|
5229
|
+
"auth:context:use": {
|
|
5153
5230
|
"aliases": [],
|
|
5154
5231
|
"args": {
|
|
5155
|
-
"
|
|
5156
|
-
"description": "
|
|
5157
|
-
"name": "
|
|
5232
|
+
"name": {
|
|
5233
|
+
"description": "Context name to activate",
|
|
5234
|
+
"name": "name",
|
|
5158
5235
|
"required": true
|
|
5159
5236
|
}
|
|
5160
5237
|
},
|
|
5161
|
-
"description": "
|
|
5238
|
+
"description": "Switch to a different auth context",
|
|
5162
5239
|
"examples": [
|
|
5163
|
-
"<%= config.bin %>
|
|
5164
|
-
"<%= config.bin %> data services uptime aws-ec2 --period 30d"
|
|
5240
|
+
"<%= config.bin %> auth context use staging"
|
|
5165
5241
|
],
|
|
5166
5242
|
"flags": {
|
|
5167
5243
|
"output": {
|
|
@@ -5198,26 +5274,11 @@
|
|
|
5198
5274
|
"name": "verbose",
|
|
5199
5275
|
"allowNo": false,
|
|
5200
5276
|
"type": "boolean"
|
|
5201
|
-
},
|
|
5202
|
-
"period": {
|
|
5203
|
-
"description": "Time period (7d, 30d, 90d)",
|
|
5204
|
-
"name": "period",
|
|
5205
|
-
"default": "30d",
|
|
5206
|
-
"hasDynamicHelp": false,
|
|
5207
|
-
"multiple": false,
|
|
5208
|
-
"type": "option"
|
|
5209
|
-
},
|
|
5210
|
-
"granularity": {
|
|
5211
|
-
"description": "Data granularity (hourly, daily)",
|
|
5212
|
-
"name": "granularity",
|
|
5213
|
-
"hasDynamicHelp": false,
|
|
5214
|
-
"multiple": false,
|
|
5215
|
-
"type": "option"
|
|
5216
5277
|
}
|
|
5217
5278
|
},
|
|
5218
5279
|
"hasDynamicHelp": false,
|
|
5219
5280
|
"hiddenAliases": [],
|
|
5220
|
-
"id": "
|
|
5281
|
+
"id": "auth:context:use",
|
|
5221
5282
|
"pluginAlias": "devhelm",
|
|
5222
5283
|
"pluginName": "devhelm",
|
|
5223
5284
|
"pluginType": "core",
|
|
@@ -5227,11 +5288,11 @@
|
|
|
5227
5288
|
"relativePath": [
|
|
5228
5289
|
"dist",
|
|
5229
5290
|
"commands",
|
|
5230
|
-
"
|
|
5231
|
-
"
|
|
5232
|
-
"
|
|
5291
|
+
"auth",
|
|
5292
|
+
"context",
|
|
5293
|
+
"use.js"
|
|
5233
5294
|
]
|
|
5234
5295
|
}
|
|
5235
5296
|
},
|
|
5236
|
-
"version": "0.1.
|
|
5297
|
+
"version": "0.1.3"
|
|
5237
5298
|
}
|