feat: implement correction and original send functionality for Nama provider
- Added new DTOs for correction requests and responses in `nama-provider.dto.ts`. - Updated `nama-provider.adapter.ts` to include `originalSend` and `correctionSend` methods. - Enhanced `nama-provider.util.ts` with mapping functions for correction requests. - Created operational guidelines for agents in `AGENT.md`. - Updated Prisma migrations to support new invoice types and relationships. - Introduced new service and DTO for creating sales invoices in `sale-invoice-create.service.ts` and `sale-invoice-create.dto.ts`. - Added utility for handling Prisma errors in `prisma-error.util.ts`.
This commit is contained in:
+14
-23
@@ -1,48 +1,39 @@
|
||||
FROM node:22-slim AS deps
|
||||
FROM node:22-slim AS base
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="${PNPM_HOME}:${PATH}"
|
||||
|
||||
RUN corepack enable
|
||||
RUN npm config set registry ${NPM_REGISTRY}
|
||||
RUN corepack enable && npm config set registry ${NPM_REGISTRY}
|
||||
|
||||
FROM base AS build
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
|
||||
FROM node:22-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
|
||||
RUN corepack enable
|
||||
RUN npm config set registry ${NPM_REGISTRY}
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
ENV PRISMA_CLIENT_ENGINE_TYPE=binary
|
||||
RUN pnpm run build
|
||||
|
||||
RUN pnpm run build && pnpm prune --prod
|
||||
FROM base AS prod-deps
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --prod --frozen-lockfile \
|
||||
&& pnpm store prune \
|
||||
&& rm -rf /root/.npm /root/.cache
|
||||
|
||||
FROM node:22-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
|
||||
USER node
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user