@myapihq/cli 2.28.0 → 2.28.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.
@@ -170,6 +170,16 @@ export async function create(nameArg, flags) {
170
170
  payload.env = merged;
171
171
  }
172
172
  const result = await sdkContainer.createContainer(config.api_key, orgId, payload);
173
+ // `create` is the verb whose RESULT a caller needs — the id to deploy to and
174
+ // the scoped key, which is returned exactly once. It printed prose and
175
+ // ignored --json, so anything automating this had to scrape an id out of a
176
+ // sentence and a secret out of an indented line. Same defect as
177
+ // `storage upload --json`, found the same way: a probe asked for machine
178
+ // output and got none.
179
+ if (flags.json) {
180
+ printJson(result);
181
+ return;
182
+ }
173
183
  success(`Container created: ${result.container.id}`);
174
184
  info(`Name: ${result.container.name}`);
175
185
  info(`Type: ${result.container.type}${result.container.cron_schedule ? ` (${result.container.cron_schedule})` : ''}`);
@@ -1,6 +1,6 @@
1
1
  import { email as sdkEmail } from '@myapihq/sdk';
2
2
  import { requireConfig } from '../../config.js';
3
- import { success, error, printTable, info } from '../../output.js';
3
+ import { success, error, printTable, info, printJson } from '../../output.js';
4
4
  export const EXPOSES = [
5
5
  'POST /email/mailboxes/create',
6
6
  'GET /email/mailboxes',
@@ -36,6 +36,13 @@ async function create(addressArg, flags) {
36
36
  // instead of reported. Kept the fallback anyway: the address is derivable
37
37
  // from the inputs, and a create that succeeded should still print what it
38
38
  // made if the field ever moves again.
39
+ // Same class as `container create` and `storage upload`: the create verb
40
+ // returns the thing a caller needs and printed only prose. `list` was always
41
+ // fine because printTable honours --json for it.
42
+ if (flags.json) {
43
+ printJson(res);
44
+ return;
45
+ }
39
46
  success(`Mailbox created: ${res.mailbox || `${username}@${domain}`}`);
40
47
  // A warning on a 2xx means something is configured but incomplete — here, a
41
48
  // missing CAN-SPAM mailing address, which refuses every send LATER rather
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
3
  "license": "Apache-2.0",
4
- "version": "2.28.0",
4
+ "version": "2.28.1",
5
5
  "description": "MyAPI command-line interface",
6
6
  "repository": {
7
7
  "type": "git",
@@ -46,7 +46,7 @@
46
46
  "lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
47
47
  },
48
48
  "dependencies": {
49
- "@myapihq/sdk": "^2.28.0"
49
+ "@myapihq/sdk": "^2.28.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^25.6.0",