@htyf-mp/cli 0.2.12 → 0.2.13

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 +1 -1
  2. package/src/config.mjs +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": {
package/src/config.mjs CHANGED
@@ -33,9 +33,12 @@ export class ProjectConfig {
33
33
  }
34
34
 
35
35
  generateAppId() {
36
- return md5(uuidv4({
37
- random: [0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36]
38
- }));
36
+ // 生成唯一的 UUID,然后转换为 MD5
37
+ // 使用时间戳和随机数确保唯一性
38
+ const timestamp = Date.now();
39
+ const randomUuid = uuidv4();
40
+ const uniqueString = `${timestamp}-${randomUuid}`;
41
+ return md5(uniqueString);
39
42
  }
40
43
 
41
44
  createProjectConfig(appName, displayName, appid, rotate) {