@myvitalrx/metadata-runtime 0.0.0-stage → 1.0.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/README.md +86 -2
- package/dist/index.d.ts +1766 -0
- package/dist/index.js +4793 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -4
package/README.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @myvitalrx/metadata-runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Metadata projection cache, lookup, and refresh for MyVitalRx Lambdas, API services, and workers.
|
|
4
|
+
|
|
5
|
+
The package reads published projection artifacts (S3 or the in-process cache). It does not call the Metadata Registry API on each resolve.
|
|
6
|
+
|
|
7
|
+
`libs/metadata-projection` stays a separate internal library. This package bundles only the projection helpers the runtime imports. Observability comes from `@myvitalrx/platform-tools/observability`.
|
|
8
|
+
|
|
9
|
+
| Import | Role |
|
|
10
|
+
|--------|------|
|
|
11
|
+
| `@myvitalrx/metadata-runtime` | Runtime metadata service, cache, resolver, and reference helpers |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm add @myvitalrx/metadata-runtime @myvitalrx/platform-tools
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`@myvitalrx/platform-tools` is a peer dependency (logging). `@aws-sdk/client-s3` and `zod` are installed with this package.
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
RuntimeMetadataService,
|
|
26
|
+
isMetadataReference,
|
|
27
|
+
parseMetadataReference,
|
|
28
|
+
} from '@myvitalrx/metadata-runtime';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Monorepo build
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
nx build metadata-runtime
|
|
37
|
+
# or
|
|
38
|
+
pnpm run build:metadata-runtime
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Package / validate
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm run pack:metadata-runtime
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
That builds the library, checks `dist`, and runs `npm pack --dry-run`.
|
|
50
|
+
|
|
51
|
+
Install the packed tarball outside the workspace:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
node packages/metadata-runtime/scripts/validate-consumer.mjs
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Publish to npm
|
|
60
|
+
|
|
61
|
+
Versions are `MAJOR.MINOR.PATCH` in `packages/metadata-runtime/package.json` (same as `@myvitalrx/fhir-wrapper` and `@myvitalrx/platform-tools`). Bump that version before publishing. The publish command exits non-zero when that version is already on the registry.
|
|
62
|
+
|
|
63
|
+
Authentication is `NPM_TOKEN` in the repo-root `.env`. The root `.npmrc` substitutes `${NPM_TOKEN}` and points `@myvitalrx` at `https://registry.npmjs.org/`. Do not commit tokens.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
export NPM_TOKEN=... # repo-root .env — never commit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm run publish:metadata-runtime # from repo root
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
That builds, validates the pack, refuses a duplicate version, then `npm publish`.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## External repository
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pnpm add @myvitalrx/metadata-runtime @myvitalrx/platform-tools
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { parseMetadataReference } from '@myvitalrx/metadata-runtime';
|
|
85
|
+
|
|
86
|
+
const reference = parseMetadataReference('MetricCode:BP');
|
|
87
|
+
```
|