@astris-labs/cli 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +9 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -38,15 +38,21 @@ v0 commands are `deploy`, `status`, `env`, `domains`, `restart`, `diagnose`, `da
38
38
 
39
39
  `--app <id>` redeploys that application. The value is the application id.
40
40
 
41
- To create a project and an application, then queue a deploy, pass these flags. The names are kebab-case.
41
+ To create a project and an application, then queue a deploy, pass these flags. A private repository over SSH is the exception below. The names are kebab-case.
42
42
 
43
43
  - `--project`
44
44
  - `--name`
45
45
  - `--git-url`
46
46
  - `--branch`
47
47
 
48
+ `--git-url` is a public http or https URL, or an SSH URL for a private repository in the form `ssh://git@host/owner/repo.git`. In an `ssh://` URL the user name `git` is the only user name allowed; an http or https URL takes none. Any other user name, or any password, is refused with `The Git URL must not include a user name or password.`
49
+
50
+ When the API answers the create with a deploy key (an SSH URL), the CLI makes the project and the application and queues no deploy. It prints the project id, the application id, the name, the slug, the deploy key type, the public key, the fingerprint, and then the next step: `Add this public key to the repository as a read-only deploy key, then deploy again with this app_id. On GitHub the key goes in the repository Settings under Deploy keys, and write access stays off.`
51
+
48
52
  Optional flags are `--build-path`, `--dockerfile`, `--port`, `--build`, `--publish-directory`, `--spa`, `--kind`, `--command`, and `--schedule`.
49
53
 
54
+ `--app <id> --hook` prints the push-to-deploy hook URL of that application, one line. The URL is a credential: keep it private. `--hook` needs `--app`; without it the sentence is `Send --app set to the application id.` `--hook` follows the same `--app` rules as a redeploy, so the flags that rule refuses are refused with it.
55
+
50
56
  `--build nixpacks` builds with Nixpacks. `--build dockerfile` builds from the Dockerfile named by `--dockerfile`; without `--build`, a `--dockerfile` value alone means a Dockerfile build. `--build static` serves static files; with it, `--publish-directory <dir>` names the directory to publish, relative to the build, and `--spa` serves it as a single-page application. `--spa` takes no value, and `--spa=false` is refused.
51
57
 
52
58
  `--kind web` is the default kind. `--kind worker` runs `--command` as the container's process. `--kind cron` runs `--command` on `--schedule`, five space-separated fields. A worker or a cron app cannot use `--build static`. `--app` with any of `--build`, `--publish-directory`, `--spa`, `--kind`, `--command`, or `--schedule` is refused and makes no request; the create flags `--project`, `--name`, `--git-url`, `--branch`, `--port`, `--dockerfile`, and `--build-path` are still ignored with `--app`.
@@ -153,9 +159,9 @@ After the key, `deploy`, `status`, `env`, `domains`, `restart`, `diagnose`, `dat
153
159
 
154
160
  `domains` binds with no word, or verifies with the one word `verify`. `--hostname` with `--slug` is refused. An empty `--hostname`, or one containing a space, is refused before any request. Other hostname rules are left to the API. `verify` requires `--app` set to an application id and `--id` set to a domain id; a missing or non-UUID `--id`, and a word other than `verify`, make no request.
155
161
 
156
- `--app` is refused unless the value, after trim, is an id of eight, four, four, four, and twelve hexadecimal digits, with hyphens, in either case. The sentence is `Send --app set to the application id.` `status`, `env`, `domains`, and `restart` require that id. `deploy` requires it when `--app` is present, and then refuses `--build`, `--publish-directory`, `--spa`, `--kind`, `--command`, and `--schedule`; the other create flags are ignored.
162
+ `--app` is refused unless the value, after trim, is an id of eight, four, four, four, and twelve hexadecimal digits, with hyphens, in either case. The sentence is `Send --app set to the application id.` `status`, `env`, `domains`, and `restart` require that id. `deploy` requires it when `--app` is present or when `--hook` is sent (`--hook` without `--app` is refused with `Send --app set to the application id.`), and then refuses `--build`, `--publish-directory`, `--spa`, `--kind`, `--command`, and `--schedule`; the other create flags are ignored.
157
163
 
158
- `deploy` without `--app` refuses the call unless `--project`, `--name`, `--git-url`, and `--branch` each have a non-empty value after trim. The sentence names those four flags. On that same path, a `--git-url` whose user or password is set is refused. The sentence says the Git URL must be a public http or https URL with no user or password. A `--port` on that path is refused unless it is a whole number from 1 to 65535 with no leading zero. Other Git URL rules are left to the API. On that path, `--build` is exactly `nixpacks`, `dockerfile`, or `static`. `nixpacks` refuses `--dockerfile`, `--publish-directory`, and `--spa`. `dockerfile` needs `--dockerfile`. `static` takes an optional `--publish-directory` and an optional `--spa`, and refuses `--dockerfile`. `--publish-directory` or `--spa` without `--build` is refused. `--kind` is exactly `web`, `worker`, or `cron`. A web app refuses `--command` and `--schedule`. A worker needs `--command` and refuses `--schedule`. A cron needs `--command` and a `--schedule` of five space-separated fields of digits, `*`, `,`, `-`, or `/`, at most 100 characters, each field non-empty. A command is 1 to 512 characters, with no line break and no NUL character. A worker or cron app with `--build static` is refused. Any refusal on this path makes no request.
164
+ `deploy` without `--app` refuses the call unless `--project`, `--name`, `--git-url`, and `--branch` each have a non-empty value after trim. The sentence names those four flags. On that same path, a `--git-url` whose password is set, or whose user name is set and is not the `git` of an `ssh://` URL, is refused. The sentence is `The Git URL must not include a user name or password.` A `--port` on that path is refused unless it is a whole number from 1 to 65535 with no leading zero. Other Git URL rules are left to the API. On that path, `--build` is exactly `nixpacks`, `dockerfile`, or `static`. `nixpacks` refuses `--dockerfile`, `--publish-directory`, and `--spa`. `dockerfile` needs `--dockerfile`. `static` takes an optional `--publish-directory` and an optional `--spa`, and refuses `--dockerfile`. `--publish-directory` or `--spa` without `--build` is refused. `--kind` is exactly `web`, `worker`, or `cron`. A web app refuses `--command` and `--schedule`. A worker needs `--command` and refuses `--schedule`. A cron needs `--command` and a `--schedule` of five space-separated fields of digits, `*`, `,`, `-`, or `/`, at most 100 characters, each field non-empty. A command is 1 to 512 characters, with no line break and no NUL character. A worker or cron app with `--build static` is refused. Any refusal on this path makes no request.
159
165
 
160
166
  `env` refuses stdin that is not one JSON object. An array, a bare value, and text that is not JSON are refused, before any request. `env --names` sends no replace: it prints the names of the application's variables, one per line, and never a value, and it reads no stdin.
161
167
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astris-labs/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The Astris CLI, a command-line client of the Astris API.",
5
5
  "repository": {
6
6
  "type": "git",