@ambasada/cli 0.7.4 → 0.8.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 +24 -24
- package/dist/ambasada.mjs +1683 -2057
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# @ambasada/cli: `ambasada`
|
|
2
2
|
|
|
3
|
-
One dependency-free file (`dist/ambasada.mjs`, the templates embedded).
|
|
4
|
-
from source: `pnpm village --help`.
|
|
3
|
+
Build and host apps on Ambasada. One dependency-free file (`dist/ambasada.mjs`, the platform templates embedded).
|
|
4
|
+
`pnpm build`, then `node dist/ambasada.mjs --help`; from source: `pnpm village --help`. The command tree is in
|
|
5
|
+
docs/PLATFORM.md §3.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`test/templates.test.ts`: the three templates stay in step.
|
|
7
|
+
```
|
|
8
|
+
init [dir] [--template next|spa|worker] [--village] login | logout | whoami
|
|
9
|
+
dev [--port] [--tunnel] [--mock-only] deploy [--own] [--no-smoke] [--dry-run]
|
|
10
|
+
tunnel | link <url> | check [url|dir] env list|set|unset | logs [--follow]
|
|
11
|
+
db migrate|shell|tables | kv … | files … add <addon> | upgrade [--check]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- `src/commands.ts`: login (device code at `/v1/auth/device`, else a key; saved in `~/.config/ambasada/config.json`,
|
|
15
|
+
the 0.7 `~/.config/village` file is moved there once), init (writes `.env` for the mock, the app manifest and
|
|
16
|
+
`.ambasada/project.json`), dev, link, check, env, logs, add. `src/deploy.ts`: build, workerd smoke test, upload.
|
|
17
|
+
`src/storage.ts`: `db`, `kv`, `files` (docs/STORAGE.md). `src/tunnel.ts`: docs/TUNNEL.md. `src/upgrade.ts`:
|
|
18
|
+
`ambasada upgrade` (docs/PLATFORM.md §3a).
|
|
19
|
+
- `src/mock/`: the platform mock on :8788 (a fake Ambasada ID issuer for Sign in with Ambasada and silent sign-in,
|
|
20
|
+
a fake hub for notifications and app events, the store, files, device login).
|
|
21
|
+
- `src/plugin.ts`: add-ons. A package with `"ambasada": { "plugin": "./dist/cli.mjs" }` among the project's
|
|
22
|
+
dependencies (or in `addons: []` of `ambasada.config.ts`, or `AMBASADA_ADDONS`) is imported and its
|
|
23
|
+
`register(api)` adds a namespace, aliases, mock routes, a dev hook, after-deploy hooks, smoke checks, config keys,
|
|
24
|
+
an init overlay and skills. Today: `@ambasada/village` (`ambasada village …`).
|
|
25
|
+
- `src/check.ts`: the mini-app checks (manifest schema 2, 1024² opaque PNG icon, viewport, light scheme, the SDK).
|
|
26
|
+
- Tests: `test/smoke.test.ts` runs the templates under `ambasada dev` (and a `--village` one through the bank and
|
|
27
|
+
deploy); `test/upgrade.test.ts` upgrades a 0.7 project; `test/templates.test.ts` keeps the templates in step.
|
|
28
28
|
|
|
29
29
|
Built by [CENTYSO](https://centyso.com) for [Ambasada](https://ambasada.id). MIT.
|