@nivinjoseph/n-sec 5.0.5 → 6.0.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.
Files changed (81) hide show
  1. package/.eslintrc +13 -4
  2. package/.vscode/settings.json +103 -0
  3. package/.yarn/releases/yarn-4.0.2.cjs +893 -0
  4. package/.yarnrc.yml +3 -0
  5. package/dist/api-security/alg-type.d.ts +1 -0
  6. package/dist/api-security/alg-type.d.ts.map +1 -0
  7. package/dist/api-security/alg-type.js +2 -5
  8. package/dist/api-security/alg-type.js.map +1 -1
  9. package/dist/api-security/claim.d.ts +1 -0
  10. package/dist/api-security/claim.d.ts.map +1 -0
  11. package/dist/api-security/claim.js +5 -9
  12. package/dist/api-security/claim.js.map +1 -1
  13. package/dist/api-security/claims-identity.d.ts +2 -1
  14. package/dist/api-security/claims-identity.d.ts.map +1 -0
  15. package/dist/api-security/claims-identity.js +4 -8
  16. package/dist/api-security/claims-identity.js.map +1 -1
  17. package/dist/api-security/expired-token-exception.d.ts +1 -0
  18. package/dist/api-security/expired-token-exception.d.ts.map +1 -0
  19. package/dist/api-security/expired-token-exception.js +5 -9
  20. package/dist/api-security/expired-token-exception.js.map +1 -1
  21. package/dist/api-security/invalid-token-exception.d.ts +1 -0
  22. package/dist/api-security/invalid-token-exception.d.ts.map +1 -0
  23. package/dist/api-security/invalid-token-exception.js +7 -11
  24. package/dist/api-security/invalid-token-exception.js.map +1 -1
  25. package/dist/api-security/json-web-token.d.ts +3 -2
  26. package/dist/api-security/json-web-token.d.ts.map +1 -0
  27. package/dist/api-security/json-web-token.js +39 -43
  28. package/dist/api-security/json-web-token.js.map +1 -1
  29. package/dist/api-security/security-token.d.ts +1 -0
  30. package/dist/api-security/security-token.d.ts.map +1 -0
  31. package/dist/api-security/security-token.js +6 -10
  32. package/dist/api-security/security-token.js.map +1 -1
  33. package/dist/bin.d.ts +1 -0
  34. package/dist/bin.d.ts.map +1 -0
  35. package/dist/bin.js +15 -20
  36. package/dist/bin.js.map +1 -1
  37. package/dist/crypto/asymmetric-encryption.d.ts +2 -0
  38. package/dist/crypto/asymmetric-encryption.d.ts.map +1 -0
  39. package/dist/crypto/asymmetric-encryption.js +1 -1
  40. package/dist/crypto/asymmetric-encryption.js.map +1 -1
  41. package/dist/crypto/crypto-exception.d.ts +1 -0
  42. package/dist/crypto/crypto-exception.d.ts.map +1 -0
  43. package/dist/crypto/crypto-exception.js +2 -6
  44. package/dist/crypto/crypto-exception.js.map +1 -1
  45. package/dist/crypto/digital-signature.d.ts +2 -0
  46. package/dist/crypto/digital-signature.d.ts.map +1 -0
  47. package/dist/crypto/digital-signature.js +1 -1
  48. package/dist/crypto/digital-signature.js.map +1 -1
  49. package/dist/crypto/hash.d.ts +1 -0
  50. package/dist/crypto/hash.d.ts.map +1 -0
  51. package/dist/crypto/hash.js +7 -11
  52. package/dist/crypto/hash.js.map +1 -1
  53. package/dist/crypto/hmac.d.ts +1 -0
  54. package/dist/crypto/hmac.d.ts.map +1 -0
  55. package/dist/crypto/hmac.js +6 -10
  56. package/dist/crypto/hmac.js.map +1 -1
  57. package/dist/crypto/symmetric-encryption.d.ts +1 -0
  58. package/dist/crypto/symmetric-encryption.d.ts.map +1 -0
  59. package/dist/crypto/symmetric-encryption.js +13 -17
  60. package/dist/crypto/symmetric-encryption.js.map +1 -1
  61. package/dist/index.d.ts +13 -12
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +17 -28
  64. package/dist/index.js.map +1 -1
  65. package/dist/tsconfig.json +2 -1
  66. package/package.json +23 -24
  67. package/src/api-security/claims-identity.ts +1 -1
  68. package/src/api-security/json-web-token.ts +21 -21
  69. package/src/bin.ts +1 -1
  70. package/src/crypto/hash.ts +9 -9
  71. package/src/crypto/hmac.ts +7 -7
  72. package/src/crypto/symmetric-encryption.ts +11 -11
  73. package/src/index.ts +17 -18
  74. package/test/asymmetric-encryption.test.ts +37 -37
  75. package/test/digital-signature.test.ts +22 -22
  76. package/test/hash.test.ts +109 -109
  77. package/test/hmac.test.ts +56 -55
  78. package/test/json-web-token.test.ts +95 -95
  79. package/test/other.test.ts +8 -7
  80. package/test/symmetric-encryption.test.ts +49 -48
  81. package/tsconfig.json +8 -5
