@ambasada/cli 0.4.1 → 0.5.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.
package/README.md CHANGED
@@ -6,10 +6,20 @@ from source: `pnpm village --help`. `create-ambasada/` is the tiny `npm create a
6
6
  - `ambasada init [dir] --template next|spa|worker` (default `next`) scaffolds from `templates/` in the repo. A product
7
7
  is one Cloudflare Worker: Next.js via OpenNext, Vite + React for Lovable/Bolt exports, or bare fetch handlers.
8
8
  It also writes `.env` for the mock and the app manifest (`/.well-known/ambasada.json`, `src/manifest.ts`).
9
+ - Every template is a **mini-app** for the Ambasada app (docs/MINI-APPS.md): the manifest is schema 2 (`id`, `name` ≤ 32,
10
+ `subtitle` ≤ 40, `description`, `icon` = a 1024×1024 opaque PNG, `splash`, `accent`, `entry`, `kind`, `category`,
11
+ `scopes`, `visibility`), and the page calls `ready()` from `@ambasada/miniapp` (`packages/miniapp`; the worker
12
+ template loads it as `<script src="https://hub.ambasada.id/miniapp.js">`) after its first render, padding the page
13
+ by `--ambasada-safe-area-*` and `--ambasada-host-bar`.
14
+ - `ambasada check [url | dir] [--json]` (`src/check.ts`) says whether a product passes the mini-app checks: the manifest
15
+ validates, the icon is a 1024² opaque PNG, the entry has a `width=device-width` viewport, is not dark-only and loads
16
+ the SDK. With no argument it reads the current project's static files (no network); with a URL it fetches the live
17
+ origin (https, manifest served without redirects, entry 200 in under 3 s). Problems exit 1, warnings don't; `--json`
18
+ prints `{ ok, target, problems, warnings }`.
9
19
  - `ambasada dev` starts the mock Payments API on :8788 and the project's dev server (`next dev`, `vite` or
10
20
  `wrangler dev`, `src/stack.ts`) on `product.url`, with `AMBASADA_*` pointed at the mock. `--mock-only`: the mock alone.
11
21
  - `src/commands.ts`: login (device code at `/v1/auth/device`, else paste a key; saved in `~/.config/ambasada/config.json`),
12
- init, dev, deploy, link, offerings, wallet, ledger, logs, market, steer, webhook, links.
22
+ init, dev, deploy, link, check, offerings, wallet, ledger, logs, market, steer, webhook, links.
13
23
  - `src/mock/`: the local mock of the Payments API (fake bank, fake visitor, real receipts and webhook signatures,
14
24
  canned LLMOK, and a fake Ambasada ID issuer so Sign in with Ambasada works offline: docs/AUTH.md). See the
15
25
  skill's `reference/test-mode.md`.