@adonisjs/auth 9.2.4 → 9.3.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.
- package/build/src/errors.d.ts +5 -5
- package/build/src/mixins/lucid.d.ts +24 -17
- package/build/src/mixins/lucid.js +13 -6
- package/build/src/mixins/lucid.js.map +1 -1
- package/package.json +47 -39
package/build/src/errors.d.ts
CHANGED
|
@@ -33,17 +33,17 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
33
33
|
* the guard driver name and value is a factory function
|
|
34
34
|
* to respond to the request.
|
|
35
35
|
*/
|
|
36
|
-
renderers: Record<string, (message: string, error: any, ctx: HttpContext) => Promise<void> | void>;
|
|
36
|
+
renderers: Record<string, (message: string, error: /*elided*/ any, ctx: HttpContext) => Promise<void> | void>;
|
|
37
37
|
/**
|
|
38
38
|
* Returns the message to be sent in the HTTP response.
|
|
39
39
|
* Feel free to override this method and return a custom
|
|
40
40
|
* response.
|
|
41
41
|
*/
|
|
42
|
-
getResponseMessage(error: any, ctx: HttpContext): string;
|
|
42
|
+
getResponseMessage(error: /*elided*/ any, ctx: HttpContext): string;
|
|
43
43
|
/**
|
|
44
44
|
* Converts exception to an HTTP response
|
|
45
45
|
*/
|
|
46
|
-
handle(error: any, ctx: HttpContext): Promise<void>;
|
|
46
|
+
handle(error: /*elided*/ any, ctx: HttpContext): Promise<void>;
|
|
47
47
|
name: string;
|
|
48
48
|
help?: string;
|
|
49
49
|
code?: string;
|
|
@@ -79,11 +79,11 @@ export declare const E_INVALID_CREDENTIALS: {
|
|
|
79
79
|
* Feel free to override this method and return a custom
|
|
80
80
|
* response.
|
|
81
81
|
*/
|
|
82
|
-
getResponseMessage(error: any, ctx: HttpContext): string;
|
|
82
|
+
getResponseMessage(error: /*elided*/ any, ctx: HttpContext): string;
|
|
83
83
|
/**
|
|
84
84
|
* Converts exception to an HTTP response
|
|
85
85
|
*/
|
|
86
|
-
handle(error: any, ctx: HttpContext): Promise<void>;
|
|
86
|
+
handle(error: /*elided*/ any, ctx: HttpContext): Promise<void>;
|
|
87
87
|
name: string;
|
|
88
88
|
help?: string;
|
|
89
89
|
code?: string;
|
|
@@ -17,6 +17,11 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
17
17
|
passwordColumnName: string;
|
|
18
18
|
}): <Model extends NormalizeConstructor<typeof BaseModel>>(superclass: Model) => {
|
|
19
19
|
new (...args: any[]): {
|
|
20
|
+
/**
|
|
21
|
+
* Verifies the plain password against the user's password
|
|
22
|
+
* hash
|
|
23
|
+
*/
|
|
24
|
+
verifyPassword(plainPassword: string): Promise<boolean>;
|
|
20
25
|
$attributes: import("@adonisjs/lucid/types/model").ModelObject;
|
|
21
26
|
$extras: import("@adonisjs/lucid/types/model").ModelObject;
|
|
22
27
|
$original: import("@adonisjs/lucid/types/model").ModelObject;
|
|
@@ -35,8 +40,8 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
35
40
|
$options?: import("@adonisjs/lucid/types/model").ModelOptions;
|
|
36
41
|
$trx?: import("@adonisjs/lucid/types/database").TransactionClientContract;
|
|
37
42
|
$setOptionsAndTrx(options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): void;
|
|
38
|
-
useTransaction(trx: import("@adonisjs/lucid/types/database").TransactionClientContract): any;
|
|
39
|
-
useConnection(connection: string): any;
|
|
43
|
+
useTransaction(trx: import("@adonisjs/lucid/types/database").TransactionClientContract): /*elided*/ any;
|
|
44
|
+
useConnection(connection: string): /*elided*/ any;
|
|
40
45
|
$getQueryFor(action: "insert", client: import("@adonisjs/lucid/types/database").QueryClientContract): ReturnType<import("@adonisjs/lucid/types/database").QueryClientContract["insertQuery"]>;
|
|
41
46
|
$getQueryFor(action: "update" | "delete" | "refresh", client: import("@adonisjs/lucid/types/database").QueryClientContract): import("@adonisjs/lucid/types/model").ModelQueryBuilderContract<import("@adonisjs/lucid/types/model").LucidModel>;
|
|
42
47
|
$setAttribute(key: string, value: any): void;
|
|
@@ -48,18 +53,19 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
48
53
|
$getRelated(key: string, defaultValue?: any): import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | undefined | null;
|
|
49
54
|
$consumeAdapterResult(adapterResult: import("@adonisjs/lucid/types/model").ModelObject, sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject): void;
|
|
50
55
|
$hydrateOriginals(): void;
|
|
51
|
-
fill(value: Partial<{}>, allowExtraProperties?: boolean): any;
|
|
52
|
-
merge(value: Partial<{}>, allowExtraProperties?: boolean): any;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
fill(value: Partial<{}>, allowExtraProperties?: boolean): /*elided*/ any;
|
|
57
|
+
merge(value: Partial<{}>, allowExtraProperties?: boolean): /*elided*/ any;
|
|
58
|
+
isDirty(fields?: undefined[] | undefined): boolean;
|
|
59
|
+
enableForceUpdate(): /*elided*/ any;
|
|
60
|
+
save(): Promise</*elided*/ any>;
|
|
61
|
+
lockForUpdate<T>(callback: (user: /*elided*/ any) => T | Promise<T>): Promise<T>;
|
|
56
62
|
delete(): Promise<void>;
|
|
57
|
-
refresh(): Promise
|
|
58
|
-
load: import("@adonisjs/lucid/types/model").LucidRowPreload
|
|
59
|
-
loadOnce: import("@adonisjs/lucid/types/model").LucidRowPreloadOnce
|
|
60
|
-
preload: import("@adonisjs/lucid/types/model").LucidRowPreload
|
|
61
|
-
loadAggregate: <Self extends any, Name extends import("@adonisjs/lucid/types/relations").ExtractModelRelations<Self>, RelatedBuilder = Self[Name] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? Self[Name]["subQuery"] : never>(name: Name, callback: (builder: RelatedBuilder) => void) => import("@adonisjs/lucid/types/model").LazyLoadAggregatesContract<Self>;
|
|
62
|
-
loadCount: <Self extends any, Name_1 extends import("@adonisjs/lucid/types/relations").ExtractModelRelations<Self>, RelatedBuilder_1 = Self[Name_1] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? Self[Name_1]["subQuery"] : never>(name: Name_1, callback?: ((builder: RelatedBuilder_1) => void) | undefined) => import("@adonisjs/lucid/types/model").LazyLoadAggregatesContract<Self>;
|
|
63
|
+
refresh(): Promise</*elided*/ any>;
|
|
64
|
+
load: import("@adonisjs/lucid/types/model").LucidRowPreload</*elided*/ any>;
|
|
65
|
+
loadOnce: import("@adonisjs/lucid/types/model").LucidRowPreloadOnce</*elided*/ any>;
|
|
66
|
+
preload: import("@adonisjs/lucid/types/model").LucidRowPreload</*elided*/ any>;
|
|
67
|
+
loadAggregate: <Self extends /*elided*/ any, Name extends import("@adonisjs/lucid/types/relations").ExtractModelRelations<Self>, RelatedBuilder = Self[Name] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? Self[Name]["subQuery"] : never>(name: Name, callback: (builder: RelatedBuilder) => void) => import("@adonisjs/lucid/types/model").LazyLoadAggregatesContract<Self>;
|
|
68
|
+
loadCount: <Self extends /*elided*/ any, Name_1 extends import("@adonisjs/lucid/types/relations").ExtractModelRelations<Self>, RelatedBuilder_1 = Self[Name_1] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? Self[Name_1]["subQuery"] : never>(name: Name_1, callback?: ((builder: RelatedBuilder_1) => void) | undefined) => import("@adonisjs/lucid/types/model").LazyLoadAggregatesContract<Self>;
|
|
63
69
|
serializeAttributes(fields?: import("@adonisjs/lucid/types/model").CherryPickFields, raw?: boolean): import("@adonisjs/lucid/types/model").ModelObject;
|
|
64
70
|
serializeComputed(fields?: import("@adonisjs/lucid/types/model").CherryPickFields): import("@adonisjs/lucid/types/model").ModelObject;
|
|
65
71
|
serializeRelations(fields: undefined, raw: true): {
|
|
@@ -70,24 +76,24 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
70
76
|
serialize(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick): import("@adonisjs/lucid/types/model").ModelObject;
|
|
71
77
|
toObject(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
72
78
|
toJSON(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
73
|
-
related<Name_2 extends undefined>(relation: Name_2): any[Name_2] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? any[Name_2]["client"] : never;
|
|
79
|
+
related<Name_2 extends undefined>(relation: Name_2): /*elided*/ any[Name_2] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? /*elided*/ any[Name_2]["client"] : never;
|
|
74
80
|
};
|
|
75
81
|
/**
|
|
76
82
|
* Hook to verify user password when creating or updating
|
|
77
83
|
* the user model.
|
|
78
84
|
*/
|
|
79
|
-
hashPassword<T extends any & Model>(this: T, user: InstanceType<T>): Promise<void>;
|
|
85
|
+
hashPassword<T extends /*elided*/ any & Model>(this: T, user: InstanceType<T>): Promise<void>;
|
|
80
86
|
/**
|
|
81
87
|
* Finds the user for authentication via "verifyCredentials".
|
|
82
88
|
* Feel free to override this method customize the user
|
|
83
89
|
* lookup behavior.
|
|
84
90
|
*/
|
|
85
|
-
findForAuth<T extends any & Model>(this: T, uids: string[], value: string): Promise<InstanceType<T> | null>;
|
|
91
|
+
findForAuth<T extends /*elided*/ any & Model>(this: T, uids: string[], value: string): Promise<InstanceType<T> | null>;
|
|
86
92
|
/**
|
|
87
93
|
* Find a user by uid and verify their password. This method is
|
|
88
94
|
* safe from timing attacks.
|
|
89
95
|
*/
|
|
90
|
-
verifyCredentials<T extends any & Model>(this: T, uid: string, password: string): Promise<InstanceType<T>>;
|
|
96
|
+
verifyCredentials<T extends /*elided*/ any & Model>(this: T, uid: string, password: string): Promise<InstanceType<T>>;
|
|
91
97
|
readonly booted: boolean;
|
|
92
98
|
find: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<null | InstanceType<T>>;
|
|
93
99
|
$columnsDefinitions: Map<string, import("@adonisjs/lucid/types/model").ModelColumnOptions>;
|
|
@@ -161,5 +167,6 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
161
167
|
updateOrCreateMany: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, predicate: keyof import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>> | (keyof import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>)[], payload: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>[], options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>[]>;
|
|
162
168
|
all: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>[]>;
|
|
163
169
|
query: <Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Result = InstanceType<Model_1>>(this: Model_1, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => import("@adonisjs/lucid/types/model").ModelQueryBuilderContract<Model_1, Result>;
|
|
170
|
+
transaction: import("@adonisjs/lucid/types/database").TransactionFn;
|
|
164
171
|
truncate: (cascade?: boolean) => Promise<void>;
|
|
165
172
|
} & Model;
|
|
@@ -42,16 +42,23 @@ function withAuthFinder(hash, options) {
|
|
|
42
42
|
await hash().make(password);
|
|
43
43
|
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
if (await user.verifyPassword(password)) {
|
|
46
|
+
return user;
|
|
47
|
+
}
|
|
48
|
+
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Verifies the plain password against the user's password
|
|
52
|
+
* hash
|
|
53
|
+
*/
|
|
54
|
+
verifyPassword(plainPassword) {
|
|
55
|
+
const passwordHash = this[options.passwordColumnName];
|
|
46
56
|
if (!passwordHash) {
|
|
47
57
|
throw new RuntimeException(
|
|
48
|
-
`Cannot verify password
|
|
58
|
+
`Cannot verify password. The value for "${options.passwordColumnName}" column is undefined or null`
|
|
49
59
|
);
|
|
50
60
|
}
|
|
51
|
-
|
|
52
|
-
return user;
|
|
53
|
-
}
|
|
54
|
-
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
61
|
+
return hash().verify(passwordHash, plainPassword);
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
__decorateClass([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/mixins/lucid.ts"],"sourcesContent":["/*\n * @adonisjs/auth\n *\n * (c) AdonisJS\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nimport type { Hash } from '@adonisjs/core/hash'\nimport { RuntimeException } from '@adonisjs/core/exceptions'\nimport { beforeSave, type BaseModel } from '@adonisjs/lucid/orm'\nimport type { NormalizeConstructor } from '@adonisjs/core/types/helpers'\nimport { E_INVALID_CREDENTIALS } from '../errors.js'\n\n/**\n * Mixing to add user lookup and password verification methods\n * on a model.\n *\n * Under the hood, this mixin defines following methods and hooks\n *\n * - beforeSave hook to hash user password\n * - findForAuth method to find a user during authentication\n * - verifyCredentials method to verify user credentials and prevent\n * timing attacks.\n */\nexport function withAuthFinder(\n hash: () => Hash,\n options: {\n uids: string[]\n passwordColumnName: string\n }\n) {\n return <Model extends NormalizeConstructor<typeof BaseModel>>(superclass: Model) => {\n class UserWithUserFinder extends superclass {\n /**\n * Hook to verify user password when creating or updating\n * the user model.\n */\n @beforeSave()\n static async hashPassword<T extends typeof UserWithUserFinder>(\n this: T,\n user: InstanceType<T>\n ) {\n if (user.$dirty[options.passwordColumnName]) {\n ;(user as any)[options.passwordColumnName] = await hash().make(\n (user as any)[options.passwordColumnName]\n )\n }\n }\n\n /**\n * Finds the user for authentication via \"verifyCredentials\".\n * Feel free to override this method customize the user\n * lookup behavior.\n */\n static findForAuth<T extends typeof UserWithUserFinder>(\n this: T,\n uids: string[],\n value: string\n ): Promise<InstanceType<T> | null> {\n const query = this.query()\n uids.forEach((uid) => query.orWhere(uid, value))\n return query.limit(1).first()\n }\n\n /**\n * Find a user by uid and verify their password. This method is\n * safe from timing attacks.\n */\n static async verifyCredentials<T extends typeof UserWithUserFinder>(\n this: T,\n uid: string,\n password: string\n ) {\n /**\n * Fail when uid or the password are missing\n */\n if (!uid || !password) {\n throw new E_INVALID_CREDENTIALS('Invalid user credentials')\n }\n\n const user = await this.findForAuth(options.uids, uid)\n if (!user) {\n await hash().make(password)\n throw new E_INVALID_CREDENTIALS('Invalid user credentials')\n }\n\n const passwordHash = (
|
|
1
|
+
{"version":3,"sources":["../../../src/mixins/lucid.ts"],"sourcesContent":["/*\n * @adonisjs/auth\n *\n * (c) AdonisJS\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nimport type { Hash } from '@adonisjs/core/hash'\nimport { RuntimeException } from '@adonisjs/core/exceptions'\nimport { beforeSave, type BaseModel } from '@adonisjs/lucid/orm'\nimport type { NormalizeConstructor } from '@adonisjs/core/types/helpers'\nimport { E_INVALID_CREDENTIALS } from '../errors.js'\n\n/**\n * Mixing to add user lookup and password verification methods\n * on a model.\n *\n * Under the hood, this mixin defines following methods and hooks\n *\n * - beforeSave hook to hash user password\n * - findForAuth method to find a user during authentication\n * - verifyCredentials method to verify user credentials and prevent\n * timing attacks.\n */\nexport function withAuthFinder(\n hash: () => Hash,\n options: {\n uids: string[]\n passwordColumnName: string\n }\n) {\n return <Model extends NormalizeConstructor<typeof BaseModel>>(superclass: Model) => {\n class UserWithUserFinder extends superclass {\n /**\n * Hook to verify user password when creating or updating\n * the user model.\n */\n @beforeSave()\n static async hashPassword<T extends typeof UserWithUserFinder>(\n this: T,\n user: InstanceType<T>\n ) {\n if (user.$dirty[options.passwordColumnName]) {\n ;(user as any)[options.passwordColumnName] = await hash().make(\n (user as any)[options.passwordColumnName]\n )\n }\n }\n\n /**\n * Finds the user for authentication via \"verifyCredentials\".\n * Feel free to override this method customize the user\n * lookup behavior.\n */\n static findForAuth<T extends typeof UserWithUserFinder>(\n this: T,\n uids: string[],\n value: string\n ): Promise<InstanceType<T> | null> {\n const query = this.query()\n uids.forEach((uid) => query.orWhere(uid, value))\n return query.limit(1).first()\n }\n\n /**\n * Find a user by uid and verify their password. This method is\n * safe from timing attacks.\n */\n static async verifyCredentials<T extends typeof UserWithUserFinder>(\n this: T,\n uid: string,\n password: string\n ) {\n /**\n * Fail when uid or the password are missing\n */\n if (!uid || !password) {\n throw new E_INVALID_CREDENTIALS('Invalid user credentials')\n }\n\n const user = await this.findForAuth(options.uids, uid)\n if (!user) {\n await hash().make(password)\n throw new E_INVALID_CREDENTIALS('Invalid user credentials')\n }\n\n if (await user.verifyPassword(password)) {\n return user\n }\n\n throw new E_INVALID_CREDENTIALS('Invalid user credentials')\n }\n\n /**\n * Verifies the plain password against the user's password\n * hash\n */\n verifyPassword(plainPassword: string): Promise<boolean> {\n const passwordHash = (this as any)[options.passwordColumnName]\n if (!passwordHash) {\n throw new RuntimeException(\n `Cannot verify password. The value for \"${options.passwordColumnName}\" column is undefined or null`\n )\n }\n return hash().verify(passwordHash, plainPassword)\n }\n }\n\n return UserWithUserFinder\n }\n}\n"],"mappings":";;;;;;;;AAUA,SAAS,wBAAwB;AACjC,SAAS,kBAAkC;AAepC,SAAS,eACd,MACA,SAIA;AACA,SAAO,CAAuD,eAAsB;AAAA,IAClF,MAAM,2BAA2B,WAAW;AAAA,MAM1C,aAAa,aAEX,MACA;AACA,YAAI,KAAK,OAAO,QAAQ,kBAAkB,GAAG;AAC3C;AAAC,UAAC,KAAa,QAAQ,kBAAkB,IAAI,MAAM,KAAK,EAAE;AAAA,YACvD,KAAa,QAAQ,kBAAkB;AAAA,UAC1C;AAAA,QACF;AAAA,MACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOA,OAAO,YAEL,MACA,OACiC;AACjC,cAAM,QAAQ,KAAK,MAAM;AACzB,aAAK,QAAQ,CAAC,QAAQ,MAAM,QAAQ,KAAK,KAAK,CAAC;AAC/C,eAAO,MAAM,MAAM,CAAC,EAAE,MAAM;AAAA,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA,aAAa,kBAEX,KACA,UACA;AAIA,YAAI,CAAC,OAAO,CAAC,UAAU;AACrB,gBAAM,IAAI,sBAAsB,0BAA0B;AAAA,QAC5D;AAEA,cAAM,OAAO,MAAM,KAAK,YAAY,QAAQ,MAAM,GAAG;AACrD,YAAI,CAAC,MAAM;AACT,gBAAM,KAAK,EAAE,KAAK,QAAQ;AAC1B,gBAAM,IAAI,sBAAsB,0BAA0B;AAAA,QAC5D;AAEA,YAAI,MAAM,KAAK,eAAe,QAAQ,GAAG;AACvC,iBAAO;AAAA,QACT;AAEA,cAAM,IAAI,sBAAsB,0BAA0B;AAAA,MAC5D;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA,eAAe,eAAyC;AACtD,cAAM,eAAgB,KAAa,QAAQ,kBAAkB;AAC7D,YAAI,CAAC,cAAc;AACjB,gBAAM,IAAI;AAAA,YACR,0CAA0C,QAAQ,kBAAkB;AAAA,UACtE;AAAA,QACF;AACA,eAAO,KAAK,EAAE,OAAO,cAAc,aAAa;AAAA,MAClD;AAAA,IACF;AApEe;AAAA,MADZ,WAAW;AAAA,OALR,oBAMS;AAsEf,WAAO;AAAA,EACT;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonisjs/auth",
|
|
3
3
|
"description": "Official authentication provider for Adonis framework",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.3.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.16.0"
|
|
7
7
|
},
|
|
@@ -44,66 +44,62 @@
|
|
|
44
44
|
"postcompile": "npm run copy:templates",
|
|
45
45
|
"build": "npm run compile",
|
|
46
46
|
"prepublishOnly": "npm run build",
|
|
47
|
-
"lint": "eslint .
|
|
47
|
+
"lint": "eslint .",
|
|
48
48
|
"format": "prettier --write .",
|
|
49
49
|
"release": "release-it",
|
|
50
50
|
"version": "npm run build",
|
|
51
|
-
"sync-labels": "github-label-sync --labels .github/labels.json adonisjs/auth",
|
|
52
51
|
"quick:test": "cross-env NODE_DEBUG=\"adonisjs:auth:*\" node --enable-source-maps --import=ts-node-maintained/register/esm ./bin/test.js"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@adonisjs/assembler": "^7.
|
|
56
|
-
"@adonisjs/core": "^6.
|
|
57
|
-
"@adonisjs/eslint-config": "^
|
|
54
|
+
"@adonisjs/assembler": "^7.8.2",
|
|
55
|
+
"@adonisjs/core": "^6.17.0",
|
|
56
|
+
"@adonisjs/eslint-config": "^2.0.0-beta.7",
|
|
58
57
|
"@adonisjs/hash": "^9.0.5",
|
|
59
|
-
"@adonisjs/i18n": "^2.
|
|
60
|
-
"@adonisjs/lucid": "^21.
|
|
61
|
-
"@adonisjs/prettier-config": "^1.
|
|
62
|
-
"@adonisjs/session": "^7.
|
|
63
|
-
"@adonisjs/tsconfig": "^1.
|
|
64
|
-
"@
|
|
65
|
-
"@commitlint/config-conventional": "^19.2.2",
|
|
66
|
-
"@japa/api-client": "^2.0.3",
|
|
58
|
+
"@adonisjs/i18n": "^2.2.0",
|
|
59
|
+
"@adonisjs/lucid": "^21.5.1",
|
|
60
|
+
"@adonisjs/prettier-config": "^1.4.0",
|
|
61
|
+
"@adonisjs/session": "^7.5.0",
|
|
62
|
+
"@adonisjs/tsconfig": "^1.4.0",
|
|
63
|
+
"@japa/api-client": "^2.0.4",
|
|
67
64
|
"@japa/assert": "^3.0.0",
|
|
68
65
|
"@japa/browser-client": "^2.0.3",
|
|
69
66
|
"@japa/expect-type": "^2.0.2",
|
|
70
67
|
"@japa/file-system": "^2.3.0",
|
|
71
68
|
"@japa/plugin-adonisjs": "^3.0.1",
|
|
72
69
|
"@japa/runner": "^3.1.4",
|
|
73
|
-
"@japa/snapshot": "^2.0.
|
|
74
|
-
"@
|
|
70
|
+
"@japa/snapshot": "^2.0.6",
|
|
71
|
+
"@release-it/conventional-changelog": "^9.0.3",
|
|
72
|
+
"@swc/core": "^1.10.1",
|
|
75
73
|
"@types/basic-auth": "^1.1.8",
|
|
76
74
|
"@types/luxon": "^3.4.2",
|
|
77
|
-
"@types/node": "^
|
|
78
|
-
"@types/set-cookie-parser": "^2.4.
|
|
75
|
+
"@types/node": "^22.10.2",
|
|
76
|
+
"@types/set-cookie-parser": "^2.4.10",
|
|
79
77
|
"@types/sinon": "^17.0.3",
|
|
80
|
-
"c8": "^10.1.
|
|
78
|
+
"c8": "^10.1.3",
|
|
81
79
|
"convert-hrtime": "^5.0.0",
|
|
82
80
|
"copyfiles": "^2.4.1",
|
|
83
81
|
"cross-env": "^7.0.3",
|
|
84
|
-
"del-cli": "^
|
|
85
|
-
"dotenv": "^16.4.
|
|
86
|
-
"eslint": "^
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"playwright": "^1.44.1",
|
|
94
|
-
"prettier": "^3.3.2",
|
|
82
|
+
"del-cli": "^6.0.0",
|
|
83
|
+
"dotenv": "^16.4.7",
|
|
84
|
+
"eslint": "^9.17.0",
|
|
85
|
+
"luxon": "^3.5.0",
|
|
86
|
+
"mysql2": "^3.11.5",
|
|
87
|
+
"nock": "^13.5.6",
|
|
88
|
+
"pg": "^8.13.1",
|
|
89
|
+
"playwright": "^1.49.1",
|
|
90
|
+
"prettier": "^3.4.2",
|
|
95
91
|
"release-it": "^17.10.0",
|
|
96
|
-
"set-cookie-parser": "^2.
|
|
97
|
-
"sinon": "^
|
|
92
|
+
"set-cookie-parser": "^2.7.1",
|
|
93
|
+
"sinon": "^19.0.2",
|
|
98
94
|
"sqlite3": "^5.1.7",
|
|
99
|
-
"tedious": "^18.
|
|
95
|
+
"tedious": "^18.6.1",
|
|
100
96
|
"timekeeper": "^2.3.1",
|
|
101
97
|
"ts-node-maintained": "^10.9.4",
|
|
102
|
-
"tsup": "^8.
|
|
103
|
-
"typescript": "^5.
|
|
98
|
+
"tsup": "^8.3.5",
|
|
99
|
+
"typescript": "^5.7.2"
|
|
104
100
|
},
|
|
105
101
|
"dependencies": {
|
|
106
|
-
"@adonisjs/presets": "^2.
|
|
102
|
+
"@adonisjs/presets": "^2.6.3",
|
|
107
103
|
"@poppinss/utils": "^6.8.3",
|
|
108
104
|
"basic-auth": "^2.0.1"
|
|
109
105
|
},
|
|
@@ -165,14 +161,26 @@
|
|
|
165
161
|
},
|
|
166
162
|
"release-it": {
|
|
167
163
|
"git": {
|
|
164
|
+
"requireCleanWorkingDir": true,
|
|
165
|
+
"requireUpstream": true,
|
|
168
166
|
"commitMessage": "chore(release): ${version}",
|
|
169
167
|
"tagAnnotation": "v${version}",
|
|
168
|
+
"push": true,
|
|
170
169
|
"tagName": "v${version}"
|
|
171
170
|
},
|
|
172
171
|
"github": {
|
|
173
|
-
"release": true
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
"release": true
|
|
173
|
+
},
|
|
174
|
+
"npm": {
|
|
175
|
+
"publish": true,
|
|
176
|
+
"skipChecks": true
|
|
177
|
+
},
|
|
178
|
+
"plugins": {
|
|
179
|
+
"@release-it/conventional-changelog": {
|
|
180
|
+
"preset": {
|
|
181
|
+
"name": "angular"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
176
184
|
}
|
|
177
185
|
},
|
|
178
186
|
"c8": {
|