@ambasada/cli 0.1.0 → 0.2.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
@@ -1,12 +1,18 @@
1
- # @ambasada/cli: `village`
1
+ # @ambasada/cli: `ambasada`
2
2
 
3
- One dependency-free file (`dist/ambasada.mjs`, template embedded). `pnpm build`, then `node dist/ambasada.mjs --help`;
4
- from source: `pnpm village --help`. `create-ambasada/` is the tiny `npx create-ambasada` bin.
3
+ One dependency-free file (`dist/ambasada.mjs`, the templates embedded). `pnpm build`, then `node dist/ambasada.mjs --help`;
4
+ from source: `pnpm village --help`. `create-ambasada/` is the tiny `npm create ambasada` bin.
5
5
 
6
+ - `ambasada init [dir] --template next|spa|worker` (default `next`) scaffolds from `templates/` in the repo. A product
7
+ is one Cloudflare Worker: Next.js via OpenNext, Vite + React for Lovable/Bolt exports, or bare fetch handlers.
8
+ It also writes `.env` for the mock and the app manifest (`/.well-known/ambasada.json`, `src/manifest.ts`).
9
+ - `ambasada dev` starts the mock Payments API on :8788 and the project's dev server (`next dev`, `vite` or
10
+ `wrangler dev`, `src/stack.ts`) on `product.url`, with `AMBASADA_*` pointed at the mock. `--mock-only`: the mock alone.
6
11
  - `src/commands.ts`: login (device code at `/v1/auth/device`, else paste a key; saved in `~/.config/ambasada/config.json`),
7
12
  init, dev, deploy, link, offerings, wallet, ledger, logs, market, steer, webhook, links.
8
- - `src/mock/`: `ambasada dev`, a local mock of the Payments API on :8788 (fake bank, fake visitor, real
9
- receipts and webhook signatures, canned LLMOK). See the skill's `reference/test-mode.md`.
10
- - `test/smoke.test.ts`: create-ambasada → ambasada dev → the template's product gets paid 1 TON.
13
+ - `src/mock/`: the local mock of the Payments API (fake bank, fake visitor, real receipts and webhook signatures,
14
+ canned LLMOK). See the skill's `reference/test-mode.md`.
15
+ - `test/smoke.test.ts`: `worker` and `next` scaffolds run under `ambasada dev` and get paid 1 TON;
16
+ `test/templates.test.ts`: the three templates stay in step.
11
17
 
12
18
  Built by [CENTYSO](https://centyso.com) for [Ambasada](https://ambasada.id). MIT.