plumb-fhir 0.7.0 → 0.9.0
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/CHANGELOG.md +48 -0
- package/README.md +88 -9
- package/dist/checker.cjs +63 -5
- package/dist/cjs/check.d.ts +89 -0
- package/dist/cjs/check.d.ts.map +1 -0
- package/dist/cjs/checker/handler.d.ts +34 -0
- package/dist/cjs/checker/handler.d.ts.map +1 -1
- package/dist/cjs/commands.d.ts +4 -1
- package/dist/cjs/commands.d.ts.map +1 -1
- package/dist/cjs/config.d.ts +14 -2
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/conformance.d.ts +49 -3
- package/dist/cjs/conformance.d.ts.map +1 -1
- package/dist/cjs/emit/print.d.ts.map +1 -1
- package/dist/cjs/emit/routes.d.ts +10 -0
- package/dist/cjs/emit/routes.d.ts.map +1 -1
- package/dist/cjs/index.cjs +79 -9
- package/dist/cjs/index.cjs.map +3 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/esm/check.d.ts +89 -0
- package/dist/esm/check.d.ts.map +1 -0
- package/dist/esm/checker/handler.d.ts +34 -0
- package/dist/esm/checker/handler.d.ts.map +1 -1
- package/dist/esm/cli.mjs +3274 -2779
- package/dist/esm/cli.mjs.map +4 -4
- package/dist/esm/commands.d.ts +4 -1
- package/dist/esm/commands.d.ts.map +1 -1
- package/dist/esm/config.d.ts +14 -2
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/conformance.d.ts +49 -3
- package/dist/esm/conformance.d.ts.map +1 -1
- package/dist/esm/emit/print.d.ts.map +1 -1
- package/dist/esm/emit/routes.d.ts +10 -0
- package/dist/esm/emit/routes.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.mjs +79 -9
- package/dist/esm/index.mjs.map +3 -3
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 (2026-10-05)
|
|
4
|
+
|
|
5
|
+
Faster and more useful `validate`, and config and credentials that fit a
|
|
6
|
+
monorepo. The checker changes, so the next `push` redeploys it.
|
|
7
|
+
|
|
8
|
+
- **`validate` counts records on each type's line**, not profile checks: a
|
|
9
|
+
record stamped with a profile and its parent was counted twice, so a type
|
|
10
|
+
could read `334 of 334 read, all 340 passed`. It now reads `all 331
|
|
11
|
+
stamped passed`, and each profile's line still counts its checks (#121).
|
|
12
|
+
- **`--env-file <path>`** on `validate` and `push` reads credentials and
|
|
13
|
+
secrets from a dotenv file, as Node's `--env-file` does: repeatable, later
|
|
14
|
+
files win, and a variable already set wins over every file. Node refuses
|
|
15
|
+
`--env-file` in `NODE_OPTIONS` and cannot run a package manager's shell
|
|
16
|
+
shim, so this was the only short way (#120).
|
|
17
|
+
- **A config Node cannot load loads with the project's tsx** when it has one
|
|
18
|
+
installed, so in a workspace `plumb.config.ts` can import a sibling package
|
|
19
|
+
that exports TypeScript source, and use `tsconfig` path aliases and `enum`.
|
|
20
|
+
Node still loads every config it can, so tsx is never loaded for one that
|
|
21
|
+
worked before. Without tsx, importing TypeScript from `node_modules` is now
|
|
22
|
+
a named `unsupported-syntax` error suggesting tsx (#114).
|
|
23
|
+
- **`validate` and `push`'s gate read only resources with a selected stamp**
|
|
24
|
+
(`_profile=<selected URLs>`), and count the rest by query, so one narrow
|
|
25
|
+
profile on a large type no longer reads the whole table: selecting one
|
|
26
|
+
Observation profile read every stored Observation, 100 per async job.
|
|
27
|
+
Resources stamped only with other profiles are counted together; `plumb
|
|
28
|
+
validate --full` reads everything to break them down into silent stamps
|
|
29
|
+
and profiles not selected, as every run did before. A type of more than one
|
|
30
|
+
page prints its progress (#127).
|
|
31
|
+
- **`plumb validate --unstamped`** forecasts what would fail once unstamped
|
|
32
|
+
resources are stamped: the checker routes each one with the config's
|
|
33
|
+
routing rows, as the generated `route` does, and checks it against what
|
|
34
|
+
`createProfiled` would stamp. Resources routing to no profile, or to
|
|
35
|
+
several, are counted by reason. The forecast is reported beside the
|
|
36
|
+
results and never fails the run (#123).
|
|
37
|
+
|
|
38
|
+
## 0.8.0 (2026-10-05)
|
|
39
|
+
|
|
40
|
+
- **`plumb check`** reports every `MedplumClient` read or write of a type a
|
|
41
|
+
selected profile fully holds that goes around `readProfiled`,
|
|
42
|
+
`searchProfiled`, `createProfiled`, `updateProfiled` or `stampProfiled`,
|
|
43
|
+
by the types the compiler infers, so an inferred write is found as surely as
|
|
44
|
+
a literal one. A committed baseline lets a project adopt it with a backlog:
|
|
45
|
+
only new or grown findings fail. `// plumb-check: <reason>` marks a
|
|
46
|
+
deliberate exception. It needs the project's TypeScript 5 or 6 (design 07).
|
|
47
|
+
- **`stampProfiled` returns its resource branded** (`T & Stamped`, an optional
|
|
48
|
+
unique-symbol property), which `check` reads to accept a stamped write
|
|
49
|
+
through a variable. Callers see no difference.
|
|
50
|
+
- `check` in the config: `tsconfig`, `baseline` and `ignore`.
|
|
3
51
|
## 0.7.0 (2026-10-05)
|
|
4
52
|
|
|
5
53
|
- **`stampProfiled(resource, options?)`** returns the copy `createProfiled`
|
package/README.md
CHANGED
|
@@ -58,8 +58,11 @@ export default defineConfig({
|
|
|
58
58
|
did not write.
|
|
59
59
|
|
|
60
60
|
The config is loaded by Node itself, which strips the types, so TypeScript-only
|
|
61
|
-
syntax such as `enum`, relative imports without `.ts`,
|
|
62
|
-
|
|
61
|
+
syntax such as `enum`, relative imports without `.ts`, `tsconfig` path aliases
|
|
62
|
+
and packages that export TypeScript source are not available in it. When the
|
|
63
|
+
project has `tsx` installed, Plumb loads with it whatever Node cannot, and
|
|
64
|
+
all of these work: a workspace can import its access policies from the
|
|
65
|
+
package that defines them.
|
|
63
66
|
|
|
64
67
|
**3. Generate:**
|
|
65
68
|
|
|
@@ -379,6 +382,61 @@ read would refuse. History is not offered typed: an old version may predate
|
|
|
379
382
|
its stamp, so read it with `medplum.readHistory` and `asProfiled` it if you
|
|
380
383
|
must.
|
|
381
384
|
|
|
385
|
+
## Find code that goes around Plumb
|
|
386
|
+
|
|
387
|
+
The profiled reads and writes only help where they are called. `plumb check`
|
|
388
|
+
reads your code the way the compiler does and reports every `MedplumClient`
|
|
389
|
+
read or write of a profiled type that does not go through them, including a
|
|
390
|
+
write whose type is only inferred:
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
export default defineConfig({
|
|
394
|
+
// …igs, profiles, out
|
|
395
|
+
check: {
|
|
396
|
+
tsconfig: ['apps/web/tsconfig.json'],
|
|
397
|
+
baseline: './plumb-check-baseline.json',
|
|
398
|
+
ignore: ['**/*.test.ts', '**/*.stories.tsx'],
|
|
399
|
+
},
|
|
400
|
+
});
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
```bash
|
|
404
|
+
npx plumb check
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
```text
|
|
408
|
+
plumb check
|
|
409
|
+
✖ check 2 new, 248 in the baseline, in 2767 files 6.2s
|
|
410
|
+
apps/web/src/lib/goals/goal.ts:41:10 readResource Goal → readProfiled
|
|
411
|
+
apps/web/src/lib/coverage/save.ts:90:5 createResource Coverage → createProfiled, updateProfiled or stampProfiled
|
|
412
|
+
Failed in 6.2s
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
- **What it reports:** `readResource`, `searchResources`, `searchOne`,
|
|
416
|
+
`searchResourcePages`, `createResource`, `updateResource`, `upsertResource`
|
|
417
|
+
and `createResourceIfNoneExist` on a `MedplumClient` (or a class deriving
|
|
418
|
+
from it), for a type every resource of which a selected profile holds: one
|
|
419
|
+
with a profile that routes on no keys, or a `defaultProfile`. A type whose
|
|
420
|
+
profiles are keyed on content (one code of Observation) is not reported, and
|
|
421
|
+
neither is `string` or `ResourceType`.
|
|
422
|
+
- **A stamped write passes,** through a variable too: `stampProfiled` returns
|
|
423
|
+
its resource branded, and `check` reads the brand from the type.
|
|
424
|
+
- **A deliberate exception** takes a comment with a reason on the line before:
|
|
425
|
+
`// plumb-check: the backfill reads unstamped records to stamp them`.
|
|
426
|
+
- **The baseline** is a committed count per file, method and type. `check`
|
|
427
|
+
fails only when a count grows or a new one appears, so new raw access is
|
|
428
|
+
refused at once while the backlog shrinks. `--update-baseline` records
|
|
429
|
+
fixes; it refuses growth unless `--allow-growth` is given.
|
|
430
|
+
- **Paths** in the output, the baseline and `ignore` are relative to the
|
|
431
|
+
deepest folder holding the config and every tsconfig, so a monorepo's config
|
|
432
|
+
in one package checks code in another.
|
|
433
|
+
- **TypeScript:** `check` compiles with your project's own `typescript`, which
|
|
434
|
+
needs its compiler API: TypeScript 5 or 6. TypeScript 7's native package has
|
|
435
|
+
none yet, and `check` exits 2 on it.
|
|
436
|
+
|
|
437
|
+
Exit codes: 0 when nothing is new, 1 when something is (or the baseline would
|
|
438
|
+
grow), 2 for usage, config and set-up errors.
|
|
439
|
+
|
|
382
440
|
## Check stored data, then load profiles
|
|
383
441
|
|
|
384
442
|
Medplum validates a resource when it is written, and never again. Tightening a
|
|
@@ -408,6 +466,10 @@ export default defineConfig({
|
|
|
408
466
|
});
|
|
409
467
|
```
|
|
410
468
|
|
|
469
|
+
Set the variables in the shell, or keep them in a gitignored dotenv file and
|
|
470
|
+
pass it with `--env-file .env` (repeatable; later files win, and a variable
|
|
471
|
+
already set wins over every file).
|
|
472
|
+
|
|
411
473
|
**2. Give Plumb a client.** Create a ClientApplication in the project for CI,
|
|
412
474
|
and make its project membership an admin: `push` creates Plumb's checker bot
|
|
413
475
|
through Medplum's admin endpoint, reads bot memberships, and writes Bot,
|
|
@@ -430,8 +492,8 @@ plumb validate --env prod
|
|
|
430
492
|
✔ checker plumb-checker 0.6.0 installed 60ms
|
|
431
493
|
✔ profiles 1 selected, none shadowed 80ms
|
|
432
494
|
✖ validate 1 of 1 profiles would fail 38.4s
|
|
433
|
-
Patient: 12400 of 12400 read, 300 of
|
|
434
|
-
us-core-patient
|
|
495
|
+
Patient: 12400 of 12400 read, 300 of 12357 stamped fail; 40 unstamped; 3 stamped only with profiles not selected (--full breaks them down)
|
|
496
|
+
us-core-patient 12357 checked, 300 failures
|
|
435
497
|
Patient.identifier: Missing required property (300)
|
|
436
498
|
Failing ids: .plumb/validate-prod.json (gitignored)
|
|
437
499
|
Failed in 40.8s
|
|
@@ -445,14 +507,30 @@ Failed in 40.8s
|
|
|
445
507
|
- **Against the versions in `plumb.config.ts`,** not what the project has
|
|
446
508
|
loaded: it answers "what would fail if we loaded these?"
|
|
447
509
|
- **Each resource is checked against the selected profiles it is stamped
|
|
448
|
-
with** (`meta.profile`).
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
510
|
+
with** (`meta.profile`). The bot reads only resources carrying a selected
|
|
511
|
+
stamp, so one narrow profile on a large type reads only what carries it.
|
|
512
|
+
The rest are counted by query: resources with no stamp, and those stamped
|
|
513
|
+
only with other profiles.
|
|
514
|
+
- **`--full` reads every resource** of each type to break those other stamps
|
|
515
|
+
down: silent stamps, which today validate against nothing (a profile URL
|
|
516
|
+
the project does not hold, or a `url|version` stamp, since Medplum matches
|
|
517
|
+
bare URLs only), and stamps of profiles the project holds but the config
|
|
518
|
+
does not select. Run it when the report counts any.
|
|
519
|
+
- **`--unstamped` forecasts what stamping would break.** Before moving
|
|
520
|
+
writes to `createProfiled` or backfilling stamps, `plumb validate --env prod
|
|
521
|
+
--unstamped` also reads each unstamped resource, routes it as the generated
|
|
522
|
+
`route` does, and checks it against what `createProfiled` would stamp. The
|
|
523
|
+
report adds `if stamped: 40 of 2,295 routed would fail; 12 route to no
|
|
524
|
+
profile` under each type, with the reasons. It is a forecast: the exit
|
|
525
|
+
code still reflects stamped data only. Defaults the config does not select
|
|
526
|
+
have no definition to check against, so only selected profiles are checked.
|
|
452
527
|
- **Empty is never ambiguous.** Each type reports how many resources the bot
|
|
453
528
|
read against how many exist, so "all passed", "none carries a selected
|
|
454
529
|
profile", "none stored" and "0 of N readable" (an AccessPolicy that hides
|
|
455
530
|
them) read differently.
|
|
531
|
+
- **A type counts records; a profile counts checks.** A record stamped with a
|
|
532
|
+
profile and its parent is checked against each, so it appears once on the
|
|
533
|
+
type's line (`all 331 stamped passed`) and once under each profile.
|
|
456
534
|
- **Shadowed profiles** fail the check: more than one StructureDefinition for
|
|
457
535
|
a selected URL, of which Medplum enforces the one whose version sorts last
|
|
458
536
|
as text, so `1.9.0` beats `1.10.0`.
|
|
@@ -460,7 +538,8 @@ Failed in 40.8s
|
|
|
460
538
|
CI logs or `--json`. The `.plumb` folder ignores itself in git.
|
|
461
539
|
- **Large projects:** the bot checks one page per run, as an async job, and
|
|
462
540
|
the file saves each page; `--resume` continues an interrupted run from its
|
|
463
|
-
last page.
|
|
541
|
+
last page. A type of more than one page prints its progress
|
|
542
|
+
(`Observation: 4,300 of 45,213 read`).
|
|
464
543
|
- **Exit codes:** 0 when nothing fails; 1 when something would fail, a type
|
|
465
544
|
could not be read, or a profile is shadowed; 2 for usage, config and
|
|
466
545
|
connection errors, and when the checker is missing or from another Plumb
|
package/dist/checker.cjs
CHANGED
|
@@ -1659,12 +1659,37 @@ var pd = vt();
|
|
|
1659
1659
|
var ri = `${Mt}/fhir/StructureDefinition/patient-preferredPharmacy`;
|
|
1660
1660
|
var Kd = { wk: 1440 * 7, d: 1440, h: 60, min: 1 };
|
|
1661
1661
|
|
|
1662
|
+
// src/emit/routes.ts
|
|
1663
|
+
function routeTo(rows, resource) {
|
|
1664
|
+
const fields = resource;
|
|
1665
|
+
const matched = rows.filter(
|
|
1666
|
+
(row) => row.keys.every(([element, patterns]) => patterns.some((p2) => holds(fields[element], p2)))
|
|
1667
|
+
);
|
|
1668
|
+
const best = matched.filter((row) => !matched.some((o) => o.parents.includes(row.profile)));
|
|
1669
|
+
if (best.length === 1 && best[0]) return { profile: best[0].profile };
|
|
1670
|
+
return { refused: best.length === 0 ? "none" : "ambiguous" };
|
|
1671
|
+
}
|
|
1672
|
+
function holds(value, pattern) {
|
|
1673
|
+
if (Array.isArray(value) && !Array.isArray(pattern)) return value.some((v2) => holds(v2, pattern));
|
|
1674
|
+
if (Array.isArray(pattern)) {
|
|
1675
|
+
return Array.isArray(value) && pattern.every((p2) => value.some((v2) => holds(v2, p2)));
|
|
1676
|
+
}
|
|
1677
|
+
if (pattern !== null && typeof pattern === "object") {
|
|
1678
|
+
if (value === null || typeof value !== "object") return false;
|
|
1679
|
+
const record = value;
|
|
1680
|
+
return Object.entries(pattern).every(([key, p2]) => holds(record[key], p2));
|
|
1681
|
+
}
|
|
1682
|
+
return value === pattern;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1662
1685
|
// src/checker/handler.ts
|
|
1663
1686
|
var PAGE_SIZE = "100";
|
|
1664
1687
|
async function handler(medplum, event) {
|
|
1665
|
-
const { resourceType, profiles, definitions, cursor } = event.input;
|
|
1688
|
+
const { resourceType, profiles, definitions, cursor, full, forecast } = event.input;
|
|
1666
1689
|
const selected = load(definitions, profiles);
|
|
1690
|
+
const stamped = full ? {} : { _profile: profiles.join(",") };
|
|
1667
1691
|
const bundle = await medplum.search(resourceType, {
|
|
1692
|
+
...forecast ? { "_profile:missing": "true" } : stamped,
|
|
1668
1693
|
_count: PAGE_SIZE,
|
|
1669
1694
|
_sort: "_lastUpdated",
|
|
1670
1695
|
...cursor ? { _cursor: cursor } : {}
|
|
@@ -1672,9 +1697,35 @@ async function handler(medplum, event) {
|
|
|
1672
1697
|
const next = bundle.link?.find((l) => l.relation === "next")?.url;
|
|
1673
1698
|
const resources = (bundle.entry ?? []).flatMap((e) => e.resource ? [e.resource] : []);
|
|
1674
1699
|
await loadNestedTypes(medplum, resources);
|
|
1675
|
-
const page = checkPage(resources, selected);
|
|
1676
1700
|
const nextCursor = next ? new URL(next).searchParams.get("_cursor") : null;
|
|
1677
|
-
|
|
1701
|
+
const after = nextCursor ? { next: nextCursor } : {};
|
|
1702
|
+
if (forecast) return { ...forecastPage(resources, selected, forecast), ...after };
|
|
1703
|
+
const page = checkPage(resources, selected);
|
|
1704
|
+
const totals = full || cursor ? void 0 : await count(medplum, resourceType, stamped);
|
|
1705
|
+
return { ...page, ...totals ? { totals } : {}, ...after };
|
|
1706
|
+
}
|
|
1707
|
+
function forecastPage(resources, selected, forecast) {
|
|
1708
|
+
const unrouted = { none: 0, ambiguous: 0 };
|
|
1709
|
+
const routed = [];
|
|
1710
|
+
for (const resource of resources) {
|
|
1711
|
+
const route = routeTo(forecast.routes, resource);
|
|
1712
|
+
if ("refused" in route) unrouted[route.refused]++;
|
|
1713
|
+
else {
|
|
1714
|
+
const profile = (forecast.stamps[route.profile] ?? []).filter((url) => selected.has(url));
|
|
1715
|
+
routed.push({ ...resource, meta: { ...resource.meta, profile } });
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
const page = checkPage(routed, selected);
|
|
1719
|
+
return { ...page, read: resources.length, unrouted };
|
|
1720
|
+
}
|
|
1721
|
+
async function count(medplum, resourceType, stamped) {
|
|
1722
|
+
const total = async (params) => (await medplum.search(resourceType, { ...params, _summary: "count" })).total ?? 0;
|
|
1723
|
+
const [readable, unstamped, selected] = await Promise.all([
|
|
1724
|
+
total({}),
|
|
1725
|
+
total({ "_profile:missing": "true" }),
|
|
1726
|
+
total(stamped)
|
|
1727
|
+
]);
|
|
1728
|
+
return { readable, unstamped, stamped: selected };
|
|
1678
1729
|
}
|
|
1679
1730
|
function load(definitions, urls) {
|
|
1680
1731
|
const { base, profiles } = JSON.parse(
|
|
@@ -1707,6 +1758,8 @@ function checkPage(resources, selected) {
|
|
|
1707
1758
|
const result = {
|
|
1708
1759
|
core: Dn,
|
|
1709
1760
|
read: resources.length,
|
|
1761
|
+
stamped: 0,
|
|
1762
|
+
failing: 0,
|
|
1710
1763
|
unstamped: 0,
|
|
1711
1764
|
silent: { versioned: 0, empty: 0 },
|
|
1712
1765
|
otherStamps: {},
|
|
@@ -1720,14 +1773,17 @@ function checkPage(resources, selected) {
|
|
|
1720
1773
|
else {
|
|
1721
1774
|
const tally = tallies.get(url) ?? new Tally();
|
|
1722
1775
|
tallies.set(url, tally);
|
|
1723
|
-
tally.add(resource, profile);
|
|
1776
|
+
return { checked: true, passed: tally.add(resource, profile) };
|
|
1724
1777
|
}
|
|
1778
|
+
return { checked: false, passed: true };
|
|
1725
1779
|
};
|
|
1726
1780
|
for (const resource of resources) {
|
|
1727
1781
|
const stamps = resource.meta?.profile;
|
|
1728
1782
|
if (stamps === void 0) result.unstamped++;
|
|
1729
1783
|
else if (stamps.length === 0) result.silent.empty++;
|
|
1730
|
-
|
|
1784
|
+
const checks = (stamps ?? []).map((url) => stamp(url, resource));
|
|
1785
|
+
if (checks.some((c2) => c2.checked)) result.stamped++;
|
|
1786
|
+
if (checks.some((c2) => !c2.passed)) result.failing++;
|
|
1731
1787
|
}
|
|
1732
1788
|
for (const [url, tally] of tallies) result.profiles[url] = tally.result();
|
|
1733
1789
|
return result;
|
|
@@ -1736,6 +1792,7 @@ var Tally = class {
|
|
|
1736
1792
|
checked = 0;
|
|
1737
1793
|
failing = [];
|
|
1738
1794
|
reasons = /* @__PURE__ */ new Map();
|
|
1795
|
+
/** Checks the resource, returning whether it passed. */
|
|
1739
1796
|
add(resource, profile) {
|
|
1740
1797
|
this.checked++;
|
|
1741
1798
|
const failures = errors(resource, profile);
|
|
@@ -1750,6 +1807,7 @@ ${message}`;
|
|
|
1750
1807
|
reason.count++;
|
|
1751
1808
|
this.reasons.set(key, reason);
|
|
1752
1809
|
}
|
|
1810
|
+
return failures.length === 0;
|
|
1753
1811
|
}
|
|
1754
1812
|
result() {
|
|
1755
1813
|
const reasons = [...this.reasons.values()].sort((a, b) => b.count - a.count);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type * as TS from 'typescript5';
|
|
2
|
+
import type { PlumbConfig } from './config.js';
|
|
3
|
+
import { type Route } from './emit/routes.js';
|
|
4
|
+
/** A `MedplumClient` read or write of a profiled type that goes around Plumb. */
|
|
5
|
+
export interface Finding {
|
|
6
|
+
/** Relative to the config's folder, with forward slashes. */
|
|
7
|
+
file: string;
|
|
8
|
+
line: number;
|
|
9
|
+
column: number;
|
|
10
|
+
method: string;
|
|
11
|
+
/** The profiled resource types the call can touch, sorted. */
|
|
12
|
+
resourceTypes: string[];
|
|
13
|
+
/** What to call instead, or why the finding stands. */
|
|
14
|
+
instead: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FindOptions {
|
|
17
|
+
/** The project's TypeScript module, with its compiler API. */
|
|
18
|
+
ts: typeof TS;
|
|
19
|
+
/** The folder findings are relative to, and `ignore` is matched from. */
|
|
20
|
+
base: string;
|
|
21
|
+
tsconfig: string[];
|
|
22
|
+
/** Resource types a selected profile constrains. */
|
|
23
|
+
profiledTypes: ReadonlySet<string>;
|
|
24
|
+
/** The generated folder, never checked. */
|
|
25
|
+
out: string;
|
|
26
|
+
ignore?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Compiles each project and reports every raw `MedplumClient` read or write of
|
|
30
|
+
* a profiled type, with the type the checker infers, not the text written.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findRawAccess(options: FindOptions): {
|
|
33
|
+
findings: Finding[];
|
|
34
|
+
files: number;
|
|
35
|
+
};
|
|
36
|
+
/** Accepted findings, counted per file, method and resource types. */
|
|
37
|
+
export type Baseline = Record<string, number>;
|
|
38
|
+
export declare function countFindings(findings: Finding[]): Baseline;
|
|
39
|
+
export interface BaselineComparison {
|
|
40
|
+
/** Findings under a key that is new or grew: every one of them, since a line cannot be told apart. */
|
|
41
|
+
fresh: Finding[];
|
|
42
|
+
/** How many findings the baseline accepts that are now gone. */
|
|
43
|
+
fixed: number;
|
|
44
|
+
/** Findings the baseline accepts. */
|
|
45
|
+
accepted: number;
|
|
46
|
+
}
|
|
47
|
+
/** A finding fails only where its key's count exceeds the baseline's. */
|
|
48
|
+
export declare function compareBaseline(findings: Finding[], baseline: Baseline): BaselineComparison;
|
|
49
|
+
export interface CheckResult {
|
|
50
|
+
ok: boolean;
|
|
51
|
+
findings: Finding[];
|
|
52
|
+
comparison: BaselineComparison;
|
|
53
|
+
files: number;
|
|
54
|
+
/** Set when `updateBaseline` wrote the file. */
|
|
55
|
+
baselineWritten?: boolean;
|
|
56
|
+
errors: {
|
|
57
|
+
code: 'no-check-config' | 'no-compiler-api' | 'no-lock' | 'baseline-growth';
|
|
58
|
+
message: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
export interface CheckOptions {
|
|
62
|
+
config: PlumbConfig;
|
|
63
|
+
configPath: string;
|
|
64
|
+
/** The project's TypeScript; resolved from the config's folder by default. */
|
|
65
|
+
ts?: typeof TS;
|
|
66
|
+
cacheDir?: string;
|
|
67
|
+
updateBaseline?: boolean;
|
|
68
|
+
allowGrowth?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* `plumb check`: loads the selected profiles for the types they constrain,
|
|
72
|
+
* compiles the configured projects, and compares what it finds with the
|
|
73
|
+
* baseline, or rewrites the baseline.
|
|
74
|
+
*/
|
|
75
|
+
export declare function checkProject(options: CheckOptions): Promise<CheckResult>;
|
|
76
|
+
/**
|
|
77
|
+
* The folder findings and `ignore` globs are relative to: the deepest one
|
|
78
|
+
* holding the config and every tsconfig, so a monorepo's config in one package
|
|
79
|
+
* checks code in another, and baseline keys do not depend on where it runs.
|
|
80
|
+
*/
|
|
81
|
+
export declare function checkRoot(configPath: string, tsconfig: string[]): string;
|
|
82
|
+
/**
|
|
83
|
+
* The types every resource of which a selected profile holds: one with a
|
|
84
|
+
* profile that routes on no keys, or a `defaultProfile`. A profile keyed on
|
|
85
|
+
* content (one code of Observation) holds only some, so raw access to the type
|
|
86
|
+
* is not wrong and is not reported.
|
|
87
|
+
*/
|
|
88
|
+
export declare function enforcedTypes(routes: Record<string, Route[]>, defaultProfile?: Record<string, string[]>): Set<string>;
|
|
89
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sour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
|
import type { ResourceType } from '@medplum/fhirtypes';
|
|
3
|
+
import { type Route } from '../emit/routes.js';
|
|
3
4
|
/** One page's request, from `plumb validate`. */
|
|
4
5
|
export interface CheckerInput {
|
|
5
6
|
resourceType: ResourceType;
|
|
@@ -13,6 +14,28 @@ export interface CheckerInput {
|
|
|
13
14
|
definitions: string;
|
|
14
15
|
/** The server's `_cursor` from the previous page; the first page has none. */
|
|
15
16
|
cursor?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Read every resource of the type, to break down the stamps that name no
|
|
19
|
+
* selected profile. Otherwise only resources with a selected stamp are
|
|
20
|
+
* read, and the rest are counted by query.
|
|
21
|
+
*/
|
|
22
|
+
full?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Read the unstamped resources instead, and check each against what
|
|
25
|
+
* `createProfiled` would stamp it with: its type's routing rows, and each
|
|
26
|
+
* routed profile's stamps.
|
|
27
|
+
*/
|
|
28
|
+
forecast?: {
|
|
29
|
+
routes: Route[];
|
|
30
|
+
stamps: Record<string, string[]>;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** A type's counts by query, under the checker's own AccessPolicy. */
|
|
34
|
+
export interface Totals {
|
|
35
|
+
readable: number;
|
|
36
|
+
unstamped: number;
|
|
37
|
+
/** Resources with a selected stamp: what the run will page through. */
|
|
38
|
+
stamped: number;
|
|
16
39
|
}
|
|
17
40
|
/** Resources failing for one element path and message, indexes removed. */
|
|
18
41
|
export interface Reason {
|
|
@@ -29,6 +52,10 @@ export interface PageResult {
|
|
|
29
52
|
/** The `@medplum/core` version validating, bundled into the bot. */
|
|
30
53
|
core: string;
|
|
31
54
|
read: number;
|
|
55
|
+
/** Resources stamped with at least one selected profile, each counted once. */
|
|
56
|
+
stamped: number;
|
|
57
|
+
/** Of those, the ones failing any of their selected profiles. */
|
|
58
|
+
failing: number;
|
|
32
59
|
/** Resources with no `meta.profile`: routing's job, not validated. */
|
|
33
60
|
unstamped: number;
|
|
34
61
|
/** Stamps that validate against nothing: `url|version`, and `meta.profile: []`. */
|
|
@@ -39,6 +66,13 @@ export interface PageResult {
|
|
|
39
66
|
/** Stamps naming a profile not selected, by URL: the CLI tells loaded from unknown. */
|
|
40
67
|
otherStamps: Record<string, number>;
|
|
41
68
|
profiles: Record<string, ProfileResult>;
|
|
69
|
+
/** On the first page of a run that is not `full`. */
|
|
70
|
+
totals?: Totals;
|
|
71
|
+
/** With `forecast`: the unstamped resources no profile, or several, would route to. */
|
|
72
|
+
unrouted?: {
|
|
73
|
+
none: number;
|
|
74
|
+
ambiguous: number;
|
|
75
|
+
};
|
|
42
76
|
/** The cursor for the next page, absent on the last. */
|
|
43
77
|
next?: string;
|
|
44
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/checker/handler.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,QAAQ,EAKb,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAY,YAAY,EAAuB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/checker/handler.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,QAAQ,EAKb,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAY,YAAY,EAAuB,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,KAAK,KAAK,EAAW,MAAM,mBAAmB,CAAC;AAMxD,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ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AC;CACf;AAED,wBAAsB,OAAO,CAC3B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,GAC5B,OAAO,CAAC,UAAU,CAAC,CAoBrB"}
|
package/dist/cjs/commands.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as TS from 'typescript5';
|
|
1
2
|
import { type Checked } from './conformance.js';
|
|
2
3
|
import { type Step } from './generate.js';
|
|
3
4
|
export interface CliIo {
|
|
@@ -9,12 +10,14 @@ export interface CliIo {
|
|
|
9
10
|
stderr: (text: string) => void;
|
|
10
11
|
cacheDir?: string;
|
|
11
12
|
fetch?: typeof globalThis.fetch;
|
|
13
|
+
/** The TypeScript `check` compiles with; the project's own by default. */
|
|
14
|
+
typescript?: typeof TS;
|
|
12
15
|
}
|
|
13
16
|
/** What a step did, as one line: its name, its counts and its time. */
|
|
14
17
|
export declare function formatStep(step: Step, out: string): string;
|
|
15
18
|
/** Runs a command line, printing its report, and returns the exit code. */
|
|
16
19
|
export declare function run(argv: string[], io: CliIo): Promise<number>;
|
|
17
|
-
type Found = Pick<Checked, 'types' | 'profiles'>;
|
|
20
|
+
type Found = Pick<Checked, 'types' | 'profiles' | 'forecast'>;
|
|
18
21
|
/** The validate report under its step: each type, then each of its profiles and their reasons. */
|
|
19
22
|
export declare function formatValidation(result: Found): string[];
|
|
20
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAGvC,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAGzE,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,6DAA6D;IAC7D,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;CACxB;AAqED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAe1D;AAED,2EAA2E;AAC3E,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBpE;AA+MD,KAAK,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAI9D,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,CAcxD"}
|
package/dist/cjs/config.d.ts
CHANGED
|
@@ -36,6 +36,17 @@ export interface PlumbConfig {
|
|
|
36
36
|
defaultProfile?: Record<string, string[]>;
|
|
37
37
|
/** What `push` writes to each environment's project besides its profiles. */
|
|
38
38
|
project?: ProjectConfig;
|
|
39
|
+
/** What `plumb check` reads. */
|
|
40
|
+
check?: CheckConfig;
|
|
41
|
+
}
|
|
42
|
+
/** What `plumb check` reads: the project's code, for raw access to profiled types. */
|
|
43
|
+
export interface CheckConfig {
|
|
44
|
+
/** The TypeScript projects to check, each compiled once; a path or several. */
|
|
45
|
+
tsconfig: string | string[];
|
|
46
|
+
/** The committed file of accepted findings; without one, every finding fails. */
|
|
47
|
+
baseline?: string;
|
|
48
|
+
/** Globs, relative to the config, of files not to check (tests, stories). */
|
|
49
|
+
ignore?: string[];
|
|
39
50
|
}
|
|
40
51
|
/**
|
|
41
52
|
* A project's configuration, as a project admin can write it. Policies and
|
|
@@ -94,7 +105,7 @@ export interface ResolvedEnvironment {
|
|
|
94
105
|
clientId: string;
|
|
95
106
|
clientSecret: string;
|
|
96
107
|
}
|
|
97
|
-
export type ConfigErrorCode = 'config-not-found' | 'unsupported-syntax' | 'unresolved-import' | 'no-default-export' | 'unknown-key' | 'missing-out' | 'invalid-type' | 'invalid-ig' | 'unlisted-ig' | 'invalid-profile' | 'invalid-max-codes' | 'invalid-base-url' | 'unknown-environment' | 'missing-variable' | 'invalid-route' | 'unselected-route' | 'invalid-route-element' | 'invalid-default-profile' | 'versioned-url' | 'fsh-and-local' | 'no-sushi-config' | 'invalid-setting' | 'super-admin-field' | 'unknown-access-policy' | 'duplicate-key';
|
|
108
|
+
export type ConfigErrorCode = 'config-not-found' | 'unsupported-syntax' | 'unresolved-import' | 'no-default-export' | 'unknown-key' | 'missing-out' | 'invalid-type' | 'invalid-ig' | 'unlisted-ig' | 'invalid-profile' | 'invalid-max-codes' | 'invalid-base-url' | 'unknown-environment' | 'missing-variable' | 'invalid-route' | 'unselected-route' | 'invalid-route-element' | 'invalid-default-profile' | 'versioned-url' | 'fsh-and-local' | 'no-sushi-config' | 'invalid-setting' | 'super-admin-field' | 'unknown-access-policy' | 'duplicate-key' | 'invalid-check';
|
|
98
109
|
export interface ConfigError {
|
|
99
110
|
code: ConfigErrorCode;
|
|
100
111
|
message: string;
|
|
@@ -115,7 +126,8 @@ export declare function defineConfig(config: PlumbConfig): PlumbConfig;
|
|
|
115
126
|
declare const PROFILE_TYPES: readonly ['Patient', 'Practitioner', 'RelatedPerson', 'Admin'];
|
|
116
127
|
/**
|
|
117
128
|
* Loads `plumb.config.ts` from `cwd`, or `configPath` relative to it, with
|
|
118
|
-
* Node's
|
|
129
|
+
* Node's type stripping, or the project's own tsx for what Node cannot load.
|
|
130
|
+
* `local`, `fsh` and `out` come back as absolute
|
|
119
131
|
* paths, resolved against the config file's folder; with `fsh`, `local` is its
|
|
120
132
|
* SUSHI output.
|
|
121
133
|
*/
|
package/dist/cjs/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,YAAY,EAEZ,MAAM,EACN,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,GAAG,EAAE,MAAM,EAAE,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE;QACT,0FAA0F;QAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,KAAK,CAAC,CAAC;IAC1C;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,gCAAgC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,+EA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