nemar-cli 0.10.19-PR1783.f9e4763 → 0.10.19-PR1787.69a4002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -5
- package/dist/index.js +670 -502
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -325,19 +325,51 @@ nemar admin publish list # List active publication requests
|
|
|
325
325
|
nemar admin publish list --all # Every request, whatever its state
|
|
326
326
|
nemar admin publish list --denied # One state (also --published, --requested, ...)
|
|
327
327
|
nemar admin publish list -s denied # Same as --denied (--status, as before)
|
|
328
|
-
nemar admin publish list --search
|
|
328
|
+
nemar admin publish list --search nm099999 --all
|
|
329
329
|
# Look up a dataset by ID, user or name
|
|
330
|
+
nemar admin publish list --needs-me # Only the requests you can act on now
|
|
331
|
+
nemar admin publish show <dataset-id> # The automated review of one request, in full
|
|
332
|
+
nemar admin publish start <dataset-id> # Start the automated review (--all: every request waiting)
|
|
333
|
+
nemar admin publish next # One card per request that needs you: y approves, n denies, c comments
|
|
330
334
|
nemar admin publish approve <dataset-id> # Approve and publish dataset
|
|
335
|
+
nemar admin publish approve <dataset-id> --force
|
|
336
|
+
# Approve over a review that is not a pass
|
|
331
337
|
nemar admin publish approve <dataset-id> --acknowledge-identifier-screen "<reason>"
|
|
332
338
|
# Approve over a screen that needs review
|
|
333
|
-
nemar admin publish
|
|
339
|
+
nemar admin publish approve <dataset-id> --request-id <n>
|
|
340
|
+
# Approve only if request n is the one in force
|
|
334
341
|
nemar admin publish deny <dataset-id> # Deny publication request
|
|
342
|
+
nemar admin publish deny <dataset-id> --request-id <n>
|
|
343
|
+
# Deny only if request n is the one in force
|
|
344
|
+
nemar admin publish screen <dataset-id> # Re-run the identifier screen
|
|
335
345
|
```
|
|
336
346
|
|
|
337
347
|
A publication request is screened for identifying information before the
|
|
338
348
|
admins are mailed; the mail, `publish status` and `admin publish list` state
|
|
339
349
|
the result, and approval waits for a screen that is clear for the current
|
|
340
350
|
`main`.
|
|
351
|
+
Each request also gets an automated review of what the depositor submitted,
|
|
352
|
+
which `admin publish list` and `admin publish show` state.
|
|
353
|
+
An approval over a review that is not a pass needs `--force` and is recorded
|
|
354
|
+
with your account.
|
|
355
|
+
An approval is for the request it showed, and the API refuses it when that
|
|
356
|
+
request was denied or filed again since (`--request-id` names it yourself).
|
|
357
|
+
An approval started from the website is run by a workflow that is handed a
|
|
358
|
+
token in the environment variable `NEMAR_APPROVAL_DISPATCH_TOKEN` and runs
|
|
359
|
+
`approve <dataset> --yes` with it (adding `--resume` when the click resumes a
|
|
360
|
+
request or the request is already approving), so the token is never typed at a
|
|
361
|
+
terminal.
|
|
362
|
+
With the variable set, the API records the administrator who clicked as the
|
|
363
|
+
approver, and `--force`, `--acknowledge-identifier-screen`, `--skip-ci-check`
|
|
364
|
+
and `--sandbox` are refused.
|
|
365
|
+
Without the variable the command is your own approval, recorded under your
|
|
366
|
+
account, and `next` never reads it.
|
|
367
|
+
Every failure of `admin publish` exits 1, and so does an outcome that is not
|
|
368
|
+
what was asked: `publish screen` exits 1 when the API accepted the call but
|
|
369
|
+
could not start the screen (the dispatch failed), and `publish approve` exits 1
|
|
370
|
+
when the API's answer is not `published` (a tail job's warning leaves the
|
|
371
|
+
request `approving`; run it again once the cause the warning names is fixed).
|
|
372
|
+
`next` counts such an approval as failed, not approved.
|
|
341
373
|
|
|
342
374
|
### Admin Commands
|
|
343
375
|
|
|
@@ -454,9 +486,11 @@ See [the Zenodo testing guide](https://docs.nemar.org/develop/zenodo-testing/) f
|
|
|
454
486
|
### CLI Usage
|
|
455
487
|
|
|
456
488
|
```bash
|
|
457
|
-
NEMAR_API_KEY
|
|
458
|
-
NEMAR_NO_BROWSER=1
|
|
459
|
-
NEMAR_NO_COLOR
|
|
489
|
+
NEMAR_API_KEY # API key (alternative to `nemar auth login -k`)
|
|
490
|
+
NEMAR_NO_BROWSER=1 # Never try to open a browser during sign-in (same as --no-open)
|
|
491
|
+
NEMAR_NO_COLOR # Disable colored output
|
|
492
|
+
NEMAR_APPROVAL_DISPATCH_TOKEN # Dispatch token of a web approval; set only by the web approval executor, never by a person
|
|
493
|
+
NEMAR_APPROVE_RETRY_DELAY_MS # Whole milliseconds to wait between retries of an approval; it can only shorten the default wait (for tests), never lengthen it
|
|
460
494
|
```
|
|
461
495
|
|
|
462
496
|
### Testing
|