@openfn/language-dhis2 3.0.1 → 3.0.2

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/lib/Adaptor.js CHANGED
@@ -322,7 +322,12 @@ function create(resourceType, data, options = {}, callback = false) {
322
322
  data: (0, _Utils.nestArray)(data, resourceType),
323
323
  ...requestConfig
324
324
  }).then(result => {
325
- _Utils.Log.success(`Created ${resourceType}: ${result.headers.location}`);
325
+ const {
326
+ data
327
+ } = result;
328
+ const details = `with response ${JSON.stringify(data, null, 2)}`;
329
+
330
+ _Utils.Log.success(`Created ${resourceType} ${details}`);
326
331
 
327
332
  return (0, _Utils.handleResponse)(result, state, callback);
328
333
  });
package/lib/Client.js CHANGED
@@ -7,6 +7,8 @@ exports.request = request;
7
7
 
8
8
  var _axios = _interopRequireDefault(require("axios"));
9
9
 
10
+ var _qs = _interopRequireDefault(require("qs"));
11
+
10
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
13
 
12
14
  /**
@@ -42,6 +44,9 @@ function request({
42
44
  username,
43
45
  password
44
46
  },
47
+ paramsSerializer: params => _qs.default.stringify(params, {
48
+ arrayFormat: 'repeat'
49
+ }),
45
50
  // Note that providing headers or auth in the request object will overwrite.
46
51
  ...axiosRequest
47
52
  });
@@ -1,27 +1,33 @@
1
1
  {
2
- "_from": "axios@^0.21.4",
2
+ "_args": [
3
+ [
4
+ "axios@0.21.4",
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
+ ]
7
+ ],
8
+ "_from": "axios@0.21.4",
3
9
  "_id": "axios@0.21.4",
4
10
  "_inBundle": true,
5
11
  "_integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
6
12
  "_location": "/@openfn/language-common/axios",
7
13
  "_phantomChildren": {},
8
14
  "_requested": {
9
- "type": "range",
15
+ "type": "version",
10
16
  "registry": true,
11
- "raw": "axios@^0.21.4",
17
+ "raw": "axios@0.21.4",
12
18
  "name": "axios",
13
19
  "escapedName": "axios",
14
- "rawSpec": "^0.21.4",
20
+ "rawSpec": "0.21.4",
15
21
  "saveSpec": null,
16
- "fetchSpec": "^0.21.4"
22
+ "fetchSpec": "0.21.4"
17
23
  },
18
24
  "_requiredBy": [
19
25
  "/@openfn/language-common"
20
26
  ],
21
- "_resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
27
+ "_resolved": false,
22
28
  "_shasum": "c67b90dc0568e5c1cf2b0b858c43ba28e2eda575",
23
- "_spec": "axios@^0.21.4",
24
- "_where": "/workspaces/language-common",
29
+ "_spec": "0.21.4",
30
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
25
31
  "author": {
26
32
  "name": "Matt Zabriskie"
27
33
  },
@@ -1,27 +1,33 @@
1
1
  {
2
- "_from": "follow-redirects@^1.14.0",
2
+ "_args": [
3
+ [
4
+ "follow-redirects@1.14.3",
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
+ ]
7
+ ],
8
+ "_from": "follow-redirects@1.14.3",
3
9
  "_id": "follow-redirects@1.14.3",
4
10
  "_inBundle": true,
5
11
  "_integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw==",
6
12
  "_location": "/@openfn/language-common/follow-redirects",
7
13
  "_phantomChildren": {},
8
14
  "_requested": {
9
- "type": "range",
15
+ "type": "version",
10
16
  "registry": true,
11
- "raw": "follow-redirects@^1.14.0",
17
+ "raw": "follow-redirects@1.14.3",
12
18
  "name": "follow-redirects",
13
19
  "escapedName": "follow-redirects",
14
- "rawSpec": "^1.14.0",
20
+ "rawSpec": "1.14.3",
15
21
  "saveSpec": null,
16
- "fetchSpec": "^1.14.0"
22
+ "fetchSpec": "1.14.3"
17
23
  },
18
24
  "_requiredBy": [
19
25
  "/@openfn/language-common/axios"
20
26
  ],
21
- "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
27
+ "_resolved": false,
22
28
  "_shasum": "6ada78118d8d24caee595595accdc0ac6abd022e",
23
- "_spec": "follow-redirects@^1.14.0",
24
- "_where": "/workspaces/language-common/node_modules/axios",
29
+ "_spec": "1.14.3",
30
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
25
31
  "author": {
26
32
  "name": "Ruben Verborgh",
27
33
  "email": "ruben@verborgh.org",
@@ -2,13 +2,12 @@
2
2
  "_args": [
3
3
  [
4
4
  "jsonpath-plus@4.0.0",
5
- "/workspaces/devtools/adaptors/language-common"
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
6
  ]
7
7
  ],
8
8
  "_from": "jsonpath-plus@4.0.0",
9
9
  "_id": "jsonpath-plus@4.0.0",
10
10
  "_inBundle": true,
11
- "_integrity": "sha512-e0Jtg4KAzDJKKwzbLaUtinCn0RZseWBVRTRGihSpvFlM3wTR7ExSp+PTdeTsDrLNJUe7L7JYJe8mblHX5SCT6A==",
12
11
  "_location": "/@openfn/language-common/jsonpath-plus",
13
12
  "_phantomChildren": {},
14
13
  "_requested": {
@@ -24,9 +23,9 @@
24
23
  "_requiredBy": [
25
24
  "/@openfn/language-common"
26
25
  ],
27
- "_resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-4.0.0.tgz",
26
+ "_resolved": false,
28
27
  "_spec": "4.0.0",
29
- "_where": "/workspaces/devtools/adaptors/language-common",
28
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
30
29
  "author": {
31
30
  "name": "Stefan Goessner"
32
31
  },
@@ -2,13 +2,12 @@
2
2
  "_args": [
3
3
  [
4
4
  "lodash@4.17.21",
5
- "/workspaces/devtools/adaptors/language-common"
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
6
  ]
7
7
  ],
8
8
  "_from": "lodash@4.17.21",
9
9
  "_id": "lodash@4.17.21",
10
10
  "_inBundle": true,
11
- "_integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
12
11
  "_location": "/@openfn/language-common/lodash",
13
12
  "_phantomChildren": {},
14
13
  "_requested": {
@@ -24,9 +23,9 @@
24
23
  "_requiredBy": [
25
24
  "/@openfn/language-common"
26
25
  ],
27
- "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
26
+ "_resolved": false,
28
27
  "_spec": "4.17.21",
29
- "_where": "/workspaces/devtools/adaptors/language-common",
28
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
30
29
  "author": {
31
30
  "name": "John-David Dalton",
32
31
  "email": "john.david.dalton@gmail.com"
@@ -1,4 +1,10 @@
1
1
  {
2
+ "_args": [
3
+ [
4
+ "@openfn/language-common@1.6.2",
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
+ ]
7
+ ],
2
8
  "_from": "@openfn/language-common@1.6.2",
3
9
  "_id": "@openfn/language-common@1.6.2",
4
10
  "_inBundle": false,
@@ -20,9 +26,8 @@
20
26
  "/"
21
27
  ],
22
28
  "_resolved": "https://registry.npmjs.org/@openfn/language-common/-/language-common-1.6.2.tgz",
23
- "_shasum": "950a6f52a191b33d75abea993c72cc5f9162175b",
24
- "_spec": "@openfn/language-common@1.6.2",
25
- "_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2",
29
+ "_spec": "1.6.2",
30
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
26
31
  "author": {
27
32
  "name": "Open Function Group"
28
33
  },
@@ -40,7 +45,6 @@
40
45
  "jsonpath-plus": "^4.0.0",
41
46
  "lodash": "^4.17.19"
42
47
  },
43
- "deprecated": false,
44
48
  "description": "Common Expressions for OpenFn",
45
49
  "devDependencies": {
46
50
  "@babel/cli": "^7.8.4",
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "axios@0.24.0",
5
- "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2"
6
- ]
7
- ],
8
- "_from": "axios@0.24.0",
2
+ "_from": "axios@^0.24.0",
9
3
  "_id": "axios@0.24.0",
10
4
  "_inBundle": false,
11
5
  "_integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
12
6
  "_location": "/axios",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "axios@0.24.0",
11
+ "raw": "axios@^0.24.0",
18
12
  "name": "axios",
19
13
  "escapedName": "axios",
20
- "rawSpec": "0.24.0",
14
+ "rawSpec": "^0.24.0",
21
15
  "saveSpec": null,
22
- "fetchSpec": "0.24.0"
16
+ "fetchSpec": "^0.24.0"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
28
- "_spec": "0.24.0",
29
- "_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2",
22
+ "_shasum": "804e6fa1e4b9c5288501dd9dff56a7a0940d20d6",
23
+ "_spec": "axios@^0.24.0",
24
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
30
25
  "author": {
31
26
  "name": "Matt Zabriskie"
32
27
  },
@@ -36,6 +31,7 @@
36
31
  "bugs": {
37
32
  "url": "https://github.com/axios/axios/issues"
38
33
  },
34
+ "bundleDependencies": false,
39
35
  "bundlesize": [
40
36
  {
41
37
  "path": "./dist/axios.min.js",
@@ -45,6 +41,7 @@
45
41
  "dependencies": {
46
42
  "follow-redirects": "^1.14.4"
47
43
  },
44
+ "deprecated": false,
48
45
  "description": "Promise based HTTP client for the browser and node.js",
49
46
  "devDependencies": {
50
47
  "abortcontroller-polyfill": "^1.5.0",
@@ -1,31 +1,35 @@
1
1
  {
2
- "_from": "date-fns@^2.25.0",
2
+ "_args": [
3
+ [
4
+ "date-fns@2.28.0",
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
+ ]
7
+ ],
8
+ "_from": "date-fns@2.28.0",
3
9
  "_id": "date-fns@2.28.0",
4
10
  "_inBundle": false,
5
11
  "_integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==",
6
12
  "_location": "/date-fns",
7
13
  "_phantomChildren": {},
8
14
  "_requested": {
9
- "type": "range",
15
+ "type": "version",
10
16
  "registry": true,
11
- "raw": "date-fns@^2.25.0",
17
+ "raw": "date-fns@2.28.0",
12
18
  "name": "date-fns",
13
19
  "escapedName": "date-fns",
14
- "rawSpec": "^2.25.0",
20
+ "rawSpec": "2.28.0",
15
21
  "saveSpec": null,
16
- "fetchSpec": "^2.25.0"
22
+ "fetchSpec": "2.28.0"
17
23
  },
18
24
  "_requiredBy": [
19
25
  "/@openfn/language-common"
20
26
  ],
21
27
  "_resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz",
22
- "_shasum": "9570d656f5fc13143e50c975a3b6bbeb46cd08b2",
23
- "_spec": "date-fns@^2.25.0",
24
- "_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2/node_modules/@openfn/language-common",
28
+ "_spec": "2.28.0",
29
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
25
30
  "bugs": {
26
31
  "url": "https://github.com/date-fns/date-fns/issues"
27
32
  },
28
- "bundleDependencies": false,
29
33
  "contributors": [
30
34
  {
31
35
  "name": "Sasha Koss",
@@ -37,7 +41,6 @@
37
41
  }
38
42
  ],
39
43
  "dependencies": {},
40
- "deprecated": false,
41
44
  "description": "Modern JavaScript date utility library",
42
45
  "devDependencies": {
43
46
  "@babel/cli": "^7.13.10",
@@ -1,32 +1,27 @@
1
1
  {
2
- "_args": [
3
- [
4
- "follow-redirects@1.14.6",
5
- "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2"
6
- ]
7
- ],
8
- "_from": "follow-redirects@1.14.6",
2
+ "_from": "follow-redirects@^1.14.4",
9
3
  "_id": "follow-redirects@1.14.6",
10
4
  "_inBundle": false,
11
5
  "_integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==",
12
6
  "_location": "/follow-redirects",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
15
- "type": "version",
9
+ "type": "range",
16
10
  "registry": true,
17
- "raw": "follow-redirects@1.14.6",
11
+ "raw": "follow-redirects@^1.14.4",
18
12
  "name": "follow-redirects",
19
13
  "escapedName": "follow-redirects",
20
- "rawSpec": "1.14.6",
14
+ "rawSpec": "^1.14.4",
21
15
  "saveSpec": null,
22
- "fetchSpec": "1.14.6"
16
+ "fetchSpec": "^1.14.4"
23
17
  },
24
18
  "_requiredBy": [
25
19
  "/axios"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz",
28
- "_spec": "1.14.6",
29
- "_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2",
22
+ "_shasum": "8cfb281bbc035b3c067d6cd975b0f6ade6e855cd",
23
+ "_spec": "follow-redirects@^1.14.4",
24
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2/node_modules/axios",
30
25
  "author": {
31
26
  "name": "Ruben Verborgh",
32
27
  "email": "ruben@verborgh.org",
@@ -35,6 +30,7 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/follow-redirects/follow-redirects/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "contributors": [
39
35
  {
40
36
  "name": "Olivier Lalonde",
@@ -46,6 +42,7 @@
46
42
  "email": "james@talmage.io"
47
43
  }
48
44
  ],
45
+ "deprecated": false,
49
46
  "description": "HTTP and HTTPS modules that follow redirects.",
50
47
  "devDependencies": {
51
48
  "concat-stream": "^2.0.0",
@@ -2,7 +2,7 @@
2
2
  "_args": [
3
3
  [
4
4
  "lodash@4.17.21",
5
- "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2"
5
+ "/Users/taylor/devtools/adaptors/language-dhis2"
6
6
  ]
7
7
  ],
8
8
  "_from": "lodash@4.17.21",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
36
36
  "_spec": "4.17.21",
37
- "_where": "/Users/mlcisse/Documents/OpenFn/devtools/adaptors/language-dhis2",
37
+ "_where": "/Users/taylor/devtools/adaptors/language-dhis2",
38
38
  "author": {
39
39
  "name": "John-David Dalton",
40
40
  "email": "john.david.dalton@gmail.com"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-dhis2",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "DHIS2 Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -26,7 +26,8 @@
26
26
  "dependencies": {
27
27
  "@openfn/language-common": "1.6.2",
28
28
  "axios": "^0.24.0",
29
- "lodash": "^4.17.19"
29
+ "lodash": "^4.17.19",
30
+ "qs": "^6.10.3"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@babel/cli": "^7.12.10",