ci(bots/discord): patch drizzle-kit to stop using node, decreases image size

This commit is contained in:
PalmDevs
2024-07-26 00:01:40 +07:00
parent 042b155b5e
commit 3559ed1cb5
4 changed files with 26 additions and 7 deletions

View File

@@ -1,10 +1,5 @@
# This file should be triggered from the monorepo root
FROM node:latest AS base
# Install Bun
RUN apt-get update && apt-get install -y curl unzip
RUN curl -fsSL https://bun.sh/install.sh | bash
ENV PATH="/root/.bun/bin:$PATH"
FROM oven/bun:latest AS base
FROM base AS build

BIN
bun.lockb

Binary file not shown.

View File

@@ -54,6 +54,7 @@
"lefthook"
],
"patchedDependencies": {
"@semantic-release/npm@12.0.1": "patches/@semantic-release%2Fnpm@12.0.1.patch"
"@semantic-release/npm@12.0.1": "patches/@semantic-release%2Fnpm@12.0.1.patch",
"drizzle-kit@0.22.8": "patches/drizzle-kit@0.22.8.patch"
}
}

View File

@@ -0,0 +1,23 @@
diff --git a/bin.cjs b/bin.cjs
index 142ed9c20f28dc1080bebfb52325fa308c6cb771..9d3bea0787f6c05df11567c6821bc85743286340 100644
--- a/bin.cjs
+++ b/bin.cjs
# Fixes no schema changes issue
@@ -22053,7 +22053,7 @@ var init_sqliteImports = __esm({
const { unregister } = await safeRegister();
for (let i2 = 0; i2 < imports.length; i2++) {
const it = imports[i2];
- const i0 = require(`${it}`);
+ const i0 = await import(`${it}`);
const prepared = prepareFromExports3(i0);
tables.push(...prepared.tables);
}
# Fixes process hanging issue
@@ -129572,6 +129572,7 @@ var generateCommand = new Command("generate").option("--dialect <dialect>", "Dat
} else {
assertUnreachable(dialect7);
}
+ process.exit(0);
});
var migrateCommand = new Command("migrate").option(
"--config <config>",