nestjs-cryptography 3.1.1 → 3.2.0

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.
@@ -1,4 +1,4 @@
1
1
  import { CryptographyOptionsInterface } from './interfaces';
2
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<CryptographyOptionsInterface, "register", "create", {
2
+ export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<CryptographyOptionsInterface, "forRoot", "create", {
3
3
  isGlobal: boolean;
4
4
  }>, MODULE_OPTIONS_TOKEN: string | symbol;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
5
5
  const common_1 = require("@nestjs/common");
6
6
  _a = new common_1.ConfigurableModuleBuilder()
7
+ .setClassMethodName('forRoot')
7
8
  .setExtras({
8
9
  isGlobal: true,
9
10
  }, (definition, extras) => ({
@@ -52,6 +52,7 @@ const common_1 = require("@nestjs/common");
52
52
  const cryptography_module_definition_1 = require("./cryptography.module-definition");
53
53
  const constants_1 = require("./constants");
54
54
  let CryptographyService = class CryptographyService {
55
+ moduleOptions;
55
56
  constructor(moduleOptions) {
56
57
  this.moduleOptions = moduleOptions;
57
58
  }
@@ -26,6 +26,7 @@ export interface CryptographyEncryptionOptions {
26
26
  };
27
27
  }
28
28
  export interface CryptographyOptionsInterface {
29
+ isGlobal?: boolean;
29
30
  useDefaultValues?: boolean;
30
31
  kdf?: Partial<CryptographyKdfOptions>;
31
32
  hashing?: Partial<CryptographyHashingOptions>;
@@ -0,0 +1,35 @@
1
+ // @ts-check
2
+ import eslint from '@eslint/js';
3
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4
+ import globals from 'globals';
5
+ import tseslint from 'typescript-eslint';
6
+
7
+ export default tseslint.config(
8
+ {
9
+ ignores: ['eslint.config.mjs', 'wiki/', 'dist/' , 'test/', 'index.js', '.eslintrc.js', 'index.d.ts', 'index.ts'],
10
+ },
11
+ eslint.configs.recommended,
12
+ ...tseslint.configs.recommendedTypeChecked,
13
+ eslintPluginPrettierRecommended,
14
+ {
15
+ languageOptions: {
16
+ globals: {
17
+ ...globals.node,
18
+ ...globals.jest,
19
+ },
20
+ ecmaVersion: 5,
21
+ sourceType: 'module',
22
+ parserOptions: {
23
+ projectService: true,
24
+ tsconfigRootDir: import.meta.dirname,
25
+ },
26
+ },
27
+ },
28
+ {
29
+ rules: {
30
+ '@typescript-eslint/no-explicit-any': 'off',
31
+ '@typescript-eslint/no-floating-promises': 'warn',
32
+ '@typescript-eslint/no-unsafe-argument': 'warn'
33
+ },
34
+ },
35
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-cryptography",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "author": {
5
5
  "name": "Marc Jorge Gonzalez",
6
6
  "url": "https://github.com/mjorgegulab"
@@ -30,33 +30,34 @@
30
30
  "argon2": "^0.41.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@nestjs/cli": "^11.0.4",
34
- "@nestjs/common": "^11.0.10",
35
- "@nestjs/core": "^11.0.10",
36
- "@nestjs/platform-express": "^11.0.10",
37
- "@nestjs/schematics": "^11.0.1",
38
- "@nestjs/testing": "^11.0.10",
39
- "@types/express": "^5.0.0",
33
+ "@eslint/eslintrc": "^3.3.1",
34
+ "@eslint/js": "^9.24.0",
35
+ "@nestjs/cli": "^11.0.6",
36
+ "@nestjs/common": "^11.0.13",
37
+ "@nestjs/core": "^11.0.13",
38
+ "@nestjs/platform-express": "^11.0.13",
39
+ "@nestjs/schematics": "^11.0.4",
40
+ "@nestjs/testing": "^11.0.13",
41
+ "@types/express": "^5.0.1",
40
42
  "@types/jest": "29.5.14",
41
- "@types/node": "22.13.4",
42
- "@types/supertest": "^6.0.2",
43
- "@typescript-eslint/eslint-plugin": "^7.12.0",
44
- "@typescript-eslint/parser": "^7.12.0",
45
- "eslint": "^8.57.0",
46
- "eslint-config-prettier": "^9.1.0",
47
- "eslint-plugin-prettier": "^5.2.3",
43
+ "@types/node": "22.14.0",
44
+ "@types/supertest": "^6.0.3",
45
+ "eslint": "^9.24.0",
46
+ "eslint-config-prettier": "^10.1.1",
47
+ "eslint-plugin-prettier": "^5.2.6",
48
48
  "jest": "29.7.0",
49
- "prettier": "^3.5.1",
49
+ "prettier": "^3.5.3",
50
50
  "reflect-metadata": "^0.2.2",
51
51
  "rimraf": "^6.0.1",
52
- "rxjs": "^7.8.1",
52
+ "rxjs": "^7.8.2",
53
53
  "source-map-support": "^0.5.21",
54
- "supertest": "^7.0.0",
55
- "ts-jest": "29.2.5",
54
+ "supertest": "^7.1.0",
55
+ "ts-jest": "29.3.1",
56
56
  "ts-loader": "^9.5.2",
57
57
  "ts-node": "^10.9.2",
58
58
  "tsconfig-paths": "4.2.0",
59
- "typescript": "^5.7.3"
59
+ "typescript": "^5.8.3",
60
+ "typescript-eslint": "^8.29.1"
60
61
  },
61
62
  "peerDependencies": {
62
63
  "@nestjs/common": "^9.0.0 || ^10.0.0 || ^11.0.0",