@openfn/language-dhis2 5.0.6 → 5.0.7

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 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
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-dhis2",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "DHIS2 Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {