mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
A bunch of improvements to chaining
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
FindHttpResponsesResponse,
|
||||
GetHttpRequestByIdResponse,
|
||||
HttpRequestAction,
|
||||
ImportResponse,
|
||||
@@ -17,6 +18,7 @@ import { readFileSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import * as util from 'node:util';
|
||||
import { parentPort, workerData } from 'node:worker_threads';
|
||||
import { text } from '../../src-web/components/core/Editor/text/extension';
|
||||
|
||||
new Promise<void>(async (resolve, reject) => {
|
||||
const { pluginDir, pluginRefId } = workerData;
|
||||
@@ -101,6 +103,13 @@ new Promise<void>(async (resolve, reject) => {
|
||||
await sendAndWaitForReply({ type: 'show_toast_request', ...args });
|
||||
},
|
||||
},
|
||||
httpResponse: {
|
||||
async find(args) {
|
||||
const payload = { type: 'find_http_responses_request', ...args } as const;
|
||||
const { httpResponses } = await sendAndWaitForReply<FindHttpResponsesResponse>(payload);
|
||||
return httpResponses;
|
||||
},
|
||||
},
|
||||
httpRequest: {
|
||||
async getById({ id }) {
|
||||
const payload = { type: 'get_http_request_by_id_request', id } as const;
|
||||
|
||||
Reference in New Issue
Block a user