@foliwake/cli 0.0.0-stage → 0.6.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/CHANGELOG.md +35 -0
- package/LICENSE +202 -0
- package/README.md +643 -2
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +9 -0
- package/dist/command-words.d.ts +13 -0
- package/dist/command-words.js +53 -0
- package/dist/commands/account/keys/create.d.ts +12 -0
- package/dist/commands/account/keys/create.js +36 -0
- package/dist/commands/account/keys/list.d.ts +9 -0
- package/dist/commands/account/keys/list.js +23 -0
- package/dist/commands/account/keys/revoke.d.ts +12 -0
- package/dist/commands/account/keys/revoke.js +15 -0
- package/dist/commands/branch/bootstrap.d.ts +11 -0
- package/dist/commands/branch/bootstrap.js +23 -0
- package/dist/commands/branch/delete.d.ts +17 -0
- package/dist/commands/branch/delete.js +38 -0
- package/dist/commands/branch/history.d.ts +14 -0
- package/dist/commands/branch/history.js +24 -0
- package/dist/commands/branch/list.d.ts +11 -0
- package/dist/commands/branch/list.js +15 -0
- package/dist/commands/branch/update.d.ts +19 -0
- package/dist/commands/branch/update.js +49 -0
- package/dist/commands/code/deploy.d.ts +15 -0
- package/dist/commands/code/deploy.js +78 -0
- package/dist/commands/code/prepare.d.ts +13 -0
- package/dist/commands/code/prepare.js +54 -0
- package/dist/commands/code/release.d.ts +19 -0
- package/dist/commands/code/release.js +51 -0
- package/dist/commands/code/rollback.d.ts +17 -0
- package/dist/commands/code/rollback.js +38 -0
- package/dist/commands/connect.d.ts +19 -0
- package/dist/commands/connect.js +100 -0
- package/dist/commands/create.d.ts +30 -0
- package/dist/commands/create.js +163 -0
- package/dist/commands/credential/list.d.ts +10 -0
- package/dist/commands/credential/list.js +21 -0
- package/dist/commands/credential/rm.d.ts +12 -0
- package/dist/commands/credential/rm.js +18 -0
- package/dist/commands/credential/set.d.ts +15 -0
- package/dist/commands/credential/set.js +58 -0
- package/dist/commands/dev.d.ts +25 -0
- package/dist/commands/dev.js +89 -0
- package/dist/commands/login.d.ts +20 -0
- package/dist/commands/login.js +94 -0
- package/dist/commands/logout.d.ts +14 -0
- package/dist/commands/logout.js +61 -0
- package/dist/commands/migration/commit.d.ts +13 -0
- package/dist/commands/migration/commit.js +42 -0
- package/dist/commands/migration/prepare.d.ts +18 -0
- package/dist/commands/migration/prepare.js +53 -0
- package/dist/commands/operation/cancel.d.ts +14 -0
- package/dist/commands/operation/cancel.js +21 -0
- package/dist/commands/operation/get.d.ts +14 -0
- package/dist/commands/operation/get.js +26 -0
- package/dist/commands/operation/list.d.ts +12 -0
- package/dist/commands/operation/list.js +25 -0
- package/dist/commands/operation/recover.d.ts +20 -0
- package/dist/commands/operation/recover.js +49 -0
- package/dist/commands/page/changes.d.ts +13 -0
- package/dist/commands/page/changes.js +26 -0
- package/dist/commands/page/check.d.ts +12 -0
- package/dist/commands/page/check.js +25 -0
- package/dist/commands/page/replace.d.ts +13 -0
- package/dist/commands/page/replace.js +59 -0
- package/dist/commands/page/unpreview.d.ts +17 -0
- package/dist/commands/page/unpreview.js +54 -0
- package/dist/commands/page/unpublish.d.ts +18 -0
- package/dist/commands/page/unpublish.js +36 -0
- package/dist/commands/project/preview.d.ts +8 -0
- package/dist/commands/project/preview.js +20 -0
- package/dist/commands/project/publish.d.ts +16 -0
- package/dist/commands/project/publish.js +40 -0
- package/dist/commands/project/unpublish.d.ts +16 -0
- package/dist/commands/project/unpublish.js +33 -0
- package/dist/commands/release/rollback.d.ts +17 -0
- package/dist/commands/release/rollback.js +38 -0
- package/dist/commands/servers/index.d.ts +20 -0
- package/dist/commands/servers/index.js +36 -0
- package/dist/commands/servers/use.d.ts +11 -0
- package/dist/commands/servers/use.js +30 -0
- package/dist/commands/site/adopt.d.ts +11 -0
- package/dist/commands/site/adopt.js +21 -0
- package/dist/commands/site/create.d.ts +18 -0
- package/dist/commands/site/create.js +61 -0
- package/dist/commands/site/edit.d.ts +11 -0
- package/dist/commands/site/edit.js +56 -0
- package/dist/commands/site/history.d.ts +11 -0
- package/dist/commands/site/history.js +25 -0
- package/dist/commands/site/link.d.ts +15 -0
- package/dist/commands/site/link.js +35 -0
- package/dist/commands/site/list.d.ts +9 -0
- package/dist/commands/site/list.js +29 -0
- package/dist/commands/site/reset-storage.d.ts +15 -0
- package/dist/commands/site/reset-storage.js +61 -0
- package/dist/commands/site/set.d.ts +16 -0
- package/dist/commands/site/set.js +45 -0
- package/dist/commands/site/show.d.ts +10 -0
- package/dist/commands/site/show.js +19 -0
- package/dist/commands/site/status.d.ts +11 -0
- package/dist/commands/site/status.js +15 -0
- package/dist/commands/site/unlink.d.ts +11 -0
- package/dist/commands/site/unlink.js +28 -0
- package/dist/commands/source/add.d.ts +32 -0
- package/dist/commands/source/add.js +103 -0
- package/dist/commands/source/adopt-pages.d.ts +14 -0
- package/dist/commands/source/adopt-pages.js +30 -0
- package/dist/commands/source/check.d.ts +17 -0
- package/dist/commands/source/check.js +52 -0
- package/dist/commands/source/list.d.ts +11 -0
- package/dist/commands/source/list.js +15 -0
- package/dist/commands/source/mappings/check.d.ts +13 -0
- package/dist/commands/source/mappings/check.js +69 -0
- package/dist/commands/source/pending.d.ts +12 -0
- package/dist/commands/source/pending.js +25 -0
- package/dist/commands/source/plugins.d.ts +6 -0
- package/dist/commands/source/plugins.js +17 -0
- package/dist/commands/source/sync.d.ts +16 -0
- package/dist/commands/source/sync.js +58 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.js +21 -0
- package/dist/connect-prompts.d.ts +16 -0
- package/dist/connect-prompts.js +24 -0
- package/dist/connect.d.ts +133 -0
- package/dist/connect.js +416 -0
- package/dist/core-command.d.ts +91 -0
- package/dist/core-command.js +262 -0
- package/dist/core-types.d.ts +21 -0
- package/dist/core-types.js +1 -0
- package/dist/create-connect.d.ts +26 -0
- package/dist/create-connect.js +93 -0
- package/dist/dev/code-watcher.d.ts +66 -0
- package/dist/dev/code-watcher.js +254 -0
- package/dist/dev/dev-checks.d.ts +14 -0
- package/dist/dev/dev-checks.js +138 -0
- package/dist/dev/dev-reload.d.ts +51 -0
- package/dist/dev/dev-reload.js +345 -0
- package/dist/dev/flags.d.ts +15 -0
- package/dist/dev/flags.js +43 -0
- package/dist/dev/html.d.ts +30 -0
- package/dist/dev/html.js +106 -0
- package/dist/dev/kit-files.d.ts +7 -0
- package/dist/dev/kit-files.js +33 -0
- package/dist/dev/local-code.d.ts +22 -0
- package/dist/dev/local-code.js +101 -0
- package/dist/dev/remote-config.d.ts +57 -0
- package/dist/dev/remote-config.js +100 -0
- package/dist/dev/remote-dev.d.ts +41 -0
- package/dist/dev/remote-dev.js +527 -0
- package/dist/dev/remote-fetch.d.ts +5 -0
- package/dist/dev/remote-fetch.js +36 -0
- package/dist/dev/remote-html.d.ts +10 -0
- package/dist/dev/remote-html.js +60 -0
- package/dist/dev/remote-page.d.ts +34 -0
- package/dist/dev/remote-page.js +183 -0
- package/dist/dev/remote-routes.d.ts +63 -0
- package/dist/dev/remote-routes.js +114 -0
- package/dist/dev/signal-stop.d.ts +17 -0
- package/dist/dev/signal-stop.js +46 -0
- package/dist/dev/start.d.ts +18 -0
- package/dist/dev/start.js +80 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/lib/diagnostics.d.ts +15 -0
- package/dist/lib/diagnostics.js +12 -0
- package/dist/lib/front-matter.d.ts +6 -0
- package/dist/lib/front-matter.js +59 -0
- package/dist/lib/operation-result.d.ts +3 -0
- package/dist/lib/operation-result.js +16 -0
- package/dist/lib/problem-groups.d.ts +27 -0
- package/dist/lib/problem-groups.js +49 -0
- package/dist/lib/problems.d.ts +50 -0
- package/dist/lib/problems.js +94 -0
- package/dist/lib/prompts.d.ts +38 -0
- package/dist/lib/prompts.js +77 -0
- package/dist/lib/result-types.d.ts +198 -0
- package/dist/lib/result-types.js +3 -0
- package/dist/lib/rules.d.ts +15 -0
- package/dist/lib/rules.js +26 -0
- package/dist/lib/summaries.d.ts +19 -0
- package/dist/lib/summaries.js +22 -0
- package/dist/lib/sync-problems.d.ts +21 -0
- package/dist/lib/sync-problems.js +19 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +40 -0
- package/dist/project-preview.d.ts +35 -0
- package/dist/project-preview.js +156 -0
- package/dist/project-publish.d.ts +28 -0
- package/dist/project-publish.js +173 -0
- package/dist/remote/connection.d.ts +8 -0
- package/dist/remote/connection.js +19 -0
- package/dist/remote/core-failure.d.ts +8 -0
- package/dist/remote/core-failure.js +15 -0
- package/dist/remote/credentials.d.ts +15 -0
- package/dist/remote/credentials.js +112 -0
- package/dist/remote/device-login.d.ts +33 -0
- package/dist/remote/device-login.js +161 -0
- package/dist/remote/remote-caller.d.ts +14 -0
- package/dist/remote/remote-caller.js +52 -0
- package/dist/remote/rpc-wire.d.ts +18 -0
- package/dist/remote/rpc-wire.js +57 -0
- package/dist/remote/servers.d.ts +80 -0
- package/dist/remote/servers.js +162 -0
- package/dist/remote/session.d.ts +53 -0
- package/dist/remote/session.js +132 -0
- package/dist/remote/sign-in-here.d.ts +5 -0
- package/dist/remote/sign-in-here.js +33 -0
- package/dist/remote/sign-in.d.ts +25 -0
- package/dist/remote/sign-in.js +55 -0
- package/dist/remote/wait-slices.d.ts +16 -0
- package/dist/remote/wait-slices.js +21 -0
- package/dist/render/add.d.ts +3 -0
- package/dist/render/add.js +9 -0
- package/dist/render/branch-write.d.ts +9 -0
- package/dist/render/branch-write.js +28 -0
- package/dist/render/branches.d.ts +5 -0
- package/dist/render/branches.js +28 -0
- package/dist/render/credentials.d.ts +5 -0
- package/dist/render/credentials.js +39 -0
- package/dist/render/operation-result.d.ts +16 -0
- package/dist/render/operation-result.js +65 -0
- package/dist/render/operation.d.ts +7 -0
- package/dist/render/operation.js +15 -0
- package/dist/render/page-changes.d.ts +3 -0
- package/dist/render/page-changes.js +36 -0
- package/dist/render/pending.d.ts +3 -0
- package/dist/render/pending.js +46 -0
- package/dist/render/plugin-list.d.ts +3 -0
- package/dist/render/plugin-list.js +30 -0
- package/dist/render/probe.d.ts +3 -0
- package/dist/render/probe.js +61 -0
- package/dist/render/problems.d.ts +35 -0
- package/dist/render/problems.js +64 -0
- package/dist/render/recovery.d.ts +2 -0
- package/dist/render/recovery.js +36 -0
- package/dist/render/reset-storage.d.ts +4 -0
- package/dist/render/reset-storage.js +70 -0
- package/dist/render/site-status.d.ts +2 -0
- package/dist/render/site-status.js +81 -0
- package/dist/render/source-list.d.ts +2 -0
- package/dist/render/source-list.js +37 -0
- package/dist/render/sync.d.ts +5 -0
- package/dist/render/sync.js +66 -0
- package/dist/settings.d.ts +10 -0
- package/dist/settings.js +45 -0
- package/dist/site-entry-edit.d.ts +5 -0
- package/dist/site-entry-edit.js +44 -0
- package/dist/source-entry.d.ts +32 -0
- package/dist/source-entry.js +89 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.js +10 -0
- package/package.json +108 -3
package/README.md
CHANGED
|
@@ -1,3 +1,644 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @foliwake/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `foliwake` command without the Foliwake engine: sign in to a Foliwake server and run your site's commands
|
|
4
|
+
there. Nothing renders or stores content on your computer; the server does the work, as it does for the
|
|
5
|
+
dashboard.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx @foliwake/cli login https://foliwake.example
|
|
9
|
+
npx @foliwake/cli whoami
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Foliwake Cloud is not available yet: sign in to your own Foliwake server (the Docker package, or one your team
|
|
13
|
+
runs). The server name `cloud` is reserved for it.
|
|
14
|
+
|
|
15
|
+
Or install it: `npm i -g @foliwake/cli`, then `foliwake …`. Node.js 22.22 or later.
|
|
16
|
+
|
|
17
|
+
## Signing in
|
|
18
|
+
|
|
19
|
+
`foliwake login <server>` signs this computer in through the browser with a one-time code (`--no-browser` only
|
|
20
|
+
prints the approval address; without a server it asks for one in a terminal). The token is kept in the macOS
|
|
21
|
+
Keychain or the Linux Secret Service (a 0600 file only with `--insecure-storage`); the list of servers,
|
|
22
|
+
without secrets, is `~/.config/foliwake/servers.json`
|
|
23
|
+
(`FOLIWAKE_CONFIG_DIR` moves it). These are the same places the engine's own `foliwake` uses, so a sign-in made
|
|
24
|
+
with either works for both. `foliwake logout` revokes the token on the server and forgets it here;
|
|
25
|
+
`foliwake whoami` shows the server, your account and what it may do.
|
|
26
|
+
|
|
27
|
+
You can be signed in to several servers. The first sign-in becomes the default server of commands that name
|
|
28
|
+
none; a later `login` keeps the default unless you pass `--default`. `foliwake servers` lists the servers with
|
|
29
|
+
their account and organisations (`*` marks the default, `--json` for scripts); `foliwake servers use <server>`
|
|
30
|
+
changes the default.
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
Each command calls one operation of the server and prints the same text and `--json` as the engine's own
|
|
35
|
+
`foliwake` for that command.
|
|
36
|
+
|
|
37
|
+
- `login`, `logout`, `whoami`, `servers`, `servers use`
|
|
38
|
+
- `connect`: link this folder to a new or an existing site
|
|
39
|
+
- `create [folder]`: a new site frontend (`create-foliwake`), then `--create-site` / `--link-site <id>` or, in
|
|
40
|
+
a terminal, «Connect to a Foliwake server?»
|
|
41
|
+
- `site list | status | show | set | edit | history | adopt | reset-storage | create | link | unlink`
|
|
42
|
+
- `preview`, `publish [paths]` (= `project preview | publish` in a folder linked to a site), `project unpublish`
|
|
43
|
+
- `source list | sync | pending | plugins | adopt-pages | add | check | mappings check`
|
|
44
|
+
- `page check | changes | replace | unpreview | unpublish`
|
|
45
|
+
- `code prepare | release | deploy | rollback`, `release rollback`, `migration prepare | commit`
|
|
46
|
+
- `branch list | history | update | delete | bootstrap`
|
|
47
|
+
- `operation get | list | cancel | recover`
|
|
48
|
+
- `credential set | list | rm`
|
|
49
|
+
- `account keys create | list | revoke`
|
|
50
|
+
- `dev --remote [preview|live]`, `dev --remote-url <url>`: your blocks over a deployed site's pages
|
|
51
|
+
|
|
52
|
+
`foliwake <command> --help` describes each; `--debug` prints the underlying error. The full list with flags
|
|
53
|
+
is under [Command reference](#command-reference).
|
|
54
|
+
|
|
55
|
+
`foliwake connect` links a project folder to a site in one step: in a terminal it asks which server (signing
|
|
56
|
+
in when needed), then whether to create a new site (as `site create`, the folder name suggested as its id) or
|
|
57
|
+
link one you may develop (as `site link`); without a terminal, `--create <id>` or `--link <id>`. A folder that
|
|
58
|
+
is linked already is refused: `--force` replaces the link, `foliwake site unlink` removes it.
|
|
59
|
+
|
|
60
|
+
## Which server a command calls
|
|
61
|
+
|
|
62
|
+
1. `--server <origin or host>`;
|
|
63
|
+
2. the server of this folder's `.foliwake/connection.json` (written by `site create` and `site link`), whose
|
|
64
|
+
site is also the default for `--site`;
|
|
65
|
+
3. `FOLIWAKE_SERVER`;
|
|
66
|
+
4. the default server (the first `login`, or the one `servers use` chose).
|
|
67
|
+
|
|
68
|
+
Without any of these a command stops and says so. Unlike the engine's CLI, nothing runs locally:
|
|
69
|
+
`FOLIWAKE_CONFIG` and `foliwake.config.json` are not read, and `--config` or `--content` answer that they need
|
|
70
|
+
the engine.
|
|
71
|
+
|
|
72
|
+
## CI
|
|
73
|
+
|
|
74
|
+
Create a CI key on the server (`foliwake account keys create`), then set `FOLIWAKE_SERVER` and
|
|
75
|
+
`FOLIWAKE_TOKEN` in the job. The key is sent only to `FOLIWAKE_SERVER`, never to a server another flag names.
|
|
76
|
+
|
|
77
|
+
## dev --remote
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
foliwake dev --remote --watch # in the frontend checkout: preview content, this checkout's code
|
|
81
|
+
foliwake dev --remote live --port 3001
|
|
82
|
+
foliwake dev --remote-url https://preview.foliwake.example --remote-auth-user owner --remote-auth-env PREVIEW_PASSWORD
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
A local server on `http://127.0.0.1:3000/` shows the pages of the deployed preview (or, only when named, live)
|
|
86
|
+
site with the `components/`, `scripts/` and `styles/` of the folder it runs in. The endpoints come from the
|
|
87
|
+
secret-free `foliwake.remote.json` of the checkout (`--remote-config` names another file) or from
|
|
88
|
+
`--remote-url`; a Basic password is read from the environment variable the file or `--remote-auth-env`
|
|
89
|
+
names, at start, and is never printed. Each page is fetched when the browser asks for it: only its `<main>`,
|
|
90
|
+
`<title>`, description and language are kept and wrapped in a local page shell with the import map of the
|
|
91
|
+
block kit (`@foliwake/block-kit`, served from this package's installed copy). Deployed JavaScript and CSS are
|
|
92
|
+
never loaded. With `--watch`, open pages reload after a change to the local code and show the problems the
|
|
93
|
+
platform's checks (`@foliwake/site-check`) find in it.
|
|
94
|
+
|
|
95
|
+
## Compatibility
|
|
96
|
+
|
|
97
|
+
The CLI speaks core over HTTP as `@foliwake/core-contract` describes it, and names itself to the server in
|
|
98
|
+
`X-Foliwake-Cli`. A server older than the CLI answers `PROCEDURE_UNKNOWN` for an operation it does not have; the
|
|
99
|
+
CLI then says to update the server or use an older `@foliwake/cli`. `GET /api/version` on the server names its
|
|
100
|
+
engine and contract.
|
|
101
|
+
|
|
102
|
+
## Limits
|
|
103
|
+
|
|
104
|
+
- No command renders or stores content locally: `dev` without `--remote`, `blocks render`, `serve`, `server`,
|
|
105
|
+
`api serve`, `admin`, `docker …`, `config trust`, `account bootstrap|invite|link` need the engine.
|
|
106
|
+
- `--config`, `--content`, `preview|publish --site`, and `operation recover --break-lock` (they act on a local
|
|
107
|
+
configuration or state) answer that they need the engine.
|
|
108
|
+
- `--timings` prints only the total time; the phase timings are measured by the engine.
|
|
109
|
+
- `create` writes the project with `create-foliwake`; its texts are create-foliwake's, not the engine's own
|
|
110
|
+
`create`. The server choice and sign-in questions are the same.
|
|
111
|
+
- Commands default waits to a 30 s settle delay, as the engine CLI does against a server (the server's own delay
|
|
112
|
+
is not read).
|
|
113
|
+
- `dev` serves only remote content (`--remote`, `--remote-url`); serving local Markdown needs the engine.
|
|
114
|
+
- `dev --remote` has no block catalog: `/_dev/blocks` and `/_foliwake/blocks` answer 501 until the open block
|
|
115
|
+
renderer exists (the engine's `foliwake dev` has it).
|
|
116
|
+
- `dev --remote` signs in to a protected site with HTTP Basic only, not with your `foliwake login`.
|
|
117
|
+
- `dev --remote` shows no content errors: the content is the deployed site's, checked when it was published.
|
|
118
|
+
|
|
119
|
+
## Command reference
|
|
120
|
+
|
|
121
|
+
<!-- commands -->
|
|
122
|
+
|
|
123
|
+
Every command also takes `--help`; those that call a server take `--server <origin or host>`, `--json`
|
|
124
|
+
and `--debug`.
|
|
125
|
+
|
|
126
|
+
### `foliwake account keys create`
|
|
127
|
+
|
|
128
|
+
Make a CI key: it may only deploy code and update branch previews of the named sites (role ci); shown once, kept as a
|
|
129
|
+
hash (core account.keys.create)
|
|
130
|
+
|
|
131
|
+
- `--label <value>`: what the key is for, e.g. the pipeline (shown in `account keys list`)
|
|
132
|
+
- `--org <value>`: the organisation of the sites (default: the only one you administer)
|
|
133
|
+
- `--site <value>`: a site the key may release code of (repeat for several)
|
|
134
|
+
|
|
135
|
+
### `foliwake account keys list`
|
|
136
|
+
|
|
137
|
+
Your signed-in computers and the CI keys of the organisations you administer; never a key itself (core account.keys.list
|
|
138
|
+
and account.keys.ci)
|
|
139
|
+
|
|
140
|
+
### `foliwake account keys revoke [key]`
|
|
141
|
+
|
|
142
|
+
Revoke a key at once: a CI key of an organisation you administer (ci_…), or one of your signed-in computers (key_…)
|
|
143
|
+
(core account.keys.revoke)
|
|
144
|
+
|
|
145
|
+
### `foliwake branch bootstrap`
|
|
146
|
+
|
|
147
|
+
Once: seed the default branch preview from live code; a no-op when it exists (core branches.bootstrap)
|
|
148
|
+
|
|
149
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
150
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
151
|
+
|
|
152
|
+
### `foliwake branch delete [branch]`
|
|
153
|
+
|
|
154
|
+
Stop serving a branch preview (its hosts answer 404); its code and selection history stay (core branches.remove)
|
|
155
|
+
|
|
156
|
+
- `--expect <sel_…|none>`: the selection of the branch you saw (`branch list --json` shows it; `none`: the branch had no
|
|
157
|
+
preview); refused when it is another one
|
|
158
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
159
|
+
- `--latest-selection`: expect the branch's selection as it is now (read once, before the request)
|
|
160
|
+
- `--sequence <value>`: deployment ordering (a positive integer such as the CI run id), instead of --expect: refused as
|
|
161
|
+
superseded when a request with a higher sequence already updated or deleted this branch
|
|
162
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
163
|
+
|
|
164
|
+
### `foliwake branch history [branch]`
|
|
165
|
+
|
|
166
|
+
Selection history of one branch (core branches.history)
|
|
167
|
+
|
|
168
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
169
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
170
|
+
|
|
171
|
+
### `foliwake branch list`
|
|
172
|
+
|
|
173
|
+
Branches, their code and preview URLs (core branches.list)
|
|
174
|
+
|
|
175
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
176
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
177
|
+
|
|
178
|
+
### `foliwake branch update [branch]`
|
|
179
|
+
|
|
180
|
+
Prepare code from a commit (or use --code) and show it in that branch preview; live is unchanged (core branches.update)
|
|
181
|
+
|
|
182
|
+
- `--code <value>`: an already prepared code release (cd_…) instead of preparing one
|
|
183
|
+
- `--expect <sel_…|none>`: the selection of the branch you saw (`branch list --json` shows it; `none`: the branch had no
|
|
184
|
+
preview); refused when it is another one
|
|
185
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
186
|
+
- `--latest-selection`: expect the branch's selection as it is now (read once, before the request)
|
|
187
|
+
- `--rev <value>`: the commit to prepare the code from, a branch, tag or full SHA (default HEAD)
|
|
188
|
+
- `--sequence <value>`: deployment ordering (a positive integer such as the CI run id), instead of --expect: refused as
|
|
189
|
+
superseded when a request with a higher sequence already updated or deleted this branch
|
|
190
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
191
|
+
|
|
192
|
+
### `foliwake code deploy`
|
|
193
|
+
|
|
194
|
+
Deploy a commit of the site's frontend: prepare it, rebuild every page against it in preview and, with codeRelease auto,
|
|
195
|
+
release exactly that pair when its checks pass (core code.deploy). Its progress goes to stderr while it runs (one JSON
|
|
196
|
+
event per line with --json); `operation list` shows it too
|
|
197
|
+
|
|
198
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
199
|
+
- `--rev <value>`: the full commit SHA to deploy
|
|
200
|
+
- `--sequence <value>`: deployment ordering, e.g. a CI run id; an older one than live code is not released
|
|
201
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
202
|
+
|
|
203
|
+
### `foliwake code prepare`
|
|
204
|
+
|
|
205
|
+
Copy JS/CSS from a clean commit into an immutable code release; on a site with a live release, live and preview are
|
|
206
|
+
unchanged. On a site without one it changes live: it makes release 1, this code and no pages, and waits for its cache
|
|
207
|
+
refresh (core code.prepare)
|
|
208
|
+
|
|
209
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
210
|
+
- `--rev <value>`: the Git revision to copy, a branch, tag or full SHA (default HEAD); the checkout must be clean
|
|
211
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
212
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
213
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
214
|
+
|
|
215
|
+
### `foliwake code release [code]`
|
|
216
|
+
|
|
217
|
+
Make a prepared code release live code; pages stay as they are; refused when live is not the release you expected (core
|
|
218
|
+
code.release)
|
|
219
|
+
|
|
220
|
+
- `--expect <value>`: the live site release you saw (sr_…, as `site status` shows it); refused when live is another one
|
|
221
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
222
|
+
- `--latest-live`: expect the live release as it is now (read once, before the request)
|
|
223
|
+
- `--rev <value>`: the commit the code was prepared from (full SHA), when it was prepared from several
|
|
224
|
+
- `--sequence <value>`: deployment ordering, e.g. a CI run id: refused as superseded when live code was released with a
|
|
225
|
+
higher one
|
|
226
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
227
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
228
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
229
|
+
|
|
230
|
+
### `foliwake code rollback [to]`
|
|
231
|
+
|
|
232
|
+
Make earlier live code live again; pages stay as they are; refused when live is not the release you expected (core
|
|
233
|
+
code.rollback)
|
|
234
|
+
|
|
235
|
+
- `--expect <value>`: the live site release you saw (sr_…, as `site status` shows it); refused when live is another one
|
|
236
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
237
|
+
- `--latest-live`: expect the live release as it is now (read once, before the request)
|
|
238
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
239
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
240
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
241
|
+
|
|
242
|
+
### `foliwake connect`
|
|
243
|
+
|
|
244
|
+
Link this project folder to a site on your Foliwake server: a new one or an existing one
|
|
245
|
+
|
|
246
|
+
- `--create <value>`: create this new site and link the folder to it
|
|
247
|
+
- `--force`: replace the link of a folder that is linked already
|
|
248
|
+
- `--interactive` / --no-interactive: ask for what the flags leave open (default: only when stdin and stdout are a
|
|
249
|
+
terminal)
|
|
250
|
+
- `--link <value>`: link the folder to this existing site
|
|
251
|
+
|
|
252
|
+
### `foliwake create [folder]`
|
|
253
|
+
|
|
254
|
+
Create a new site frontend: blocks, styles, local pages, checks and workflows
|
|
255
|
+
|
|
256
|
+
- `--connect` / --no-connect: --no-connect: never ask «Connect to a Foliwake server?» (default: asked at the end in a
|
|
257
|
+
terminal)
|
|
258
|
+
- `--create-site`: at the end, create the site (id: --site, else the folder name) on your server, as `site create`
|
|
259
|
+
- `--git` / --no-git: create a Git repository (branch main) and commit the project with your Git identity (default:
|
|
260
|
+
yes); skipped inside an existing repository
|
|
261
|
+
- `--install` / --no-install: install Storybook's npm packages; default: asked in a terminal after Storybook, else no
|
|
262
|
+
- `--interactive` / --no-interactive: ask for missing values (default: only when stdin and stdout are a terminal)
|
|
263
|
+
- `--keep-existing`: the folder is not empty: add the project next to its files (refused if one would be replaced)
|
|
264
|
+
- `--link-site <value>`: at the end, link the project to this existing site on your Foliwake server, as `site link`
|
|
265
|
+
- `--overwrite`: the folder is not empty: remove its files first (.git is kept)
|
|
266
|
+
- `--react` / --no-react: add React support: React and ReactDOM vendored in scripts/vendor/ and the React example block
|
|
267
|
+
poll; default: asked in a terminal, else no
|
|
268
|
+
- `--relink`: with --create-site or --link-site in a folder already linked elsewhere: replace that link
|
|
269
|
+
- `--site <value>`: the site id on your Foliwake server, if you know it (the README uses it); empty: none
|
|
270
|
+
- `--storybook` / --no-storybook: add Storybook for the blocks: .storybook/ and npm scripts; default: asked in a
|
|
271
|
+
terminal, else no
|
|
272
|
+
- `--template <value>`: minimal: one page and one block (default); examples: two pages and three blocks, one with
|
|
273
|
+
JavaScript
|
|
274
|
+
|
|
275
|
+
### `foliwake credential list`
|
|
276
|
+
|
|
277
|
+
Credentials the content sources use: set or not, from the environment or stored; never the value (core credentials.list)
|
|
278
|
+
|
|
279
|
+
- `--site <value>`: only the credentials this site's sources use (default: every site you administer)
|
|
280
|
+
|
|
281
|
+
### `foliwake credential rm [name]`
|
|
282
|
+
|
|
283
|
+
Removes a stored credential (the installation's owner); refused while a source uses it (core credentials.remove)
|
|
284
|
+
|
|
285
|
+
### `foliwake credential set [name]`
|
|
286
|
+
|
|
287
|
+
Stores a credential value on the server (the installation's owner): a source names it in `credentials`; the next sync
|
|
288
|
+
uses it without a restart. The value is read from a file or stdin, never from the command line (core credentials.set)
|
|
289
|
+
|
|
290
|
+
- `--from-file <value>`: read the value from this file (a Google service-account JSON key is checked)
|
|
291
|
+
- `--from-stdin`: read the value from standard input
|
|
292
|
+
|
|
293
|
+
### `foliwake dev`
|
|
294
|
+
|
|
295
|
+
Develop blocks against a deployed site: its content, this checkout’s code (dev --remote)
|
|
296
|
+
|
|
297
|
+
- `--port <value>`: port to listen on (default 3000)
|
|
298
|
+
- `--remote <[preview|live]>`: content from the deployed preview (default) or live site, local components/, scripts/ and
|
|
299
|
+
styles/; endpoints from ./foliwake.remote.json. Live only when named; never a fallback
|
|
300
|
+
- `--remote-auth-env <NAME>`: with --remote-url: NAME of the environment variable holding the HTTP Basic password (never
|
|
301
|
+
the password itself)
|
|
302
|
+
- `--remote-auth-user <value>`: with --remote-auth-env: the HTTP Basic user name
|
|
303
|
+
- `--remote-config <value>`: with --remote: another endpoints file than ./foliwake.remote.json (same format,
|
|
304
|
+
secret-free)
|
|
305
|
+
- `--remote-url <value>`: remote mode with this site origin instead of foliwake.remote.json (https; http only for
|
|
306
|
+
loopback)
|
|
307
|
+
- `--watch`: watch local components/, scripts/, styles/ and reload open browser pages after changes (one reload per
|
|
308
|
+
burst of saves; problems are shown in the page until fixed). Without it, refresh by hand
|
|
309
|
+
- `--watch-polling` / --no-watch-polling: with --watch: detect code changes by polling file stats (default on macOS);
|
|
310
|
+
--no-watch-polling: native file-system events (default elsewhere). Precedence: this flag, then
|
|
311
|
+
FOLIWAKE_WATCH_POLLING=1|0, then CHOKIDAR_USEPOLLING, then the platform default
|
|
312
|
+
|
|
313
|
+
### `foliwake login [server]`
|
|
314
|
+
|
|
315
|
+
Sign this computer in to a Foliwake server through the browser (device code)
|
|
316
|
+
|
|
317
|
+
- `--browser` / --no-browser: open the approval page in the browser (--no-browser only prints its address)
|
|
318
|
+
- `--default`: make this server the default of other commands (the first sign-in always is)
|
|
319
|
+
- `--insecure-storage`: keep the token in a 0600 file when there is no system keychain
|
|
320
|
+
|
|
321
|
+
### `foliwake logout [server]`
|
|
322
|
+
|
|
323
|
+
Revoke this computer’s sign-in to a Foliwake server and forget its token
|
|
324
|
+
|
|
325
|
+
- `--forget-only`: forget the token here even when the server cannot revoke it (it then stays valid there until it
|
|
326
|
+
expires)
|
|
327
|
+
|
|
328
|
+
### `foliwake migration commit`
|
|
329
|
+
|
|
330
|
+
Release the reviewed preview of new code: code and pages go live as one site release (core migration.commit)
|
|
331
|
+
|
|
332
|
+
- `--expect <value>`: the reviewed preview and its code, sr_…@cd_… (`site status` prints them)
|
|
333
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
334
|
+
- `--sequence <value>`: deployment ordering, e.g. a CI run id; an older one than live code is refused
|
|
335
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
336
|
+
|
|
337
|
+
### `foliwake migration prepare [code]`
|
|
338
|
+
|
|
339
|
+
Rebuild every live page against prepared code as the preview; live is unchanged (core migration.prepare)
|
|
340
|
+
|
|
341
|
+
- `--add <value>`: pages that are not live and join the site with it (comma-separated IDs)
|
|
342
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
343
|
+
- `--remove <value>`: live pages that leave the site with it (comma-separated IDs)
|
|
344
|
+
- `--rev <value>`: the commit the code was prepared from, recorded with the preview
|
|
345
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
346
|
+
|
|
347
|
+
### `foliwake operation cancel [id]`
|
|
348
|
+
|
|
349
|
+
Ask a long operation to stop: a queued one stops at once, a running one when it can (core operations.cancel)
|
|
350
|
+
|
|
351
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
352
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
353
|
+
|
|
354
|
+
### `foliwake operation get [id]`
|
|
355
|
+
|
|
356
|
+
One long operation: its state, stage, delivery and result (core operations.get)
|
|
357
|
+
|
|
358
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
359
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
360
|
+
|
|
361
|
+
### `foliwake operation list`
|
|
362
|
+
|
|
363
|
+
The latest long operations of a site, newest first (core operations.list)
|
|
364
|
+
|
|
365
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
366
|
+
- `--limit <value>`: how many (default 50)
|
|
367
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
368
|
+
|
|
369
|
+
### `foliwake operation recover`
|
|
370
|
+
|
|
371
|
+
Find out what happened to interrupted operations, finish the engine’s interrupted work and pending cache refreshes;
|
|
372
|
+
never runs an operation again (core operations.recover)
|
|
373
|
+
|
|
374
|
+
- `--break-lock`: remove a state lock left by a process that is gone (on the server: needs the engine there)
|
|
375
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
376
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
377
|
+
- `--timings`: report the total time on stderr (one JSON line with --json); also FOLIWAKE_TIMINGS=1 (phase timings need
|
|
378
|
+
the engine)
|
|
379
|
+
- `--wait`: also wait (bounded) for pending cache refreshes; those still pending then stay recorded and the exit status
|
|
380
|
+
is 3
|
|
381
|
+
- `--wait-timeout <value>`: limit of --wait in seconds (default: settle delay + 90 s)
|
|
382
|
+
|
|
383
|
+
### `foliwake page changes`
|
|
384
|
+
|
|
385
|
+
Compare working pages (text and images) with the live site (core content.changes)
|
|
386
|
+
|
|
387
|
+
- `--changed`: list only pages that differ from the live site
|
|
388
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
389
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
390
|
+
|
|
391
|
+
### `foliwake page check`
|
|
392
|
+
|
|
393
|
+
Validate all pages and components/components.json (core content.validate)
|
|
394
|
+
|
|
395
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
396
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
397
|
+
|
|
398
|
+
### `foliwake page replace`
|
|
399
|
+
|
|
400
|
+
Let another item of its source feed a published page (e.g. a Drive file deleted and uploaded again): the page keeps its
|
|
401
|
+
ID, address, live version and history. Shows the plan and asks first; preview and live are unchanged until the next sync
|
|
402
|
+
and preview/publish (core sources.replacePage)
|
|
403
|
+
|
|
404
|
+
- `--path <value>`: the path of the page that is live or in preview
|
|
405
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
406
|
+
- `--with <value>`: the native ID of the source item that should feed it (a Drive file ID; `source sync --json` lists
|
|
407
|
+
the items' native_id)
|
|
408
|
+
- `--yes`: apply the plan without asking (required when not in a terminal)
|
|
409
|
+
|
|
410
|
+
### `foliwake page unpreview`
|
|
411
|
+
|
|
412
|
+
Remove a page from the preview, live untouched: a page that is not live leaves the preview, a live page shows its live
|
|
413
|
+
version there again. Refused when the preview is not the one you expected (core channels.unpreview)
|
|
414
|
+
|
|
415
|
+
- `--expect <value>`: the preview site release you saw (sr_…, as `site status` shows it); refused when the preview is
|
|
416
|
+
another one
|
|
417
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
418
|
+
- `--latest-preview`: expect the preview as it is now (read once, before the request)
|
|
419
|
+
- `--path <value>`: the path of the page in the preview
|
|
420
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
421
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
422
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
423
|
+
|
|
424
|
+
### `foliwake page unpublish [pages]`
|
|
425
|
+
|
|
426
|
+
Remove pages from the live site; refused when live is not the release you expected (core channels.unpublish)
|
|
427
|
+
|
|
428
|
+
- `--expect <value>`: the live site release you saw (sr_…, as `site status` shows it); refused when live is another one
|
|
429
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
430
|
+
- `--latest-live`: expect the live release as it is now (read once, before the request)
|
|
431
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
432
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
433
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
434
|
+
|
|
435
|
+
### `foliwake project preview`
|
|
436
|
+
|
|
437
|
+
Preview this project's pages on its site's server (a folder linked with site create / site link)
|
|
438
|
+
|
|
439
|
+
### `foliwake project publish [paths]`
|
|
440
|
+
|
|
441
|
+
Publish the pages your last preview changed (or the pages of the given files and folders) to live
|
|
442
|
+
|
|
443
|
+
- `--expect <value>`: the preview release you reviewed (sr_…); default: the one the last `foliwake preview` here made
|
|
444
|
+
- `--yes`: do not ask (scripts)
|
|
445
|
+
|
|
446
|
+
### `foliwake project unpublish [paths]`
|
|
447
|
+
|
|
448
|
+
Take the pages of the given files and folders off live
|
|
449
|
+
|
|
450
|
+
- `--expect <value>`: the live release you saw (sr_…); default: live as it is now
|
|
451
|
+
- `--yes`: do not ask (scripts)
|
|
452
|
+
|
|
453
|
+
### `foliwake release rollback [to]`
|
|
454
|
+
|
|
455
|
+
Make an earlier site release live again, code and pages as they were, as a new release; refused when live is not the
|
|
456
|
+
release you expected (core channels.rollback)
|
|
457
|
+
|
|
458
|
+
- `--expect <value>`: the live site release you saw (sr_…, as `site status` shows it); refused when live is another one
|
|
459
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
460
|
+
- `--latest-live`: expect the live release as it is now (read once, before the request)
|
|
461
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
462
|
+
- `--wait-timeout <value>`: limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s);
|
|
463
|
+
still pending then: exit 3, `operation recover` finishes it
|
|
464
|
+
|
|
465
|
+
### `foliwake servers`
|
|
466
|
+
|
|
467
|
+
List the Foliwake servers this computer is signed in to; * marks the default
|
|
468
|
+
|
|
469
|
+
### `foliwake servers use [server]`
|
|
470
|
+
|
|
471
|
+
Make a signed-in server the default of commands that name no server
|
|
472
|
+
|
|
473
|
+
### `foliwake site adopt`
|
|
474
|
+
|
|
475
|
+
Bind an existing bucket and its state to a configured site; publishes nothing (core sites.adopt)
|
|
476
|
+
|
|
477
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
478
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
479
|
+
|
|
480
|
+
### `foliwake site create [id]`
|
|
481
|
+
|
|
482
|
+
Create this project's site on your Foliwake server (core sites.create; admin)
|
|
483
|
+
|
|
484
|
+
- `--code` / --no-code: send the last commit for release 1 (--no-code: release 1 waits for the first code prepare)
|
|
485
|
+
- `--org <value>`: the organisation (default: your only one where you are admin)
|
|
486
|
+
- `--relink`: replace the link of this folder (.foliwake/connection.json) to another server or site without asking
|
|
487
|
+
- `--repository <value>`: where the code will live, e.g. https://github.com/acme/mytest (the server checkout's origin)
|
|
488
|
+
|
|
489
|
+
### `foliwake site edit`
|
|
490
|
+
|
|
491
|
+
Edit a stored site's settings in $VISUAL or $EDITOR; saved only if nobody changed the site meanwhile (core sites.update)
|
|
492
|
+
|
|
493
|
+
- `--expect <value>`: the revision you saw (`site show`); default: the one opened in the editor
|
|
494
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
495
|
+
|
|
496
|
+
### `foliwake site history`
|
|
497
|
+
|
|
498
|
+
Who changed a stored site's settings, when, and which settings (core sites.history)
|
|
499
|
+
|
|
500
|
+
- `--limit <value>`: how many changes, newest first (default 20)
|
|
501
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
502
|
+
|
|
503
|
+
### `foliwake site link [id]`
|
|
504
|
+
|
|
505
|
+
Link this project folder to an existing site on your Foliwake server (developer or admin)
|
|
506
|
+
|
|
507
|
+
- `--relink`: replace the link of this folder (.foliwake/connection.json) to another server or site without asking
|
|
508
|
+
|
|
509
|
+
### `foliwake site list`
|
|
510
|
+
|
|
511
|
+
Configured sites with hosts, repositories and bindings (core sites.list)
|
|
512
|
+
|
|
513
|
+
### `foliwake site reset-storage`
|
|
514
|
+
|
|
515
|
+
Recreate a site's storage in one action: archive its state, delete its objects in its own bucket, bind both again,
|
|
516
|
+
prepare its code (release 1) and sync its sources. Publishes nothing: live is EMPTY (no pages) until you publish again.
|
|
517
|
+
Prints the plan first and asks for the site id (the installation's owner only; core sites.resetStorage)
|
|
518
|
+
|
|
519
|
+
- `--confirm <value>`: the site id, typed again: confirms the reset without a question (needed without a terminal)
|
|
520
|
+
- `--dry-run`: print the plan (what is lost, what is done) and change nothing
|
|
521
|
+
- `--rev <value>`: the commit to prepare again (default: the commit live code came from, else HEAD)
|
|
522
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
523
|
+
|
|
524
|
+
### `foliwake site set [path] [value]`
|
|
525
|
+
|
|
526
|
+
Change one setting of a stored site, only if nobody changed the site since it was read (core sites.update)
|
|
527
|
+
|
|
528
|
+
- `--expect <value>`: the revision you saw (`site show`); default: the one read just before the change
|
|
529
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
530
|
+
- `--unset`: remove the setting instead of setting it
|
|
531
|
+
|
|
532
|
+
### `foliwake site show`
|
|
533
|
+
|
|
534
|
+
A site's stored settings and their revision, on a server that keeps its sites in a database (core sites.get)
|
|
535
|
+
|
|
536
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
537
|
+
|
|
538
|
+
### `foliwake site status`
|
|
539
|
+
|
|
540
|
+
Live, preview, code and pending work at a glance (core sites.status)
|
|
541
|
+
|
|
542
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
543
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
544
|
+
|
|
545
|
+
### `foliwake site unlink`
|
|
546
|
+
|
|
547
|
+
Remove this project folder's link to its site (.foliwake/connection.json); the server is not changed
|
|
548
|
+
|
|
549
|
+
- `--force`: also remove a .foliwake/connection.json this version cannot read
|
|
550
|
+
|
|
551
|
+
### `foliwake source add`
|
|
552
|
+
|
|
553
|
+
Adds a content source to a site: checks it first (settings, credentials, connection, files and their addresses), then
|
|
554
|
+
saves it after a confirmation; nothing is fetched (core sources.probe, sources.add)
|
|
555
|
+
|
|
556
|
+
- `--base-url <value>`: Drupal: the site address
|
|
557
|
+
- `--basic-password <value>`: Drupal: the credential name of its password
|
|
558
|
+
- `--basic-user <value>`: Drupal: the credential name of a read-only user name (HTTP Basic)
|
|
559
|
+
- `--branch <value>`: Git: the branch (default main)
|
|
560
|
+
- `--check-only`: check and print, save nothing
|
|
561
|
+
- `--display-name <value>`: the name the dashboard shows
|
|
562
|
+
- `--folder <value>`: Google Drive: the folder link or ID
|
|
563
|
+
- `--id <value>`: the new source id (lower case, digits, "-")
|
|
564
|
+
- `--identity <value>`: Google Drive: file-id (default; renames keep the page) or front-matter
|
|
565
|
+
- `--key <value>`: Google Drive: the credential name of the service-account key (default FOLIWAKE_GOOGLE_SA_KEY)
|
|
566
|
+
- `--language <value>`: Drupal: a language code, the default first (repeatable)
|
|
567
|
+
- `--mappings <value>`: a JSON file with path mapping rules (default: each file names its address)
|
|
568
|
+
- `--owns <value>`: a path the source owns, such as /lessons or "=/" (repeatable)
|
|
569
|
+
- `--plugin <value>`: the connector
|
|
570
|
+
- `--repository <value>`: Git: the https address of the repository
|
|
571
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
572
|
+
- `--subfolder <value>`: Google Drive or Git: the folder inside that holds the pages
|
|
573
|
+
- `--token <value>`: Git: the credential name of a read-only token (private repository)
|
|
574
|
+
- `--yes`: save without asking (scripts)
|
|
575
|
+
|
|
576
|
+
### `foliwake source adopt-pages [source]`
|
|
577
|
+
|
|
578
|
+
Let a source take over published pages that no source owns yet (published by an earlier configuration: one folder), at
|
|
579
|
+
paths it owns; preview and live are unchanged (core sources.adoptPages)
|
|
580
|
+
|
|
581
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
582
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
583
|
+
|
|
584
|
+
### `foliwake source check`
|
|
585
|
+
|
|
586
|
+
Checks content sources without changing anything: settings, credentials, the connection and, with --listing, the files
|
|
587
|
+
and the page addresses they would get (core sources.probe)
|
|
588
|
+
|
|
589
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
590
|
+
- `--listing`: also list the files and their page addresses (slower: reads the whole source)
|
|
591
|
+
- `--max <value>`: at most this many files in the listing (default 500)
|
|
592
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
593
|
+
- `--source <value>`: one source of the site (default: every enabled source)
|
|
594
|
+
|
|
595
|
+
### `foliwake source list`
|
|
596
|
+
|
|
597
|
+
The site's content sources: plugin, owned paths and selected snapshot (core sources.list)
|
|
598
|
+
|
|
599
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
600
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
601
|
+
|
|
602
|
+
### `foliwake source mappings check`
|
|
603
|
+
|
|
604
|
+
Dry run of a source's path mappings over the documents it already has (the selected snapshot, or a working folder's
|
|
605
|
+
files): each document's page path now and with the rules, unmatched files and problems; reads no upstream and changes
|
|
606
|
+
nothing (core sources.mappingsCheck)
|
|
607
|
+
|
|
608
|
+
- `--file <value>`: check the rules in this JSON file (a list of rules) instead of the configured ones; needs --source
|
|
609
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
610
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
611
|
+
- `--source <value>`: only this source (default: every source with path mappings)
|
|
612
|
+
|
|
613
|
+
### `foliwake source pending`
|
|
614
|
+
|
|
615
|
+
Edits waiting in the content sources that the selected snapshots do not have: a read-only check, nothing is fetched into
|
|
616
|
+
a snapshot or stored (core sources.pending)
|
|
617
|
+
|
|
618
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
619
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
620
|
+
- `--source <value>`: content source id of the site (see `source list`; default: every source)
|
|
621
|
+
|
|
622
|
+
### `foliwake source plugins`
|
|
623
|
+
|
|
624
|
+
Registered content-source plugins, their versions and the planned catalog (core sources.plugins)
|
|
625
|
+
|
|
626
|
+
### `foliwake source sync`
|
|
627
|
+
|
|
628
|
+
Read content sources into private snapshots and select them; preview and live are unchanged (core sources.sync)
|
|
629
|
+
|
|
630
|
+
- `--code <value>`: the prepared code of a migration: read and check the sources against it instead of live code
|
|
631
|
+
- `--full`: read every item of the source again (no incremental sync: unchanged items are not kept from the selected
|
|
632
|
+
snapshot)
|
|
633
|
+
- `--input <value>`: raw JSON for the full operation input; overrides the other input flags
|
|
634
|
+
- `--site <value>`: site id (default: the site this folder is linked to, else the only site on the server)
|
|
635
|
+
- `--source <value>`: content source id of the site (see `source list`; default: every enabled source)
|
|
636
|
+
- `--timings`: report the total time on stderr (one JSON line with --json); also FOLIWAKE_TIMINGS=1 (phase timings need
|
|
637
|
+
the engine)
|
|
638
|
+
- `--verbose`: also print codes, snapshots, attempts and the engine's technical text (for support)
|
|
639
|
+
|
|
640
|
+
### `foliwake whoami`
|
|
641
|
+
|
|
642
|
+
Show the server, who this command acts as and what it may do (core whoami)
|
|
643
|
+
|
|
644
|
+
<!-- commandsstop -->
|
package/dist/bin.d.ts
ADDED
package/dist/bin.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The `foliwake` command: main (main.ts) on the process's arguments.
|
|
3
|
+
import { main } from './main.js';
|
|
4
|
+
main(process.argv.slice(2)).then((code) => {
|
|
5
|
+
process.exitCode = code;
|
|
6
|
+
}, (error) => {
|
|
7
|
+
console.error(error);
|
|
8
|
+
process.exitCode = 1;
|
|
9
|
+
});
|