@myapihq/cli 2.28.1 → 2.29.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.
|
@@ -39,6 +39,8 @@ export const SCHEMA = {
|
|
|
39
39
|
'no-promote': 'boolean',
|
|
40
40
|
'health-check': 'string',
|
|
41
41
|
clear: 'boolean',
|
|
42
|
+
// `container get --reveal` — print env VALUES, not just their names.
|
|
43
|
+
reveal: 'boolean',
|
|
42
44
|
smoke: 'string',
|
|
43
45
|
remove: 'boolean',
|
|
44
46
|
source: 'string',
|
|
@@ -212,7 +214,10 @@ export async function get(id, flags) {
|
|
|
212
214
|
const orgId = requireOrg(flags, config, 'myapi container get <id> [--org <id>]');
|
|
213
215
|
if (!id)
|
|
214
216
|
error('Missing id.\nUsage: myapi container get <id>');
|
|
215
|
-
|
|
217
|
+
// --reveal is opt-in for the same reason the API makes it opt-in: the values
|
|
218
|
+
// are secrets, and a plain read should not put them on a terminal (or in a
|
|
219
|
+
// screenshot, or a pasted bug report) unless that was the point.
|
|
220
|
+
const c = await sdkContainer.getContainer(config.api_key, orgId, id, flags.reveal ? { reveal: true } : undefined);
|
|
216
221
|
if (flags.json) {
|
|
217
222
|
printJson(c);
|
|
218
223
|
return;
|
|
@@ -226,6 +231,12 @@ export async function get(id, flags) {
|
|
|
226
231
|
info(`Port: ${c.port}`);
|
|
227
232
|
info(`URL: ${c.url || '(not deployed)'}`);
|
|
228
233
|
info(`Startup probe: ${c.health_check || '(none)'}`);
|
|
234
|
+
const envNames = Object.keys(c.env ?? {});
|
|
235
|
+
if (envNames.length) {
|
|
236
|
+
info(`Env: ${envNames.length} variable(s): ${envNames.sort().join(', ')}`);
|
|
237
|
+
if (!flags.reveal)
|
|
238
|
+
info(' values hidden — add --reveal to print them');
|
|
239
|
+
}
|
|
229
240
|
if (c.egress)
|
|
230
241
|
info(`Egress: ${c.egress}`);
|
|
231
242
|
if (c.custom_domain)
|
|
@@ -750,7 +761,11 @@ revision — so it completes in seconds.
|
|
|
750
761
|
|
|
751
762
|
List candidates with: myapi container revisions <id>`,
|
|
752
763
|
'list': 'myapi container list [--org <id>] [--json]',
|
|
753
|
-
'get':
|
|
764
|
+
'get': `myapi container get <id> [--reveal] [--org <id>] [--json]
|
|
765
|
+
|
|
766
|
+
Environment VALUES are hidden by default and shown with --reveal; the names are
|
|
767
|
+
always listed. They are secrets, and a plain read should not put them on a
|
|
768
|
+
terminal unless that was the point.`,
|
|
754
769
|
'logs': `myapi container logs <id> [--tail <n>] [--scope all] [--org <id>] [--json]
|
|
755
770
|
|
|
756
771
|
Recent runtime logs, newest first. --tail caps the count (default 100,
|
package/dist/commands/storage.js
CHANGED
|
@@ -23,6 +23,7 @@ export const SCHEMA = {
|
|
|
23
23
|
name: 'string',
|
|
24
24
|
'content-type': 'string',
|
|
25
25
|
private: 'boolean',
|
|
26
|
+
description: 'string',
|
|
26
27
|
ttl: 'string',
|
|
27
28
|
};
|
|
28
29
|
// Extension → content type, for inference only. The API accepts any MIME type
|
|
@@ -118,7 +119,8 @@ async function upload(filePath, flags) {
|
|
|
118
119
|
}
|
|
119
120
|
const name = flags.name || basename(filePath);
|
|
120
121
|
const visibility = flags.private ? 'private' : undefined;
|
|
121
|
-
const
|
|
122
|
+
const description = typeof flags.description === 'string' ? flags.description : undefined;
|
|
123
|
+
const res = await sdkStorage.uploadAsset(config.api_key, orgId, data, contentType, name, visibility, description);
|
|
122
124
|
// Every other storage verb honours --json; upload did not, so an agent that
|
|
123
125
|
// asked for machine output got prose and had to scrape "ID: obj_…" out of a
|
|
124
126
|
// sentence to learn what it had just created. Agents are the primary caller
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-container-api
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.3
|
|
4
4
|
description: >
|
|
5
5
|
Run containers on demand — long-running services, background workers, and scheduled jobs. The heavier-duty sibling of edge functions, for native deps and long execution.
|
|
6
6
|
triggers: [container, cloud run, dynamic app, custom domain app, service, worker, scheduled job, deploy container, docker image]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-14cb4bc8d0d968425e121f728e86f8e7057efb56572c2fbb4d18d65d75a146b5
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyContainerAPI
|
|
11
11
|
|
|
12
|
-
A container runs a pre-built image on managed cloud
|
|
12
|
+
A container runs a pre-built image on managed cloud infra. Three types: a **service** (HTTP server, scales to zero), a **worker** (always-on), or a **job** (runs to completion — the only type taking a cron schedule).
|
|
13
13
|
|
|
14
14
|
## Capabilities
|
|
15
15
|
<!-- llm:start -->
|
|
16
16
|
The lifecycle is **create → deploy → (optionally) bind a custom domain**.
|
|
17
17
|
|
|
18
|
-
- `create` registers the container and issues a **scoped API key**, returned once. The container gets it as `MYAPI_KEY`, so your code calls other
|
|
18
|
+
- `create` registers the container and issues a **scoped API key**, returned once (rotated on deploy). The container gets it as `MYAPI_KEY`, so your code calls other slots with no token handling.
|
|
19
19
|
- `deploy` takes **either** a pre-built image reference **or** a source
|
|
20
|
-
directory. `--source ./dir` tars
|
|
21
|
-
|
|
22
|
-
no registry account, no image to push**.
|
|
20
|
+
directory. `--source ./dir` tars it, builds server-side (~4 min) and deploys —
|
|
21
|
+
**no Docker locally, no registry account, no image to push**.
|
|
23
22
|
- `domain` puts the container on a **custom domain** — a dynamic app at `app.yourbrand.com`.
|
|
24
23
|
|
|
25
24
|
### Deploying safely
|
|
@@ -49,11 +48,13 @@ revision in seconds, no rebuild.
|
|
|
49
48
|
`--health-check /livez` makes the startup probe an HTTP request, not a bare TCP
|
|
50
49
|
connect — at create, or later with `myapi container health-check <id> /livez`
|
|
51
50
|
(`--clear` removes it), which rolls a new revision on the same image.
|
|
52
|
-
`/healthz` is refused: the runtime answers it before your container does
|
|
51
|
+
`/healthz` is refused: the runtime answers it before your container does, and a
|
|
52
|
+
path yours does not SERVE leaves the revision unready. `container get` lists env names;
|
|
53
|
+
`--reveal` prints values.
|
|
53
54
|
|
|
54
55
|
### Custom domains (dynamic apps)
|
|
55
56
|
|
|
56
|
-
`myapi container domain <id> <domain>` binds a custom domain to a **deployed** container
|
|
57
|
+
`myapi container domain <id> <domain>` binds a custom domain to a **deployed** container over HTTPS — a dynamic backend on a real domain, unlike `my-funnel-api`'s static sites.
|
|
57
58
|
|
|
58
59
|
- **Deploy first.** Binding a domain to a container that has never deployed fails (422) — there is nothing running to route to.
|
|
59
60
|
- **Register the parent domain first** via `my-domain-api`. Binding `app.synthesisdaily.com` requires `synthesisdaily.com` registered in MyAPI; otherwise 422.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: my-storage-api
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: >
|
|
5
5
|
Edge-hosted asset storage. Upload a local file of any content type directly, or have the server fetch from a public URL. Each asset gets a stable public CDN URL.
|
|
6
6
|
triggers: [storage, upload, ingest, asset, cdn, image hosting, file upload, get-url, download, public url]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-a98e06eacd41973d0b847005bd949cf71ca13b0f99d5206a3dd762301db6e040
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyStorageAPI
|
|
@@ -45,7 +45,7 @@ Use `get` for a round-trip metadata fetch. Use `get-url` when you just need the
|
|
|
45
45
|
| Command | What it does |
|
|
46
46
|
|---|---|
|
|
47
47
|
| `myapi storage list` | List all stored assets |
|
|
48
|
-
| `myapi storage upload <file>` | Direct multipart upload of a local file (any content type) |
|
|
48
|
+
| `myapi storage upload <file>` | Direct multipart upload of a local file (any content type; `--description` labels it) |
|
|
49
49
|
| `myapi storage ingest <url>` | Server fetches a public URL into storage |
|
|
50
50
|
| `myapi storage get <asset_id>` | Round-trip the API for full metadata (`--json` or human block) |
|
|
51
51
|
| `myapi storage get-url <asset_id>` | Pure local URL constructor — no API call, no auth |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myapihq/cli",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.29.0",
|
|
5
5
|
"description": "MyAPI command-line interface",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"lint:changelog": "node ../../scripts/lint-changelog.js",
|
|
35
35
|
"lint:help-order": "node scripts/lint-help-order.js",
|
|
36
36
|
"lint:exposes": "node scripts/lint-exposes.js",
|
|
37
|
+
"lint:query-params": "node scripts/lint-query-params.js",
|
|
37
38
|
"lint:request-fields": "node scripts/lint-request-fields.js",
|
|
38
39
|
"audit:doctor": "npm run build && node scripts/audit-doctor.js",
|
|
39
40
|
"lint:docs": "node scripts/lint-docs.js",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@myapihq/sdk": "^2.
|
|
50
|
+
"@myapihq/sdk": "^2.29.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@types/node": "^25.6.0",
|