فهرست منبع

♻️ refactor(goods-module): optimize type exports

- explicitly export specific types from goods.types.js instead of wildcard export

🔧 chore(merchant-module): update data permission configuration

- add userIdField to dataPermission configuration for consistency

📦 build: update package dependencies

- add @d8d/merchant-module and @d8d/supplier-module to workspace dependencies
yourname 1 ماه پیش
والد
کامیت
bd18161727
3فایلهای تغییر یافته به همراه21 افزوده شده و 2 حذف شده
  1. 13 1
      packages/goods-module/src/types/index.ts
  2. 2 1
      packages/merchant-module/src/routes/admin-routes.ts
  3. 6 0
      pnpm-lock.yaml

+ 13 - 1
packages/goods-module/src/types/index.ts

@@ -1 +1,13 @@
-export * from './goods.types.js';
+export {
+  Goods as GoodsSchemaType,
+  CreateGoods as CreateGoodsSchemaType,
+  UpdateGoods as UpdateGoodsSchemaType,
+  GoodsCategory as GoodsCategorySchemaType,
+  CreateGoodsCategory as CreateGoodsCategorySchemaType,
+  UpdateGoodsCategory as UpdateGoodsCategorySchemaType,
+  RandomGoodsQuery,
+  RandomGoodsResponse,
+  GoodsState,
+  GoodsCategoryState,
+  GoodsType as GoodsTypeEnum
+} from './goods.types.js';

+ 2 - 1
packages/merchant-module/src/routes/admin-routes.ts

@@ -17,6 +17,7 @@ export const adminMerchantRoutes = createCrudRoutes({
     updatedByField: 'updatedBy'
   },
   dataPermission: {
-    enabled: false // 管理员路由不使用数据权限控制
+    enabled: false, // 管理员路由不使用数据权限控制
+    userIdField: 'createdBy' // 即使不启用,也需要提供userIdField
   }
 });

+ 6 - 0
pnpm-lock.yaml

@@ -500,6 +500,9 @@ importers:
       '@d8d/file-module':
         specifier: workspace:*
         version: link:../file-module
+      '@d8d/merchant-module':
+        specifier: workspace:*
+        version: link:../merchant-module
       '@d8d/shared-crud':
         specifier: workspace:*
         version: link:../shared-crud
@@ -509,6 +512,9 @@ importers:
       '@d8d/shared-utils':
         specifier: workspace:*
         version: link:../shared-utils
+      '@d8d/supplier-module':
+        specifier: workspace:*
+        version: link:../supplier-module
       '@d8d/user-module':
         specifier: workspace:*
         version: link:../user-module