@aranzatech/aranza-auth 0.2.2 → 0.2.4

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ### Added
10
+
11
+ - **E2E harness** (`__tests__/helpers/auth-e2e.harness.ts`) — app Nest + repo mock reutilizable.
12
+ - **E2E ampliados**: register duplicado, login inválido, refresh reuse, `pwdAt` tras change-password, features off → 404, Swagger UI `GET /api`.
13
+
14
+ ## [0.2.3] - 2026-07-03
15
+
16
+ ### Fixed
17
+
18
+ - **Swagger**: explicit `type: String | Boolean` on all DTO `@ApiProperty` decorators — fixes circular dependency crash when consuming the bundled package from npm (missing `emitDecoratorMetadata` in dist).
19
+ - **Tests**: integration test boots `setupAuthSwagger` with real `SwaggerModule`.
20
+
7
21
  ## [0.2.2] - 2026-07-03
8
22
 
9
23
  ### Added
package/README.md CHANGED
@@ -727,7 +727,7 @@ import { AUTH_MODULE_OPTIONS, AUTH_HOOKS, AUTH_REPOSITORY } from "@aranzatech/ar
727
727
 
728
728
  ```bash
729
729
  npm install
730
- npm run ci # lint + tests + coverage gates + audit + build
730
+ npm run ci # lint + 122 tests (unit + e2e) + coverage gates + audit + build
731
731
  npm test # solo tests
732
732
  ```
733
733
 
