@workglow/tasks 0.0.53 → 0.0.54
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.js +16 -1
- package/dist/index.js.map +3 -3
- package/dist/task/FetchTask.d.ts +5 -0
- package/dist/task/FetchTask.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -381,6 +381,21 @@ class FetchTask extends JobQueueTask {
|
|
|
381
381
|
super(input, config);
|
|
382
382
|
this.jobClass = FetchJob;
|
|
383
383
|
}
|
|
384
|
+
setInput(input) {
|
|
385
|
+
if (!("response_type" in input)) {
|
|
386
|
+
super.setInput(input);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const getCurrentResponseType = () => {
|
|
390
|
+
return this.runInputData?.response_type ?? this.defaults?.response_type ?? null;
|
|
391
|
+
};
|
|
392
|
+
const previousResponseType = getCurrentResponseType();
|
|
393
|
+
super.setInput(input);
|
|
394
|
+
const newResponseType = getCurrentResponseType();
|
|
395
|
+
if (previousResponseType !== newResponseType) {
|
|
396
|
+
this.emitSchemaChange();
|
|
397
|
+
}
|
|
398
|
+
}
|
|
384
399
|
async getDefaultQueueName(input) {
|
|
385
400
|
if (!input.url) {
|
|
386
401
|
return `fetch:${this.type}`;
|
|
@@ -5092,4 +5107,4 @@ export {
|
|
|
5092
5107
|
DebugLog
|
|
5093
5108
|
};
|
|
5094
5109
|
|
|
5095
|
-
//# debugId=
|
|
5110
|
+
//# debugId=F96A652558032ADF64756E2164756E21
|