npm to pnpm

This commit is contained in:
Pierre
2026-02-08 15:26:51 +01:00
parent aa90a0f171
commit 823c09cf14
5 changed files with 1647 additions and 2706 deletions
+1
View File
@@ -3,3 +3,4 @@ dist/
*.log
.env
.DS_Store
.pnpm-store
+45 -13
View File
@@ -1,22 +1,54 @@
FROM node:20-slim AS builder
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json tsconfig.json ./
RUN npm install
# Build the git dependency (filename-tools)
RUN cd node_modules/@metazla/filename-tools && npm install && npm run build
COPY src/ ./src/
RUN npm run build
# MetaMesh Plugin: anime-detector
# Detects anime content
FROM node:20-slim
FROM node:20-slim AS builder
# Install git for GitHub dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm install -g corepack@latest && corepack enable
WORKDIR /app
COPY package.json ./
RUN npm install --omit=dev
# Copy package files first for layer caching
COPY package.json pnpm-lock.yaml ./
RUN corepack install
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# Build the git dependency (filename-tools)
RUN cd node_modules/@metazla/filename-tools && pnpm install && pnpm run build
# Copy source and build
COPY tsconfig.json ./
COPY src/ ./src/
RUN pnpm run build
# Production image
FROM node:20-slim
# Install git for GitHub dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm install -g corepack@latest && corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack install
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prod
# Build the git dependency in production too
RUN cd node_modules/@metazla/filename-tools && npm install && npm run build
RUN cd node_modules/@metazla/filename-tools && pnpm install && pnpm run build
COPY --from=builder /app/dist ./dist
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:8080/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"
CMD ["node", "dist/index.js"]
-2693
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@metazla/plugin-anime-detector",
"version": "1.0.0",
"packageManager": "[email protected]",
"description": "MetaMesh plugin: Detects anime content",
"type": "module",
"main": "dist/index.js",
+1600
View File
File diff suppressed because it is too large Load Diff