package/dist/index.cjs CHANGED
@@ -82,21 +82,21 @@ var AuthErrorCode = {
82
82
  var AuthTokensDto = class {
83
83
  };
84
84
  __decorateClass([
85
- swagger.ApiProperty({ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." })
85
+ swagger.ApiProperty({ type: String, example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." })
86
86
  ], AuthTokensDto.prototype, "accessToken", 2);
87
87
  __decorateClass([
88
- swagger.ApiProperty({ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." })
88
+ swagger.ApiProperty({ type: String, example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." })
89
89
  ], AuthTokensDto.prototype, "refreshToken", 2);
90
90
  var ChangePasswordDto = class {
91
91
  };
92
92
  __decorateClass([
93
- swagger.ApiProperty({ example: "CurrentPassword1", minLength: 1, maxLength: 128 }),
93
+ swagger.ApiProperty({ type: String, example: "CurrentPassword1", minLength: 1, maxLength: 128 }),
94
94
  classValidator.IsString(),
95
95
  classValidator.IsNotEmpty(),
96
96
  classValidator.Length(1, 128)
97
97
  ], ChangePasswordDto.prototype, "currentPassword", 2);
98
98
  __decorateClass([
99
- swagger.ApiProperty({ example: "NewPassword1", minLength: 8, maxLength: 128 }),
99
+ swagger.ApiProperty({ type: String, example: "NewPassword1", minLength: 8, maxLength: 128 }),
100
100
  classValidator.IsString(),
101
101
  classValidator.IsNotEmpty(),
102
102
  classValidator.Length(8, 128)
@@ -104,26 +104,26 @@ __decorateClass([
104
104
  var ForgotPasswordDto = class {
105
105
  };
106
106
  __decorateClass([
107
- swagger.ApiProperty({ example: "user@example.com" }),
107
+ swagger.ApiProperty({ type: String, example: "user@example.com" }),
108
108
  classValidator.IsEmail()
109
109
  ], ForgotPasswordDto.prototype, "email", 2);
110
110
  var LoginDto = class {
111
111
  };
112
112
  __decorateClass([
113
- swagger.ApiPropertyOptional({ example: "user@example.com" }),
113
+ swagger.ApiPropertyOptional({ type: String, example: "user@example.com" }),
114
114
  classValidator.IsOptional(),
115
115
  classValidator.ValidateIf((dto) => dto.email != null && dto.email.trim() !== ""),
116
116
  classValidator.IsEmail(),
117
117
  classValidator.Length(3, 255)
118
118
  ], LoginDto.prototype, "email", 2);
119
119
  __decorateClass([
120
- swagger.ApiPropertyOptional({ example: "johndoe" }),
120
+ swagger.ApiPropertyOptional({ type: String, example: "johndoe" }),
121
121
  classValidator.IsOptional(),
122
122
  classValidator.IsString(),
123
123
  classValidator.Length(3, 50)
124
124
  ], LoginDto.prototype, "username", 2);
125
125
  __decorateClass([
126
- swagger.ApiProperty({ example: "Password1", minLength: 8, maxLength: 128 }),
126
+ swagger.ApiProperty({ type: String, example: "Password1", minLength: 8, maxLength: 128 }),
127
127
  classValidator.IsString(),
128
128
  classValidator.IsNotEmpty(),
129
129
  classValidator.Length(8, 128)
@@ -131,19 +131,19 @@ __decorateClass([
131
131
  var MeResponseDto = class {
132
132
  };
133
133
  __decorateClass([
134
- swagger.ApiProperty({ example: "507f1f77bcf86cd799439011" })
134
+ swagger.ApiProperty({ type: String, example: "507f1f77bcf86cd799439011" })
135
135
  ], MeResponseDto.prototype, "id", 2);
136
136
  __decorateClass([
137
- swagger.ApiPropertyOptional({ example: "user@example.com" })
137
+ swagger.ApiPropertyOptional({ type: String, example: "user@example.com" })
138
138
  ], MeResponseDto.prototype, "email", 2);
139
139
  __decorateClass([
140
- swagger.ApiPropertyOptional({ example: "johndoe" })
140
+ swagger.ApiPropertyOptional({ type: String, example: "johndoe" })
141
141
  ], MeResponseDto.prototype, "username", 2);
142
142
  __decorateClass([
143
- swagger.ApiProperty({ example: true })
143
+ swagger.ApiProperty({ type: Boolean, example: true })
144
144
  ], MeResponseDto.prototype, "emailVerified", 2);
145
145
  __decorateClass([
146
- swagger.ApiProperty({ example: false })
146
+ swagger.ApiProperty({ type: Boolean, example: false })
147
147
  ], MeResponseDto.prototype, "disabled", 2);
148
148
  __decorateClass([
149
149
  swagger.ApiPropertyOptional({ type: String, format: "date-time" })
@@ -154,33 +154,33 @@ __decorateClass([
154
154
  var RefreshTokenDto = class {
155
155
  };
156
156
  __decorateClass([
157
- swagger.ApiProperty({ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }),
157
+ swagger.ApiProperty({ type: String, example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }),
158
158
  classValidator.IsString(),
159
159
  classValidator.IsNotEmpty()
160
160
  ], RefreshTokenDto.prototype, "refreshToken", 2);
161
161
  var RegisterAckDto = class {
162
162
  };
163
163
  __decorateClass([
164
- swagger.ApiProperty({ example: true, enum: [true] })
164
+ swagger.ApiProperty({ type: Boolean, example: true, enum: [true] })
165
165
  ], RegisterAckDto.prototype, "registered", 2);
166
166
  var RegisterDto = class {
167
167
  };
168
168
  __decorateClass([
169
- swagger.ApiPropertyOptional({ example: "user@example.com" }),
169
+ swagger.ApiPropertyOptional({ type: String, example: "user@example.com" }),
170
170
  classValidator.IsOptional(),
171
171
  classValidator.ValidateIf((dto) => dto.email != null && dto.email.trim() !== ""),
172
172
  classValidator.IsEmail(),
173
173
  classValidator.Length(3, 255)
174
174
  ], RegisterDto.prototype, "email", 2);
175
175
  __decorateClass([
176
- swagger.ApiPropertyOptional({ example: "johndoe" }),
176
+ swagger.ApiPropertyOptional({ type: String, example: "johndoe" }),
177
177
  classValidator.IsOptional(),
178
178
  classValidator.IsString(),
179
179
  classValidator.Length(3, 50),
180
180
  classValidator.Matches(/^[a-zA-Z0-9._-]+$/)
181
181
  ], RegisterDto.prototype, "username", 2);
182
182
  __decorateClass([
183
- swagger.ApiProperty({ example: "Password1", minLength: 8, maxLength: 128 }),
183
+ swagger.ApiProperty({ type: String, example: "Password1", minLength: 8, maxLength: 128 }),
184
184
  classValidator.IsString(),
185
185
  classValidator.IsNotEmpty(),
186
186
  classValidator.Length(8, 128)
@@ -188,18 +188,18 @@ __decorateClass([
188
188
  var ResendVerificationDto = class {
189
189
  };
190
190
  __decorateClass([
191
- swagger.ApiProperty({ example: "user@example.com" }),
191
+ swagger.ApiProperty({ type: String, example: "user@example.com" }),
192
192
  classValidator.IsEmail()
193
193
  ], ResendVerificationDto.prototype, "email", 2);
194
194
  var ResetPasswordDto = class {
195
195
  };
196
196
  __decorateClass([
197
- swagger.ApiProperty({ example: "reset-token-from-email" }),
197
+ swagger.ApiProperty({ type: String, example: "reset-token-from-email" }),
198
198
  classValidator.IsString(),
199
199
  classValidator.IsNotEmpty()
200
200
  ], ResetPasswordDto.prototype, "token", 2);
201
201
  __decorateClass([
202
- swagger.ApiProperty({ example: "NewPassword1", minLength: 8, maxLength: 128 }),
202
+ swagger.ApiProperty({ type: String, example: "NewPassword1", minLength: 8, maxLength: 128 }),
203
203
  classValidator.IsString(),
204
204
  classValidator.IsNotEmpty(),
205
205
  classValidator.Length(8, 128)
@@ -207,7 +207,7 @@ __decorateClass([
207
207
  var VerifyEmailDto = class {
208
208
  };
209
209
  __decorateClass([
210
- swagger.ApiProperty({ example: "verification-token-from-email" }),
210
+ swagger.ApiProperty({ type: String, example: "verification-token-from-email" }),
211
211
  classValidator.IsString(),
212
212
  classValidator.IsNotEmpty()
213
213
  ], VerifyEmailDto.prototype, "token", 2);