npm to pnpm

This commit is contained in:
Pierre
2026-02-08 15:27:44 +01:00
parent 1839400042
commit d3d6622a8b
5 changed files with 1638 additions and 2696 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: filename-parser
# Parses video filenames to extract metadata
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"]
-2683
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@metazla/plugin-filename-parser",
"version": "1.0.0",
"packageManager": "[email protected]",
"description": "MetaMesh plugin: Parses video filenames to extract metadata",
"type": "module",
"main": "dist/index.js",
+1591
View File
File diff suppressed because it is too large Load Diff