manifest 4.10.0 → 4.10.1

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.
@@ -48,7 +48,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.AuthService = void 0;
49
49
  const common_1 = require("@nestjs/common");
50
50
  const config_1 = require("@nestjs/config");
51
- const bcrypt_1 = __importDefault(require("bcrypt"));
51
+ const bcryptjs_1 = __importDefault(require("bcryptjs"));
52
52
  const jwt = __importStar(require("jsonwebtoken"));
53
53
  const entity_service_1 = require("../entity/services/entity.service");
54
54
  const constants_1 = require("../constants");
@@ -91,7 +91,7 @@ let AuthService = class AuthService {
91
91
  const newUser = entityRepository.create({
92
92
  email: signupUserDto.email
93
93
  });
94
- newUser.password = bcrypt_1.default.hashSync(signupUserDto.password, constants_1.SALT_ROUNDS);
94
+ newUser.password = bcryptjs_1.default.hashSync(signupUserDto.password, constants_1.SALT_ROUNDS);
95
95
  const errors = await (0, class_validator_1.validate)(newUser);
96
96
  if (errors.length) {
97
97
  throw new common_1.HttpException(errors, common_1.HttpStatus.BAD_REQUEST);
@@ -146,7 +146,7 @@ let AuthService = class AuthService {
146
146
  email
147
147
  }
148
148
  });
149
- if (!user || !bcrypt_1.default.compareSync(password, user.password)) {
149
+ if (!user || !bcryptjs_1.default.compareSync(password, user.password)) {
150
150
  return null;
151
151
  }
152
152
  return user;
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CrudService = void 0;
16
- const bcrypt_1 = __importDefault(require("bcrypt"));
16
+ const bcryptjs_1 = __importDefault(require("bcryptjs"));
17
17
  const common_1 = require("@nestjs/common");
18
18
  const common_2 = require("../../../../common/src");
19
19
  const entity_service_1 = require("../../entity/services/entity.service");
@@ -134,7 +134,7 @@ let CrudService = class CrudService {
134
134
  .filter((prop) => prop.type === types_1.PropType.Password)
135
135
  .forEach((prop) => {
136
136
  if (newItem[prop.name]) {
137
- newItem[prop.name] = bcrypt_1.default.hashSync(itemDto['password'], constants_1.SALT_ROUNDS);
137
+ newItem[prop.name] = bcryptjs_1.default.hashSync(itemDto['password'], constants_1.SALT_ROUNDS);
138
138
  }
139
139
  });
140
140
  const errors = this.validationService.validate(newItem, entityManifest);
@@ -175,7 +175,7 @@ let CrudService = class CrudService {
175
175
  }
176
176
  const updatedItem = entityRepository.create({ id, ...itemDto });
177
177
  if (entityManifest.authenticable && itemDto.password) {
178
- updatedItem.password = bcrypt_1.default.hashSync(itemDto['password'], constants_1.SALT_ROUNDS);
178
+ updatedItem.password = bcryptjs_1.default.hashSync(itemDto['password'], constants_1.SALT_ROUNDS);
179
179
  }
180
180
  else if (entityManifest.authenticable && !itemDto.password) {
181
181
  delete updatedItem.password;
@@ -54,7 +54,7 @@ const relationship_service_1 = require("../../entity/services/relationship.servi
54
54
  const faker_1 = require("@faker-js/faker");
55
55
  const fs = __importStar(require("fs"));
56
56
  const path = __importStar(require("path"));
57
- const bcrypt_1 = __importDefault(require("bcrypt"));
57
+ const bcryptjs_1 = __importDefault(require("bcryptjs"));
58
58
  const constants_1 = require("../../constants");
59
59
  const storage_service_1 = require("../../storage/services/storage.service");
60
60
  const entity_manifest_service_1 = require("../../manifest/services/entity-manifest.service");
@@ -185,7 +185,7 @@ let SeederService = class SeederService {
185
185
  case types_1.PropType.Boolean:
186
186
  return faker_1.faker.datatype.boolean();
187
187
  case types_1.PropType.Password:
188
- return bcrypt_1.default.hashSync('manifest', 1);
188
+ return bcryptjs_1.default.hashSync('manifest', 1);
189
189
  case types_1.PropType.Choice:
190
190
  return faker_1.faker.helpers.arrayElement(propertyManifest.options.values);
191
191
  case types_1.PropType.Location:
@@ -217,7 +217,7 @@ let SeederService = class SeederService {
217
217
  }
218
218
  const admin = repository.create();
219
219
  admin.email = constants_1.DEFAULT_ADMIN_CREDENTIALS.email;
220
- admin.password = bcrypt_1.default.hashSync(constants_1.DEFAULT_ADMIN_CREDENTIALS.password, 1);
220
+ admin.password = bcryptjs_1.default.hashSync(constants_1.DEFAULT_ADMIN_CREDENTIALS.password, 1);
221
221
  await repository.save(admin);
222
222
  }
223
223
  async seedFile(entity, property) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manifest",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "The 1-file micro-backend",
5
5
  "author": "Manifest",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "@nestjs/swagger": "^7.3.1",
69
69
  "@nestjs/typeorm": "^10.0.2",
70
70
  "ajv": "^8.17.1",
71
- "bcrypt": "^5.1.1",
71
+ "bcryptjs": "^3.0.2",
72
72
  "chalk": "^4.1.2",
73
73
  "class-transformer": "^0.5.1",
74
74
  "class-validator": "^0.14.1",