eraspace 0.1.0 → 0.3.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,6 +1,6 @@
1
1
  # eraspace
2
2
 
3
- Build and deploy realtime apps written in TypeScript. The server runs on the BEAM with Postgres storage, live queries
3
+ Build and deploy realtime apps written in TypeScript. The server runs in V8 with Postgres storage, live queries
4
4
  and WebSockets; the client is Preact. Apps need no `package.json`, `tsconfig.json` or `node_modules`: the CLI bundles
5
5
  the SDK, Preact and TypeScript.
6
6
 
@@ -23,16 +23,38 @@ sign in and claim it (`eraspace auth login`, then `eraspace claim`).
23
23
  | --- | --- |
24
24
  | `new <name>` / `init` | Create an app in a new directory or the current one |
25
25
  | `typecheck` | Typecheck `server/`, `client/` and `shared/` |
26
- | `deploy` | Build the client, compile the server and deploy |
27
- | `dev` | Deploy, then redeploy on every save |
28
- | `call <fn> '<json>'...` | Call a query, mutation or action |
29
- | `logs` | Read handler logs (`--follow` to stream) |
26
+ | `deploy` | Build the client, compile the server and deploy (`--delete-table <table>=<rows>` confirms deleting a removed table; `--shadow` first reruns the app's live queries on the new code and reports which results change or start throwing, and `--fail-on-query-errors` refuses the deploy if any would throw) |
27
+ | `dev` | Deploy, then redeploy whenever `server/`, `client/`, `shared/` or `.env.eraspace.server` change |
28
+ | `call <fn> '<json>'...` | Call a query, mutation or action, each argument a JSON value |
29
+ | `profile [app] --seconds <n>` | Sample the app's server CPU time and write a `.cpuprofile` (TypeScript positions) for Chrome DevTools, printing the top functions by self time (`--out <file>`) |
30
+ | `explain <fn> '<json>'...` | Run a query once and print the rows it scanned and kept, with an index for each scan it filtered in JavaScript (`--json` for the full report) |
31
+ | `logs [app]` | Read handler logs (`--follow` to stream) |
32
+ | `changes` | Print recent committed row changes as NDJSON (`--since <commit>`, `--limit <rows>`) |
33
+ | `undo <commit> --yes` | Put every row changed after a commit back as it was; the undo is a commit too, so it can be undone |
30
34
  | `inspect` | Show the schema, functions and deploys |
31
- | `auth login` / `claim` | Sign in, and take ownership of an unclaimed app |
35
+ | `auth login` / `logout` / `whoami` | Sign in with your browser, sign out, or show who you are |
36
+ | `claim` | Take ownership of this checkout's unclaimed app |
37
+ | `apps` | List your apps |
38
+ | `names` / `names add` / `names rm` | List, add or remove the app's names |
39
+ | `inspection public\|private [app]` | Open or close inspection and logs to everyone |
40
+ | `archive` / `restore [app]` | Stop serving an app and keep its data, or serve it again |
41
+ | `terminate [app] --yes` | Stop an app permanently: its data is kept but it accepts no more deploys |
42
+ | `token create` / `list` / `revoke` | Manage API tokens for one app, or for all your apps with `--personal` |
32
43
 
33
- `eraspace --help` and `eraspace <command> --help` list every flag.
44
+ Commands act on the app bound to the current checkout. Pass `--app <name or id>` or set `ERASPACE_APP` to choose
45
+ another. `eraspace --help` and `eraspace <command> --help` list every flag.
46
+
47
+ ## CI
48
+
49
+ Create a token with `eraspace token create` (add `--read` for inspection and logs only), then set `ERASPACE_TOKEN` and
50
+ `ERASPACE_TOKEN_API=<platform origin>` in CI. The CLI never sends the token to any other origin.
34
51
 
35
52
  ## Platform
36
53
 
37
54
  The CLI deploys to the hosted eraspace platform by default. Set `ERASPACE_URL` or pass `--url` to use another one, such
38
55
  as a local platform at `http://localhost:4000`.
56
+
57
+ ## Upgrading from 0.1
58
+
59
+ 0.2 targets the V8 platform and its JSON socket protocol. Apps deployed with 0.1 are not carried over: deploy them
60
+ afresh with 0.2, which also rebuilds their browser bundles against the new SDK.