From ecd9810902b7b85b9bcbeced97223fd1741d59eb Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 7 Jan 2025 15:14:24 -0800 Subject: [PATCH] update --- packages/sdk-js/package.json | 2 +- packages/types/tsconfig.json | 5 +---- tests/triggerWorkflow.test.ts | 13 +++++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/packages/sdk-js/package.json b/packages/sdk-js/package.json index 644a6cc..3dcbde6 100644 --- a/packages/sdk-js/package.json +++ b/packages/sdk-js/package.json @@ -27,7 +27,7 @@ "clean": "rm -rf dist" }, "dependencies": { - "@avaprotocol/types": "workspace:0.9.2-dev.5", + "@avaprotocol/types": "workspace:*", "@grpc/grpc-js": "^1.11.3", "@grpc/proto-loader": "^0.7.13", "dotenv": "^16.4.5", diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index f0ade47..90d76d7 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -4,8 +4,5 @@ "outDir": "./dist", "rootDir": "./src" }, - "include": ["src/**/*"], - "paths": { - "@avaprotocol/*": ["./packages/*"] - } + "include": ["src/**/*"] } diff --git a/tests/triggerWorkflow.test.ts b/tests/triggerWorkflow.test.ts index da4e6c9..9353b2e 100644 --- a/tests/triggerWorkflow.test.ts +++ b/tests/triggerWorkflow.test.ts @@ -1,10 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; import Client, { TriggerFactory, - TriggerTypes, - WorkflowStatuses, + TriggerType, ExecutionStatus, -} from "../dist"; + WorkflowStatus, +} from "@/sdk-js/dist"; + import dotenv from "dotenv"; import path from "path"; import _ from "lodash"; @@ -310,7 +311,7 @@ describe("triggerWorkflow Tests", () => { // The list should now contain one execution, the id from manual trigger should matched const execution = await client.getExecution(workflowId, result.executionId); expect(execution.id).toEqual(result.executionId); - expect(execution.triggerMetadata.type).toEqual(TriggerTypes.CRON); + expect(execution.triggerMetadata.type).toEqual(TriggerType.Cron); expect(execution.triggerMetadata.epoch).toEqual(epoch + 60); const executionStatus = await client.getExecutionStatus(workflowId, result.executionId); @@ -325,7 +326,7 @@ describe("triggerWorkflow Tests", () => { // Create a cron trigger with a schedule of every minute const trigger = TriggerFactory.create({ name: "cronTrigger", - type: TriggerTypes.CRON, + type: TriggerType.Cron, data: { scheduleList: ["* * * * *"] }, }); @@ -341,7 +342,7 @@ describe("triggerWorkflow Tests", () => { const result = await client.triggerWorkflow({ id: workflowId, data: { - type: TriggerTypes.CRON, + type: TriggerType.Cron, epoch: epoch + 60, // set epoch to 1 minute later }, isBlocking: false,