diff --git a/.turbo/cache/16b2b9fdd640519f-meta.json b/.turbo/cache/16b2b9fdd640519f-meta.json new file mode 100644 index 0000000..353f6f1 --- /dev/null +++ b/.turbo/cache/16b2b9fdd640519f-meta.json @@ -0,0 +1 @@ +{"hash":"16b2b9fdd640519f","duration":4685} \ No newline at end of file diff --git a/.turbo/cache/16b2b9fdd640519f.tar.zst b/.turbo/cache/16b2b9fdd640519f.tar.zst new file mode 100644 index 0000000..b006fe0 Binary files /dev/null and b/.turbo/cache/16b2b9fdd640519f.tar.zst differ diff --git a/.turbo/cache/2c1f4b5c0c1ad80f-meta.json b/.turbo/cache/2c1f4b5c0c1ad80f-meta.json new file mode 100644 index 0000000..0b4c1ec --- /dev/null +++ b/.turbo/cache/2c1f4b5c0c1ad80f-meta.json @@ -0,0 +1 @@ +{"hash":"2c1f4b5c0c1ad80f","duration":4886} \ No newline at end of file diff --git a/.turbo/cache/2c1f4b5c0c1ad80f.tar.zst b/.turbo/cache/2c1f4b5c0c1ad80f.tar.zst new file mode 100644 index 0000000..23c1510 Binary files /dev/null and b/.turbo/cache/2c1f4b5c0c1ad80f.tar.zst differ diff --git a/.turbo/cookies/1.cookie b/.turbo/cookies/1.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/2.cookie b/.turbo/cookies/2.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/3.cookie b/.turbo/cookies/3.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/4.cookie b/.turbo/cookies/4.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/5.cookie b/.turbo/cookies/5.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/6.cookie b/.turbo/cookies/6.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/cookies/7.cookie b/.turbo/cookies/7.cookie new file mode 100644 index 0000000..e69de29 diff --git a/.turbo/daemon/459749df55927c07-turbo.log.2026-03-15 b/.turbo/daemon/459749df55927c07-turbo.log.2026-03-15 new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile index a273478..c17e8c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,11 @@ WORKDIR /app COPY package.json package-lock.json turbo.json ./ COPY apps/backend/package.json ./apps/backend/ COPY apps/fallback-ui/package.json ./apps/fallback-ui/ +COPY packages/shared/ ./packages/shared COPY packages/ui/package.json ./packages/ui/ RUN npm install -g turbo COPY . . -RUN turbo prune --scope=backend --scope=fallback-ui --scope=common-ui --docker +RUN turbo prune --scope=backend --scope=fallback-ui --scope=common-ui --scope=@packages/shared --docker # 3. ---- Builder ---- FROM base AS builder @@ -35,14 +36,12 @@ ENV NODE_ENV=production # Copy package files and install production deps COPY --from=pruner /app/out/json/ . COPY --from=pruner /app/out/package-lock.json ./package-lock.json -RUN npm config set fetch-retries 5 \ - && npm config set fetch-timeout 600000 \ - && npm config set fetch-retry-mintimeout 20000 \ - && npm cache clean --force \ - && npm ci --omit=dev +RUN npm ci --production --omit=dev # Copy built applications COPY --from=builder /app/apps/backend/dist ./apps/backend/dist COPY --from=builder /app/apps/fallback-ui/dist ./apps/fallback-ui/dist +COPY --from=builder /app/packages/shared ./packages/shared + EXPOSE 4000 RUN npm i -g bun CMD ["bun", "apps/backend/dist/index.js"] diff --git a/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts b/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts index 37d1aa9..ab25b69 100644 --- a/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts +++ b/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts @@ -95,7 +95,7 @@ export const getAllTags = async (req: Request, res: Response) => { * Get a single product tag by ID */ export const getTagById = async (req: Request, res: Response) => { - const { id } = req.params; + const id = req.params.id as string const tag = await db.query.productTagInfo.findFirst({ where: eq(productTagInfo.id, parseInt(id)), @@ -121,7 +121,7 @@ export const getTagById = async (req: Request, res: Response) => { * Update a product tag */ export const updateTag = async (req: Request, res: Response) => { - const { id } = req.params; + const id = req.params.id as string const { tagName, tagDescription, isDashboardTag, relatedStores } = req.body; // Get the current tag to check for existing image @@ -192,7 +192,7 @@ export const updateTag = async (req: Request, res: Response) => { * Delete a product tag */ export const deleteTag = async (req: Request, res: Response) => { - const { id } = req.params; + const id = req.params.id as string // Check if tag exists const tag = await db.query.productTagInfo.findFirst({ diff --git a/apps/backend/src/apis/admin-apis/apis/product.controller.ts b/apps/backend/src/apis/admin-apis/apis/product.controller.ts index f1c555b..1ff6783 100644 --- a/apps/backend/src/apis/admin-apis/apis/product.controller.ts +++ b/apps/backend/src/apis/admin-apis/apis/product.controller.ts @@ -123,7 +123,7 @@ export const createProduct = async (req: Request, res: Response) => { * Update a product */ export const updateProduct = async (req: Request, res: Response) => { - const { id } = req.params; + const id = req.params.id as string const { name, shortDescription, longDescription, unitId, storeId, price, marketPrice, incrementStep, productQuantity, isSuspended, isFlashAvailable, flashPrice, deals:dealsRaw, imagesToDelete:imagesToDeleteRaw, tagIds } = req.body; diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json index 4da0200..137ac12 100755 --- a/apps/backend/tsconfig.json +++ b/apps/backend/tsconfig.json @@ -34,7 +34,9 @@ "@commonTypes": ["../../packages/ui/shared-types"], "@commonTypes/*": ["../../packages/ui/shared-types/*"], "@packages/shared": ["../../packages/shared"], - "@packages/shared/*": ["../../packages/shared/*"] + "@packages/shared/*": ["../../packages/shared/*"], + "global-shared": ["../../packages/shared"], + "global-shared/*": ["../../packages/shared/*"] }, // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [""], /* Specify multiple folders that act like './node_modules/@types'. */ diff --git a/apps/fallback-ui/tsconfig.json b/apps/fallback-ui/tsconfig.json index 946c301..7ccdc15 100644 --- a/apps/fallback-ui/tsconfig.json +++ b/apps/fallback-ui/tsconfig.json @@ -24,12 +24,6 @@ "@/*": [ "./src/*" ], - "common-ui": [ - "../../packages/ui" - ], - "common-ui/*": [ - "../../packages/ui/*" - ] }, "types": [ "node" diff --git a/apps/user-ui/metro.config.js b/apps/user-ui/metro.config.js index fba7b7c..bfdd5c4 100755 --- a/apps/user-ui/metro.config.js +++ b/apps/user-ui/metro.config.js @@ -14,6 +14,7 @@ config.watchFolders = [ config.resolver.extraNodeModules = { ...config.resolver.extraNodeModules, '@packages/shared': path.resolve(__dirname, '../../packages/shared'), + 'global-shared': path.resolve(__dirname, '../../packages/shared'), }; module.exports = config; diff --git a/apps/user-ui/tsconfig.json b/apps/user-ui/tsconfig.json index 6f862fc..6442a8a 100755 --- a/apps/user-ui/tsconfig.json +++ b/apps/user-ui/tsconfig.json @@ -24,6 +24,12 @@ ], "@packages/shared/*": [ "../../packages/shared/*" + ], + "global-shared": [ + "../../packages/shared" + ], + "global-shared/*": [ + "../../packages/shared/*" ] }, "moduleSuffixes": [