@openfn/language-beyonic 0.3.14 → 0.3.16

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
@@ -76,6 +76,7 @@ function post({ apiToken, body, url }) {
76
76
 
77
77
  // src/Adaptor.js
78
78
  var import_url = require("url");
79
+ var import_util = require("@openfn/language-common/util");
79
80
  var import_language_common2 = require("@openfn/language-common");
80
81
  function execute(...operations) {
81
82
  const initialState = {
@@ -88,7 +89,7 @@ function execute(...operations) {
88
89
  }
89
90
  function createPayment(data) {
90
91
  return (state) => {
91
- const body = (0, import_language_common.expandReferences)(data)(state);
92
+ const [body] = (0, import_util.expandReferences)(state, data);
92
93
  const { apiUrl, apiToken } = state.configuration;
93
94
  const url = (0, import_url.resolve)(apiUrl + "/", "payments");
94
95
  console.log("Posting payment:");
@@ -101,7 +102,7 @@ function createPayment(data) {
101
102
  }
102
103
  function createContact(data) {
103
104
  return (state) => {
104
- const body = (0, import_language_common.expandReferences)(data)(state);
105
+ const [body] = (0, import_util.expandReferences)(state, data);
105
106
  const { apiUrl, apiToken } = state.configuration;
106
107
  const url = (0, import_url.resolve)(apiUrl + "/", "contacts");
107
108
  console.log("Posting contact:");
@@ -114,7 +115,7 @@ function createContact(data) {
114
115
  }
115
116
  function createCollectionRequest(data) {
116
117
  return (state) => {
117
- const body = (0, import_language_common.expandReferences)(data)(state);
118
+ const [body] = (0, import_util.expandReferences)(state, data);
118
119
  const { apiUrl, apiToken } = state.configuration;
119
120
  const url = (0, import_url.resolve)(apiUrl + "/", "collectionrequests");
120
121
  console.log("Posting collection request:");
package/dist/index.js CHANGED
@@ -21,10 +21,7 @@ __export(Adaptor_exports, {
21
21
  merge: () => merge,
22
22
  sourceValue: () => sourceValue
23
23
  });
24
- import {
25
- execute as commonExecute,
26
- expandReferences
27
- } from "@openfn/language-common";
24
+ import { execute as commonExecute } from "@openfn/language-common";
28
25
 
29
26
  // src/Client.js
30
27
  import request from "superagent";
@@ -41,6 +38,7 @@ function post({ apiToken, body, url }) {
41
38
 
42
39
  // src/Adaptor.js
43
40
  import { resolve as resolveUrl } from "url";
41
+ import { expandReferences } from "@openfn/language-common/util";
44
42
  import {
45
43
  fn,
46
44
  fnIf,
@@ -63,7 +61,7 @@ function execute(...operations) {
63
61
  }
64
62
  function createPayment(data) {
65
63
  return (state) => {
66
- const body = expandReferences(data)(state);
64
+ const [body] = expandReferences(state, data);
67
65
  const { apiUrl, apiToken } = state.configuration;
68
66
  const url = resolveUrl(apiUrl + "/", "payments");
69
67
  console.log("Posting payment:");
@@ -76,7 +74,7 @@ function createPayment(data) {
76
74
  }
77
75
  function createContact(data) {
78
76
  return (state) => {
79
- const body = expandReferences(data)(state);
77
+ const [body] = expandReferences(state, data);
80
78
  const { apiUrl, apiToken } = state.configuration;
81
79
  const url = resolveUrl(apiUrl + "/", "contacts");
82
80
  console.log("Posting contact:");
@@ -89,7 +87,7 @@ function createContact(data) {
89
87
  }
90
88
  function createCollectionRequest(data) {
91
89
  return (state) => {
92
- const body = expandReferences(data)(state);
90
+ const [body] = expandReferences(state, data);
93
91
  const { apiUrl, apiToken } = state.configuration;
94
92
  const url = resolveUrl(apiUrl + "/", "collectionrequests");
95
93
  console.log("Posting collection request:");
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-beyonic",
3
- "version": "0.3.14",
3
+ "label": "Beyonic",
4
+ "version": "0.3.16",
4
5
  "description": "beyonic Language Pack for OpenFn",
5
6
  "homepage": "https://docs.openfn.org",
6
7
  "repository": {
@@ -27,13 +28,12 @@
27
28
  "JSONPath": "^0.10.0",
28
29
  "lodash-fp": "^0.10.2",
29
30
  "superagent": "^8.0.0",
30
- "@openfn/language-common": "2.4.0"
31
+ "@openfn/language-common": "3.0.0"
31
32
  },
32
33
  "devDependencies": {
33
34
  "assertion-error": "2.0.0",
34
35
  "chai": "4.3.6",
35
36
  "deep-eql": "4.1.1",
36
- "esno": "^0.16.3",
37
37
  "rimraf": "3.0.2"
38
38
  },
39
39
  "type": "module",