@uptimerobot/cli 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -94,6 +94,7 @@ uptimerobot monitors delete 797054213 --confirm
94
94
  Help is available at every level of the command tree:
95
95
 
96
96
  ```sh
97
+ uptimerobot help
97
98
  uptimerobot monitors --help
98
99
  uptimerobot monitors create --help
99
100
  uptimerobot monitors create keyword --help
@@ -3,8 +3,10 @@ import { AuthenticationError, PRODUCTION_API_URL, saveValidatedApiKey } from '..
3
3
  import { BaseCommand } from '../../lib/base-command.js';
4
4
  import { detectInvocationMode, isCI, promptSecret } from '../../lib/invocation.js';
5
5
  import { resolveFormat } from '../../output/resolve-format.js';
6
+ /** Where a user creates and copies an API key. Not an API endpoint. */
7
+ const API_KEY_DASHBOARD_URL = 'https://dashboard.uptimerobot.com/integrations';
6
8
  export default class AuthLogin extends BaseCommand {
7
- static description = 'Validate and securely store a UptimeRobot API key. Run without flags to paste the key at a masked prompt.';
9
+ static description = `Validate and securely store a UptimeRobot API key. Run without flags to paste the key at a masked prompt. Create an API key at ${API_KEY_DASHBOARD_URL}.`;
8
10
  static flags = {
9
11
  'api-key': Flags.string({
10
12
  description: 'UptimeRobot API key to validate and save (prompted securely when omitted)',
@@ -19,7 +21,7 @@ export default class AuthLogin extends BaseCommand {
19
21
  const mode = detectInvocationMode(false);
20
22
  let apiKey = flags['api-key'];
21
23
  if (!apiKey && mode === 'human') {
22
- apiKey = await promptSecret('Paste your UptimeRobot API key: ');
24
+ apiKey = await promptSecret(`Create an API key at ${API_KEY_DASHBOARD_URL}\nPaste your UptimeRobot API key: `);
23
25
  }
24
26
  if (!apiKey) {
25
27
  this.error('No API key provided. Pass --api-key, set UPTIMEROBOT_API_KEY, or run in an interactive terminal.', { code: 'AUTH_REQUIRED', exit: 2 });
@@ -0,0 +1,14 @@
1
+ import { loadHelpClass } from '@oclif/core/help';
2
+ import { BaseCommand } from '../lib/base-command.js';
3
+ export default class Help extends BaseCommand {
4
+ static description = 'Print the command overview, identical to running uptimerobot --help';
5
+ static summary = 'Display help for uptimerobot';
6
+ async run() {
7
+ await this.parse(Help);
8
+ // Loaded the way --help loads it, so both paths honour a custom help class
9
+ // and render the same output.
10
+ const HelpClass = await loadHelpClass(this.config);
11
+ const help = new HelpClass(this.config, this.config.pjson.oclif.helpOptions);
12
+ await help.showHelp([]);
13
+ }
14
+ }
@@ -1265,7 +1265,7 @@ export const operations = {
1265
1265
  "required": false,
1266
1266
  "description": "Monitoring interval in seconds",
1267
1267
  "example": 60,
1268
- "minimum": 30,
1268
+ "minimum": 15,
1269
1269
  "type": "number"
1270
1270
  },
1271
1271
  {
@@ -6617,7 +6617,7 @@ export const operations = {
6617
6617
  "required": false,
6618
6618
  "description": "Interval of check in seconds. Heartbeat monitors support at most 2678400 seconds (31 days).",
6619
6619
  "example": 60,
6620
- "minimum": 30,
6620
+ "minimum": 15,
6621
6621
  "type": "number"
6622
6622
  },
6623
6623
  {
@@ -9,6 +9,7 @@ export const HANDWRITTEN_COMMANDS = [
9
9
  'auth logout',
10
10
  'auth status',
11
11
  'auth whoami',
12
+ 'help',
12
13
  'monitors schema',
13
14
  'user get',
14
15
  ];
@@ -44,6 +44,7 @@ export async function promptSecret(question) {
44
44
  const finish = (value, exitCode) => {
45
45
  process.stdin.setRawMode(false);
46
46
  process.stdin.removeListener('keypress', onKeypress);
47
+ process.stdin.pause();
47
48
  process.stderr.write('\n');
48
49
  if (exitCode !== undefined)
49
50
  process.exit(exitCode);
@@ -2125,7 +2125,7 @@ components:
2125
2125
  example: 42
2126
2126
  interval:
2127
2127
  type: number
2128
- minimum: 30
2128
+ minimum: 15
2129
2129
  description: Monitoring interval in seconds
2130
2130
  example: 60
2131
2131
  timeout:
@@ -2658,7 +2658,7 @@ components:
2658
2658
  type: {}
2659
2659
  interval:
2660
2660
  type: number
2661
- minimum: 30
2661
+ minimum: 15
2662
2662
  exclusiveMinimum: false
2663
2663
  maximum: 2678400
2664
2664
  exclusiveMaximum: false
@@ -3867,7 +3867,7 @@ components:
3867
3867
  type: {}
3868
3868
  interval:
3869
3869
  type: number
3870
- minimum: 30
3870
+ minimum: 15
3871
3871
  exclusiveMinimum: false
3872
3872
  maximum: 2678400
3873
3873
  exclusiveMaximum: false
@@ -6242,7 +6242,7 @@ components:
6242
6242
  description: Required for Keyword monitor
6243
6243
  interval:
6244
6244
  type: number
6245
- minimum: 30
6245
+ minimum: 15
6246
6246
  example: 60
6247
6247
  description: >-
6248
6248
  Interval of check in seconds. Heartbeat monitors support at most
@@ -7706,6 +7706,12 @@ components:
7706
7706
  type: object
7707
7707
  properties:
7708
7708
  plan:
7709
+ description: >-
7710
+ Display label for the active plan (e.g. "Free", "Solo", "Team",
7711
+ "Scale"). This is a human-readable label, NOT a stable
7712
+ identifier — it can change (e.g. "Enterprise" → "Scale").
7713
+ Consumers needing stability should branch on a stable field, not
7714
+ on this string.
7709
7715
  type: string
7710
7716
  monitorLimit:
7711
7717
  type: number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uptimerobot/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Official UptimeRobot CLI — manage uptime monitors, incidents, status pages, and alert contacts from your terminal, scripts, or CI.",
5
5
  "keywords": [
6
6
  "uptimerobot",
@@ -83,7 +83,7 @@
83
83
  "topicSeparator": " ",
84
84
  "topics": {
85
85
  "auth": {
86
- "description": "Manage authentication"
86
+ "description": "Manage authentication\n\nCreate an API key at https://dashboard.uptimerobot.com/integrations."
87
87
  },
88
88
  "alert-contacts": {
89
89
  "description": "Manage personal alert contacts"