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