Skip to content

Commit 9e33711

Browse files
committed
Update README: ESM imports, Node 24, new features
1 parent 269d082 commit 9e33711

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ Generic toolkit for server and web applications — [Health Data Safe](https://g
99

1010
## Features
1111

12-
1. **Settings** — Configure service endpoints and localization
13-
2. **Pryv extensions** — Extends [Pryv JS lib](https://github.com/pryv/lib-js) with Socket.io and Monitor support
14-
3. **HDS Data Model** — Load and query the [HDS data model](https://github.com/healthdatasafe/data-model-draft): items, streams, authorizations, event types, datasources
15-
4. **App Templates** — Consent-based data collection and sharing (Manager, Collector, Invite, Client flows)
16-
5. **Toolkit** — Stream auto-creation, reminders, duration parsing
12+
1. **HDS Data Model** — Load and query the [HDS data model](https://github.com/healthdatasafe/data-model-draft): items, streams, authorizations, event types, datasources
13+
2. **App Templates** — Consent-based data collection and sharing (Manager, Collector, Invite, Client flows)
14+
3. **HDSSettings** — Per-app user settings (locale, theme, timezone, date format, unit system)
15+
4. **HDSProfile** — Account-level profile (display name, avatar, date of birth, sex, country)
16+
5. **Pryv extensions** — Extends [Pryv JS lib](https://github.com/pryv/lib-js) with Socket.io and Monitor support
17+
6. **Toolkit** — Stream auto-creation, reminders, duration parsing, event formatting
1718

1819
## Quick start
1920

2021
```javascript
21-
const HDSLib = require('hds-lib');
22+
import HDSLib from 'hds-lib';
2223

2324
HDSLib.settings.setServiceInfoURL('https://demo.datasafe.dev/reg/service/info');
2425
await HDSLib.initHDSModel();
@@ -29,12 +30,15 @@ const weight = model.itemsDefs.forKey('body-weight');
2930

3031
## Dev
3132

32-
Source code is in TypeScript in `./ts`.
33+
Requires **Node.js >= 24**. Source code is TypeScript in `./ts/` — tests run directly from source (Node 24 type stripping).
3334

3435
```bash
35-
npm run build # TypeScript + webpack bundle
36-
npm run test # Node tests
36+
npm test # Run tests (from ts/ source, no build needed)
37+
npm run build # Webpack bundle (dist/)
38+
npm run lint # ESLint
3739
npm run test:coverage # Coverage report
3840
```
3941

42+
`tsc` is only used by the `prepare` script for npm/git-dep consumers.
43+
4044
Browser test suite: build then run `npx backloop.dev ./dist` and open `https://l.backloop.dev:4443/tests.html`

0 commit comments

Comments
 (0)