@vynelix/nestjs-multi-auth 0.3.2 → 1.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 (196) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +309 -18
  3. package/dist/auth/auth.controller.d.ts +3 -2
  4. package/dist/auth/auth.controller.js +32 -5
  5. package/dist/auth/auth.controller.js.map +1 -1
  6. package/dist/auth/auth.module.js +116 -68
  7. package/dist/auth/auth.module.js.map +1 -1
  8. package/dist/auth/auth.service.d.ts +52 -25
  9. package/dist/auth/auth.service.js +238 -327
  10. package/dist/auth/auth.service.js.map +1 -1
  11. package/dist/auth/core/auth-mapper.d.ts +1 -1
  12. package/dist/auth/core/database-otp.provider.d.ts +12 -0
  13. package/dist/auth/core/database-otp.provider.js +122 -0
  14. package/dist/auth/core/database-otp.provider.js.map +1 -0
  15. package/dist/auth/dto/requests/magic-link.dto.d.ts +1 -0
  16. package/dist/auth/dto/requests/magic-link.dto.js +6 -0
  17. package/dist/auth/dto/requests/magic-link.dto.js.map +1 -1
  18. package/dist/auth/dto/requests/mfa.dto.d.ts +5 -1
  19. package/dist/auth/dto/requests/mfa.dto.js +29 -8
  20. package/dist/auth/dto/requests/mfa.dto.js.map +1 -1
  21. package/dist/auth/enums/identifier-type.enum.d.ts +11 -0
  22. package/dist/auth/enums/identifier-type.enum.js +17 -0
  23. package/dist/auth/enums/identifier-type.enum.js.map +1 -0
  24. package/dist/auth/enums/mfa-type.enum.d.ts +5 -0
  25. package/dist/auth/enums/mfa-type.enum.js +10 -0
  26. package/dist/auth/enums/mfa-type.enum.js.map +1 -0
  27. package/dist/auth/enums/otp-purpose.enum.d.ts +8 -0
  28. package/dist/auth/enums/otp-purpose.enum.js +13 -0
  29. package/dist/auth/enums/otp-purpose.enum.js.map +1 -0
  30. package/dist/auth/enums/session-event.enum.d.ts +7 -0
  31. package/dist/auth/enums/session-event.enum.js +12 -0
  32. package/dist/auth/enums/session-event.enum.js.map +1 -0
  33. package/dist/auth/interfaces/auth-module-options.interface.d.ts +36 -1
  34. package/dist/auth/interfaces/auth-notification-provider.interface.d.ts +7 -1
  35. package/dist/auth/interfaces/auth-otp-provider.interface.d.ts +60 -0
  36. package/dist/auth/interfaces/auth-otp-provider.interface.js +7 -0
  37. package/dist/auth/interfaces/auth-otp-provider.interface.js.map +1 -0
  38. package/dist/auth/interfaces/models.interface.d.ts +91 -0
  39. package/dist/auth/interfaces/models.interface.js +3 -0
  40. package/dist/auth/interfaces/models.interface.js.map +1 -0
  41. package/dist/auth/interfaces/oauth-strategy.interface.d.ts +2 -2
  42. package/dist/auth/interfaces/repositories.interface.d.ts +70 -0
  43. package/dist/auth/interfaces/repositories.interface.js +3 -0
  44. package/dist/auth/interfaces/repositories.interface.js.map +1 -0
  45. package/dist/auth/interfaces/repository-tokens.d.ts +7 -0
  46. package/dist/auth/interfaces/repository-tokens.js +11 -0
  47. package/dist/auth/interfaces/repository-tokens.js.map +1 -0
  48. package/dist/auth/interfaces/signup-event-body.interface.d.ts +1 -1
  49. package/dist/auth/strategies/local-auth.strategy.d.ts +3 -5
  50. package/dist/auth/strategies/local-auth.strategy.js +64 -99
  51. package/dist/auth/strategies/local-auth.strategy.js.map +1 -1
  52. package/dist/auth/strategies/oauth/apple.strategy.d.ts +4 -6
  53. package/dist/auth/strategies/oauth/apple.strategy.js +57 -70
  54. package/dist/auth/strategies/oauth/apple.strategy.js.map +1 -1
  55. package/dist/auth/strategies/oauth/facebook.strategy.d.ts +4 -6
  56. package/dist/auth/strategies/oauth/facebook.strategy.js +58 -71
  57. package/dist/auth/strategies/oauth/facebook.strategy.js.map +1 -1
  58. package/dist/auth/strategies/oauth/google.strategy.d.ts +4 -6
  59. package/dist/auth/strategies/oauth/google.strategy.js +84 -155
  60. package/dist/auth/strategies/oauth/google.strategy.js.map +1 -1
  61. package/dist/auth/strategies/oauth/oauth.strategy.d.ts +2 -2
  62. package/dist/database/prisma/prisma-auth.adapter.d.ts +11 -0
  63. package/dist/database/prisma/prisma-auth.adapter.js +64 -0
  64. package/dist/database/prisma/prisma-auth.adapter.js.map +1 -0
  65. package/dist/database/prisma/repositories/auth-identifier.repository.d.ts +16 -0
  66. package/dist/database/prisma/repositories/auth-identifier.repository.js +41 -0
  67. package/dist/database/prisma/repositories/auth-identifier.repository.js.map +1 -0
  68. package/dist/database/prisma/repositories/auth.repository.d.ts +19 -0
  69. package/dist/database/prisma/repositories/auth.repository.js +49 -0
  70. package/dist/database/prisma/repositories/auth.repository.js.map +1 -0
  71. package/dist/database/prisma/repositories/index.d.ts +7 -0
  72. package/dist/database/prisma/repositories/index.js +24 -0
  73. package/dist/database/prisma/repositories/index.js.map +1 -0
  74. package/dist/database/prisma/repositories/mfa-method.repository.d.ts +11 -0
  75. package/dist/database/prisma/repositories/mfa-method.repository.js +33 -0
  76. package/dist/database/prisma/repositories/mfa-method.repository.js.map +1 -0
  77. package/dist/database/prisma/repositories/oauth-provider.repository.d.ts +14 -0
  78. package/dist/database/prisma/repositories/oauth-provider.repository.js +39 -0
  79. package/dist/database/prisma/repositories/oauth-provider.repository.js.map +1 -0
  80. package/dist/database/prisma/repositories/otp-token.repository.d.ts +13 -0
  81. package/dist/database/prisma/repositories/otp-token.repository.js +52 -0
  82. package/dist/database/prisma/repositories/otp-token.repository.js.map +1 -0
  83. package/dist/database/prisma/repositories/session-log.repository.d.ts +12 -0
  84. package/dist/database/prisma/repositories/session-log.repository.js +42 -0
  85. package/dist/database/prisma/repositories/session-log.repository.js.map +1 -0
  86. package/dist/database/prisma/repositories/session.repository.d.ts +16 -0
  87. package/dist/database/prisma/repositories/session.repository.js +41 -0
  88. package/dist/database/prisma/repositories/session.repository.js.map +1 -0
  89. package/dist/database/typeorm/entities/auth-identify.entity.d.ts +23 -0
  90. package/dist/database/typeorm/entities/auth-identify.entity.js +61 -0
  91. package/dist/database/typeorm/entities/auth-identify.entity.js.map +1 -0
  92. package/dist/database/typeorm/entities/auth.entity.d.ts +45 -0
  93. package/dist/database/typeorm/entities/auth.entity.js +129 -0
  94. package/dist/database/typeorm/entities/auth.entity.js.map +1 -0
  95. package/dist/database/typeorm/entities/base.entity.d.ts +7 -0
  96. package/dist/database/typeorm/entities/base.entity.js +44 -0
  97. package/dist/database/typeorm/entities/base.entity.js.map +1 -0
  98. package/dist/database/typeorm/entities/entities.d.ts +7 -0
  99. package/dist/database/typeorm/entities/entities.js +18 -0
  100. package/dist/database/typeorm/entities/entities.js.map +1 -0
  101. package/dist/database/typeorm/entities/mfa-method.entity.d.ts +10 -0
  102. package/dist/database/typeorm/entities/mfa-method.entity.js +47 -0
  103. package/dist/database/typeorm/entities/mfa-method.entity.js.map +1 -0
  104. package/dist/database/typeorm/entities/oauth-provider.entity.d.ts +38 -0
  105. package/dist/database/typeorm/entities/oauth-provider.entity.js +88 -0
  106. package/dist/database/typeorm/entities/oauth-provider.entity.js.map +1 -0
  107. package/dist/database/typeorm/entities/otp-token.entity.d.ts +15 -0
  108. package/dist/database/typeorm/entities/otp-token.entity.js +53 -0
  109. package/dist/database/typeorm/entities/otp-token.entity.js.map +1 -0
  110. package/dist/database/typeorm/entities/session.entity.d.ts +21 -0
  111. package/dist/database/typeorm/entities/session.entity.js +71 -0
  112. package/dist/database/typeorm/entities/session.entity.js.map +1 -0
  113. package/dist/database/typeorm/entities/session_log.entity.d.ts +25 -0
  114. package/dist/database/typeorm/entities/session_log.entity.js +78 -0
  115. package/dist/database/typeorm/entities/session_log.entity.js.map +1 -0
  116. package/dist/database/typeorm/migrations/auth-entities.d.ts +7 -0
  117. package/dist/database/typeorm/migrations/auth-entities.js +18 -0
  118. package/dist/database/typeorm/migrations/auth-entities.js.map +1 -0
  119. package/dist/database/typeorm/migrations/auth-schema.initializer.d.ts +9 -0
  120. package/dist/database/typeorm/migrations/auth-schema.initializer.js +36 -0
  121. package/dist/database/typeorm/migrations/auth-schema.initializer.js.map +1 -0
  122. package/dist/database/typeorm/migrations/auth.migration.v1.d.ts +12 -0
  123. package/dist/database/typeorm/migrations/auth.migration.v1.js +157 -0
  124. package/dist/database/typeorm/migrations/auth.migration.v1.js.map +1 -0
  125. package/dist/database/typeorm/migrations/auth.migration.v2.d.ts +8 -0
  126. package/dist/database/typeorm/migrations/auth.migration.v2.js +23 -0
  127. package/dist/database/typeorm/migrations/auth.migration.v2.js.map +1 -0
  128. package/dist/database/typeorm/migrations/auth.migrations.d.ts +2 -0
  129. package/dist/database/typeorm/migrations/auth.migrations.js +10 -0
  130. package/dist/database/typeorm/migrations/auth.migrations.js.map +1 -0
  131. package/dist/database/typeorm/migrations/migration.service.d.ts +9 -0
  132. package/dist/database/typeorm/migrations/migration.service.js +75 -0
  133. package/dist/database/typeorm/migrations/migration.service.js.map +1 -0
  134. package/dist/database/typeorm/repositories/auth-identifier.repository.d.ts +18 -0
  135. package/dist/database/typeorm/repositories/auth-identifier.repository.js +64 -0
  136. package/dist/database/typeorm/repositories/auth-identifier.repository.js.map +1 -0
  137. package/dist/database/typeorm/repositories/auth.repository.d.ts +21 -0
  138. package/dist/database/typeorm/repositories/auth.repository.js +71 -0
  139. package/dist/database/typeorm/repositories/auth.repository.js.map +1 -0
  140. package/dist/database/typeorm/repositories/index.d.ts +7 -0
  141. package/dist/database/typeorm/repositories/index.js +24 -0
  142. package/dist/database/typeorm/repositories/index.js.map +1 -0
  143. package/dist/database/typeorm/repositories/mfa-method.repository.d.ts +13 -0
  144. package/dist/database/typeorm/repositories/mfa-method.repository.js +46 -0
  145. package/dist/database/typeorm/repositories/mfa-method.repository.js.map +1 -0
  146. package/dist/database/typeorm/repositories/oauth-provider.repository.d.ts +16 -0
  147. package/dist/database/typeorm/repositories/oauth-provider.repository.js +52 -0
  148. package/dist/database/typeorm/repositories/oauth-provider.repository.js.map +1 -0
  149. package/dist/database/typeorm/repositories/otp-token.repository.d.ts +13 -0
  150. package/dist/database/typeorm/repositories/otp-token.repository.js +52 -0
  151. package/dist/database/typeorm/repositories/otp-token.repository.js.map +1 -0
  152. package/dist/database/typeorm/repositories/session-log.repository.d.ts +12 -0
  153. package/dist/database/typeorm/repositories/session-log.repository.js +47 -0
  154. package/dist/database/typeorm/repositories/session-log.repository.js.map +1 -0
  155. package/dist/database/typeorm/repositories/session.repository.d.ts +18 -0
  156. package/dist/database/typeorm/repositories/session.repository.js +84 -0
  157. package/dist/database/typeorm/repositories/session.repository.js.map +1 -0
  158. package/dist/database/typeorm/typeorm-auth.adapter.d.ts +2 -0
  159. package/dist/database/typeorm/typeorm-auth.adapter.js +50 -0
  160. package/dist/database/typeorm/typeorm-auth.adapter.js.map +1 -0
  161. package/dist/index.d.ts +11 -9
  162. package/dist/index.js +18 -10
  163. package/dist/index.js.map +1 -1
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/fix-imports.js +46 -0
  166. package/fix-syntax.js +66 -0
  167. package/package.json +22 -20
  168. package/patch-local-specs.js +52 -0
  169. package/patch-oauth-specs.js +41 -0
  170. package/patch-specs.js +36 -0
  171. package/prompts/database_adapter.md +157 -0
  172. package/prompts/otp_provider.md +292 -0
  173. package/scratch/create-prisma-repos-final.js +139 -0
  174. package/scratch/create-prisma-repos.js +280 -0
  175. package/scratch/fix-events-spec.js +12 -0
  176. package/scratch/fix-imports.js +53 -0
  177. package/scratch/fix-prisma-interfaces.js +41 -0
  178. package/scratch/fix-prisma-interfaces2.js +36 -0
  179. package/scratch/fix-prisma-interfaces3.js +26 -0
  180. package/scratch/fix-prisma.js +28 -0
  181. package/scratch/fix-test-imports.js +51 -0
  182. package/scratch/fix-tests-advanced.js +68 -0
  183. package/scratch/fix-tests-advanced2.js +23 -0
  184. package/scratch/fix-tests-concrete.js +40 -0
  185. package/scratch/fix-tests-final.js +35 -0
  186. package/scratch/fix-tests-final2.js +28 -0
  187. package/scratch/fix-tests-final3.js +26 -0
  188. package/scratch/fix-tests-methods.js +40 -0
  189. package/scratch/fix-tests-proxy.js +67 -0
  190. package/scratch/fix-tests-types.js +24 -0
  191. package/scratch/rewrite-tests.js +110 -0
  192. package/tsc_errors.txt +60 -0
  193. package/tsc_errors2.txt +93 -0
  194. package/tmp-cv-test/package-lock.json +0 -250
  195. package/tmp-cv-test/package.json +0 -17
  196. package/tmp-cv-test/test.ts +0 -11
