moyan-mfw-base 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moyan-mfw-base",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "墨焱MFW核心框架",
5
5
  "main": "./src/shared/dist/index.js",
6
6
  "types": "./src/shared/dist/index.d.ts",
@@ -38,7 +38,10 @@
38
38
  },
39
39
  "typesVersions": {
40
40
  "*": {
41
- "*": ["./src/*/dist/*.d.ts", "./src/*/dist/index.d.ts"]
41
+ "*": [
42
+ "./src/*/dist/*.d.ts",
43
+ "./src/*/dist/index.d.ts"
44
+ ]
42
45
  }
43
46
  },
44
47
  "scripts": {
@@ -51,10 +54,20 @@
51
54
  "typecheck:shared": "pnpm --filter @internal/base-shared typecheck",
52
55
  "typecheck:backend": "pnpm --filter @internal/base-backend typecheck",
53
56
  "typecheck:frontend": "pnpm --filter @internal/base-frontend typecheck",
54
- "typecheck": "pnpm run typecheck:shared && pnpm run typecheck:backend && pnpm run typecheck:frontend"
57
+ "typecheck": "pnpm run typecheck:shared && pnpm run typecheck:backend && pnpm run typecheck:frontend",
58
+ "release:patch": "npm version patch && pnpm build && npm publish",
59
+ "release:minor": "npm version minor && pnpm build && npm publish",
60
+ "release:major": "npm version major && pnpm build && npm publish"
55
61
  },
56
62
  "license": "MIT",
57
- "keywords": ["moyan", "mfw", "admin", "framework", "nestjs", "vue3"],
63
+ "keywords": [
64
+ "moyan",
65
+ "mfw",
66
+ "admin",
67
+ "framework",
68
+ "nestjs",
69
+ "vue3"
70
+ ],
58
71
  "files": [
59
72
  "src/backend/dist",
60
73
  "src/frontend/dist",
@@ -3,43 +3,13 @@
3
3
  * @fileoverview 加密工具函数
4
4
  * @description 提供密码加密、验证等加密相关功能
5
5
  */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
39
9
  Object.defineProperty(exports, "__esModule", { value: true });
40
10
  exports.hashPassword = hashPassword;
41
11
  exports.verifyPassword = verifyPassword;
42
- const bcrypt = __importStar(require("bcrypt"));
12
+ const bcryptjs_1 = __importDefault(require("bcryptjs"));
43
13
  /**
44
14
  * 默认盐值 rounds
45
15
  * @description bcrypt 加密的盐值 rounds,值越大越安全但越慢
@@ -56,7 +26,7 @@ const SALT_ROUNDS = 10;
56
26
  * ```
57
27
  */
58
28
  async function hashPassword(password) {
59
- return bcrypt.hash(password, SALT_ROUNDS);
29
+ return bcryptjs_1.default.hash(password, SALT_ROUNDS);
60
30
  }
61
31
  /**
62
32
  * 密码验证
@@ -70,6 +40,6 @@ async function hashPassword(password) {
70
40
  * ```
71
41
  */
72
42
  async function verifyPassword(password, hash) {
73
- return bcrypt.compare(password, hash);
43
+ return bcryptjs_1.default.compare(password, hash);
74
44
  }
75
45
  //# sourceMappingURL=encrypt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../../../src/common/utils/encrypt.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBH,oCAEC;AAaD,wCAKC;AAtCD,+CAAiC;AAEjC;;;GAGG;AACH,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,cAAc,CAClC,QAAgB,EAChB,IAAY;IAEZ,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC"}
1
+ {"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../../../src/common/utils/encrypt.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAoBH,oCAEC;AAaD,wCAKC;AAtCD,wDAA8B;AAE9B;;;GAGG;AACH,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAAC,QAAgB;IACjD,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,cAAc,CAClC,QAAgB,EAChB,IAAY;IAEZ,OAAO,kBAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC"}