@openfn/language-resourcemap 0.2.3 → 0.3.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/dist/index.cjs CHANGED
@@ -86,10 +86,7 @@ function submitSite(collection_id, submissionData) {
86
86
  "Submitting site to collection " + collection_id + ":\n" + JSON.stringify(body, null, 4) + "\n"
87
87
  );
88
88
  const { username, password, baseUrl } = state.configuration;
89
- const url = resolveUrl(
90
- baseUrl + "/",
91
- "api/collections/" + collection_id + "/sites.json"
92
- );
89
+ const url = baseUrl + "/api/collections/" + collection_id + "/sites.json";
93
90
  return new Promise((resolve, reject) => {
94
91
  import_request.default.post(
95
92
  {
@@ -104,8 +101,8 @@ function submitSite(collection_id, submissionData) {
104
101
  "content-disposition": 'form-data; name=\\"site\\"'
105
102
  }
106
103
  },
107
- function(error, response, body2) {
108
- error = assembleError({ error, response });
104
+ function(err, response, body2) {
105
+ const error = assembleError({ error: err, response });
109
106
  if (error) {
110
107
  reject(error);
111
108
  } else {
package/dist/index.js CHANGED
@@ -63,10 +63,7 @@ function submitSite(collection_id, submissionData) {
63
63
  "Submitting site to collection " + collection_id + ":\n" + JSON.stringify(body, null, 4) + "\n"
64
64
  );
65
65
  const { username, password, baseUrl } = state.configuration;
66
- const url = resolveUrl(
67
- baseUrl + "/",
68
- "api/collections/" + collection_id + "/sites.json"
69
- );
66
+ const url = baseUrl + "/api/collections/" + collection_id + "/sites.json";
70
67
  return new Promise((resolve, reject) => {
71
68
  request.post(
72
69
  {
@@ -81,8 +78,8 @@ function submitSite(collection_id, submissionData) {
81
78
  "content-disposition": 'form-data; name=\\"site\\"'
82
79
  }
83
80
  },
84
- function(error, response, body2) {
85
- error = assembleError({ error, response });
81
+ function(err, response, body2) {
82
+ const error = assembleError({ error: err, response });
86
83
  if (error) {
87
84
  reject(error);
88
85
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-resourcemap",
3
- "version": "0.2.3",
3
+ "version": "0.3.2",
4
4
  "description": "Resourcemap Language Pack for OpenFn",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",
@@ -12,7 +12,7 @@
12
12
  "configuration-schema.json"
13
13
  ],
14
14
  "dependencies": {
15
- "@openfn/language-common": "^1.7.6",
15
+ "@openfn/language-common": "^1.12.0",
16
16
  "request": "^2.88.2"
17
17
  },
18
18
  "devDependencies": {
@@ -44,6 +44,7 @@
44
44
  "test": "mocha --experimental-specifier-resolution=node --no-warnings",
45
45
  "test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings",
46
46
  "clean": "rimraf dist types docs",
47
- "pack": "pnpm pack --pack-destination ../../dist"
47
+ "pack": "pnpm pack --pack-destination ../../dist",
48
+ "lint": "eslint src"
48
49
  }
49
50
  }