Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed May 17, 2024
1 parent 1995114 commit 7a4e2e4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
12 changes: 11 additions & 1 deletion src/db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import * as dynamodb from "@aws-sdk/client-dynamodb";
import os from "os";
import { z } from "zod";
import { Context } from "./createContext";
import { env } from "./env";
import { Task } from "./schema";

async function ensureDynamodbTableCreated({ dynamodbClient }: Context) {
try {
Expand Down Expand Up @@ -118,4 +123,9 @@ async function updateTaskStatusInDynamoDB(
);
}

export { ensureDynamodbTableCreated, getPreviouslyRunTaskStatuses, checkTaskCompletionStatus, updateTaskStatusInDynamoDB };
export {
checkTaskCompletionStatus,
ensureDynamodbTableCreated,
getPreviouslyRunTaskStatuses,
updateTaskStatusInDynamoDB,
};
13 changes: 8 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/usr/bin/env node
import * as sqs from "@aws-sdk/client-sqs";
import { execa } from "execa";
import fs from "fs";
import { chunk } from "lodash-es";
import os from "os";
import pMap from "p-map";
import process from "process";
import yargs from "yargs";
import { z } from "zod";
import { env } from "./env";
import { Task, TaskListFile } from "./schema";
import { Context, createContext } from "./createContext";
import { createDurationTracker } from "./createDurationTracker";
import { ensureDynamodbTableCreated, getPreviouslyRunTaskStatuses, checkTaskCompletionStatus, updateTaskStatusInDynamoDB } from "./db";
import {
checkTaskCompletionStatus,
ensureDynamodbTableCreated,
getPreviouslyRunTaskStatuses,
updateTaskStatusInDynamoDB,
} from "./db";
import { ensureQueueCreated, updateMessageVisibilityTimeout } from "./queue";
import { Task, TaskListFile } from "./schema";

yargs(process.argv.slice(2))
.demandCommand()
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "@tsconfig/node18/tsconfig.json",
"include": ["src"],
"compilerOptions": {
"noEmit": true
"noEmit": true,
"module": "ES2022",
"moduleResolution": "Bundler"
}
}

0 comments on commit 7a4e2e4

Please sign in to comment.