package/.eslintrc CHANGED
@@ -2,17 +2,27 @@
2
2
  "root": true,
3
3
  "parser": "@typescript-eslint/parser",
4
4
  "plugins": [
5
- "@typescript-eslint"
5
+ "@typescript-eslint",
6
+ "require-extensions"
6
7
  ],
7
8
  "extends": [
8
9
  "eslint:recommended",
9
10
  "plugin:@typescript-eslint/eslint-recommended",
10
- "plugin:@typescript-eslint/recommended"
11
+ "plugin:@typescript-eslint/recommended",
12
+ "plugin:require-extensions/recommended"
11
13
  ],
12
14
  "parserOptions": {
13
15
  "project": "tsconfig.json"
14
16
  },
15
17
  "rules": {
18
+ "quotes": "off",
19
+ "@typescript-eslint/quotes": [
20
+ "error",
21
+ "double",
22
+ {
23
+ "allowTemplateLiterals": true
24
+ }
25
+ ],
16
26
  "no-eval": "error",
17
27
  "no-void": "error",
18
28
  "no-with": "error",
@@ -253,8 +263,7 @@
253
263
  "no-dupe-class-members": "off",
254
264
  "@typescript-eslint/no-dupe-class-members": "error",
255
265
  "@typescript-eslint/no-duplicate-enum-values": "error",
256
- "no-duplicate-imports": "off",
257
- "@typescript-eslint/no-duplicate-imports": "error",
266
+ "no-duplicate-imports": "error",
258
267
  "no-empty-function": "off",
259
268
  "@typescript-eslint/no-empty-function": [
260
269
  "error",
@@ -0,0 +1,103 @@
1
+ {
2
+ "typescript.format.placeOpenBraceOnNewLineForFunctions": true,
3
+ "typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
4
+ "editor.formatOnType": true,
5
+ "editor.formatOnPaste": true,
6
+ "typescript.tsdk": "./node_modules/typescript/lib",
7
+ "npm.packageManager": "yarn",
8
+ "files.exclude": {
9
+ "**/.git": true,
10
+ "**/.svn": true,
11
+ "**/.hg": true,
12
+ "**/.DS_Store": true,
13
+ "**/*.js": {
14
+ "when": "$(basename).ts"
15
+ },
16
+ "**/*.map": {
17
+ "when": "$(basename).map"
18
+ },
19
+ "**/*.css": {
20
+ "when": "$(basename).scss"
21
+ },
22
+ "**/*.tsbuildinfo": true
23
+ },
24
+ "editor.trimAutoWhitespace": false,
25
+ "cSpell.userWords": [
26
+ "Repo",
27
+ "comms",
28
+ "deserialize",
29
+ "nivinjoseph",
30
+ "strval",
31
+ ],
32
+ "typescript.updateImportsOnFileMove.enabled": "prompt",
33
+ "editor.wordWrapColumn": 120,
34
+ "editor.rulers": [
35
+ 120
36
+ ],
37
+ "[scss]": {
38
+ "editor.defaultFormatter": "vscode.css-language-features"
39
+ },
40
+ "scss.format.braceStyle": "expand",
41
+ "cSpell.words": [
42
+ "acumin",
43
+ "arrowless",
44
+ "attitudetype",
45
+ "autosize",
46
+ "bulma",
47
+ "chartjs",
48
+ "cohortcat",
49
+ "corpper",
50
+ "cropperjs",
51
+ "datagrid",
52
+ "datalabels",
53
+ "datasets",
54
+ "designtime",
55
+ "draggable",
56
+ "dropdown",
57
+ "Dtos",
58
+ "embd",
59
+ "endregion",
60
+ "epoched",
61
+ "Epocher",
62
+ "fontawesome",
63
+ "fullhd",
64
+ "fullheight",
65
+ "fullwidth",
66
+ "Grayscale",
67
+ "Gridline",
68
+ "Gridlines",
69
+ "Gsrs",
70
+ "hcentered",
71
+ "hoverable",
72
+ "Imotions",
73
+ "interslide",
74
+ "ject",
75
+ "luxon",
76
+ "marginless",
77
+ "mutex",
78
+ "Nivin",
79
+ "nodownload",
80
+ "numval",
81
+ "orgs",
82
+ "paddingless",
83
+ "quotemark",
84
+ "reorderable",
85
+ "scrollable",
86
+ "scrollbar",
87
+ "scroller",
88
+ "semibold",
89
+ "Skippable",
90
+ "taggable",
91
+ "taskworker",
92
+ "templator",
93
+ "tiktok",
94
+ "timelapse",
95
+ "uninvite",
96
+ "Unmerge",
97
+ "vcentered",
98
+ "wearedirt",
99
+ "xlink",
100
+ "xsmall",
101
+ "zoomable"
102
+ ],
103
+ }