vortex-cli 8.0.1__tar.gz → 8.1.1__tar.gz
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.
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/PKG-INFO +241 -57
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/README.md +240 -56
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/pyproject.toml +1 -1
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/cli.py +117 -196
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/app.py +49 -9
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/clone.py +4 -4
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/code.py +19 -3
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/compile.py +61 -17
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/db.py +129 -24
- vortex_cli-8.1.1/vortex/commands/diff.py +352 -0
- vortex_cli-8.1.1/vortex/commands/execute.py +138 -0
- vortex_cli-8.1.1/vortex/commands/fetch.py +462 -0
- vortex_cli-8.0.1/vortex/commands/status.py → vortex_cli-8.1.1/vortex/commands/info.py +21 -34
- vortex_cli-8.1.1/vortex/commands/libs.py +103 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/log.py +82 -9
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/object_.py +191 -19
- vortex_cli-8.1.1/vortex/commands/pull.py +294 -0
- vortex_cli-8.1.1/vortex/commands/search.py +332 -0
- vortex_cli-8.1.1/vortex/commands/servers.py +362 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/use.py +2 -2
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/watch.py +91 -12
- vortex_cli-8.1.1/vortex/git.py +188 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/main.py +317 -108
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/models.py +34 -9
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/output.py +2 -2
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/registry.py +32 -7
- vortex_cli-8.1.1/vortex/server_options.py +116 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/soap.py +1 -1
- vortex_cli-8.1.1/vortex/sync.py +441 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/util.py +0 -35
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/webdesign.py +122 -23
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/workspace.py +200 -67
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/PKG-INFO +241 -57
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/SOURCES.txt +9 -4
- vortex_cli-8.0.1/vortex/commands/config.py +0 -67
- vortex_cli-8.0.1/vortex/commands/execute.py +0 -103
- vortex_cli-8.0.1/vortex/commands/find.py +0 -47
- vortex_cli-8.0.1/vortex/commands/grep.py +0 -99
- vortex_cli-8.0.1/vortex/commands/libs.py +0 -71
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/LICENSE +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/setup.cfg +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/__init__.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/__main__.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/colour.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/__init__.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/clean.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/docs.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/commands/keyword.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/constants.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/docs/Blackbook v2.md +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/docs/Blackbook.pdf +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/docs/index.html +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/docs/marked.min.js +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/lib/puakma-6.0.40.jar +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/libs.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/logging.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/schedule.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex/spinner.py +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/dependency_links.txt +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/entry_points.txt +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/requires.txt +0 -0
- {vortex_cli-8.0.1 → vortex_cli-8.1.1}/vortex_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vortex_cli
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.1.1
|
|
4
4
|
Summary: Vortex CLI
|
|
5
5
|
Author-email: Jordan Amos <jordan.amos@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -100,12 +100,88 @@ While it is possible to use without it, this software has been purposefully desi
|
|
|
100
100
|
; Optional
|
|
101
101
|
gateway_path = vortex/gateway.pma ; the default: through the vortex gateway. Blank = webdesign's vortex API directly - see Backend: gateway or webdesign
|
|
102
102
|
clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
|
|
103
|
-
lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
|
|
103
|
+
lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex server libs')
|
|
104
104
|
workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
|
|
105
105
|
java_home = /usr/lib/jvm/java-17-openjdk-amd64/ ; The local path to the JRE to use. Should be the same version running on your server
|
|
106
106
|
java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
## Upgrading to 8.1
|
|
110
|
+
|
|
111
|
+
8.1 does two things. It replaces `vortex config` with plain top-level commands that read
|
|
112
|
+
`servers.ini`, which you edit by hand. And it stops a stale clone from silently overwriting
|
|
113
|
+
someone else's upload - another agent, in another workspace or on another machine - all
|
|
114
|
+
client side, with no gateway or webdesign change (see
|
|
115
|
+
[Working alongside other agents](#working-alongside-other-agents)). `vortex config` and the `execute` flags are **removed**: `config` is a stub
|
|
116
|
+
that runs nothing, prints the replacements and exits 1; the old `execute` flags are usage
|
|
117
|
+
errors (exit 2).
|
|
118
|
+
|
|
119
|
+
| 8.0 | 8.1 |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `config --list-servers` | `server list` |
|
|
122
|
+
| `config --output-server-config` | `server get [NAME]` |
|
|
123
|
+
| `config --output-config-path` | the last line of `server list` |
|
|
124
|
+
| `config --output-workspace-path` | `vortex --path` |
|
|
125
|
+
| `config --update-vscode-settings` / `--reset-vscode-settings` | automatic on a `servers.ini` save, or `code --refresh [--reset]` |
|
|
126
|
+
| `config --set S O V` | edit `servers.ini` |
|
|
127
|
+
| `config --set-password` | `keyring set vortex-cli:<server> <username>` |
|
|
128
|
+
| `config --sample` | `server get` (every option it reads) |
|
|
129
|
+
| `execute --show-schedule` / `--refresh-agenda` / `--flush-cache` | `execute schedule` / `refresh-agenda` / `flush-cache` |
|
|
130
|
+
| `execute --refresh-design N` | `execute refresh-design N` or `app refresh N` |
|
|
131
|
+
| `execute --run PATH` | `object run ID --app-id N` |
|
|
132
|
+
| `status [--show-permissions] [--json]` | `vortex [-s NAME] [--show-permissions] [--json]` (no command) - plus the CLI version and the workspace |
|
|
133
|
+
| `vortex` with no command (the workspace path) | the live status of the default server: `vortex-cli` and `workspace` first, then the server (`vortex --path` prints just the path) |
|
|
134
|
+
| `use NAME` | `server use NAME` (`use NAME` still works) |
|
|
135
|
+
| `libs [--refresh] [-s NAME]` | `server libs [NAME] [--refresh]` |
|
|
136
|
+
| - | `fetch` - which cloned elements are out of step with the server, content and metadata (renames too); `fetch --pull` brings them in without losing local edits (3-way merges what it can) |
|
|
137
|
+
| - | `object diff` - server vs local (`--mine`: your edits, `--theirs`: the server's) |
|
|
138
|
+
| `compile --upload` sends every class | only those whose `.java` was edited since the clone synced it (`--all`: every one) |
|
|
139
|
+
| `find QUERY [--app-id ID]` (clones only) | `object list [QUERY] [--app-id ID [--local]] [--json]` - with `--app-id` it asks the server, so no clone is needed; QUERY is optional (every object) |
|
|
140
|
+
| `grep PATTERN` | `object grep PATTERN [--json]` - still the clones only |
|
|
141
|
+
| `db list --app-id ID` (required) | `db list [--app-id ID]` - without it, every application's connections; each row names its application (with `--app-id`, from its clone - the name is blank when it isn't cloned) |
|
|
142
|
+
|
|
143
|
+
- **Server commands are one noun, `vortex server`.** **`vortex server list`** lists every
|
|
144
|
+
server definition: host, backend, protected, the number of cloned apps, and `*` on the
|
|
145
|
+
default. **`vortex server get [NAME]`** (the default server without one) lists every option vortex reads with its value and where it comes from - the
|
|
146
|
+
server's own section, `[DEFAULT]`, the built-in default, or unset - plus where the
|
|
147
|
+
credentials come from and any option vortex ignores (typos, renamed and removed options).
|
|
148
|
+
Neither sends a request or prints a password. Both say when `default` names a server that
|
|
149
|
+
isn't defined.
|
|
150
|
+
- **`execute` joins its words**, so `vortex ex tell agenda schedule -s dev` needs no quotes.
|
|
151
|
+
- **A protected server must be named.** A command that writes to a server or sends a console
|
|
152
|
+
command (`execute`, `compile --upload`, every `app`/`object`/`keyword`/`db` write, and a
|
|
153
|
+
`db query` that is not a `SELECT`) refuses a protected server that was only picked up as
|
|
154
|
+
the `vortex use` default (`PROTECTED_DEFAULT` in `--json`, nothing sent): pass `-s NAME`.
|
|
155
|
+
Reads are unaffected.
|
|
156
|
+
- **Saving `servers.ini` updates the VS Code workspace files.** A running `vortex watch`
|
|
157
|
+
rebuilds them on save (and says when a watched server's connection settings changed, which
|
|
158
|
+
needs a restart); otherwise the next `vortex` command does. Unchanged files are no longer
|
|
159
|
+
rewritten, so VS Code doesn't reload for nothing.
|
|
160
|
+
- **Uploads are refused on a conflict.** `watch`, `compile --upload` and `object update
|
|
161
|
+
--source/--data` (on a cloned app) compare the server's current row with the copy the clone
|
|
162
|
+
last synced - before anything is sent. If someone else wrote it since, the upload is refused
|
|
163
|
+
(`CONFLICT`, exit 1) and names who and when: `vortex fetch ID --app-id N --pull`, merge,
|
|
164
|
+
upload again.
|
|
165
|
+
`--force` (`compile --upload`, `object update`) overrides it, and needs a terminal
|
|
166
|
+
(`FORCE_NEEDS_TERMINAL` without one) so an agent can't.
|
|
167
|
+
- **`vortex find` and `vortex grep` are stubs** naming `vortex object list` and `vortex object
|
|
168
|
+
grep`, and exit 1.
|
|
169
|
+
- **`vortex status` is a stub** that names `vortex` (the server's status, as `status` was
|
|
170
|
+
in 8.0) and `vortex fetch` (the clone against the server), and exits 1. **`vortex libs`**
|
|
171
|
+
is a stub naming `vortex server libs`.
|
|
172
|
+
- **Manifests from before 8.1 still work.** They lack the server's `updated` stamp, so the
|
|
173
|
+
check compares content until the next `clone` or `fetch --pull` stores it. An older
|
|
174
|
+
`watch` kept a failed upload's content as the clone's copy of the server, so an edit that
|
|
175
|
+
never reached the server can look unedited: `fetch --pull` keeps any file it replaces or
|
|
176
|
+
removes under such a copy in `<app>/.pull-backup/<time>/`, and `compile --upload` says
|
|
177
|
+
when it skipped one. Run `vortex fetch --app-id ID --pull` once per clone after upgrading
|
|
178
|
+
(it also brings in metadata an older clone stored differently).
|
|
179
|
+
- **The upgrade is one-way.** An 8.1 manifest stores a field 8.0 doesn't know, so an 8.0 CLI
|
|
180
|
+
treats an 8.1 clone as unreadable - keep every machine and tool sharing a workspace on
|
|
181
|
+
8.1 (or reclone after going back).
|
|
182
|
+
- **`fetch --pull --force` needs a terminal**, like the upload `--force`, and keeps every file
|
|
183
|
+
it replaces or removes under `<app>/.pull-backup/<time>/`.
|
|
184
|
+
|
|
109
185
|
## Upgrading to 8.0
|
|
110
186
|
|
|
111
187
|
8.0 reorganises the server commands into `vortex <noun> <verb>` over four entities - `app`,
|
|
@@ -127,7 +203,7 @@ exists for one release as a stub that **runs nothing**, prints its 8.0 replaceme
|
|
|
127
203
|
| `db NAME --list` / `--schema T` | `db list-tables` / `db get-table` |
|
|
128
204
|
| `schema --add-table` ... `--delete-column` | `db create-table` ... `db delete-column` |
|
|
129
205
|
| `schema --ddl` | removed |
|
|
130
|
-
| `config --check-gateway` | `status` |
|
|
206
|
+
| `config --check-gateway` | `status` (`vortex` with no command since 8.1) |
|
|
131
207
|
|
|
132
208
|
- **Numeric IDs, no guessing.** `--app-id` and `APP_ID` are numeric everywhere (only
|
|
133
209
|
`clone APP...` still takes a TemplateName, group or `group/name`), and `--app-id` is
|
|
@@ -137,7 +213,7 @@ exists for one release as a stub that **runs nothing**, prints its 8.0 replaceme
|
|
|
137
213
|
- **No clone needed for server work.** When the app *is* cloned, every change is written
|
|
138
214
|
into the clone too (see [Local clones stay in sync](#local-clones-stay-in-sync)).
|
|
139
215
|
- **Output for scripts and agents.** Readable by default; `--json` on every entity command
|
|
140
|
-
and `
|
|
216
|
+
and `fetch` prints one envelope with a machine-readable error code. Exit codes are 0/1
|
|
141
217
|
(2 for bad arguments). See [Output, errors and exit codes](#output-errors-and-exit-codes).
|
|
142
218
|
- **`gateway_path` alone picks the route.** Set (the default `vortex/gateway.pma`) means the
|
|
143
219
|
gateway, required - no probe, no fallback; blank means webdesign's `vortex` API directly.
|
|
@@ -195,6 +271,7 @@ vortex app update APP_ID [--name --group --description --inherit-from --templa
|
|
|
195
271
|
[--param NAME=VALUE ...] [--remove-param NAME ...]
|
|
196
272
|
vortex app export APP_ID... [--out-dir --exclude-source --timeout]
|
|
197
273
|
vortex app import FILE.pmx --name N --group G
|
|
274
|
+
vortex app refresh APP_ID (alias: refresh-design)
|
|
198
275
|
|
|
199
276
|
── object ───────────────────────────────────────────────────────────────────
|
|
200
277
|
vortex object get ID --app-id ID [--show-source --show-data] [--json]
|
|
@@ -205,7 +282,14 @@ vortex object update ID... --app-id ID [--source FILE --data FILE] [metadata opt
|
|
|
205
282
|
[schedule options]
|
|
206
283
|
schedule options (SCHEDULED_ACTION only): --schedule N|S|I|H|D|W|M|Y --interval N
|
|
207
284
|
--days SMTWHFA --start-time HH:mm --finish-time HH:mm --date N --month N
|
|
285
|
+
vortex object diff [ID...] --app-id ID [--mine|--theirs] [--stat --word-diff -U N] [--json]
|
|
286
|
+
[-- GIT-DIFF-OPTIONS... | --write DIR]
|
|
208
287
|
vortex object copy ID... --app-id SRC --to-app-id TGT [--copy-params]
|
|
288
|
+
vortex object list [QUERY] [--app-id ID [--local]] [--strict --inherits-from|--parent-page
|
|
289
|
+
--ids-only --show-params --type T...] [--json]
|
|
290
|
+
vortex object grep PATTERN [--app-id ID] [--output-paths|--output-apps]
|
|
291
|
+
[--include-resources|--type T...] [--json]
|
|
292
|
+
vortex object run ID --app-id ID
|
|
209
293
|
vortex object delete ID... --app-id ID [--yes]
|
|
210
294
|
|
|
211
295
|
── keyword ──────────────────────────────────────────────────────────────────
|
|
@@ -215,7 +299,7 @@ vortex keyword set NAME [VALUE...] --app-id ID
|
|
|
215
299
|
vortex keyword delete NAME --app-id ID [--yes]
|
|
216
300
|
|
|
217
301
|
── db ───────────────────────────────────────────────────────────────────────
|
|
218
|
-
vortex db list --app-id ID [--local] [--json]
|
|
302
|
+
vortex db list [--app-id ID] [--local] [--json]
|
|
219
303
|
vortex db get DB --app-id ID [--json]
|
|
220
304
|
vortex db query DB --app-id ID [SQL | --file F | -] [--limit N] [--all-cols] [--json]
|
|
221
305
|
vortex db list-tables DB --app-id ID [--json]
|
|
@@ -232,31 +316,31 @@ vortex db update-column DB TABLE COLUMN --app-id ID [--name --type --size --desc
|
|
|
232
316
|
vortex db delete-column DB TABLE COLUMN --app-id ID [--yes]
|
|
233
317
|
|
|
234
318
|
── Workspace ────────────────────────────────────────────────────────────────
|
|
235
|
-
vortex ls [app list filters]
|
|
319
|
+
vortex ls [app list filters] [--json] = app list --local
|
|
236
320
|
vortex clone APP... [--group --reclone --all --get-resources --open-urls --timeout]
|
|
237
|
-
vortex compile --app-id ID [--object ID...] [--upload [--include-source
|
|
321
|
+
vortex compile --app-id ID [--object ID...] [--upload [--include-source --all --force]]
|
|
322
|
+
[--show-warnings]
|
|
323
|
+
vortex fetch [ID...] [--app-id ID] [--all] [--pull [--force --no-merge]] [--json]
|
|
238
324
|
vortex watch [--include-protected]
|
|
239
325
|
vortex clean [--app-id ID] [--all --include-libs]
|
|
240
|
-
vortex
|
|
241
|
-
[--include-resources|--type]
|
|
242
|
-
vortex find QUERY [--app-id ID] [--strict --inherits-from|--parent-page --ids-only
|
|
243
|
-
--show-params --type]
|
|
244
|
-
vortex code
|
|
245
|
-
vortex libs [--refresh]
|
|
326
|
+
vortex code [--refresh [--reset]] [-s]
|
|
246
327
|
|
|
247
328
|
── Server and setup ─────────────────────────────────────────────────────────
|
|
248
|
-
vortex
|
|
249
|
-
vortex
|
|
250
|
-
vortex
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
vortex use
|
|
329
|
+
vortex [-s NAME] [--show-permissions] [--json] (the server's live status)
|
|
330
|
+
vortex --path (the workspace path)
|
|
331
|
+
vortex log [-n --source -m --errors-only|--debug-only|--info-only -k -d] [--json]
|
|
332
|
+
vortex execute CMD... | flush-cache | refresh-agenda | refresh-design APP_ID | schedule
|
|
333
|
+
[--json] (alias: ex)
|
|
334
|
+
vortex server list [--json]
|
|
335
|
+
vortex server get [NAME] [--json]
|
|
336
|
+
vortex server use NAME (or: vortex use NAME)
|
|
337
|
+
vortex server libs [NAME] [--refresh] [--json]
|
|
256
338
|
vortex docs [--serve --port]
|
|
257
339
|
```
|
|
258
340
|
|
|
259
|
-
Every server command takes `-s/--server NAME
|
|
341
|
+
Every server command takes `-s/--server NAME`, after the command or before it (default: the
|
|
342
|
+
server set with `vortex use`;
|
|
343
|
+
a protected default must be named with `-s` to write or run a console command).
|
|
260
344
|
`--show-X` adds X to what is **printed**; `--include-X` adds X to what is **sent**.
|
|
261
345
|
|
|
262
346
|
Each entity command makes at most three small requests (three per ID for multi-ID
|
|
@@ -265,8 +349,11 @@ commands); only `clone` downloads a whole application.
|
|
|
265
349
|
### Output, errors and exit codes
|
|
266
350
|
|
|
267
351
|
Output is readable by default - tables for `list`, key/value for `get`. `--json` (every
|
|
268
|
-
`app`, `object`, `keyword` and `db` command,
|
|
269
|
-
|
|
352
|
+
`app`, `object`, `keyword` and `db` command, `fetch`, `server list|get|libs`, `execute`, `log`,
|
|
353
|
+
`ls` and a bare `vortex`) prints
|
|
354
|
+
exactly one JSON envelope
|
|
355
|
+
on stdout; logs, progress and prompts always go to stderr. `log --keep-alive --json` never
|
|
356
|
+
ends, so it prints one envelope per line instead - one per log entry, as it arrives:
|
|
270
357
|
|
|
271
358
|
```json
|
|
272
359
|
{"ok": true, "server": "dev", "data": {"appid": 9, "appname": "app", "appgroup": "bettrackr"}}
|
|
@@ -277,7 +364,9 @@ on stdout; logs, progress and prompts always go to stderr:
|
|
|
277
364
|
the gateway's refusal code as sent (`FORBIDDEN` with the missing `role`, `NOT_FOUND`,
|
|
278
365
|
`SYSTEM_DB`, `SQL_NOT_ALLOWED`, `WEBDESIGN_UNAVAILABLE`, ...), or one the CLI sets:
|
|
279
366
|
`NOT_FOUND` (404), `FORBIDDEN` (a login page, 401/403), `UNAVAILABLE` (network, timeout, a
|
|
280
|
-
missing route), `CONFIRMATION_REQUIRED
|
|
367
|
+
missing route), `CONFIRMATION_REQUIRED`, `CONFLICT` (an upload over someone else's newer
|
|
368
|
+
copy, or a pull that left something to merge), `OUT_OF_SYNC` (`fetch`: something needs a
|
|
369
|
+
pull), `NOT_CLONED`, `FORCE_NEEDS_TERMINAL` and `ERROR`. A `hint` says what to do next when
|
|
281
370
|
there is something to do.
|
|
282
371
|
|
|
283
372
|
Exit codes: `0` success, `1` failure (including a partly failed multi-ID command, whose
|
|
@@ -288,7 +377,7 @@ Nothing ever prompts without a terminal. The only wizards are `app create` and
|
|
|
288
377
|
ask; `--yes` confirms, and without a terminal and without `--yes` they fail with
|
|
289
378
|
`CONFIRMATION_REQUIRED` and send nothing.
|
|
290
379
|
|
|
291
|
-
`vortex
|
|
380
|
+
`vortex --show-permissions` lists every server command, whether this identity may run
|
|
292
381
|
it and the gateway role it is missing - read from the gateway's own route table (`whoami`),
|
|
293
382
|
so it is always the server's current rules.
|
|
294
383
|
|
|
@@ -316,22 +405,31 @@ and application write, so a manual cache flush is never required after one.
|
|
|
316
405
|
|
|
317
406
|
### Console shortcuts
|
|
318
407
|
|
|
319
|
-
`vortex execute CMD` sends any console command
|
|
320
|
-
`GatewaySystem`, or the SOAP console without the gateway
|
|
321
|
-
strings the server's
|
|
408
|
+
`vortex execute CMD...` (or `ex`) sends any console command - the gateway's `POST console`,
|
|
409
|
+
which needs `GatewaySystem`, or the SOAP console without the gateway. The words are joined,
|
|
410
|
+
so no quoting is needed. These names are shortcuts that send the exact strings the server's
|
|
411
|
+
addins match:
|
|
322
412
|
|
|
323
413
|
| Shortcut | Sends | Effect |
|
|
324
414
|
|---|---|---|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
| `--run PATH` | `tell agenda run /group/app.pma/action` | runs the action at that local path now |
|
|
415
|
+
| `schedule` | `tell agenda schedule` | lists every scheduled action and its next run |
|
|
416
|
+
| `refresh-agenda` | `tell agenda refresh` | AGENDA rereads every schedule now |
|
|
417
|
+
| `refresh-design APP_ID` | `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N` | rebuilds the application's design from its template, as `app refresh` does (a clone is then out of date) |
|
|
418
|
+
| `flush-cache` | `tell http cache flush` | clears the design cache and all action class loaders |
|
|
330
419
|
|
|
331
420
|
`tell http flush cache` is **not** a valid command: the HTTP addin only matches
|
|
332
|
-
`cache flush`, and anything else does nothing, silently. Use
|
|
333
|
-
|
|
334
|
-
|
|
421
|
+
`cache flush`, and anything else does nothing, silently. Use `flush-cache`.
|
|
422
|
+
|
|
423
|
+
Two console operations act on one application or object, so they also live with those nouns:
|
|
424
|
+
|
|
425
|
+
| Command | Sends |
|
|
426
|
+
|---|---|
|
|
427
|
+
| `vortex app refresh APP_ID` | `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N` - rebuilds the design from its template (a clone is then out of date) |
|
|
428
|
+
| `vortex object run ID --app-id N` | `tell agenda run /group/app.pma/name` - runs an ACTION or SCHEDULED_ACTION now |
|
|
429
|
+
|
|
430
|
+
The 8.0 flags (`--show-schedule`, `--refresh-agenda`, `--flush-cache`, `--refresh-design`,
|
|
431
|
+
`--run`) were removed in 8.1. `app refresh` was `app refresh-design` in 8.1.0; the old
|
|
432
|
+
name still works.
|
|
335
433
|
|
|
336
434
|
### Local clones stay in sync
|
|
337
435
|
|
|
@@ -349,17 +447,86 @@ prints the command to re-sync (`vortex clone APP_ID -s SERVER`).
|
|
|
349
447
|
| Command | Local effect |
|
|
350
448
|
|---|---|
|
|
351
449
|
| `app update` | details and params; a name or group change moves the folder |
|
|
450
|
+
| `fetch --pull` | the objects' files (renamed with the server), `zbin/` classes and manifest entries (local edits kept - see [Working alongside other agents](#working-alongside-other-agents)) |
|
|
352
451
|
| `object create` / `update` / `delete` | the object's file and manifest entry (a metadata-only change moves the file but never overwrites its content; an uploaded class also lands in `zbin/`) |
|
|
353
452
|
| `object copy` | the target application's clone |
|
|
354
453
|
| `keyword set` / `delete` | the clone's stored keywords |
|
|
355
454
|
| `compile` | writes `zbin/`; `--upload` stores the uploaded blobs |
|
|
356
|
-
| `execute
|
|
455
|
+
| `app refresh` / `execute refresh-design` | none - prints that the clone is out of date |
|
|
357
456
|
| `app create` / `import` / `export`, all `db` commands | none |
|
|
358
457
|
|
|
359
458
|
A clone stores the design objects, the application's details (with its description), its
|
|
360
459
|
params, its keywords and its DB connections (id, name, database). `keyword list --local` and
|
|
361
460
|
`db list --local` read them with no request. Dictionary tables and columns are not stored.
|
|
362
461
|
|
|
462
|
+
### Working alongside other agents
|
|
463
|
+
|
|
464
|
+
Several agents (or people) may edit one application from different sessions, workspaces or
|
|
465
|
+
machines. The server has no locking, so the CLI protects uploads itself, from the clone's
|
|
466
|
+
manifest: it holds the server's copy of every element as the clone last synced it - its
|
|
467
|
+
**base** - and every upload compares three things first:
|
|
468
|
+
|
|
469
|
+
| Server now vs base | Upload |
|
|
470
|
+
|---|---|
|
|
471
|
+
| the same: nobody else wrote it | sent; the base becomes what was sent |
|
|
472
|
+
| already exactly what you are sending | sent (nothing is lost) |
|
|
473
|
+
| anything else | **refused** (`CONFLICT`, nothing sent), naming who changed it and when |
|
|
474
|
+
|
|
475
|
+
Both blobs count: a class uploaded on top of someone else's newer source is refused too.
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
vortex fetch --app-id 9 # before working: anything outdated?
|
|
479
|
+
vortex object diff --app-id 9 --theirs # what did the server get?
|
|
480
|
+
vortex fetch --app-id 9 --pull [ID...] # bring the clone up to date
|
|
481
|
+
...edit...
|
|
482
|
+
vortex compile --app-id 9 --object 396 --upload --include-source
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
**`vortex fetch`** lists the elements that are not in sync - `edited` (yours, ok to
|
|
486
|
+
upload), `outdated` (the server changed the content), `metadata` (the server renamed or
|
|
487
|
+
retyped it, or changed its comment, params, content type or inherit-from - the Server column
|
|
488
|
+
says what, e.g. `renamed home -> landing`), `conflict` (both changed), `unresolved` (a pull
|
|
489
|
+
conflict not merged yet), `new` / `deleted` on the server - and exits 1 when anything needs
|
|
490
|
+
a pull. It writes nothing. Without `--app-id` it checks the cloned application the current
|
|
491
|
+
directory is in, else every clone of the server. A whole application is one request as
|
|
492
|
+
heavy as a clone; IDs are one small request each.
|
|
493
|
+
|
|
494
|
+
**`vortex object diff`** shows the difference between two of the three versions: server ->
|
|
495
|
+
local by default (what an upload would change), `--mine` base -> local (your edits; no
|
|
496
|
+
request) or `--theirs` base -> server (what changed there). Without IDs it shows every
|
|
497
|
+
element that differs. With git installed it runs `git diff --no-index` on temporary files -
|
|
498
|
+
colour, `--stat`, `--word-diff` - otherwise Python's difflib. Everything after `--` goes to
|
|
499
|
+
`git diff` as-is, after vortex's own options so it wins: options only, values attached
|
|
500
|
+
(`-- --ignore-all-space --diff-algorithm=histogram -U10`). `--write DIR` runs no diff and
|
|
501
|
+
writes the versions as files instead - `DIR/base`, `DIR/local`, `DIR/server`, each
|
|
502
|
+
`<TYPE>/<file>` - for any other tool (`git diff --no-index DIR/base DIR/server`,
|
|
503
|
+
`git merge-file`, an IDE).
|
|
504
|
+
|
|
505
|
+
**`vortex fetch --pull`** brings the server's changes in from the same request. Metadata is
|
|
506
|
+
always the server's: a rename moves your file - edits and all - to the new name, and the
|
|
507
|
+
comment, params and the rest are updated in the clone. Content: it takes the server's copy
|
|
508
|
+
wherever that loses nothing (outdated, new, deleted, missing locally) and keeps local edits
|
|
509
|
+
when the server is unchanged. When both
|
|
510
|
+
changed it runs git's 3-way merge (`git merge-file` on base, local and server - temporary
|
|
511
|
+
files, never a repository): edits that don't overlap are **merged** into your file, the
|
|
512
|
+
server's copy becomes the base, and the element is an ordinary edit to review and upload.
|
|
513
|
+
Overlapping edits - or binary content, no git, or `--no-merge` - keep your file, write the
|
|
514
|
+
server's copy to `<app>/.conflicts/<TYPE>/<file>` and make the server's copy the base. While that copy
|
|
515
|
+
exists the element is `unresolved` and every upload of it is refused: merge it into your
|
|
516
|
+
file, delete it, then upload. `--force` takes the server's copy over local edits; it only
|
|
517
|
+
ever changes the clone. A file already where a new element goes is never overwritten - it
|
|
518
|
+
becomes the element's local copy, with the server's under `.conflicts/`; a rename onto such
|
|
519
|
+
a file leaves the element where it is until the file is moved. `--pull` is
|
|
520
|
+
refused for an application while `vortex watch` runs on it.
|
|
521
|
+
|
|
522
|
+
`compile --upload` without `--object` sends only the classes whose `.java` was edited since
|
|
523
|
+
the clone synced it, so it can't re-send an untouched, older class over someone else's.
|
|
524
|
+
`--force` overrides a refusal and discards the server's newer copy; it needs a terminal.
|
|
525
|
+
|
|
526
|
+
The check is a read then a write, not atomic: two uploads of one element within
|
|
527
|
+
milliseconds can still race. Keywords, app params and design params are not covered - each
|
|
528
|
+
write replaces the whole set.
|
|
529
|
+
|
|
363
530
|
### Scheduled actions
|
|
364
531
|
|
|
365
532
|
A scheduled action's schedule lives in its `Options` (a comma-separated `name=value` string
|
|
@@ -463,7 +630,8 @@ sections). Cloned apps remember which server they came from:
|
|
|
463
630
|
|
|
464
631
|
- `vortex watch` watches **every** cloned app and uploads each change to the
|
|
465
632
|
server it was cloned from. Use `--server` to watch a single server only.
|
|
466
|
-
- `
|
|
633
|
+
- `object grep`, `ls` and `object list` without `--app-id` search across all cloned apps
|
|
634
|
+
unless `--server` is given.
|
|
467
635
|
- `watch`, `clone` and `clean` take a workspace-wide lock: only one watch at a
|
|
468
636
|
time, and cloning or cleaning is refused while a watch is running. Commands
|
|
469
637
|
that write into one cloned application (every mirrored server write,
|
|
@@ -476,17 +644,20 @@ sections). Cloned apps remember which server they came from:
|
|
|
476
644
|
Every server command targets `-s <server>`, else the `vortex use` default:
|
|
477
645
|
|
|
478
646
|
```
|
|
479
|
-
vortex
|
|
647
|
+
vortex server list # what is defined, and which is the default
|
|
648
|
+
vortex server get dev # every option of one server and where it comes from
|
|
649
|
+
vortex use dev # = vortex server use dev
|
|
480
650
|
vortex app list
|
|
481
651
|
```
|
|
482
652
|
|
|
483
653
|
#### Credentials
|
|
484
654
|
|
|
485
|
-
`username`/`password` can be left out of `servers.ini
|
|
486
|
-
credentials resolve in this order and are only requested
|
|
487
|
-
actually connects to that server
|
|
655
|
+
`username`/`password` can be left out of `servers.ini` (when set there, they win).
|
|
656
|
+
Each server's credentials otherwise resolve in this order and are only requested
|
|
657
|
+
when a command actually connects to that server - `vortex server get NAME` says which
|
|
658
|
+
one applies:
|
|
488
659
|
|
|
489
|
-
1. The system keyring - store with `
|
|
660
|
+
1. The system keyring - store with `keyring set vortex-cli:<server> <username>`
|
|
490
661
|
(requires `pip install keyring`)
|
|
491
662
|
2. Per-server environment variables `VORTEX_USERNAME_<SERVER>` /
|
|
492
663
|
`VORTEX_PASSWORD_<SERVER>` (e.g. `VORTEX_PASSWORD_DEV`)
|
|
@@ -495,10 +666,15 @@ actually connects to that server:
|
|
|
495
666
|
|
|
496
667
|
#### Protected Servers
|
|
497
668
|
|
|
498
|
-
`protected = true` means
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
669
|
+
`protected = true` means two things:
|
|
670
|
+
|
|
671
|
+
- `vortex watch` skips the server unless `--include-protected` is given, so saving a file
|
|
672
|
+
can never hot-deploy to it by accident.
|
|
673
|
+
- A write or console command never reaches it by default: when a protected server is only
|
|
674
|
+
the `vortex use` default, those commands refuse to run until it is named with `-s`.
|
|
675
|
+
|
|
676
|
+
There are no write confirmations - the gateway's roles are the protection, so run agents
|
|
677
|
+
against production with an identity whose roles fit the job.
|
|
502
678
|
|
|
503
679
|
### Backend: gateway or webdesign
|
|
504
680
|
|
|
@@ -516,22 +692,22 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
|
|
|
516
692
|
- **Role checks.** Every route needs a role, checked on the server: `GatewayDesignRead`,
|
|
517
693
|
`GatewayDesignWrite`, `GatewayDBRead`, `GatewayDBWrite`, `GatewaySystem` and `Admin`
|
|
518
694
|
(every route). Write implies read. A route the gateway does not map is refused.
|
|
519
|
-
`vortex
|
|
695
|
+
`vortex --show-permissions` shows which commands your identity may run.
|
|
520
696
|
- **Guards.** The gateway never addresses the Puakma system database (`SYSTEM_DB`), never
|
|
521
697
|
lets an id from one application be used under another (`NOT_FOUND`), and runs exactly one
|
|
522
698
|
`SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (`SQL_NOT_ALLOWED`: DDL, `WITH`, and
|
|
523
699
|
any `;`).
|
|
524
|
-
- **Its own routes:** `whoami` (`
|
|
700
|
+
- **Its own routes:** `whoami` (a bare `vortex`), the server log (`log`), the console (`execute`),
|
|
525
701
|
`.pmx` export and import.
|
|
526
702
|
|
|
527
703
|
On a server with a blank `gateway_path`:
|
|
528
704
|
|
|
529
705
|
| Command | Behaviour |
|
|
530
706
|
|---|---|
|
|
531
|
-
| `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `libs` | the same routes, sent to webdesign's `/vortex` |
|
|
707
|
+
| `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `server libs` | the same routes, sent to webdesign's `/vortex` |
|
|
532
708
|
| `db query` | a CLI-side guard replaces the gateway's: one `SELECT`/`INSERT`/`UPDATE`/`DELETE` statement, refused otherwise with `SQL_NOT_ALLOWED` before anything is sent |
|
|
533
709
|
| `app export` | webdesign's `ExportPMX` |
|
|
534
|
-
| `
|
|
710
|
+
| `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
|
|
535
711
|
| `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run) |
|
|
536
712
|
| `execute` | the console command over SOAP |
|
|
537
713
|
| `app import` | unavailable (`UNAVAILABLE`) |
|
|
@@ -557,8 +733,11 @@ The server runs compiled classes, not source. There are three ways to get a clas
|
|
|
557
733
|
server's `java_home` against the server's own jars, for the server's
|
|
558
734
|
`java_environment_name` (`JavaSE-17` -> `--release 17`; unset is an error naming the
|
|
559
735
|
setting). `--upload` sends each compiled class to its existing design element, one at a
|
|
560
|
-
time (`--include-source` adds the `.java`)
|
|
561
|
-
|
|
736
|
+
time (`--include-source` adds the `.java`): the `--object` ones, else those whose `.java`
|
|
737
|
+
was edited since the clone synced it (`--all`: every one). It refuses when anything failed
|
|
738
|
+
to compile, refuses each element whose server copy changed since (see
|
|
739
|
+
[Working alongside other agents](#working-alongside-other-agents)), and never creates
|
|
740
|
+
elements (`object create` does). ecj is downloaded once from Maven Central;
|
|
562
741
|
the server's libraries are fetched on first use.
|
|
563
742
|
- **`vortex object update ID --app-id APP --data Foo.class [--source Foo.java]`** uploads a
|
|
564
743
|
class you built yourself.
|
|
@@ -583,10 +762,10 @@ webdesign `vortex` API (`systemjar` and `libraries`, through the gateway when
|
|
|
583
762
|
`gateway_path` is set - `GatewayDesignRead`) and caches them per server under
|
|
584
763
|
`<workspace>/<host>/.lib/`:
|
|
585
764
|
|
|
586
|
-
- `clone` does **not** download them; it prints a one-line `vortex libs --refresh
|
|
765
|
+
- `clone` does **not** download them; it prints a one-line `vortex server libs SERVER --refresh`
|
|
587
766
|
hint when they are not cached. `compile` and `watch` fetch them on first use.
|
|
588
|
-
- `vortex libs` shows what's cached for each server; `vortex libs --refresh`
|
|
589
|
-
(
|
|
767
|
+
- `vortex server libs` shows what's cached for each server; `vortex server libs --refresh`
|
|
768
|
+
re-downloads (name a server for just that one), e.g. after a server upgrade.
|
|
590
769
|
- Each server's VS Code workspace (`vortex code -s <server>`) uses that server's own cached
|
|
591
770
|
jars, so identical class names on different servers/versions never cross-contaminate.
|
|
592
771
|
- `vortex clean` keeps each host's `.lib` cache; pass `--include-libs` to remove it as well.
|
|
@@ -595,8 +774,13 @@ webdesign `vortex` API (`systemjar` and `libraries`, through the gateway when
|
|
|
595
774
|
|
|
596
775
|
Every `db` command takes `--app-id` (every database route is app-scoped) and a `DB`: the
|
|
597
776
|
connection name, the database name or the connection ID, resolved within that application.
|
|
777
|
+
`db list` is the exception: without `--app-id` it lists every application's connections on
|
|
778
|
+
the server (one request per application), and every row names its application (id, group
|
|
779
|
+
and name). `--local` reads the clones instead - the `--app-id` one, else every clone of the
|
|
780
|
+
server.
|
|
598
781
|
|
|
599
782
|
```
|
|
783
|
+
vortex db list # every application on the server
|
|
600
784
|
vortex db list --app-id 9
|
|
601
785
|
vortex db query bettrackr --app-id 9 "SELECT * FROM account" --limit 5
|
|
602
786
|
vortex db query 3 --app-id 9 --file report.sql --json
|