@openfn/language-maximo 0.5.17 → 0.5.18

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
@@ -66,6 +66,7 @@ __export(Adaptor_exports, {
66
66
  update75: () => update75
67
67
  });
68
68
  var import_language_common = require("@openfn/language-common");
69
+ var import_util = require("@openfn/language-common/util");
69
70
  var import_request = __toESM(require("request"), 1);
70
71
  var import_url = require("url");
71
72
  var import_base_64 = __toESM(require("base-64"), 1);
@@ -89,7 +90,8 @@ function fetch(params) {
89
90
  return error;
90
91
  return new Error(`Server responded with ${response.statusCode}`);
91
92
  }
92
- const { endpoint, query, postUrl } = (0, import_language_common.expandReferences)(params)(state);
93
+ const [resolvedParam] = (0, import_util.expandReferences)(state, params);
94
+ const { endpoint, query, postUrl } = resolvedParam;
93
95
  const { username, password, baseUrl } = state.configuration;
94
96
  const authy = username + ":" + password;
95
97
  const bytes = import_utf8.default.encode(authy);
@@ -153,7 +155,8 @@ function create(params) {
153
155
  return error;
154
156
  return new Error(`Server responded with ${response.statusCode}`);
155
157
  }
156
- const { endpoint, body } = (0, import_language_common.expandReferences)(params)(state);
158
+ const [resolvedParams] = (0, import_util.expandReferences)(state, params);
159
+ const { endpoint, body } = resolvedParams;
157
160
  const { username, password, baseUrl } = state.configuration;
158
161
  const authy = username + ":" + password;
159
162
  const bytes = import_utf8.default.encode(authy);
@@ -200,7 +203,8 @@ function update(params) {
200
203
  return error;
201
204
  return new Error(`Server responded with ${response.statusCode}`);
202
205
  }
203
- const { endpoint, body } = (0, import_language_common.expandReferences)(params)(state);
206
+ const [resolvedParams] = (0, import_util.expandReferences)(state, params);
207
+ const { endpoint, body } = resolvedParams;
204
208
  const { username, password, baseUrl } = state.configuration;
205
209
  const authy = username + ":" + password;
206
210
  const bytes = import_utf8.default.encode(authy);
@@ -248,7 +252,8 @@ function update75(params) {
248
252
  return error;
249
253
  return new Error(`Server responded with ${response.statusCode}`);
250
254
  }
251
- const { endpoint, body } = (0, import_language_common.expandReferences)(params)(state);
255
+ const [resolvedParams] = (0, import_util.expandReferences)(state, params);
256
+ const { endpoint, body } = resolvedParams;
252
257
  const { username, password, baseUrl } = state.configuration;
253
258
  const authy = username + ":" + password;
254
259
  const bytes = import_utf8.default.encode(authy);
package/dist/index.js CHANGED
@@ -24,10 +24,8 @@ __export(Adaptor_exports, {
24
24
  update: () => update,
25
25
  update75: () => update75
26
26
  });
27
- import {
28
- execute as commonExecute,
29
- expandReferences
30
- } from "@openfn/language-common";
27
+ import { execute as commonExecute } from "@openfn/language-common";
28
+ import { expandReferences } from "@openfn/language-common/util";
31
29
  import request from "request";
32
30
  import { resolve as resolveUrl } from "url";
33
31
  import base64 from "base-64";
@@ -63,7 +61,8 @@ function fetch(params) {
63
61
  return error;
64
62
  return new Error(`Server responded with ${response.statusCode}`);
65
63
  }
66
- const { endpoint, query, postUrl } = expandReferences(params)(state);
64
+ const [resolvedParam] = expandReferences(state, params);
65
+ const { endpoint, query, postUrl } = resolvedParam;
67
66
  const { username, password, baseUrl } = state.configuration;
68
67
  const authy = username + ":" + password;
69
68
  const bytes = utf8.encode(authy);
@@ -127,7 +126,8 @@ function create(params) {
127
126
  return error;
128
127
  return new Error(`Server responded with ${response.statusCode}`);
129
128
  }
130
- const { endpoint, body } = expandReferences(params)(state);
129
+ const [resolvedParams] = expandReferences(state, params);
130
+ const { endpoint, body } = resolvedParams;
131
131
  const { username, password, baseUrl } = state.configuration;
132
132
  const authy = username + ":" + password;
133
133
  const bytes = utf8.encode(authy);
@@ -174,7 +174,8 @@ function update(params) {
174
174
  return error;
175
175
  return new Error(`Server responded with ${response.statusCode}`);
176
176
  }
177
- const { endpoint, body } = expandReferences(params)(state);
177
+ const [resolvedParams] = expandReferences(state, params);
178
+ const { endpoint, body } = resolvedParams;
178
179
  const { username, password, baseUrl } = state.configuration;
179
180
  const authy = username + ":" + password;
180
181
  const bytes = utf8.encode(authy);
@@ -222,7 +223,8 @@ function update75(params) {
222
223
  return error;
223
224
  return new Error(`Server responded with ${response.statusCode}`);
224
225
  }
225
- const { endpoint, body } = expandReferences(params)(state);
226
+ const [resolvedParams] = expandReferences(state, params);
227
+ const { endpoint, body } = resolvedParams;
226
228
  const { username, password, baseUrl } = state.configuration;
227
229
  const authy = username + ":" + password;
228
230
  const bytes = utf8.encode(authy);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-maximo",
3
3
  "label": "Maximo",
4
- "version": "0.5.17",
4
+ "version": "0.5.18",
5
5
  "description": "An IBM Maximo EAM Language Pack for OpenFn",
6
6
  "main": "dist/index.cjs",
7
7
  "author": "Open Function Group",
@@ -16,7 +16,7 @@
16
16
  "base-64": "^0.1.0",
17
17
  "request": "^2.88.2",
18
18
  "utf8": "^2.1.2",
19
- "@openfn/language-common": "2.5.0"
19
+ "@openfn/language-common": "3.0.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "assertion-error": "^2.0.0",