@smartkomm/plexus-cli 0.1.74 → 0.1.76
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
294fa2510acc6baca9ba47a7055ce5bb23e415e18a7f414ff92927b3461b8163
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -228,6 +228,7 @@ whole is the operator's (ask them; do not try).
|
|
|
228
228
|
| [persons/import-persons-from-csv.md](references/persons/import-persons-from-csv.md) | Mandant | Import pupils, their guardians and class enrollments from a person list (CSV + mapping file). |
|
|
229
229
|
| [persons/purge-deleted-person.md](references/persons/purge-deleted-person.md) | Plattform | Delete a soft-deleted person for good. |
|
|
230
230
|
| [platform/rename-tenant.md](references/platform/rename-tenant.md) | Plattform | Change a tenant's slug and display name in place, then its accounts' addresses. |
|
|
231
|
+
| [platform/inventory.md](references/platform/inventory.md) | Plattform | Count test data per real tenant and stored files (referenced, orphaned) — counts and ids only. |
|
|
231
232
|
| [platform/sweep-storage-orphans.md](references/platform/sweep-storage-orphans.md) | Plattform | List the stored files no record names, then delete exactly the reviewed ones. |
|
|
232
233
|
| [resolver/manage-contract-package.md](references/resolver/manage-contract-package.md) | Mandant + Plattform | Create, review and seal a contract package from one file by key. |
|
|
233
234
|
| [resolver/manage-contract-resolver.md](references/resolver/manage-contract-resolver.md) | Mandant | Create, test, seal, assign and revise a contract resolver. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# plexus-cli command reference
|
|
2
2
|
|
|
3
3
|
Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
|
|
4
|
-
|
|
4
|
+
292 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
|
|
5
5
|
`--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
|
|
6
6
|
|
|
7
7
|
- [Admission (offline)](#admission-offline) (1)
|
|
@@ -31,7 +31,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
31
31
|
- [Organisation (school token)](#organisation-school-token) (8)
|
|
32
32
|
- [Persons (platform operator)](#persons-platform-operator) (1)
|
|
33
33
|
- [Persons (school token)](#persons-school-token) (2)
|
|
34
|
-
- [Platform (platform operator)](#platform-platform-operator) (
|
|
34
|
+
- [Platform (platform operator)](#platform-platform-operator) (10)
|
|
35
35
|
- [Setup (platform operator)](#setup-platform-operator) (5)
|
|
36
36
|
- [Signing (platform operator)](#signing-platform-operator) (5)
|
|
37
37
|
- [Signing (school token)](#signing-school-token) (8)
|
|
@@ -3095,6 +3095,30 @@ Read the privileged-access log (platform-admin)
|
|
|
3095
3095
|
| `--actor <value>` | Employee email to report accesses BY (tenant-scoped) |
|
|
3096
3096
|
| `--with-actor` | Include the employee identity (needs _platform.audit.readActor) |
|
|
3097
3097
|
|
|
3098
|
+
### `platform inventory storage`
|
|
3099
|
+
|
|
3100
|
+
Read-only: every stored object — all, referenced, orphaned (copy or single, at least 7 days old or younger), orphans at least 7 days old by type and month — through the orphan sweep's holder check. --out writes the id lists.
|
|
3101
|
+
|
|
3102
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3103
|
+
- **Effect:** read — changes nothing on the deployment
|
|
3104
|
+
|
|
3105
|
+
| Option | Description |
|
|
3106
|
+
|---|---|
|
|
3107
|
+
| `--out <value>` | Write the counts and the id lists as JSON (refused when it exists, unless --force) |
|
|
3108
|
+
| `--force` | Overwrite an existing --out file. |
|
|
3109
|
+
|
|
3110
|
+
### `platform inventory test-data`
|
|
3111
|
+
|
|
3112
|
+
Read-only: per real tenant (not test, not _platform) the applications (all, test mode, kept demos) and persons (all, with an account, with an import origin) — counts and ids only. --out writes the test-mode and demo application ids.
|
|
3113
|
+
|
|
3114
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3115
|
+
- **Effect:** read — changes nothing on the deployment
|
|
3116
|
+
|
|
3117
|
+
| Option | Description |
|
|
3118
|
+
|---|---|
|
|
3119
|
+
| `--out <value>` | Write the counts and the id lists as JSON (refused when it exists, unless --force) |
|
|
3120
|
+
| `--force` | Overwrite an existing --out file. |
|
|
3121
|
+
|
|
3098
3122
|
### `platform storage orphans apply`
|
|
3099
3123
|
|
|
3100
3124
|
Delete the stored objects that are BOTH in --list and orphaned in a fresh run (each asked once more before its delete); both differences are reported, never deleted. Dry run unless --confirm.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Inventory test data and storage
|
|
2
|
+
|
|
3
|
+
**When to use:** before a cleanup (or after one, as the "after" picture) you
|
|
4
|
+
need the numbers: how many applications, test applications and persons each
|
|
5
|
+
real school holds, and how many stored files exist, are referenced or orphaned.
|
|
6
|
+
Read-only; it prints counts and writes ids — never a name or an address — so
|
|
7
|
+
nobody has to pull a deployment export onto a machine to count.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
- A platform token with `_platform.config.read`.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
```bash
|
|
14
|
+
# 1. Test data per real tenant (every tenant except `test` and `_platform`):
|
|
15
|
+
# applications all / test mode / kept demos, persons all / with an account / with an import origin
|
|
16
|
+
plexus-cli --env <env> platform inventory test-data --out <scratch>/inventory-test-data.json
|
|
17
|
+
|
|
18
|
+
# 2. Storage: all, referenced, orphaned (copy / single, at least 7 days / younger), by type and month
|
|
19
|
+
plexus-cli --env <env> platform inventory storage --out <scratch>/inventory-storage.json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The `test-data` file holds per tenant the ids of its test-mode applications and
|
|
23
|
+
of the kept demo applications. The `storage` file holds three id lists:
|
|
24
|
+
`copies` (orphans at least 7 days old whose bytes are stored more than once),
|
|
25
|
+
`singles` (the only copy) and `youngOrphans` (orphans younger than 7 days — never
|
|
26
|
+
listed for a delete).
|
|
27
|
+
|
|
28
|
+
## What it does not count
|
|
29
|
+
- The residue of deleted test applications (contracts, generation runs, signing
|
|
30
|
+
requests) and the person candidates: the test-residue plan counts them with its
|
|
31
|
+
deletion criteria — one implementation, not copied here.
|
|
32
|
+
- "By type" and "by month" cover the orphans at least 7 days old.
|
|
33
|
+
|
|
34
|
+
## Idempotency / gotchas
|
|
35
|
+
- Both commands write nothing on the deployment; re-run freely.
|
|
36
|
+
- `storage` is the orphan sweep's plan ([Sweep storage orphans](./sweep-storage-orphans.md))
|
|
37
|
+
shown as an inventory — the same holder check, the same run time (minutes on a
|
|
38
|
+
large deployment).
|
|
39
|
+
|
|
40
|
+
## Related
|
|
41
|
+
- [Sweep storage orphans](./sweep-storage-orphans.md)
|