@gapi/auth 1.8.169 → 1.8.170

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.
@@ -23,16 +23,16 @@ let AuthInternalService = class AuthInternalService {
23
23
  this.config = config;
24
24
  }
25
25
  verifyToken(token) {
26
- return jsonwebtoken_1.verify(token, this.config.cert, { algorithm: 'HS256' });
26
+ return (0, jsonwebtoken_1.verify)(token, this.config.cert, { algorithm: 'HS256' });
27
27
  }
28
28
  decrypt(password) {
29
- const decipher = crypto_1.createDecipheriv(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
29
+ const decipher = (0, crypto_1.createDecipheriv)(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
30
30
  let dec = decipher.update(password, 'hex', 'utf8');
31
31
  dec += decipher.final('utf8');
32
32
  return dec;
33
33
  }
34
34
  encrypt(password) {
35
- const cipher = crypto_1.createCipheriv(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
35
+ const cipher = (0, crypto_1.createCipheriv)(this.config.cyper.algorithm, this.config.cyper.privateKey, this.config.cyper.iv);
36
36
  let crypted = cipher.update(password, 'utf8', 'hex');
37
37
  crypted += cipher.final('hex');
38
38
  return crypted;
@@ -47,14 +47,14 @@ let AuthInternalService = class AuthInternalService {
47
47
  callback(null, true, token);
48
48
  }
49
49
  sign(tokenData) {
50
- return jsonwebtoken_1.sign(tokenData, this.config.cert, {
50
+ return (0, jsonwebtoken_1.sign)(tokenData, this.config.cert, {
51
51
  algorithm: this.config.algorithm,
52
52
  });
53
53
  }
54
54
  };
55
- AuthInternalService = __decorate([
56
- core_1.Service(),
57
- __param(0, core_1.Inject(auth_config_1.AUTH_MODULE_CONFIG)),
55
+ exports.AuthInternalService = AuthInternalService;
56
+ exports.AuthInternalService = AuthInternalService = __decorate([
57
+ (0, core_1.Service)(),
58
+ __param(0, (0, core_1.Inject)(auth_config_1.AUTH_MODULE_CONFIG)),
58
59
  __metadata("design:paramtypes", [Object])
59
60
  ], AuthInternalService);
60
- exports.AuthInternalService = AuthInternalService;
package/dist/index.d.ts CHANGED
@@ -3,5 +3,5 @@ import { AuthModuleConfig } from './auth.config';
3
3
  export declare class AuthModule {
4
4
  static forRoot(config?: AuthModuleConfig): ModuleWithServices;
5
5
  }
6
- export * from './auth.service';
7
6
  export * from './auth.config';
7
+ export * from './auth.service';
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -13,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
13
17
  return c > 3 && r && Object.defineProperty(target, key, r), r;
14
18
  };
15
19
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
21
  };
18
22
  var AuthModule_1;
19
23
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -35,9 +39,9 @@ let AuthModule = AuthModule_1 = class AuthModule {
35
39
  };
36
40
  }
37
41
  };
38
- AuthModule = AuthModule_1 = __decorate([
39
- core_1.Module()
40
- ], AuthModule);
41
42
  exports.AuthModule = AuthModule;
42
- __exportStar(require("./auth.service"), exports);
43
+ exports.AuthModule = AuthModule = AuthModule_1 = __decorate([
44
+ (0, core_1.Module)()
45
+ ], AuthModule);
43
46
  __exportStar(require("./auth.config"), exports);
47
+ __exportStar(require("./auth.service"), exports);
@@ -0,0 +1,38 @@
1
+ import { defineConfig, globalIgnores } from 'eslint/config';
2
+ import tsParser from '@typescript-eslint/parser';
3
+ import tsPlugin from '@typescript-eslint/eslint-plugin';
4
+ import prettierPlugin from 'eslint-plugin-prettier';
5
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
6
+ import prettierConfig from 'eslint-config-prettier';
7
+
8
+ export default defineConfig([
9
+ globalIgnores(["dist/*"]),
10
+ {
11
+ files: ['./src/**/*.ts', './src/**/*.tsx'],
12
+ languageOptions: {
13
+ parser: tsParser,
14
+ ecmaVersion: 2018,
15
+ sourceType: 'module',
16
+ },
17
+ plugins: {
18
+ '@typescript-eslint': tsPlugin,
19
+ prettier: prettierPlugin,
20
+ 'simple-import-sort': simpleImportSort, // ✅ MUST MATCH RULE PREFIX
21
+ },
22
+ rules: {
23
+ ...tsPlugin.configs.recommended.rules,
24
+ ...prettierConfig.rules,
25
+
26
+ '@typescript-eslint/explicit-function-return-type': 'off',
27
+ '@typescript-eslint/camelcase': 'off',
28
+ '@typescript-eslint/interface-name-prefix': 'off',
29
+
30
+ 'simple-import-sort/imports': 'error',
31
+ 'simple-import-sort/exports': 'error',
32
+ 'sort-imports': 'off',
33
+ 'import/order': 'off',
34
+
35
+ 'prettier/prettier': 'error',
36
+ },
37
+ },
38
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/auth",
3
- "version": "1.8.169",
3
+ "version": "1.8.170",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi-auth"
@@ -36,8 +36,8 @@
36
36
  "moment": "^2.22.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@rxdi/core": "^0.7.193",
40
- "@types/node": "^13.11.1",
41
- "typescript": "^3.8.3"
39
+ "@rxdi/core": "^0.7.194",
40
+ "@types/node": "^25.0.3",
41
+ "typescript": "^5.9.3"
42
42
  }
43
43
  }
@@ -1,7 +1,7 @@
1
1
  import { InjectionToken } from '@rxdi/core';
2
2
 
3
3
  export const AUTH_MODULE_CONFIG = new InjectionToken(
4
- 'gapi-auth-module-config-injection-token'
4
+ 'gapi-auth-module-config-injection-token',
5
5
  );
6
6
 
7
7
  export interface AuthInterface {
@@ -17,7 +17,7 @@ export class AuthInternalService {
17
17
  const decipher = createDecipheriv(
18
18
  this.config.cyper.algorithm,
19
19
  this.config.cyper.privateKey,
20
- this.config.cyper.iv
20
+ this.config.cyper.iv,
21
21
  );
22
22
  let dec = decipher.update(password, 'hex', 'utf8');
23
23
  dec += decipher.final('utf8');
@@ -28,7 +28,7 @@ export class AuthInternalService {
28
28
  const cipher = createCipheriv(
29
29
  this.config.cyper.algorithm,
30
30
  this.config.cyper.privateKey,
31
- this.config.cyper.iv
31
+ this.config.cyper.iv,
32
32
  );
33
33
  let crypted = cipher.update(password, 'utf8', 'hex');
34
34
  crypted += cipher.final('hex');
package/src/index.ts CHANGED
@@ -19,5 +19,5 @@ export class AuthModule {
19
19
  }
20
20
  }
21
21
 
22
- export * from './auth.service';
23
22
  export * from './auth.config';
23
+ export * from './auth.service';