Skip to content

Commit

Permalink
Fix ts linting errors during build
Browse files Browse the repository at this point in the history
  • Loading branch information
zph committed Feb 27, 2024
1 parent 87dbb64 commit 8e2a899
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build:
declare -a TARGETS
TARGETS=(x86_64-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin)
for TARGET in "${TARGETS[@]}"; do
deno compile --allow-all --unstable --target $TARGET --output ./build/$TARGET/msh --node-modules-dir=false main.ts
deno compile --allow-all --target $TARGET --output ./build/$TARGET/msh --node-modules-dir=false main.ts
echo Building build/$TARGET/msh-$TARGET.tgz
tar -C build/$TARGET -cvzf build/$TARGET/msh-$TARGET.tgz msh
done
Expand Down
6 changes: 3 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ await log.setup({
});
const logger = log.getLogger();

import { MongoClient } from "npm:[email protected]";
import { Document, MongoClient } from "npm:[email protected]";

if (Deno.env.has("MSH_ENV_VAR_OVERRIDE")) {
const overrides = JSON.parse(Deno.env.get("MSH_ENV_VAR_OVERRIDE") || "{}");
Expand Down Expand Up @@ -158,7 +158,7 @@ const mainPrompted = async (envName: string) => {
state: string;
};

const nodeRespondedOnPort = async (node, port) => {
const nodeRespondedOnPort = async (node: string, port: string) => {
const result = await $`nc -z ${node} ${port}`.stdout("piped").noThrow().quiet()
if(result.code === 0) {
return true
Expand Down Expand Up @@ -193,7 +193,7 @@ const mainPrompted = async (envName: string) => {
for await (const n of shardURIs) {
const result = await replSetGetStatus(n).catch(e =>
logger.error("Error getting connection", e)
)
) as Document
// Try to guard against a single node going down and breaking connectivity
if(result === undefined) {
continue
Expand Down

0 comments on commit 8e2a899

Please sign in to comment.