@myapihq/cli 2.28.1 → 2.28.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.
|
@@ -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,
|
|
@@ -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.
|
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.
|
|
4
|
+
"version": "2.28.2",
|
|
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.
|
|
49
|
+
"@myapihq/sdk": "^2.28.2"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^25.6.0",
|