befly 3.9.4 → 3.9.5

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/sync/syncDev.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.9.4",
3
+ "version": "3.9.5",
4
4
  "description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
5
5
  "type": "module",
6
6
  "private": false,
@@ -64,7 +64,7 @@
64
64
  "bun": ">=1.3.0"
65
65
  },
66
66
  "dependencies": {
67
- "befly-shared": "^1.2.0",
67
+ "befly-shared": "^1.2.1",
68
68
  "chalk": "^5.6.2",
69
69
  "es-toolkit": "^1.42.0",
70
70
  "fast-jwt": "^6.1.0",
@@ -73,7 +73,7 @@
73
73
  "pino": "^10.1.0",
74
74
  "pino-roll": "^4.0.0"
75
75
  },
76
- "gitHead": "19ec26ee9c8cf1f4ca6c4693176272a77a67f673",
76
+ "gitHead": "762170d80f1649d216fcf702752b1375d335ccc0",
77
77
  "devDependencies": {
78
78
  "typescript": "^5.9.3"
79
79
  }
package/sync/syncDev.ts CHANGED
@@ -119,8 +119,9 @@ export async function syncDevCommand(options: SyncDevOptions = {}): Promise<void
119
119
  devRole = { id: roleId };
120
120
  }
121
121
 
122
- // 使用 bcrypt 加密密码
123
- const hashed = await Cipher.hashPassword(beflyConfig.devPassword);
122
+ // 先对密码进行 SHA-256 + 盐值 哈希(模拟前端加密),再用 bcrypt 存储
123
+ const sha256Hashed = Cipher.sha256(beflyConfig.devPassword + 'befly');
124
+ const hashed = await Cipher.hashPassword(sha256Hashed);
124
125
 
125
126
  // 准备开发管理员数据
126
127
  const devData = {