From 8be52a87c1f203fb868f0430dca901b4fcf73afd Mon Sep 17 00:00:00 2001 From: Marcin Gordel Date: Wed, 7 Feb 2024 18:22:51 +0100 Subject: [PATCH] fix: broken imports --- examples/external-request/request.ts | 4 ++-- examples/simple-usage/logger.ts | 3 ++- src/executor.ts | 5 +++-- src/index.ts | 8 +++++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/external-request/request.ts b/examples/external-request/request.ts index 3023f9b..9769be6 100644 --- a/examples/external-request/request.ts +++ b/examples/external-request/request.ts @@ -1,4 +1,4 @@ -import { TaskExecutor, ResultState } from "@golem-sdk/task-executor"; +import { TaskExecutor } from "@golem-sdk/task-executor"; import { readFile } from "fs/promises"; import { fileURLToPath } from "url"; const DIR_NAME = fileURLToPath(new URL(".", import.meta.url)); @@ -28,7 +28,7 @@ const DIR_NAME = fileURLToPath(new URL(".", import.meta.url)); .downloadFile("/golem/work/example.jpg", `${DIR_NAME}/example.jpg`) .end(), ); - if (results[1].result === ResultState.Ok) { + if (results[1].result === "Ok") { console.log("Downloaded file to", `${DIR_NAME}/example.jpg`); } else { console.error("Something went wrong", results[1].message); diff --git a/examples/simple-usage/logger.ts b/examples/simple-usage/logger.ts index bbc3ed3..a43c225 100644 --- a/examples/simple-usage/logger.ts +++ b/examples/simple-usage/logger.ts @@ -1,4 +1,5 @@ -import { TaskExecutor, jsonLogger, nullLogger, pinoLogger } from "@golem-sdk/task-executor"; +import { TaskExecutor } from "@golem-sdk/task-executor"; +import { pinoLogger, jsonLogger, nullLogger } from "@golem-sdk/golem-js"; import { program, Option } from "commander"; // Create command-line configuration. diff --git a/src/executor.ts b/src/executor.ts index f979e74..f20a999 100644 --- a/src/executor.ts +++ b/src/executor.ts @@ -29,7 +29,7 @@ import { ExecutorConfig } from "./config"; import { RequireAtLeastOne } from "./types"; import { TaskExecutorEventsDict } from "./events"; import { EventEmitter } from "eventemitter3"; -import { TaskService } from "./service"; +import { TaskService, TaskServiceOptions } from "./service"; import { TaskQueue } from "./queue"; import { isBrowser, isNode, sleep } from "./utils"; import { Task, TaskOptions } from "./task"; @@ -87,7 +87,8 @@ export type ExecutorOptions = { PaymentOptions & NetworkServiceOptions & AgreementServiceOptions & - WorkOptions; + WorkOptions & + TaskServiceOptions; /** * Contains information needed to start executor, if string the imageHash is required, otherwise it should be a type of {@link ExecutorOptions} diff --git a/src/index.ts b/src/index.ts index eb58014..ba7d1e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,8 @@ export { TaskExecutor, YagnaOptions, ExecutorOptions, ExecutorOptionsMixin } from "./executor"; -export { ProposalFilterFactory } from "@golem-sdk/golem-js"; +export { + ProposalFilterFactory, + PaymentFilters, + AgreementSelectors, + AgreementCandidate, + ProposalFilter, +} from "@golem-sdk/golem-js";