@nocobase/plugin-workflow-request 1.0.0-alpha.3 → 1.0.0-alpha.4
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/externalVersion.js
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/antd-v5": "1.1.9",
|
|
12
|
-
"@nocobase/plugin-workflow": "1.0.0-alpha.
|
|
13
|
-
"@nocobase/client": "1.0.0-alpha.
|
|
12
|
+
"@nocobase/plugin-workflow": "1.0.0-alpha.4",
|
|
13
|
+
"@nocobase/client": "1.0.0-alpha.4",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
15
|
-
"@nocobase/server": "1.0.0-alpha.
|
|
15
|
+
"@nocobase/server": "1.0.0-alpha.4",
|
|
16
16
|
"axios": "0.26.1"
|
|
17
17
|
};
|
|
@@ -93,13 +93,18 @@ class RequestInstruction_default extends import_plugin_workflow.Instruction {
|
|
|
93
93
|
status: import_plugin_workflow.JOB_STATUS.RESOLVED,
|
|
94
94
|
result: response.data
|
|
95
95
|
});
|
|
96
|
+
processor.logger.info(`request (#${node.id}) response success, status: ${response.status}`);
|
|
96
97
|
}).catch((error) => {
|
|
97
98
|
job.set({
|
|
98
99
|
status: import_plugin_workflow.JOB_STATUS.FAILED,
|
|
99
100
|
result: error.isAxiosError ? error.toJSON() : error.message
|
|
100
101
|
});
|
|
102
|
+
if (error.response) {
|
|
103
|
+
processor.logger.info(`request (#${node.id}) response failed, status: ${error.response.status}`);
|
|
104
|
+
} else {
|
|
105
|
+
processor.logger.error(`request (#${node.id}) response failed: ${error.message}`);
|
|
106
|
+
}
|
|
101
107
|
}).finally(() => {
|
|
102
|
-
processor.logger.info(`request (#${node.id}) response received, status: ${job.get("status")}`);
|
|
103
108
|
this.workflow.resume(job);
|
|
104
109
|
});
|
|
105
110
|
processor.logger.info(`request (#${node.id}) sent to "${config.url}", waiting for response...`);
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流:HTTP 请求节点",
|
|
5
5
|
"description": "Send HTTP requests to any HTTP service for data interaction in workflow.",
|
|
6
6
|
"description.zh-CN": "可用于在工作流中向任意 HTTP 服务发送请求,进行数据交互。",
|
|
7
|
-
"version": "1.0.0-alpha.
|
|
7
|
+
"version": "1.0.0-alpha.4",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/workflow-request",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@nocobase/server": "1.x",
|
|
25
25
|
"@nocobase/test": "1.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "7a7005ce3bddf33498580a6486c45b5d9ea64ffb",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"Workflow"
|
|
30
30
|
]
|