Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

fix warning in log

daniel31x138bc59e6764b3
diff --git a/Dockerfile b/Dockerfile
index ab27d6bd..e623f027 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,8 @@
# Stage 1: Monolith Builder
# ==============================================================================
FROM docker.io/rust:1.96-bullseye AS monolith-builder
-RUN set -eux && cargo install --locked monolith
+ARG MONOLITH_VERSION=2.10.1
+RUN set -eux && cargo install --locked monolith@${MONOLITH_VERSION}
# ==============================================================================
# Stage 2: App Builder (Where the heavy building happens)
diff --git a/apps/web/scripts/migration/migrateToV2.js b/apps/web/scripts/migration/migrateToV2.js
index 29223e99..eb0a4f8b 100644
--- a/apps/web/scripts/migration/migrateToV2.js
+++ b/apps/web/scripts/migration/migrateToV2.js
@@ -1,7 +1,6 @@
-const { S3 } = require("@aws-sdk/client-s3");
+const { S3, HeadObjectCommand } = require("@aws-sdk/client-s3");
const { PrismaClient } = require("@prisma/client");
const { existsSync } = require("fs");
-const util = require("util");
const prisma = new PrismaClient();
@@ -31,12 +30,8 @@ async function checkFileExistence(path) {
};
try {
- const headObjectAsync = util.promisify(
- s3Client.headObject.bind(s3Client)
- );
-
try {
- await headObjectAsync(bucketParams);
+ await s3Client.send(new HeadObjectCommand(bucketParams));
return true;
} catch (err) {
return false;
diff --git a/apps/web/scripts/migration/v2.6.1/index.js b/apps/web/scripts/migration/v2.6.1/index.js
index 0c537e0c..ca5180f6 100644
--- a/apps/web/scripts/migration/v2.6.1/index.js
+++ b/apps/web/scripts/migration/v2.6.1/index.js
@@ -10,10 +10,9 @@
// If they do, it updates the link with the path in the db.
// If they don't, it passes.
-const { S3 } = require("@aws-sdk/client-s3");
+const { S3, HeadObjectCommand } = require("@aws-sdk/client-s3");
const { PrismaClient } = require("@prisma/client");
const { existsSync } = require("fs");
-const util = require("util");
const prisma = new PrismaClient();
@@ -46,12 +45,8 @@ async function checkFileExistence(path) {
};
try {
- const headObjectAsync = util.promisify(
- s3Client.headObject.bind(s3Client)
- );
-
try {
- await headObjectAsync(bucketParams);
+ await s3Client.send(new HeadObjectCommand(bucketParams));
return true;
} catch (err) {
return false;
diff --git a/packages/filesystem/readFile.ts b/packages/filesystem/readFile.ts
index d6b43dee..4af68f83 100644
--- a/packages/filesystem/readFile.ts
+++ b/packages/filesystem/readFile.ts
@@ -1,12 +1,12 @@
import {
GetObjectCommand,
GetObjectCommandInput,
+ HeadObjectCommand,
S3,
} from "@aws-sdk/client-s3";
import fs from "fs";
import path from "path";
import s3Client from "./s3Client";
-import util from "util";
type ReturnContentTypes =
| "text/plain"
@@ -34,12 +34,8 @@ export async function readFile(filePath: string) {
}
| undefined;
- const headObjectAsync = util.promisify(
- s3Client.headObject.bind(s3Client)
- );
-
try {
- await headObjectAsync(bucketParams);
+ await (s3Client as S3).send(new HeadObjectCommand(bucketParams));
} catch (err) {
contentType = "text/plain";