vortex-cli 8.5.0__tar.gz → 8.7.0__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.5.0 → vortex_cli-8.7.0}/PKG-INFO +112 -43
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/README.md +111 -42
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/pyproject.toml +1 -1
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/cli.py +122 -16
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/agenda.py +214 -41
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/app.py +27 -4
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/db.py +79 -46
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/diff.py +8 -3
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/fetch.py +9 -12
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/keyword.py +1 -7
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/object_.py +38 -32
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/search.py +18 -20
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/main.py +15 -1
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/output.py +23 -1
- vortex_cli-8.7.0/vortex/registry.py +644 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/webdesign.py +115 -31
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex_cli.egg-info/PKG-INFO +112 -43
- vortex_cli-8.5.0/vortex/registry.py +0 -343
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/LICENSE +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/setup.cfg +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/__init__.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/__main__.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/colour.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/__init__.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/clean.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/clone.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/code.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/compile.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/docs.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/execute.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/file.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/info.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/libs.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/log.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/pull.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/servers.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/stats.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/use.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/watch.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/commands/weblog.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/constants.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/docs/Blackbook v2.md +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/docs/Blackbook.pdf +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/docs/index.html +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/docs/marked.min.js +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/git.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/lib/puakma-6.0.40.jar +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/libs.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/logging.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/models.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/schedule.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/server_options.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/session_store.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/soap.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/spinner.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/sync.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/util.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex/workspace.py +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex_cli.egg-info/SOURCES.txt +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex_cli.egg-info/dependency_links.txt +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex_cli.egg-info/entry_points.txt +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/vortex_cli.egg-info/requires.txt +0 -0
- {vortex_cli-8.5.0 → vortex_cli-8.7.0}/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.7.0
|
|
4
4
|
Summary: Vortex CLI
|
|
5
5
|
Author-email: Jordan Amos <jordan.amos@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -217,7 +217,7 @@ errors (exit 2).
|
|
|
217
217
|
- **`execute` joins its words**, so `vortex ex tell agenda schedule -s dev` needs no quotes.
|
|
218
218
|
- **A protected server must be named.** A command that writes to a server or sends a console
|
|
219
219
|
command (`execute`, `compile --upload`, every `app`/`object`/`keyword`/`db` write, and a
|
|
220
|
-
`db query` that is not a `SELECT`) refuses a protected server that was only picked up as
|
|
220
|
+
`db query` that is not a read-only `SELECT`/`EXPLAIN`/`SHOW`) refuses a protected server that was only picked up as
|
|
221
221
|
the `vortex use` default (`PROTECTED_DEFAULT` in `--json`, nothing sent): pass `-s NAME`.
|
|
222
222
|
Reads are unaffected.
|
|
223
223
|
- **Saving `servers.ini` updates the VS Code workspace files.** A running `vortex watch`
|
|
@@ -332,59 +332,59 @@ For a full list of commands see `--help` (every command and verb has its own:
|
|
|
332
332
|
── app ──────────────────────────────────────────────────────────────────────
|
|
333
333
|
vortex app list [--group --name --template --strict --local --show-inherited
|
|
334
334
|
--all --ids-only --open-urls --open-dev-urls] [--json]
|
|
335
|
-
vortex app get
|
|
335
|
+
vortex app get APP [--show-params] [--json]
|
|
336
336
|
vortex app create --name N --group G [--template --inherit-from --description]
|
|
337
|
-
vortex app update
|
|
337
|
+
vortex app update APP [--name --group --description --inherit-from --template]
|
|
338
338
|
[--param NAME=VALUE ...] [--remove-param NAME ...]
|
|
339
|
-
vortex app export
|
|
339
|
+
vortex app export APP... [--out-dir --exclude-source --timeout]
|
|
340
340
|
vortex app import FILE.pmx --name N --group G
|
|
341
|
-
vortex app refresh
|
|
341
|
+
vortex app refresh APP (alias: refresh-design)
|
|
342
342
|
|
|
343
343
|
── object ───────────────────────────────────────────────────────────────────
|
|
344
|
-
vortex object get
|
|
345
|
-
vortex object create --app
|
|
344
|
+
vortex object get OBJECT [--show-source --show-data] [--json]
|
|
345
|
+
vortex object create --app APP --type T --name N [--source FILE --data FILE
|
|
346
346
|
--content-type --comment --inherit-from --open-action
|
|
347
347
|
--save-action --parent-page] [schedule options]
|
|
348
|
-
vortex object update
|
|
348
|
+
vortex object update OBJECT... [--source FILE --data FILE] [metadata options]
|
|
349
349
|
[schedule options]
|
|
350
350
|
schedule options (SCHEDULED_ACTION only): --schedule N|S|I|H|D|W|M|Y --interval N
|
|
351
351
|
--days SMTWHFA --start-time HH:mm --finish-time HH:mm --date N --month N
|
|
352
|
-
vortex object diff [
|
|
352
|
+
vortex object diff [OBJECT...] [--app APP] [--mine|--theirs] [--stat --word-diff -U N] [--json]
|
|
353
353
|
[-- GIT-DIFF-OPTIONS... | --write DIR]
|
|
354
|
-
vortex object copy
|
|
355
|
-
vortex object list [QUERY] [--app
|
|
354
|
+
vortex object copy OBJECT... --to-app TGT [--copy-params]
|
|
355
|
+
vortex object list [QUERY] [--app APP [--local]] [--strict --inherits-from|--parent-page
|
|
356
356
|
--ids-only --show-params --type T...] [--json]
|
|
357
|
-
vortex object grep PATTERN [--app
|
|
357
|
+
vortex object grep PATTERN [--app APP] [--output-paths|--output-apps]
|
|
358
358
|
[--include-resources|--type T...] [--json]
|
|
359
|
-
vortex object run
|
|
360
|
-
vortex object delete
|
|
359
|
+
vortex object run OBJECT [--output] [--json]
|
|
360
|
+
vortex object delete OBJECT... [--yes]
|
|
361
361
|
|
|
362
362
|
── keyword ──────────────────────────────────────────────────────────────────
|
|
363
|
-
vortex keyword list --app
|
|
364
|
-
vortex keyword get NAME --app
|
|
365
|
-
vortex keyword set NAME [VALUE...] --app
|
|
366
|
-
vortex keyword delete NAME --app
|
|
363
|
+
vortex keyword list --app APP [--local] [--reveal] [--json]
|
|
364
|
+
vortex keyword get NAME --app APP [--local] [--reveal] [--json]
|
|
365
|
+
vortex keyword set NAME [VALUE...] --app APP
|
|
366
|
+
vortex keyword delete NAME --app APP [--yes]
|
|
367
367
|
|
|
368
368
|
── db ───────────────────────────────────────────────────────────────────────
|
|
369
|
-
vortex db list [--app
|
|
370
|
-
vortex db get DB --app
|
|
371
|
-
vortex db query DB --app
|
|
372
|
-
vortex db list-tables DB --app
|
|
373
|
-
vortex db get-table DB TABLE --app
|
|
374
|
-
vortex db create-table DB TABLE --app
|
|
375
|
-
vortex db update-table DB TABLE --app
|
|
376
|
-
vortex db delete-table DB TABLE --app
|
|
377
|
-
vortex db create-column DB TABLE COLUMN --app
|
|
369
|
+
vortex db list [--app APP] [--local] [--json]
|
|
370
|
+
vortex db get DB --app APP [--json]
|
|
371
|
+
vortex db query DB --app APP [SQL | --file F | -] [--limit N] [--all-cols] [--json]
|
|
372
|
+
vortex db list-tables DB --app APP [--json]
|
|
373
|
+
vortex db get-table DB TABLE --app APP [--json]
|
|
374
|
+
vortex db create-table DB TABLE --app APP [--description]
|
|
375
|
+
vortex db update-table DB TABLE --app APP [--name --description]
|
|
376
|
+
vortex db delete-table DB TABLE --app APP [--yes]
|
|
377
|
+
vortex db create-column DB TABLE COLUMN --app APP --type T [--size N --pk --not-null
|
|
378
378
|
--unique --auto-increment --ref TABLE --cascade-delete --description]
|
|
379
|
-
vortex db update-column DB TABLE COLUMN --app
|
|
379
|
+
vortex db update-column DB TABLE COLUMN --app APP [--name --type --size --description
|
|
380
380
|
--pk|--no-pk --null|--not-null --unique|--no-unique
|
|
381
381
|
--auto-increment|--no-auto-increment --ref TABLE|--no-ref
|
|
382
382
|
--cascade-delete|--no-cascade-delete]
|
|
383
|
-
vortex db delete-column DB TABLE COLUMN --app
|
|
383
|
+
vortex db delete-column DB TABLE COLUMN --app APP [--yes]
|
|
384
384
|
|
|
385
385
|
── agenda ───────────────────────────────────────────────────────────────────
|
|
386
|
-
vortex agenda [
|
|
387
|
-
vortex agenda run ID --app
|
|
386
|
+
vortex agenda list [GROUP/APP | --app APP] [--json] ('vortex agenda' alone = list)
|
|
387
|
+
vortex agenda run GROUP/APP/ACTION | ID --app APP [--param KEY=VALUE ...] [--refresh --force] [--json]
|
|
388
388
|
|
|
389
389
|
── file (Admin) ─────────────────────────────────────────────────────────────
|
|
390
390
|
vortex file list [PATH] [--json]
|
|
@@ -427,6 +427,62 @@ a protected default must be named with `-s` to write or run a console command).
|
|
|
427
427
|
Each entity command makes at most three small requests (three per ID for multi-ID
|
|
428
428
|
commands); only `clone` downloads a whole application.
|
|
429
429
|
|
|
430
|
+
### Naming an application
|
|
431
|
+
|
|
432
|
+
`APP` is `GROUP/APP` or a numeric ID, on every command that takes one. `--app-id` and
|
|
433
|
+
`--to-app-id` still work and accept the same values as `--app` and `--to-app`.
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
vortex keyword list --app bettrackr/app -s dev
|
|
437
|
+
vortex db query bettrackr --app bettrackr/app -s dev "SELECT 1"
|
|
438
|
+
vortex object get 7825 --app bettrackr/app -s dev
|
|
439
|
+
vortex app get bettrackr/app -s dev
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
- Case is ignored, but an exact match wins, and two applications that differ only in case
|
|
443
|
+
(with neither typed exactly) are `AMBIGUOUS`, never a guess. An ungrouped application is
|
|
444
|
+
`/NAME`, and `/group/app.pma` works too. A bare word is refused as a likely typo.
|
|
445
|
+
- A command that talks to the server looks the path up in that server's inventory: one more
|
|
446
|
+
`GET` (every application row), so an identity that can't read the inventory gets `FORBIDDEN`
|
|
447
|
+
and should use the ID.
|
|
448
|
+
This read comes before the workspace lock, but nothing has been written by then.
|
|
449
|
+
- `object grep`, `object diff`, `fetch`, `compile`, `clean` and anything with `--local` look it
|
|
450
|
+
up in the clones instead, with no request. Only the clones of the server the command runs
|
|
451
|
+
against count (`-s`, else the default), because IDs differ between servers: a path cloned
|
|
452
|
+
only from another server is `NOT_CLONED`. `clean --all` refuses a path, because it would
|
|
453
|
+
clean that ID on every server, where it can name a different application.
|
|
454
|
+
|
|
455
|
+
### Naming a design object
|
|
456
|
+
|
|
457
|
+
`OBJECT` is `GROUP/APP/NAME`, which also names the application, or a numeric ID with `--app`.
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
vortex object get bettrackr/app/Nightly -s dev
|
|
461
|
+
vortex object update bettrackr/app/Nightly bettrackr/app/Weekly --comment "..." -s dev
|
|
462
|
+
vortex object get bettrackr/app/PAGE/Dashboard -s dev # name the type when a name is shared
|
|
463
|
+
vortex object get 7825 --app bettrackr/app -s dev
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
- Case is ignored (an exact match wins), and the type goes after the application as it does in a
|
|
467
|
+
clone. The type must be upper case. If an application is itself named like a type (an app
|
|
468
|
+
`site/PAGE` beside an app `site`), `site/PAGE/Home` is refused as `AMBIGUOUS`: name it
|
|
469
|
+
`/site/PAGE.pma/Home` or `/site.pma/Home`. With only one of the two, the path names that one.
|
|
470
|
+
`agenda run` follows the same rule. Paths whose applications differ only in case
|
|
471
|
+
(`grp/Foo/A grp/foo/B`) must be the same application, or they're `AMBIGUOUS`. A name of all digits needs the path form:
|
|
472
|
+
`bettrackr/app/403`, because `403` alone is an ID.
|
|
473
|
+
- **A name several objects share is refused, never guessed** (`AMBIGUOUS`, with the IDs and the
|
|
474
|
+
paths that tell them apart), so `update` or `delete` can't hit the wrong one. Names that differ
|
|
475
|
+
only in case count as shared unless one matches exactly: in an app with a `PAGE` `dashboard` and
|
|
476
|
+
a `SHARED_CODE` `Dashboard`, each exact name finds its own object and `DASHBOARD` is refused.
|
|
477
|
+
`object run` is the exception: it takes the `ACTION`.
|
|
478
|
+
- Name the objects all by path or all by ID, in one application.
|
|
479
|
+
- The server looks up the name through `GET designs` (gateway 0.5.0): no blobs, 0.05s on an app of
|
|
480
|
+
462 objects. A gateway without that route, or no gateway, falls back to `GET {app}/design`, which
|
|
481
|
+
downloads the whole design (about 3s on the same app). Nothing else changes.
|
|
482
|
+
- `object diff` looks the name up in the clone, with no request. `object list` keeps its full
|
|
483
|
+
download, because it reports design params. `object create` has no object to name, so it takes `--app`.
|
|
484
|
+
- `vortex agenda run` takes the same paths ([The agenda](#the-agenda)).
|
|
485
|
+
|
|
430
486
|
### Output, errors and exit codes
|
|
431
487
|
|
|
432
488
|
Output is readable by default - tables for `list`, key/value for `get`. `--json` (every
|
|
@@ -862,10 +918,19 @@ console without the gateway) and parses the text they answer.
|
|
|
862
918
|
|
|
863
919
|
```
|
|
864
920
|
vortex agenda -s dev # = agenda list
|
|
865
|
-
vortex agenda list --app-id 9
|
|
866
|
-
vortex agenda run
|
|
921
|
+
vortex agenda list bettrackr/app -s dev # or --app-id 9
|
|
922
|
+
vortex agenda run bettrackr/app/Nightly -s dev [--param AppID=12] [--refresh] [--force]
|
|
923
|
+
vortex agenda run 7825 --app-id 60 -s dev
|
|
867
924
|
```
|
|
868
925
|
|
|
926
|
+
An action's path is `GROUP/APP/ACTION`, built from the `App` and `Action` columns of
|
|
927
|
+
`vortex agenda`. Case is ignored unless two names differ only in case: then the exact case wins,
|
|
928
|
+
and with no exact match it's `AMBIGUOUS`. An ungrouped application is `APP/ACTION` (`/2024/Nightly`
|
|
929
|
+
when its name is all digits), and AGENDA's own `/group/app.pma/Name` works too (needed when
|
|
930
|
+
the action's name holds a `/`). A path is always checked against the design row, as an ID is, so
|
|
931
|
+
the lookup reads the application's design rows (`GET designs`, or on an older gateway the whole design). Group and
|
|
932
|
+
application names with spaces or other characters AGENDA URL-encodes are matched decoded.
|
|
933
|
+
|
|
869
934
|
- **`list`** - `tell agenda schedule`: every scheduled action AGENDA has **loaded**, by next
|
|
870
935
|
run (server time), with the waitlist and AGENDA's counts (running, waitlisted, scheduled,
|
|
871
936
|
max at once). An action with empty `Options` is loaded as *on demand only*. Not listed: an
|
|
@@ -1010,10 +1075,11 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
|
|
|
1010
1075
|
`GatewayDesignWrite`, `GatewayDBRead`, `GatewayDBWrite`, `GatewaySystem` and `Admin`
|
|
1011
1076
|
(every route). Write implies read. A route the gateway does not map is refused.
|
|
1012
1077
|
`vortex --show-permissions` shows which commands your identity may run.
|
|
1013
|
-
- **Guards.** The gateway
|
|
1014
|
-
lets an id from one application be used under another (`NOT_FOUND`), and
|
|
1015
|
-
|
|
1016
|
-
any
|
|
1078
|
+
- **Guards.** The gateway keeps the Puakma system database read only (`SYSTEM_DB`), never
|
|
1079
|
+
lets an id from one application be used under another (`NOT_FOUND`), and refuses a SQL
|
|
1080
|
+
request with no statement in it (`SQL_NOT_ALLOWED`). From gateway 0.4.0 `GatewayDBWrite`
|
|
1081
|
+
runs any SQL - DDL including `DROP`/`TRUNCATE`, `WITH`, several statements; older gateways
|
|
1082
|
+
refuse those with `SQL_NOT_ALLOWED`.
|
|
1017
1083
|
- **Its own routes:** `whoami` (a bare `vortex`), the server and web logs (`log`, `weblog`), the console (`execute`),
|
|
1018
1084
|
addin statistics (`stats`), `.pmx` export and import, and the server's files (`file`, `Admin`).
|
|
1019
1085
|
|
|
@@ -1022,7 +1088,7 @@ On a server with a blank `gateway_path`:
|
|
|
1022
1088
|
| Command | Behaviour |
|
|
1023
1089
|
|---|---|
|
|
1024
1090
|
| `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `server libs` | the same routes, sent to webdesign's `/vortex` |
|
|
1025
|
-
| `db query` |
|
|
1091
|
+
| `db query` | sent to webdesign as-is (any SQL, as with the gateway); only a body with no statement is refused with `SQL_NOT_ALLOWED` before anything is sent |
|
|
1026
1092
|
| `app export` | webdesign's `ExportPMX` |
|
|
1027
1093
|
| `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
|
|
1028
1094
|
| `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run); `--since`/`--from`/`--to`/`--search` go into the query, `--page`/`--all-pages` are refused |
|
|
@@ -1107,11 +1173,14 @@ vortex db query 3 --app-id 9 --file report.sql --json
|
|
|
1107
1173
|
vortex db get-table bettrackr invoice --app-id 9
|
|
1108
1174
|
```
|
|
1109
1175
|
|
|
1110
|
-
`db query` sends the
|
|
1176
|
+
`db query` sends the SQL as given, apart from adding `LIMIT n` (default 10) to a single
|
|
1111
1177
|
`SELECT` that has none - a full page of rows is flagged as possibly truncated. There is no
|
|
1112
|
-
`--update` flag: the gateway
|
|
1113
|
-
`
|
|
1114
|
-
|
|
1178
|
+
`--update` flag: the gateway picks the role - one `SELECT` (no `INTO`), `EXPLAIN` (no
|
|
1179
|
+
`ANALYZE`) or `SHOW` needs `GatewayDBRead`; any other SQL - DML, DDL including `DROP` and
|
|
1180
|
+
`TRUNCATE`, `ANALYZE`, `WITH`, several statements - needs `GatewayDBWrite` (gateway 0.4.0+).
|
|
1181
|
+
webdesign runs the body with one `Statement.execute()`: DDL replies `0 row(s) affected`, and
|
|
1182
|
+
for several statements the reply is the first one's result (all of them run). A numeric `DB`
|
|
1183
|
+
is one request; a name is two.
|
|
1115
1184
|
|
|
1116
1185
|
The `create-`/`update-`/`delete-` table and column commands record design-time definitions in
|
|
1117
1186
|
the Puakma data dictionary (the PMATABLE/ATTRIBUTE tables). They **never run DDL** - deletes
|
|
@@ -173,7 +173,7 @@ errors (exit 2).
|
|
|
173
173
|
- **`execute` joins its words**, so `vortex ex tell agenda schedule -s dev` needs no quotes.
|
|
174
174
|
- **A protected server must be named.** A command that writes to a server or sends a console
|
|
175
175
|
command (`execute`, `compile --upload`, every `app`/`object`/`keyword`/`db` write, and a
|
|
176
|
-
`db query` that is not a `SELECT`) refuses a protected server that was only picked up as
|
|
176
|
+
`db query` that is not a read-only `SELECT`/`EXPLAIN`/`SHOW`) refuses a protected server that was only picked up as
|
|
177
177
|
the `vortex use` default (`PROTECTED_DEFAULT` in `--json`, nothing sent): pass `-s NAME`.
|
|
178
178
|
Reads are unaffected.
|
|
179
179
|
- **Saving `servers.ini` updates the VS Code workspace files.** A running `vortex watch`
|
|
@@ -288,59 +288,59 @@ For a full list of commands see `--help` (every command and verb has its own:
|
|
|
288
288
|
── app ──────────────────────────────────────────────────────────────────────
|
|
289
289
|
vortex app list [--group --name --template --strict --local --show-inherited
|
|
290
290
|
--all --ids-only --open-urls --open-dev-urls] [--json]
|
|
291
|
-
vortex app get
|
|
291
|
+
vortex app get APP [--show-params] [--json]
|
|
292
292
|
vortex app create --name N --group G [--template --inherit-from --description]
|
|
293
|
-
vortex app update
|
|
293
|
+
vortex app update APP [--name --group --description --inherit-from --template]
|
|
294
294
|
[--param NAME=VALUE ...] [--remove-param NAME ...]
|
|
295
|
-
vortex app export
|
|
295
|
+
vortex app export APP... [--out-dir --exclude-source --timeout]
|
|
296
296
|
vortex app import FILE.pmx --name N --group G
|
|
297
|
-
vortex app refresh
|
|
297
|
+
vortex app refresh APP (alias: refresh-design)
|
|
298
298
|
|
|
299
299
|
── object ───────────────────────────────────────────────────────────────────
|
|
300
|
-
vortex object get
|
|
301
|
-
vortex object create --app
|
|
300
|
+
vortex object get OBJECT [--show-source --show-data] [--json]
|
|
301
|
+
vortex object create --app APP --type T --name N [--source FILE --data FILE
|
|
302
302
|
--content-type --comment --inherit-from --open-action
|
|
303
303
|
--save-action --parent-page] [schedule options]
|
|
304
|
-
vortex object update
|
|
304
|
+
vortex object update OBJECT... [--source FILE --data FILE] [metadata options]
|
|
305
305
|
[schedule options]
|
|
306
306
|
schedule options (SCHEDULED_ACTION only): --schedule N|S|I|H|D|W|M|Y --interval N
|
|
307
307
|
--days SMTWHFA --start-time HH:mm --finish-time HH:mm --date N --month N
|
|
308
|
-
vortex object diff [
|
|
308
|
+
vortex object diff [OBJECT...] [--app APP] [--mine|--theirs] [--stat --word-diff -U N] [--json]
|
|
309
309
|
[-- GIT-DIFF-OPTIONS... | --write DIR]
|
|
310
|
-
vortex object copy
|
|
311
|
-
vortex object list [QUERY] [--app
|
|
310
|
+
vortex object copy OBJECT... --to-app TGT [--copy-params]
|
|
311
|
+
vortex object list [QUERY] [--app APP [--local]] [--strict --inherits-from|--parent-page
|
|
312
312
|
--ids-only --show-params --type T...] [--json]
|
|
313
|
-
vortex object grep PATTERN [--app
|
|
313
|
+
vortex object grep PATTERN [--app APP] [--output-paths|--output-apps]
|
|
314
314
|
[--include-resources|--type T...] [--json]
|
|
315
|
-
vortex object run
|
|
316
|
-
vortex object delete
|
|
315
|
+
vortex object run OBJECT [--output] [--json]
|
|
316
|
+
vortex object delete OBJECT... [--yes]
|
|
317
317
|
|
|
318
318
|
── keyword ──────────────────────────────────────────────────────────────────
|
|
319
|
-
vortex keyword list --app
|
|
320
|
-
vortex keyword get NAME --app
|
|
321
|
-
vortex keyword set NAME [VALUE...] --app
|
|
322
|
-
vortex keyword delete NAME --app
|
|
319
|
+
vortex keyword list --app APP [--local] [--reveal] [--json]
|
|
320
|
+
vortex keyword get NAME --app APP [--local] [--reveal] [--json]
|
|
321
|
+
vortex keyword set NAME [VALUE...] --app APP
|
|
322
|
+
vortex keyword delete NAME --app APP [--yes]
|
|
323
323
|
|
|
324
324
|
── db ───────────────────────────────────────────────────────────────────────
|
|
325
|
-
vortex db list [--app
|
|
326
|
-
vortex db get DB --app
|
|
327
|
-
vortex db query DB --app
|
|
328
|
-
vortex db list-tables DB --app
|
|
329
|
-
vortex db get-table DB TABLE --app
|
|
330
|
-
vortex db create-table DB TABLE --app
|
|
331
|
-
vortex db update-table DB TABLE --app
|
|
332
|
-
vortex db delete-table DB TABLE --app
|
|
333
|
-
vortex db create-column DB TABLE COLUMN --app
|
|
325
|
+
vortex db list [--app APP] [--local] [--json]
|
|
326
|
+
vortex db get DB --app APP [--json]
|
|
327
|
+
vortex db query DB --app APP [SQL | --file F | -] [--limit N] [--all-cols] [--json]
|
|
328
|
+
vortex db list-tables DB --app APP [--json]
|
|
329
|
+
vortex db get-table DB TABLE --app APP [--json]
|
|
330
|
+
vortex db create-table DB TABLE --app APP [--description]
|
|
331
|
+
vortex db update-table DB TABLE --app APP [--name --description]
|
|
332
|
+
vortex db delete-table DB TABLE --app APP [--yes]
|
|
333
|
+
vortex db create-column DB TABLE COLUMN --app APP --type T [--size N --pk --not-null
|
|
334
334
|
--unique --auto-increment --ref TABLE --cascade-delete --description]
|
|
335
|
-
vortex db update-column DB TABLE COLUMN --app
|
|
335
|
+
vortex db update-column DB TABLE COLUMN --app APP [--name --type --size --description
|
|
336
336
|
--pk|--no-pk --null|--not-null --unique|--no-unique
|
|
337
337
|
--auto-increment|--no-auto-increment --ref TABLE|--no-ref
|
|
338
338
|
--cascade-delete|--no-cascade-delete]
|
|
339
|
-
vortex db delete-column DB TABLE COLUMN --app
|
|
339
|
+
vortex db delete-column DB TABLE COLUMN --app APP [--yes]
|
|
340
340
|
|
|
341
341
|
── agenda ───────────────────────────────────────────────────────────────────
|
|
342
|
-
vortex agenda [
|
|
343
|
-
vortex agenda run ID --app
|
|
342
|
+
vortex agenda list [GROUP/APP | --app APP] [--json] ('vortex agenda' alone = list)
|
|
343
|
+
vortex agenda run GROUP/APP/ACTION | ID --app APP [--param KEY=VALUE ...] [--refresh --force] [--json]
|
|
344
344
|
|
|
345
345
|
── file (Admin) ─────────────────────────────────────────────────────────────
|
|
346
346
|
vortex file list [PATH] [--json]
|
|
@@ -383,6 +383,62 @@ a protected default must be named with `-s` to write or run a console command).
|
|
|
383
383
|
Each entity command makes at most three small requests (three per ID for multi-ID
|
|
384
384
|
commands); only `clone` downloads a whole application.
|
|
385
385
|
|
|
386
|
+
### Naming an application
|
|
387
|
+
|
|
388
|
+
`APP` is `GROUP/APP` or a numeric ID, on every command that takes one. `--app-id` and
|
|
389
|
+
`--to-app-id` still work and accept the same values as `--app` and `--to-app`.
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
vortex keyword list --app bettrackr/app -s dev
|
|
393
|
+
vortex db query bettrackr --app bettrackr/app -s dev "SELECT 1"
|
|
394
|
+
vortex object get 7825 --app bettrackr/app -s dev
|
|
395
|
+
vortex app get bettrackr/app -s dev
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
- Case is ignored, but an exact match wins, and two applications that differ only in case
|
|
399
|
+
(with neither typed exactly) are `AMBIGUOUS`, never a guess. An ungrouped application is
|
|
400
|
+
`/NAME`, and `/group/app.pma` works too. A bare word is refused as a likely typo.
|
|
401
|
+
- A command that talks to the server looks the path up in that server's inventory: one more
|
|
402
|
+
`GET` (every application row), so an identity that can't read the inventory gets `FORBIDDEN`
|
|
403
|
+
and should use the ID.
|
|
404
|
+
This read comes before the workspace lock, but nothing has been written by then.
|
|
405
|
+
- `object grep`, `object diff`, `fetch`, `compile`, `clean` and anything with `--local` look it
|
|
406
|
+
up in the clones instead, with no request. Only the clones of the server the command runs
|
|
407
|
+
against count (`-s`, else the default), because IDs differ between servers: a path cloned
|
|
408
|
+
only from another server is `NOT_CLONED`. `clean --all` refuses a path, because it would
|
|
409
|
+
clean that ID on every server, where it can name a different application.
|
|
410
|
+
|
|
411
|
+
### Naming a design object
|
|
412
|
+
|
|
413
|
+
`OBJECT` is `GROUP/APP/NAME`, which also names the application, or a numeric ID with `--app`.
|
|
414
|
+
|
|
415
|
+
```
|
|
416
|
+
vortex object get bettrackr/app/Nightly -s dev
|
|
417
|
+
vortex object update bettrackr/app/Nightly bettrackr/app/Weekly --comment "..." -s dev
|
|
418
|
+
vortex object get bettrackr/app/PAGE/Dashboard -s dev # name the type when a name is shared
|
|
419
|
+
vortex object get 7825 --app bettrackr/app -s dev
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
- Case is ignored (an exact match wins), and the type goes after the application as it does in a
|
|
423
|
+
clone. The type must be upper case. If an application is itself named like a type (an app
|
|
424
|
+
`site/PAGE` beside an app `site`), `site/PAGE/Home` is refused as `AMBIGUOUS`: name it
|
|
425
|
+
`/site/PAGE.pma/Home` or `/site.pma/Home`. With only one of the two, the path names that one.
|
|
426
|
+
`agenda run` follows the same rule. Paths whose applications differ only in case
|
|
427
|
+
(`grp/Foo/A grp/foo/B`) must be the same application, or they're `AMBIGUOUS`. A name of all digits needs the path form:
|
|
428
|
+
`bettrackr/app/403`, because `403` alone is an ID.
|
|
429
|
+
- **A name several objects share is refused, never guessed** (`AMBIGUOUS`, with the IDs and the
|
|
430
|
+
paths that tell them apart), so `update` or `delete` can't hit the wrong one. Names that differ
|
|
431
|
+
only in case count as shared unless one matches exactly: in an app with a `PAGE` `dashboard` and
|
|
432
|
+
a `SHARED_CODE` `Dashboard`, each exact name finds its own object and `DASHBOARD` is refused.
|
|
433
|
+
`object run` is the exception: it takes the `ACTION`.
|
|
434
|
+
- Name the objects all by path or all by ID, in one application.
|
|
435
|
+
- The server looks up the name through `GET designs` (gateway 0.5.0): no blobs, 0.05s on an app of
|
|
436
|
+
462 objects. A gateway without that route, or no gateway, falls back to `GET {app}/design`, which
|
|
437
|
+
downloads the whole design (about 3s on the same app). Nothing else changes.
|
|
438
|
+
- `object diff` looks the name up in the clone, with no request. `object list` keeps its full
|
|
439
|
+
download, because it reports design params. `object create` has no object to name, so it takes `--app`.
|
|
440
|
+
- `vortex agenda run` takes the same paths ([The agenda](#the-agenda)).
|
|
441
|
+
|
|
386
442
|
### Output, errors and exit codes
|
|
387
443
|
|
|
388
444
|
Output is readable by default - tables for `list`, key/value for `get`. `--json` (every
|
|
@@ -818,10 +874,19 @@ console without the gateway) and parses the text they answer.
|
|
|
818
874
|
|
|
819
875
|
```
|
|
820
876
|
vortex agenda -s dev # = agenda list
|
|
821
|
-
vortex agenda list --app-id 9
|
|
822
|
-
vortex agenda run
|
|
877
|
+
vortex agenda list bettrackr/app -s dev # or --app-id 9
|
|
878
|
+
vortex agenda run bettrackr/app/Nightly -s dev [--param AppID=12] [--refresh] [--force]
|
|
879
|
+
vortex agenda run 7825 --app-id 60 -s dev
|
|
823
880
|
```
|
|
824
881
|
|
|
882
|
+
An action's path is `GROUP/APP/ACTION`, built from the `App` and `Action` columns of
|
|
883
|
+
`vortex agenda`. Case is ignored unless two names differ only in case: then the exact case wins,
|
|
884
|
+
and with no exact match it's `AMBIGUOUS`. An ungrouped application is `APP/ACTION` (`/2024/Nightly`
|
|
885
|
+
when its name is all digits), and AGENDA's own `/group/app.pma/Name` works too (needed when
|
|
886
|
+
the action's name holds a `/`). A path is always checked against the design row, as an ID is, so
|
|
887
|
+
the lookup reads the application's design rows (`GET designs`, or on an older gateway the whole design). Group and
|
|
888
|
+
application names with spaces or other characters AGENDA URL-encodes are matched decoded.
|
|
889
|
+
|
|
825
890
|
- **`list`** - `tell agenda schedule`: every scheduled action AGENDA has **loaded**, by next
|
|
826
891
|
run (server time), with the waitlist and AGENDA's counts (running, waitlisted, scheduled,
|
|
827
892
|
max at once). An action with empty `Options` is loaded as *on demand only*. Not listed: an
|
|
@@ -966,10 +1031,11 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
|
|
|
966
1031
|
`GatewayDesignWrite`, `GatewayDBRead`, `GatewayDBWrite`, `GatewaySystem` and `Admin`
|
|
967
1032
|
(every route). Write implies read. A route the gateway does not map is refused.
|
|
968
1033
|
`vortex --show-permissions` shows which commands your identity may run.
|
|
969
|
-
- **Guards.** The gateway
|
|
970
|
-
lets an id from one application be used under another (`NOT_FOUND`), and
|
|
971
|
-
|
|
972
|
-
any
|
|
1034
|
+
- **Guards.** The gateway keeps the Puakma system database read only (`SYSTEM_DB`), never
|
|
1035
|
+
lets an id from one application be used under another (`NOT_FOUND`), and refuses a SQL
|
|
1036
|
+
request with no statement in it (`SQL_NOT_ALLOWED`). From gateway 0.4.0 `GatewayDBWrite`
|
|
1037
|
+
runs any SQL - DDL including `DROP`/`TRUNCATE`, `WITH`, several statements; older gateways
|
|
1038
|
+
refuse those with `SQL_NOT_ALLOWED`.
|
|
973
1039
|
- **Its own routes:** `whoami` (a bare `vortex`), the server and web logs (`log`, `weblog`), the console (`execute`),
|
|
974
1040
|
addin statistics (`stats`), `.pmx` export and import, and the server's files (`file`, `Admin`).
|
|
975
1041
|
|
|
@@ -978,7 +1044,7 @@ On a server with a blank `gateway_path`:
|
|
|
978
1044
|
| Command | Behaviour |
|
|
979
1045
|
|---|---|
|
|
980
1046
|
| `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `server libs` | the same routes, sent to webdesign's `/vortex` |
|
|
981
|
-
| `db query` |
|
|
1047
|
+
| `db query` | sent to webdesign as-is (any SQL, as with the gateway); only a body with no statement is refused with `SQL_NOT_ALLOWED` before anything is sent |
|
|
982
1048
|
| `app export` | webdesign's `ExportPMX` |
|
|
983
1049
|
| `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
|
|
984
1050
|
| `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run); `--since`/`--from`/`--to`/`--search` go into the query, `--page`/`--all-pages` are refused |
|
|
@@ -1063,11 +1129,14 @@ vortex db query 3 --app-id 9 --file report.sql --json
|
|
|
1063
1129
|
vortex db get-table bettrackr invoice --app-id 9
|
|
1064
1130
|
```
|
|
1065
1131
|
|
|
1066
|
-
`db query` sends the
|
|
1132
|
+
`db query` sends the SQL as given, apart from adding `LIMIT n` (default 10) to a single
|
|
1067
1133
|
`SELECT` that has none - a full page of rows is flagged as possibly truncated. There is no
|
|
1068
|
-
`--update` flag: the gateway
|
|
1069
|
-
`
|
|
1070
|
-
|
|
1134
|
+
`--update` flag: the gateway picks the role - one `SELECT` (no `INTO`), `EXPLAIN` (no
|
|
1135
|
+
`ANALYZE`) or `SHOW` needs `GatewayDBRead`; any other SQL - DML, DDL including `DROP` and
|
|
1136
|
+
`TRUNCATE`, `ANALYZE`, `WITH`, several statements - needs `GatewayDBWrite` (gateway 0.4.0+).
|
|
1137
|
+
webdesign runs the body with one `Statement.execute()`: DDL replies `0 row(s) affected`, and
|
|
1138
|
+
for several statements the reply is the first one's result (all of them run). A numeric `DB`
|
|
1139
|
+
is one request; a name is two.
|
|
1071
1140
|
|
|
1072
1141
|
The `create-`/`update-`/`delete-` table and column commands record design-time definitions in
|
|
1073
1142
|
the Puakma data dictionary (the PMATABLE/ATTRIBUTE tables). They **never run DDL** - deletes
|