From 8f9a8d466f736ea244188562256c31effebf4ac2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 09:40:13 +0000 Subject: [PATCH 1/2] fix(importer): unbreak @repo/crawlers build and make it consumable (Fixes #103) - FlagshipDeviceSeed: make expert_review_summary / expert_criteria_scores optional. The 8 seeds added in 310ef3d have no expert write-up and broke `pnpm --filter @repo/crawlers build` (TS2739), turning dev CI red. The matching master_products columns are nullable. - tsconfig: rootDir ./src + declaration, so dist/index.js actually exists (main pointed at a file that was emitted as dist/src/index.js) and consumers get .d.ts types. - package.json: add types and exports ("." and "./shopee/*") so DOS/Rate-Services can import the engine instead of keeping copies. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SJ8kEoAgmss5ZwS8ziunTj --- apps/importer/package.json | 12 ++++++++++++ apps/importer/src/shopee/flagship-seed-data.ts | 5 +++-- apps/importer/tsconfig.json | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/apps/importer/package.json b/apps/importer/package.json index eae5925a..a95a4f05 100644 --- a/apps/importer/package.json +++ b/apps/importer/package.json @@ -4,6 +4,18 @@ "private": true, "description": "Open-Core Product Normalization, 3-Tier Entity Matching, AI 10-Group Spec Enricher & Anti-Seeding Review Intelligence Engine for Rate Platform", "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./shopee/*": { + "types": "./dist/shopee/*.d.ts", + "import": "./dist/shopee/*.js" + }, + "./package.json": "./package.json" + }, "type": "module", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/apps/importer/src/shopee/flagship-seed-data.ts b/apps/importer/src/shopee/flagship-seed-data.ts index 272b9923..a6d0979d 100644 --- a/apps/importer/src/shopee/flagship-seed-data.ts +++ b/apps/importer/src/shopee/flagship-seed-data.ts @@ -19,8 +19,9 @@ export interface FlagshipDeviceSeed { specifications: ProductSpecifications; key_specs: KeySpecs; expert_rating: number; - expert_review_summary: string; - expert_criteria_scores: { + // Optional: newer 2026 entries ship without an expert write-up yet; the DB columns are nullable. + expert_review_summary?: string; + expert_criteria_scores?: { display: number; performance: number; camera: number; diff --git a/apps/importer/tsconfig.json b/apps/importer/tsconfig.json index 545a7a77..0254fefe 100644 --- a/apps/importer/tsconfig.json +++ b/apps/importer/tsconfig.json @@ -8,7 +8,8 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "outDir": "./dist", - "rootDir": ".", + "rootDir": "./src", + "declaration": true, "paths": { "*": ["./*"] }, From 59bf0386403636f7c7b702560bcdd76f68f88d56 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 09:43:17 +0000 Subject: [PATCH 2/2] fix(importer): export explicit engine subpaths instead of ./shopee/* The wildcard also exposed test-ai-enricher, test-review-analyzer and run-ingestion-test, which execute on import. Only export the two library modules Rate-Services needs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SJ8kEoAgmss5ZwS8ziunTj --- apps/importer/package.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/importer/package.json b/apps/importer/package.json index a95a4f05..8986590e 100644 --- a/apps/importer/package.json +++ b/apps/importer/package.json @@ -10,9 +10,13 @@ "types": "./dist/index.d.ts", "import": "./dist/index.js" }, - "./shopee/*": { - "types": "./dist/shopee/*.d.ts", - "import": "./dist/shopee/*.js" + "./shopee/arena-spec-syncer": { + "types": "./dist/shopee/arena-spec-syncer.d.ts", + "import": "./dist/shopee/arena-spec-syncer.js" + }, + "./shopee/flagship-seed-data": { + "types": "./dist/shopee/flagship-seed-data.d.ts", + "import": "./dist/shopee/flagship-seed-data.js" }, "./package.json": "./package.json" },