@openfn/language-dhis2 3.2.1 → 3.2.3

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
@@ -1,4 +1,4 @@
1
- # Language DHIS2 [<img src="https://avatars2.githubusercontent.com/u/9555108?s=200&v=4)" alt="alt text" height="20">](https://www.openfn.org) [![CircleCI](https://circleci.com/gh/OpenFn/language-dhis2.svg?style=svg)](https://circleci.com/gh/OpenFn/language-dhis2)
1
+ # Language DHIS2 [<img src="https://avatars2.githubusercontent.com/u/9555108?s=200&v=4)" alt="alt text" height="20"/>](https://www.openfn.org)
2
2
 
3
3
  An OpenFn language Pack for building expressions and operations for working with
4
4
  the
@@ -16,12 +16,12 @@ core execute \
16
16
 
17
17
  ## Documentation
18
18
 
19
- View the [docs site](https://openfn.github.io/language-dhis2/) for full
20
- technical documentation.
19
+ View the [docs site](https://docs.openfn.org/adaptors/packages/dhis2-docs) for
20
+ full technical documentation.
21
21
 
22
22
  There are lots of **examples** for how to use the various helper functions on
23
23
  the main
24
- [Adaptor docs](https://openfn.github.io/language-dhis2/module-Adaptor.html)
24
+ [Adaptor docs](https://docs.openfn.org/adaptors/packages/dhis2-docs#modules)
25
25
  page.
26
26
 
27
27
  ## Sample State
@@ -91,7 +91,7 @@ modifying the orgUnit, program, etc., IDs set in `globalState`.
91
91
  trackedEntityInstance need to be enrolled to the program, which should be
92
92
  created in that organisation unit and contains at least that programStage. If
93
93
  the tests fail, you must adjust these attributes in the
94
- [before hook](test/integration.js):
94
+ [before hook](https://github.com/OpenFn/adaptors/tree/main/packages/dhis2/test/integration.js):
95
95
 
96
96
  ```javascript
97
97
  before(done => {
package/ast.json CHANGED
@@ -947,6 +947,14 @@
947
947
  "name": "Function"
948
948
  },
949
949
  "name": "func"
950
+ },
951
+ {
952
+ "title": "returns",
953
+ "description": null,
954
+ "type": {
955
+ "type": "NameExpression",
956
+ "name": "Operation"
957
+ }
950
958
  }
951
959
  ]
952
960
  },
@@ -982,6 +990,14 @@
982
990
  "name": "String"
983
991
  },
984
992
  "name": "path"
993
+ },
994
+ {
995
+ "title": "returns",
996
+ "description": null,
997
+ "type": {
998
+ "type": "NameExpression",
999
+ "name": "Operation"
1000
+ }
985
1001
  }
986
1002
  ]
987
1003
  },
@@ -1060,6 +1076,14 @@
1060
1076
  "name": "String"
1061
1077
  },
1062
1078
  "name": "path"
1079
+ },
1080
+ {
1081
+ "title": "returns",
1082
+ "description": null,
1083
+ "type": {
1084
+ "type": "NameExpression",
1085
+ "name": "Operation"
1086
+ }
1063
1087
  }
1064
1088
  ]
1065
1089
  },
@@ -1095,6 +1119,14 @@
1095
1119
  "name": "String"
1096
1120
  },
1097
1121
  "name": "path"
1122
+ },
1123
+ {
1124
+ "title": "returns",
1125
+ "description": null,
1126
+ "type": {
1127
+ "type": "NameExpression",
1128
+ "name": "Operation"
1129
+ }
1098
1130
  }
1099
1131
  ]
1100
1132
  },
@@ -1140,6 +1172,14 @@
1140
1172
  "name": "Operation"
1141
1173
  },
1142
1174
  "name": "operation"
1175
+ },
1176
+ {
1177
+ "title": "returns",
1178
+ "description": null,
1179
+ "type": {
1180
+ "type": "NameExpression",
1181
+ "name": "Operation"
1182
+ }
1143
1183
  }
1144
1184
  ]
1145
1185
  },
@@ -1185,6 +1225,14 @@
1185
1225
  "name": "Value"
1186
1226
  },
1187
1227
  "name": "value"
1228
+ },
1229
+ {
1230
+ "title": "returns",
1231
+ "description": null,
1232
+ "type": {
1233
+ "type": "NameExpression",
1234
+ "name": "Field"
1235
+ }
1188
1236
  }
1189
1237
  ]
1190
1238
  },
package/dist/index.cjs CHANGED
@@ -25,8 +25,30 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
25
25
  // src/index.js
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
- Adaptor: () => Adaptor_exports,
29
- default: () => src_default
28
+ alterState: () => import_language_common3.alterState,
29
+ attr: () => attr,
30
+ create: () => create,
31
+ dataPath: () => import_language_common3.dataPath,
32
+ dataValue: () => import_language_common3.dataValue,
33
+ dateFns: () => import_language_common3.dateFns,
34
+ default: () => src_default,
35
+ destroy: () => destroy,
36
+ discover: () => discover,
37
+ dv: () => dv,
38
+ each: () => import_language_common3.each,
39
+ execute: () => execute,
40
+ field: () => import_language_common3.field,
41
+ fields: () => import_language_common3.fields,
42
+ findAttributeValue: () => findAttributeValue,
43
+ fn: () => import_language_common3.fn,
44
+ get: () => get,
45
+ http: () => import_language_common3.http,
46
+ lastReferenceValue: () => import_language_common3.lastReferenceValue,
47
+ merge: () => import_language_common3.merge,
48
+ patch: () => patch,
49
+ sourceValue: () => import_language_common3.sourceValue,
50
+ update: () => update,
51
+ upsert: () => upsert
30
52
  });
31
53
  module.exports = __toCommonJS(src_exports);
32
54
 
@@ -428,5 +450,27 @@ function dv(dataElement, value) {
428
450
  var src_default = Adaptor_exports;
429
451
  // Annotate the CommonJS export names for ESM import in node:
430
452
  0 && (module.exports = {
431
- Adaptor
453
+ alterState,
454
+ attr,
455
+ create,
456
+ dataPath,
457
+ dataValue,
458
+ dateFns,
459
+ destroy,
460
+ discover,
461
+ dv,
462
+ each,
463
+ execute,
464
+ field,
465
+ fields,
466
+ findAttributeValue,
467
+ fn,
468
+ get,
469
+ http,
470
+ lastReferenceValue,
471
+ merge,
472
+ patch,
473
+ sourceValue,
474
+ update,
475
+ upsert
432
476
  });
package/dist/index.js CHANGED
@@ -417,6 +417,28 @@ function dv(dataElement, value) {
417
417
  // src/index.js
418
418
  var src_default = Adaptor_exports;
419
419
  export {
420
- Adaptor_exports as Adaptor,
421
- src_default as default
420
+ alterState,
421
+ attr,
422
+ create,
423
+ dataPath,
424
+ dataValue,
425
+ dateFns,
426
+ src_default as default,
427
+ destroy,
428
+ discover,
429
+ dv,
430
+ each,
431
+ execute,
432
+ field,
433
+ fields,
434
+ findAttributeValue,
435
+ fn,
436
+ get,
437
+ http,
438
+ lastReferenceValue,
439
+ merge,
440
+ patch,
441
+ sourceValue,
442
+ update,
443
+ upsert
422
444
  };
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@openfn/language-dhis2",
3
- "version": "3.2.1",
3
+ "version": "3.2.3",
4
4
  "description": "DHIS2 Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/openfn/adaptors.git"
9
9
  },
10
- "main": "dist/index.cjs",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
11
17
  "types": "types/index.d.ts",
12
18
  "author": "Open Function Group",
13
19
  "license": "LGPLv3",
@@ -18,25 +24,26 @@
18
24
  "configuration-schema.json"
19
25
  ],
20
26
  "dependencies": {
21
- "@openfn/buildtools": "^1.0.1",
22
- "@openfn/language-common": "1.6.2",
27
+ "@openfn/buildtools": "^1.0.2",
28
+ "@openfn/language-common": "^1.7.5",
23
29
  "axios": "^0.24.0",
24
30
  "lodash": "^4.17.19",
25
31
  "qs": "^6.10.3"
26
32
  },
27
33
  "devDependencies": {
34
+ "@openfn/buildtools": "^1.0.2",
28
35
  "@openfn/simple-ast": "0.4.1",
29
- "assertion-error": "1.1.0",
30
- "chai": "3.5.0",
36
+ "assertion-error": "2.0.0",
37
+ "chai": "4.3.6",
31
38
  "chai-http": "4.3.0",
32
- "deep-eql": "0.1.3",
33
- "esno": "0.16.3",
39
+ "deep-eql": "4.1.1",
40
+ "esno": "^0.16.3",
34
41
  "mocha": "7.2.0",
35
42
  "nock": "13.2.9",
36
- "rimraf": "3.0.2",
37
- "sinon": "1.17.7"
43
+ "rimraf": "3.0.2"
38
44
  },
39
45
  "type": "module",
46
+ "main": "dist/index.cjs",
40
47
  "scripts": {
41
48
  "build": "pnpm clean && build-adaptor dhis2",
42
49
  "clean": "rimraf dist types docs",