@datarails-ai/dr-appspace-cli 0.12.58 → 0.12.60
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 +38 -1
- package/dist/cli.js +1738 -558
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -318,6 +318,26 @@ column on the record and nothing else: the contract document, the compiled
|
|
|
318
318
|
pages and the dashboard are the same with or without it. The builder flows
|
|
319
319
|
set `DR_APPSPACE_KIT` in their sandboxes.
|
|
320
320
|
|
|
321
|
+
**A transform edited since the compile is refused by `push`.** A handler is
|
|
322
|
+
one file, so each source's (or dashboard's) transform rides inside it as text,
|
|
323
|
+
copied in by the last `compile`; `push` sends `handlers/`, not `transforms/`.
|
|
324
|
+
When a `transforms/*.py` differs from the text the compiled handlers carry,
|
|
325
|
+
`push` sends nothing and names the file and the handlers: run `compile --push`
|
|
326
|
+
(or `compile`, then `push`). It refuses rather than recompiling because `push`
|
|
327
|
+
writes nothing into the folder — what a handler may be overwritten with is
|
|
328
|
+
`compile`'s to decide.
|
|
329
|
+
|
|
330
|
+
**The `tests.json` the compiler writes is the compiler's** until somebody
|
|
331
|
+
edits it: an unedited one (its bytes still the digest `.appspace/compile.json`
|
|
332
|
+
recorded) is written again from the contract on every compile, so it gains a
|
|
333
|
+
case for a handler added since and loses one a newer generator no longer
|
|
334
|
+
writes. An edited one is carried as written and recorded under `inputs`. The
|
|
335
|
+
generated cases hold in a dry run: an insert (`save`/`submit` with no
|
|
336
|
+
`required`) carries a sample of every column the table requires (an enum's
|
|
337
|
+
first value, `1`, `2000-01-01`, text marked `app-space test`), and a source
|
|
338
|
+
reading a declared metric (`"@key"`), which a dry run cannot bind, is asked
|
|
339
|
+
only for `meta.source.kind`, not its kind's payload.
|
|
340
|
+
|
|
321
341
|
**Push before `get`**: `get` replaces `handlers/` and `ui/` with what the
|
|
322
342
|
platform holds, and refuses (unless `--force`) while the compile record lists
|
|
323
343
|
files as yours that the pushed package does not hold as written.
|
|
@@ -344,6 +364,7 @@ then reads each laid-out page back for the `look-*` findings below.
|
|
|
344
364
|
| `--width <px>` / `--height <px>` | the window | `1400` × `900` |
|
|
345
365
|
| `--full` | grow the window to the page's full height (one extra load per picture) | off |
|
|
346
366
|
| `--no-look` | skip the look load (see below) | look on |
|
|
367
|
+
| `--no-sample` | answer data cards with `tests.json` or `[]` only (see below) | sample on |
|
|
347
368
|
| `--shelf <path>` | serve `vendor/` and `ui-kit/` from this dr-app-space checkout | the server the app is pushed to |
|
|
348
369
|
| `--screenshot-budget <ms>` | the whole phase's ceiling; each picture is capped at 60 s | `180000` |
|
|
349
370
|
|
|
@@ -385,6 +406,19 @@ the tenant's rows, so a page can lay out differently with real data. Without
|
|
|
385
406
|
`--screenshot-budget`, so they never cost a picture; one with less than 5 s
|
|
386
407
|
left is skipped and its row says why in `lookSkipped`.
|
|
387
408
|
|
|
409
|
+
**Data cards draw on sample data.** A card the page's contract ties to data
|
|
410
|
+
is answered with a sample payload of its kind when `tests.json` holds no
|
|
411
|
+
value for it: a dashboard's cards (the SPEC handler's `load`, and its
|
|
412
|
+
`catalog`, so the filter bar draws its chips and selects) and an app's
|
|
413
|
+
`widget` elements (their handler, read as their kind reads). The payloads
|
|
414
|
+
are the widget contract's own fixtures, scaled per card the same way every
|
|
415
|
+
run, so a picture shows the cards a viewer meets instead of failure panels.
|
|
416
|
+
They are never the tenant's figures and never a fixture assertion. A
|
|
417
|
+
hand-written `expect` still wins; lists, grids and action handlers keep
|
|
418
|
+
`tests.json` or `[]`. The table names the sampled handlers, each picture's
|
|
419
|
+
row in `index.json` lists them in `handlersSampled`, and `--no-sample`
|
|
420
|
+
turns it off.
|
|
421
|
+
|
|
388
422
|
**The same check on the kit goldens, in CI.** The "Golden look" job in
|
|
389
423
|
`pr-checks.yml` draws every kit golden and test app the same way, offline, at
|
|
390
424
|
the kit's pins and at the newest `dr-app-*` release on the shelf, and fails on
|
|
@@ -394,7 +428,10 @@ move, not a builder. To try a release by hand, from `cli/`:
|
|
|
394
428
|
fails on B6).
|
|
395
429
|
|
|
396
430
|
Chrome is found through `CHROME_PATH`, then `google-chrome`, `chromium` or
|
|
397
|
-
`chrome` on `PATH`, then the macOS app bundle and the usual Linux paths
|
|
431
|
+
`chrome` on `PATH`, then the macOS app bundle and the usual Linux paths
|
|
432
|
+
(`/opt/google/chrome/chrome` included, where the managed build sandbox keeps
|
|
433
|
+
its Chromium). Run as root, as a container's shell is, Chrome gets
|
|
434
|
+
`--no-sandbox`, which it needs to start there. With
|
|
398
435
|
none, the command exits 2 before anything runs. No browser is ever
|
|
399
436
|
downloaded. Each Chrome gets its own temporary profile, which is removed
|
|
400
437
|
afterwards, and its process group is killed once the file is written,
|