@openfn/language-common 3.0.2 → 3.0.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/ast.json +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -958,24 +958,25 @@ __export(http_exports, {
|
|
|
958
958
|
post: () => post2,
|
|
959
959
|
request: () => req
|
|
960
960
|
});
|
|
961
|
-
var
|
|
961
|
+
var import_lodash3 = __toESM(require("lodash"), 1);
|
|
962
|
+
var { set } = import_lodash3.default;
|
|
962
963
|
var helpers = {
|
|
963
964
|
json: function() {
|
|
964
|
-
(
|
|
965
|
+
set(this, "headers.Content-Type", "application/json");
|
|
965
966
|
return this;
|
|
966
967
|
},
|
|
967
968
|
basic: function(username, password) {
|
|
968
969
|
const buff = Buffer.from(`${username}:${password}`);
|
|
969
970
|
const credentials = buff.toString("base64");
|
|
970
|
-
(
|
|
971
|
+
set(this, "headers.Authorization", `Basic ${credentials}`);
|
|
971
972
|
return this;
|
|
972
973
|
},
|
|
973
974
|
bearer: function(token) {
|
|
974
|
-
(
|
|
975
|
+
set(this, "headers.Authorization", `Bearer ${token}`);
|
|
975
976
|
return this;
|
|
976
977
|
},
|
|
977
978
|
oauth: function(token) {
|
|
978
|
-
(
|
|
979
|
+
set(this, "headers.Authorization", `Bearer ${token}`);
|
|
979
980
|
return this;
|
|
980
981
|
}
|
|
981
982
|
};
|
package/dist/index.js
CHANGED
|
@@ -893,7 +893,8 @@ __export(http_exports, {
|
|
|
893
893
|
post: () => post2,
|
|
894
894
|
request: () => req
|
|
895
895
|
});
|
|
896
|
-
import
|
|
896
|
+
import _3 from "lodash";
|
|
897
|
+
var { set } = _3;
|
|
897
898
|
var helpers = {
|
|
898
899
|
json: function() {
|
|
899
900
|
set(this, "headers.Content-Type", "application/json");
|
package/package.json
CHANGED
package/types/Adaptor.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export function alterState(func: Function): Operation;
|
|
|
33
33
|
*/
|
|
34
34
|
export function fn(func: Function): Operation;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Execute a function only when the condition returns true
|
|
37
37
|
* @public
|
|
38
38
|
* @function
|
|
39
39
|
* @example
|