servcraft 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ROADMAP.md CHANGED
@@ -4,7 +4,8 @@ This document outlines the planned features and improvements for Servcraft.
4
4
 
5
5
  ## Version History
6
6
 
7
- - **v0.4.2** (Current) - Custom template loading in generate/scaffold - Phase 3 in progress 🚧
7
+ - **v0.4.3** (Current) - ESM/CommonJS compatibility fix - Phase 3 in progress 🚧
8
+ - **v0.4.2** - Custom template loading in generate/scaffold
8
9
  - **v0.4.1** - Custom templates management (init/list)
9
10
  - **v0.4.0** - Scaffold command for complete CRUD generation
10
11
  - **v0.3.1** - Test templates with --with-tests flag - Phase 2 complete ✅
@@ -5801,7 +5801,18 @@ function getSkip(params) {
5801
5801
  }
5802
5802
 
5803
5803
  // src/modules/user/user.repository.ts
5804
- var import_client2 = require("@prisma/client");
5804
+ var UserRole = {
5805
+ USER: "USER",
5806
+ MODERATOR: "MODERATOR",
5807
+ ADMIN: "ADMIN",
5808
+ SUPER_ADMIN: "SUPER_ADMIN"
5809
+ };
5810
+ var UserStatus = {
5811
+ ACTIVE: "ACTIVE",
5812
+ INACTIVE: "INACTIVE",
5813
+ SUSPENDED: "SUSPENDED",
5814
+ BANNED: "BANNED"
5815
+ };
5805
5816
  var UserRepository = class {
5806
5817
  /**
5807
5818
  * Find user by ID
@@ -5851,7 +5862,7 @@ var UserRepository = class {
5851
5862
  password: data.password,
5852
5863
  name: data.name,
5853
5864
  role: this.mapRoleToEnum(data.role || "user"),
5854
- status: import_client2.UserStatus.ACTIVE,
5865
+ status: UserStatus.ACTIVE,
5855
5866
  emailVerified: false
5856
5867
  }
5857
5868
  });
@@ -5984,22 +5995,22 @@ var UserRepository = class {
5984
5995
  */
5985
5996
  mapRoleToEnum(role) {
5986
5997
  const roleMap = {
5987
- user: import_client2.UserRole.USER,
5988
- moderator: import_client2.UserRole.MODERATOR,
5989
- admin: import_client2.UserRole.ADMIN,
5990
- super_admin: import_client2.UserRole.SUPER_ADMIN
5998
+ user: UserRole.USER,
5999
+ moderator: UserRole.MODERATOR,
6000
+ admin: UserRole.ADMIN,
6001
+ super_admin: UserRole.SUPER_ADMIN
5991
6002
  };
5992
- return roleMap[role] || import_client2.UserRole.USER;
6003
+ return roleMap[role] || UserRole.USER;
5993
6004
  }
5994
6005
  /**
5995
6006
  * Map Prisma enum to application role
5996
6007
  */
5997
6008
  mapEnumToRole(role) {
5998
6009
  const roleMap = {
5999
- [import_client2.UserRole.USER]: "user",
6000
- [import_client2.UserRole.MODERATOR]: "moderator",
6001
- [import_client2.UserRole.ADMIN]: "admin",
6002
- [import_client2.UserRole.SUPER_ADMIN]: "super_admin"
6010
+ [UserRole.USER]: "user",
6011
+ [UserRole.MODERATOR]: "moderator",
6012
+ [UserRole.ADMIN]: "admin",
6013
+ [UserRole.SUPER_ADMIN]: "super_admin"
6003
6014
  };
6004
6015
  return roleMap[role];
6005
6016
  }
@@ -6008,22 +6019,22 @@ var UserRepository = class {
6008
6019
  */
6009
6020
  mapStatusToEnum(status) {
6010
6021
  const statusMap = {
6011
- active: import_client2.UserStatus.ACTIVE,
6012
- inactive: import_client2.UserStatus.INACTIVE,
6013
- suspended: import_client2.UserStatus.SUSPENDED,
6014
- banned: import_client2.UserStatus.BANNED
6022
+ active: UserStatus.ACTIVE,
6023
+ inactive: UserStatus.INACTIVE,
6024
+ suspended: UserStatus.SUSPENDED,
6025
+ banned: UserStatus.BANNED
6015
6026
  };
6016
- return statusMap[status] || import_client2.UserStatus.ACTIVE;
6027
+ return statusMap[status] || UserStatus.ACTIVE;
6017
6028
  }
6018
6029
  /**
6019
6030
  * Map Prisma enum to application status
6020
6031
  */
6021
6032
  mapEnumToStatus(status) {
6022
6033
  const statusMap = {
6023
- [import_client2.UserStatus.ACTIVE]: "active",
6024
- [import_client2.UserStatus.INACTIVE]: "inactive",
6025
- [import_client2.UserStatus.SUSPENDED]: "suspended",
6026
- [import_client2.UserStatus.BANNED]: "banned"
6034
+ [UserStatus.ACTIVE]: "active",
6035
+ [UserStatus.INACTIVE]: "inactive",
6036
+ [UserStatus.SUSPENDED]: "suspended",
6037
+ [UserStatus.BANNED]: "banned"
6027
6038
  };
6028
6039
  return statusMap[status];
6029
6040
  }