@openfn/language-dhis2 5.0.6 → 5.0.8
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 +7 -0
- package/dist/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -14,6 +14,13 @@ core execute \
|
|
|
14
14
|
-o ./tmp/output.json
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
> **Important Note:**
|
|
18
|
+
> This adaptor uses the old tracker version and is only compatible with DHIS2
|
|
19
|
+
> API versions before 42 (2.42). For later API versions and the new tracker, use
|
|
20
|
+
> adaptor 6.0+. See
|
|
21
|
+
> [DHIS2 documentation](https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/tracker.html)
|
|
22
|
+
> for more information.
|
|
23
|
+
|
|
17
24
|
## Documentation
|
|
18
25
|
|
|
19
26
|
View the [docs site](https://docs.openfn.org/adaptors/packages/dhis2-docs) for
|
package/dist/index.cjs
CHANGED
|
@@ -261,6 +261,12 @@ function execute(...operations) {
|
|
|
261
261
|
data: null
|
|
262
262
|
};
|
|
263
263
|
return (state) => {
|
|
264
|
+
var _a;
|
|
265
|
+
const version = (_a = state.configuration) == null ? void 0 : _a.apiVersion;
|
|
266
|
+
if (+version >= 42)
|
|
267
|
+
console.warn(
|
|
268
|
+
`WARNING: This adaptor is incompatible with DHIS2 API version 42+. See here: https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/tracker.html.`
|
|
269
|
+
);
|
|
264
270
|
return (0, import_language_common2.execute)(
|
|
265
271
|
configMigrationHelper,
|
|
266
272
|
...operations
|
|
@@ -359,7 +365,7 @@ function update(resourceType, path, data, options = {}, callback = false) {
|
|
|
359
365
|
configuration,
|
|
360
366
|
resolvedOptions,
|
|
361
367
|
resolvedResourceType,
|
|
362
|
-
|
|
368
|
+
resolvedPath
|
|
363
369
|
),
|
|
364
370
|
params,
|
|
365
371
|
data: resolvedData,
|
package/dist/index.js
CHANGED
|
@@ -228,6 +228,12 @@ function execute(...operations) {
|
|
|
228
228
|
data: null
|
|
229
229
|
};
|
|
230
230
|
return (state) => {
|
|
231
|
+
var _a;
|
|
232
|
+
const version = (_a = state.configuration) == null ? void 0 : _a.apiVersion;
|
|
233
|
+
if (+version >= 42)
|
|
234
|
+
console.warn(
|
|
235
|
+
`WARNING: This adaptor is incompatible with DHIS2 API version 42+. See here: https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/tracker.html.`
|
|
236
|
+
);
|
|
231
237
|
return commonExecute(
|
|
232
238
|
configMigrationHelper,
|
|
233
239
|
...operations
|
|
@@ -326,7 +332,7 @@ function update(resourceType, path, data, options = {}, callback = false) {
|
|
|
326
332
|
configuration,
|
|
327
333
|
resolvedOptions,
|
|
328
334
|
resolvedResourceType,
|
|
329
|
-
|
|
335
|
+
resolvedPath
|
|
330
336
|
),
|
|
331
337
|
params,
|
|
332
338
|
data: resolvedData,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-dhis2",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"description": "DHIS2 Language Pack for OpenFn",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "pnpm clean && build-adaptor dhis2",
|
|
47
47
|
"clean": "rimraf dist types docs",
|
|
48
|
-
"integration-test": "mocha --experimental-specifier-resolution=node --no-warnings test/integration.cjs",
|
|
49
48
|
"pack": "pnpm pack --pack-destination ../../dist",
|
|
50
|
-
"test
|
|
51
|
-
"test": "mocha --experimental-specifier-resolution=node --no-warnings --exclude test/integration.
|
|
49
|
+
"test": "mocha --experimental-specifier-resolution=node --no-warnings --exclude test/integration.js --recursive --timeout 10000",
|
|
50
|
+
"test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings --exclude test/integration.js --recursive --timeout 10000",
|
|
51
|
+
"test:integration": "mocha --experimental-specifier-resolution=node --no-warnings test/integration.js",
|
|
52
52
|
"lint": "eslint src"
|
|
53
53
|
}
|
|
54
54
|
}
|