@@ -1,250 +0,0 @@
1
- {
2
- "name": "tmp-cv-test",
3
- "version": "1.0.0",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "tmp-cv-test",
9
- "version": "1.0.0",
10
- "license": "ISC",
11
- "dependencies": {
12
- "class-validator": "^0.15.1",
13
- "ts-node": "^10.9.2",
14
- "typescript": "^6.0.3"
15
- }
16
- },
17
- "node_modules/@cspotcode/source-map-support": {
18
- "version": "0.8.1",
19
- "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
20
- "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
21
- "license": "MIT",
22
- "dependencies": {
23
- "@jridgewell/trace-mapping": "0.3.9"
24
- },
25
- "engines": {
26
- "node": ">=12"
27
- }
28
- },
29
- "node_modules/@jridgewell/resolve-uri": {
30
- "version": "3.1.2",
31
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
32
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
33
- "license": "MIT",
34
- "engines": {
35
- "node": ">=6.0.0"
36
- }
37
- },
38
- "node_modules/@jridgewell/sourcemap-codec": {
39
- "version": "1.5.5",
40
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
41
- "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
42
- "license": "MIT"
43
- },
44
- "node_modules/@jridgewell/trace-mapping": {
45
- "version": "0.3.9",
46
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
47
- "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
48
- "license": "MIT",
49
- "dependencies": {
50
- "@jridgewell/resolve-uri": "^3.0.3",
51
- "@jridgewell/sourcemap-codec": "^1.4.10"
52
- }
53
- },
54
- "node_modules/@tsconfig/node10": {
55
- "version": "1.0.12",
56
- "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz",
57
- "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==",
58
- "license": "MIT"
59
- },
60
- "node_modules/@tsconfig/node12": {
61
- "version": "1.0.11",
62
- "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
63
- "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
64
- "license": "MIT"
65
- },
66
- "node_modules/@tsconfig/node14": {
67
- "version": "1.0.3",
68
- "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
69
- "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
70
- "license": "MIT"
71
- },
72
- "node_modules/@tsconfig/node16": {
73
- "version": "1.0.4",
74
- "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
75
- "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
76
- "license": "MIT"
77
- },
78
- "node_modules/@types/node": {
79
- "version": "25.9.1",
80
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz",
81
- "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==",
82
- "license": "MIT",
83
- "peer": true,
84
- "dependencies": {
85
- "undici-types": ">=7.24.0 <7.24.7"
86
- }
87
- },
88
- "node_modules/@types/validator": {
89
- "version": "13.15.10",
90
- "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.10.tgz",
91
- "integrity": "sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==",
92
- "license": "MIT"
93
- },
94
- "node_modules/acorn": {
95
- "version": "8.16.0",
96
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
97
- "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
98
- "license": "MIT",
99
- "bin": {
100
- "acorn": "bin/acorn"
101
- },
102
- "engines": {
103
- "node": ">=0.4.0"
104
- }
105
- },
106
- "node_modules/acorn-walk": {
107
- "version": "8.3.5",
108
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz",
109
- "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==",
110
- "license": "MIT",
111
- "dependencies": {
112
- "acorn": "^8.11.0"
113
- },
114
- "engines": {
115
- "node": ">=0.4.0"
116
- }
117
- },
118
- "node_modules/arg": {
119
- "version": "4.1.3",
120
- "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
121
- "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
122
- "license": "MIT"
123
- },
124
- "node_modules/class-validator": {
125
- "version": "0.15.1",
126
- "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.15.1.tgz",
127
- "integrity": "sha512-LqoS80HBBSCVhz/3KloUly0ovokxpdOLR++Al3J3+dHXWt9sTKlKd4eYtoxhxyUjoe5+UcIM+5k9MIxyBWnRTw==",
128
- "license": "MIT",
129
- "dependencies": {
130
- "@types/validator": "^13.15.3",
131
- "libphonenumber-js": "^1.11.1",
132
- "validator": "^13.15.22"
133
- }
134
- },
135
- "node_modules/create-require": {
136
- "version": "1.1.1",
137
- "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
138
- "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
139
- "license": "MIT"
140
- },
141
- "node_modules/diff": {
142
- "version": "4.0.4",
143
- "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz",
144
- "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==",
145
- "license": "BSD-3-Clause",
146
- "engines": {
147
- "node": ">=0.3.1"
148
- }
149
- },
150
- "node_modules/libphonenumber-js": {
151
- "version": "1.13.4",
152
- "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.13.4.tgz",
153
- "integrity": "sha512-/lhWr7vq8foWN9Apksnd9v8/cfwzW6g6qKOCo25XBGkNaVCHucXO57hLy4CWHGvytvLz6Nt3J5Gs8p3jlCGFXA==",
154
- "license": "MIT"
155
- },
156
- "node_modules/make-error": {
157
- "version": "1.3.6",
158
- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
159
- "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
160
- "license": "ISC"
161
- },
162
- "node_modules/ts-node": {
163
- "version": "10.9.2",
164
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
165
- "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
166
- "license": "MIT",
167
- "dependencies": {
168
- "@cspotcode/source-map-support": "^0.8.0",
169
- "@tsconfig/node10": "^1.0.7",
170
- "@tsconfig/node12": "^1.0.7",
171
- "@tsconfig/node14": "^1.0.0",
172
- "@tsconfig/node16": "^1.0.2",
173
- "acorn": "^8.4.1",
174
- "acorn-walk": "^8.1.1",
175
- "arg": "^4.1.0",
176
- "create-require": "^1.1.0",
177
- "diff": "^4.0.1",
178
- "make-error": "^1.1.1",
179
- "v8-compile-cache-lib": "^3.0.1",
180
- "yn": "3.1.1"
181
- },
182
- "bin": {
183
- "ts-node": "dist/bin.js",
184
- "ts-node-cwd": "dist/bin-cwd.js",
185
- "ts-node-esm": "dist/bin-esm.js",
186
- "ts-node-script": "dist/bin-script.js",
187
- "ts-node-transpile-only": "dist/bin-transpile.js",
188
- "ts-script": "dist/bin-script-deprecated.js"
189
- },
190
- "peerDependencies": {
191
- "@swc/core": ">=1.2.50",
192
- "@swc/wasm": ">=1.2.50",
193
- "@types/node": "*",
194
- "typescript": ">=2.7"
195
- },
196
- "peerDependenciesMeta": {
197
- "@swc/core": {
198
- "optional": true
199
- },
200
- "@swc/wasm": {
201
- "optional": true
202
- }
203
- }
204
- },
205
- "node_modules/typescript": {
206
- "version": "6.0.3",
207
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
208
- "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
209
- "license": "Apache-2.0",
210
- "bin": {
211
- "tsc": "bin/tsc",
212
- "tsserver": "bin/tsserver"
213
- },
214
- "engines": {
215
- "node": ">=14.17"
216
- }
217
- },
218
- "node_modules/undici-types": {
219
- "version": "7.24.6",
220
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
221
- "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
222
- "license": "MIT",
223
- "peer": true
224
- },
225
- "node_modules/v8-compile-cache-lib": {
226
- "version": "3.0.1",
227
- "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
228
- "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
229
- "license": "MIT"
230
- },
231
- "node_modules/validator": {
232
- "version": "13.15.35",
233
- "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.35.tgz",
234
- "integrity": "sha512-TQ5pAGhd5whStmqWvYF4OjQROlmv9SMFVt37qoCBdqRffuuklWYQlCNnEs2ZaIBD1kZRNnikiZOS1eqgkar0iw==",
235
- "license": "MIT",
236
- "engines": {
237
- "node": ">= 0.10"
238
- }
239
- },
240
- "node_modules/yn": {
241
- "version": "3.1.1",
242
- "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
243
- "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
244
- "license": "MIT",
245
- "engines": {
246
- "node": ">=6"
247
- }
248
- }
249
- }
250
- }
@@ -1,17 +0,0 @@
1
- {
2
- "name": "tmp-cv-test",
3
- "version": "1.0.0",
4
- "main": "index.js",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "ISC",
11
- "description": "",
12
- "dependencies": {
13
- "class-validator": "^0.15.1",
14
- "ts-node": "^10.9.2",
15
- "typescript": "^6.0.3"
16
- }
17
- }
@@ -1,11 +0,0 @@
1
- import { validateSync, IsPhoneNumber } from 'class-validator';
2
-
3
- class Test {
4
- @IsPhoneNumber()
5
- phone?: string;
6
- }
7
-
8
- const t1 = new Test();
9
- t1.phone = '+447455731149';
10
- const errors1 = validateSync(t1);
11
- console.log('Errors without libphonenumber-js:', errors1.map(e => e.constraints));