@openfn/language-dagu 1.0.0 → 1.1.1
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/configuration-schema.json +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.js +4 -3
- package/package.json +2 -2
- package/types/Utils.d.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -92,11 +92,12 @@ var prepareNextState = (state, response) => {
|
|
|
92
92
|
response: responseWithoutBody
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
|
-
var getAccessToken = async (configuration) => {
|
|
95
|
+
var getAccessToken = async (configuration, headers) => {
|
|
96
96
|
const { username, password, baseUrl } = configuration;
|
|
97
97
|
const { body } = await (0, import_util.request)("POST", "/account/login", {
|
|
98
98
|
headers: {
|
|
99
|
-
"content-type": "application/json"
|
|
99
|
+
"content-type": "application/json",
|
|
100
|
+
...headers
|
|
100
101
|
},
|
|
101
102
|
baseUrl,
|
|
102
103
|
parseAs: "json",
|
|
@@ -110,7 +111,7 @@ var getAccessToken = async (configuration) => {
|
|
|
110
111
|
var request = async (configuration = {}, method, path, options) => {
|
|
111
112
|
const { baseUrl } = configuration;
|
|
112
113
|
if (!access_token)
|
|
113
|
-
access_token = await getAccessToken(configuration);
|
|
114
|
+
access_token = await getAccessToken(configuration, options.headers);
|
|
114
115
|
const { query = {}, body = {} } = options;
|
|
115
116
|
const opts = {
|
|
116
117
|
parseAs: "json",
|
package/dist/index.js
CHANGED
|
@@ -49,11 +49,12 @@ var prepareNextState = (state, response) => {
|
|
|
49
49
|
response: responseWithoutBody
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
var getAccessToken = async (configuration) => {
|
|
52
|
+
var getAccessToken = async (configuration, headers) => {
|
|
53
53
|
const { username, password, baseUrl } = configuration;
|
|
54
54
|
const { body } = await commonRequest("POST", "/account/login", {
|
|
55
55
|
headers: {
|
|
56
|
-
"content-type": "application/json"
|
|
56
|
+
"content-type": "application/json",
|
|
57
|
+
...headers
|
|
57
58
|
},
|
|
58
59
|
baseUrl,
|
|
59
60
|
parseAs: "json",
|
|
@@ -67,7 +68,7 @@ var getAccessToken = async (configuration) => {
|
|
|
67
68
|
var request = async (configuration = {}, method, path, options) => {
|
|
68
69
|
const { baseUrl } = configuration;
|
|
69
70
|
if (!access_token)
|
|
70
|
-
access_token = await getAccessToken(configuration);
|
|
71
|
+
access_token = await getAccessToken(configuration, options.headers);
|
|
71
72
|
const { query = {}, body = {} } = options;
|
|
72
73
|
const opts = {
|
|
73
74
|
parseAs: "json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-dagu",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "OpenFn dagu adaptor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"configuration-schema.json"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@openfn/language-common": "3.2.
|
|
23
|
+
"@openfn/language-common": "3.2.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"assertion-error": "2.0.0",
|
package/types/Utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export function prepareNextState(state: any, response: any): any;
|
|
2
|
-
export function getAccessToken(configuration: any): Promise<any>;
|
|
2
|
+
export function getAccessToken(configuration: any, headers: any): Promise<any>;
|
|
3
3
|
export function request(configuration: {}, method: any, path: any, options: any): Promise<any>;
|