@adonisjs/auth 9.2.3 → 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/debug.d.ts +0 -1
- package/build/src/errors.d.ts +22 -23
- package/build/src/mixins/lucid.d.ts +74 -69
- package/build/src/mixins/lucid.js +13 -6
- package/build/src/mixins/lucid.js.map +1 -1
- package/package.json +65 -46
package/build/src/debug.d.ts
CHANGED
package/build/src/errors.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
import type { HttpContext } from '@adonisjs/core/http';
|
|
3
2
|
/**
|
|
4
3
|
* The "E_UNAUTHORIZED_ACCESS" exception is raised when unable to
|
|
@@ -16,7 +15,7 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
16
15
|
* Endpoint to redirect to. Only used by "session" driver
|
|
17
16
|
* renderer
|
|
18
17
|
*/
|
|
19
|
-
redirectTo?: string
|
|
18
|
+
redirectTo?: string;
|
|
20
19
|
/**
|
|
21
20
|
* Translation identifier. Can be customized
|
|
22
21
|
*/
|
|
@@ -34,32 +33,32 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
34
33
|
* the guard driver name and value is a factory function
|
|
35
34
|
* to respond to the request.
|
|
36
35
|
*/
|
|
37
|
-
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>;
|
|
38
37
|
/**
|
|
39
38
|
* Returns the message to be sent in the HTTP response.
|
|
40
39
|
* Feel free to override this method and return a custom
|
|
41
40
|
* response.
|
|
42
41
|
*/
|
|
43
|
-
getResponseMessage(error: any, ctx: HttpContext): string;
|
|
42
|
+
getResponseMessage(error: /*elided*/ any, ctx: HttpContext): string;
|
|
44
43
|
/**
|
|
45
44
|
* Converts exception to an HTTP response
|
|
46
45
|
*/
|
|
47
|
-
handle(error: any, ctx: HttpContext): Promise<void>;
|
|
46
|
+
handle(error: /*elided*/ any, ctx: HttpContext): Promise<void>;
|
|
48
47
|
name: string;
|
|
49
|
-
help?: string
|
|
50
|
-
code?: string
|
|
48
|
+
help?: string;
|
|
49
|
+
code?: string;
|
|
51
50
|
status: number;
|
|
52
51
|
toString(): string;
|
|
53
52
|
readonly [Symbol.toStringTag]: string;
|
|
54
53
|
message: string;
|
|
55
|
-
stack?: string
|
|
54
|
+
stack?: string;
|
|
56
55
|
cause?: unknown;
|
|
57
56
|
};
|
|
58
57
|
status: number;
|
|
59
58
|
code: string;
|
|
60
|
-
help?: string
|
|
61
|
-
message?: string
|
|
62
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function
|
|
59
|
+
help?: string;
|
|
60
|
+
message?: string;
|
|
61
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
63
62
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
64
63
|
stackTraceLimit: number;
|
|
65
64
|
};
|
|
@@ -67,10 +66,10 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
67
66
|
* Exception is raised when user credentials are invalid
|
|
68
67
|
*/
|
|
69
68
|
export declare const E_INVALID_CREDENTIALS: {
|
|
70
|
-
new (message?: string
|
|
71
|
-
code?: string
|
|
72
|
-
status?: number
|
|
73
|
-
})
|
|
69
|
+
new (message?: string, options?: ErrorOptions & {
|
|
70
|
+
code?: string;
|
|
71
|
+
status?: number;
|
|
72
|
+
}): {
|
|
74
73
|
/**
|
|
75
74
|
* Translation identifier. Can be customized
|
|
76
75
|
*/
|
|
@@ -80,26 +79,26 @@ export declare const E_INVALID_CREDENTIALS: {
|
|
|
80
79
|
* Feel free to override this method and return a custom
|
|
81
80
|
* response.
|
|
82
81
|
*/
|
|
83
|
-
getResponseMessage(error: any, ctx: HttpContext): string;
|
|
82
|
+
getResponseMessage(error: /*elided*/ any, ctx: HttpContext): string;
|
|
84
83
|
/**
|
|
85
84
|
* Converts exception to an HTTP response
|
|
86
85
|
*/
|
|
87
|
-
handle(error: any, ctx: HttpContext): Promise<void>;
|
|
86
|
+
handle(error: /*elided*/ any, ctx: HttpContext): Promise<void>;
|
|
88
87
|
name: string;
|
|
89
|
-
help?: string
|
|
90
|
-
code?: string
|
|
88
|
+
help?: string;
|
|
89
|
+
code?: string;
|
|
91
90
|
status: number;
|
|
92
91
|
toString(): string;
|
|
93
92
|
readonly [Symbol.toStringTag]: string;
|
|
94
93
|
message: string;
|
|
95
|
-
stack?: string
|
|
94
|
+
stack?: string;
|
|
96
95
|
cause?: unknown;
|
|
97
96
|
};
|
|
98
97
|
status: number;
|
|
99
98
|
code: string;
|
|
100
|
-
help?: string
|
|
101
|
-
message?: string
|
|
102
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function
|
|
99
|
+
help?: string;
|
|
100
|
+
message?: string;
|
|
101
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
103
102
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
104
103
|
stackTraceLimit: number;
|
|
105
104
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Hash } from '@adonisjs/core/hash';
|
|
2
|
+
import { type BaseModel } from '@adonisjs/lucid/orm';
|
|
2
3
|
import type { NormalizeConstructor } from '@adonisjs/core/types/helpers';
|
|
3
4
|
/**
|
|
4
5
|
* Mixing to add user lookup and password verification methods
|
|
@@ -14,8 +15,13 @@ import type { NormalizeConstructor } from '@adonisjs/core/types/helpers';
|
|
|
14
15
|
export declare function withAuthFinder(hash: () => Hash, options: {
|
|
15
16
|
uids: string[];
|
|
16
17
|
passwordColumnName: string;
|
|
17
|
-
}): <Model extends NormalizeConstructor<
|
|
18
|
+
}): <Model extends NormalizeConstructor<typeof BaseModel>>(superclass: Model) => {
|
|
18
19
|
new (...args: any[]): {
|
|
20
|
+
/**
|
|
21
|
+
* Verifies the plain password against the user's password
|
|
22
|
+
* hash
|
|
23
|
+
*/
|
|
24
|
+
verifyPassword(plainPassword: string): Promise<boolean>;
|
|
19
25
|
$attributes: import("@adonisjs/lucid/types/model").ModelObject;
|
|
20
26
|
$extras: import("@adonisjs/lucid/types/model").ModelObject;
|
|
21
27
|
$original: import("@adonisjs/lucid/types/model").ModelObject;
|
|
@@ -24,74 +30,72 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
24
30
|
};
|
|
25
31
|
$columns: undefined;
|
|
26
32
|
$sideloaded: import("@adonisjs/lucid/types/model").ModelObject;
|
|
27
|
-
$primaryKeyValue?:
|
|
33
|
+
$primaryKeyValue?: number | string;
|
|
28
34
|
$isPersisted: boolean;
|
|
29
35
|
$isNew: boolean;
|
|
30
36
|
$isLocal: boolean;
|
|
31
37
|
$dirty: import("@adonisjs/lucid/types/model").ModelObject;
|
|
32
38
|
$isDirty: boolean;
|
|
33
39
|
$isDeleted: boolean;
|
|
34
|
-
$options?: import("@adonisjs/lucid/types/model").ModelOptions
|
|
35
|
-
$trx?: import("@adonisjs/lucid/types/database").TransactionClientContract
|
|
36
|
-
$setOptionsAndTrx(options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions
|
|
37
|
-
useTransaction(trx: import("@adonisjs/lucid/types/database").TransactionClientContract): any;
|
|
38
|
-
useConnection(connection: string): any;
|
|
39
|
-
$getQueryFor(action: "insert", client: import("@adonisjs/lucid/types/database").QueryClientContract): import("@adonisjs/lucid/types/
|
|
40
|
-
$getQueryFor(action: "
|
|
40
|
+
$options?: import("@adonisjs/lucid/types/model").ModelOptions;
|
|
41
|
+
$trx?: import("@adonisjs/lucid/types/database").TransactionClientContract;
|
|
42
|
+
$setOptionsAndTrx(options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): void;
|
|
43
|
+
useTransaction(trx: import("@adonisjs/lucid/types/database").TransactionClientContract): /*elided*/ any;
|
|
44
|
+
useConnection(connection: string): /*elided*/ any;
|
|
45
|
+
$getQueryFor(action: "insert", client: import("@adonisjs/lucid/types/database").QueryClientContract): ReturnType<import("@adonisjs/lucid/types/database").QueryClientContract["insertQuery"]>;
|
|
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>;
|
|
41
47
|
$setAttribute(key: string, value: any): void;
|
|
42
48
|
$getAttribute(key: string): any;
|
|
43
|
-
$getAttributeFromCache(key: string, callback: (
|
|
49
|
+
$getAttributeFromCache(key: string, callback: import("@adonisjs/lucid/types/model").CacheNode["getter"]): any;
|
|
44
50
|
$hasRelated(key: string): boolean;
|
|
45
51
|
$setRelated(key: string, result: import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | null): void;
|
|
46
52
|
$pushRelated(key: string, result: import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | null): void;
|
|
47
|
-
$getRelated(key: string, defaultValue?: any): import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> |
|
|
48
|
-
$consumeAdapterResult(adapterResult: import("@adonisjs/lucid/types/model").ModelObject, sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject
|
|
53
|
+
$getRelated(key: string, defaultValue?: any): import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | undefined | null;
|
|
54
|
+
$consumeAdapterResult(adapterResult: import("@adonisjs/lucid/types/model").ModelObject, sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject): void;
|
|
49
55
|
$hydrateOriginals(): void;
|
|
50
|
-
fill(value: Partial<{}>, allowExtraProperties?: boolean
|
|
51
|
-
merge(value: Partial<{}>, allowExtraProperties?: boolean
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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>;
|
|
55
62
|
delete(): Promise<void>;
|
|
56
|
-
refresh(): Promise
|
|
57
|
-
load: import("@adonisjs/lucid/types/model").LucidRowPreload
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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>;
|
|
69
|
+
serializeAttributes(fields?: import("@adonisjs/lucid/types/model").CherryPickFields, raw?: boolean): import("@adonisjs/lucid/types/model").ModelObject;
|
|
70
|
+
serializeComputed(fields?: import("@adonisjs/lucid/types/model").CherryPickFields): import("@adonisjs/lucid/types/model").ModelObject;
|
|
63
71
|
serializeRelations(fields: undefined, raw: true): {
|
|
64
72
|
[key: string]: import("@adonisjs/lucid/types/model").LucidRow | import("@adonisjs/lucid/types/model").LucidRow[];
|
|
65
73
|
};
|
|
66
|
-
serializeRelations(cherryPick:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
serializeRelations(cherryPick?: {
|
|
70
|
-
[relation: string]: import("@adonisjs/lucid/types/model").CherryPick;
|
|
71
|
-
} | undefined, raw?: boolean | undefined): import("@adonisjs/lucid/types/model").ModelObject;
|
|
72
|
-
serialize(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick | undefined): import("@adonisjs/lucid/types/model").ModelObject;
|
|
74
|
+
serializeRelations(cherryPick: import("@adonisjs/lucid/types/model").CherryPick["relations"] | undefined, raw: false | undefined): import("@adonisjs/lucid/types/model").ModelObject;
|
|
75
|
+
serializeRelations(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick["relations"], raw?: boolean): import("@adonisjs/lucid/types/model").ModelObject;
|
|
76
|
+
serialize(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick): import("@adonisjs/lucid/types/model").ModelObject;
|
|
73
77
|
toObject(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
74
78
|
toJSON(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
75
|
-
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;
|
|
76
80
|
};
|
|
77
81
|
/**
|
|
78
82
|
* Hook to verify user password when creating or updating
|
|
79
83
|
* the user model.
|
|
80
84
|
*/
|
|
81
|
-
hashPassword<
|
|
85
|
+
hashPassword<T extends /*elided*/ any & Model>(this: T, user: InstanceType<T>): Promise<void>;
|
|
82
86
|
/**
|
|
83
87
|
* Finds the user for authentication via "verifyCredentials".
|
|
84
88
|
* Feel free to override this method customize the user
|
|
85
89
|
* lookup behavior.
|
|
86
90
|
*/
|
|
87
|
-
findForAuth<
|
|
91
|
+
findForAuth<T extends /*elided*/ any & Model>(this: T, uids: string[], value: string): Promise<InstanceType<T> | null>;
|
|
88
92
|
/**
|
|
89
93
|
* Find a user by uid and verify their password. This method is
|
|
90
94
|
* safe from timing attacks.
|
|
91
95
|
*/
|
|
92
|
-
verifyCredentials<
|
|
96
|
+
verifyCredentials<T extends /*elided*/ any & Model>(this: T, uid: string, password: string): Promise<InstanceType<T>>;
|
|
93
97
|
readonly booted: boolean;
|
|
94
|
-
find: <
|
|
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>>;
|
|
95
99
|
$columnsDefinitions: Map<string, import("@adonisjs/lucid/types/model").ModelColumnOptions>;
|
|
96
100
|
$relationsDefinitions: Map<string, import("@adonisjs/lucid/types/relations").RelationshipsContract>;
|
|
97
101
|
$computedDefinitions: Map<string, import("@adonisjs/lucid/types/model").ComputedOptions>;
|
|
@@ -111,57 +115,58 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
111
115
|
serializedToColumns: import("@adonisjs/lucid/types/model").ModelKeysContract;
|
|
112
116
|
serializedToAttributes: import("@adonisjs/lucid/types/model").ModelKeysContract;
|
|
113
117
|
};
|
|
114
|
-
$createFromAdapterResult: <
|
|
115
|
-
$createMultipleFromAdapterResult: <
|
|
118
|
+
$createFromAdapterResult: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, result?: import("@adonisjs/lucid/types/model").ModelObject, sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => null | InstanceType<T>;
|
|
119
|
+
$createMultipleFromAdapterResult: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, results: import("@adonisjs/lucid/types/model").ModelObject[], sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => InstanceType<T>[];
|
|
116
120
|
$addColumn: (name: string, options: Partial<import("@adonisjs/lucid/types/model").ColumnOptions>) => import("@adonisjs/lucid/types/model").ColumnOptions;
|
|
117
121
|
$hasColumn: (name: string) => boolean;
|
|
118
122
|
$getColumn: (name: string) => import("@adonisjs/lucid/types/model").ModelColumnOptions | undefined;
|
|
119
123
|
$addComputed: (name: string, options: Partial<import("@adonisjs/lucid/types/model").ComputedOptions>) => import("@adonisjs/lucid/types/model").ComputedOptions;
|
|
120
124
|
$hasComputed: (name: string) => boolean;
|
|
121
125
|
$getComputed: (name: string) => import("@adonisjs/lucid/types/model").ComputedOptions | undefined;
|
|
122
|
-
$addRelation: (name: string, type: "
|
|
126
|
+
$addRelation: (name: string, type: import("@adonisjs/lucid/types/relations").ModelRelationTypes["__opaque_type"], relatedModel: () => import("@adonisjs/lucid/types/model").LucidModel, options: import("@adonisjs/lucid/types/model").ModelRelationOptions) => void;
|
|
123
127
|
$hasRelation: (name: string) => boolean;
|
|
124
128
|
$getRelation: {
|
|
125
|
-
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel,
|
|
126
|
-
<
|
|
129
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Name_2 extends import("@adonisjs/lucid/types/relations").ExtractModelRelations<InstanceType<Model_1>>>(this: Model_1, name: Name_2): InstanceType<Model_1>[Name_2] extends import("@adonisjs/lucid/types/relations").ModelRelations<import("@adonisjs/lucid/types/model").LucidModel, import("@adonisjs/lucid/types/model").LucidModel> ? InstanceType<Model_1>[Name_2]["client"]["relation"] : import("@adonisjs/lucid/types/relations").RelationshipsContract;
|
|
130
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel>(this: Model_1, name: string): import("@adonisjs/lucid/types/relations").RelationshipsContract;
|
|
127
131
|
};
|
|
128
|
-
$defineProperty: <
|
|
132
|
+
$defineProperty: <Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Prop extends keyof Model_1>(this: Model_1, propertyName: Prop, defaultValue: Model_1[Prop], strategy: "inherit" | "define" | ((value: Model_1[Prop]) => Model_1[Prop])) => void;
|
|
129
133
|
boot: () => void;
|
|
130
134
|
before: {
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
<
|
|
135
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Event extends "find" | "fetch">(this: Model_1, event: Event, handler: import("@adonisjs/lucid/types/model").HooksHandler<import("@adonisjs/lucid/types/model").ModelQueryBuilderContract<Model_1>, Event>): void;
|
|
136
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel>(this: Model_1, event: "paginate", handler: import("@adonisjs/lucid/types/model").HooksHandler<[import("@adonisjs/lucid/types/model").ModelQueryBuilderContract<Model_1>, import("@adonisjs/lucid/types/model").ModelQueryBuilderContract<Model_1>], "paginate">): void;
|
|
137
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Event_1 extends import("@adonisjs/lucid/types/model").EventsList>(this: Model_1, event: Event_1, handler: import("@adonisjs/lucid/types/model").HooksHandler<InstanceType<Model_1>, Event_1>): void;
|
|
134
138
|
};
|
|
135
139
|
after: {
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
<
|
|
140
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel>(this: Model_1, event: "fetch", handler: import("@adonisjs/lucid/types/model").HooksHandler<InstanceType<Model_1>[], "fetch">): void;
|
|
141
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel>(this: Model_1, event: "paginate", handler: import("@adonisjs/lucid/types/model").HooksHandler<import("@adonisjs/lucid/types/model").ModelPaginatorContract<InstanceType<Model_1>>, "paginate">): void;
|
|
142
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel, Event_2 extends import("@adonisjs/lucid/types/model").EventsList>(this: Model_1, event: Event_2, handler: import("@adonisjs/lucid/types/model").HooksHandler<InstanceType<Model_1>, Event_2>): void;
|
|
139
143
|
};
|
|
140
|
-
create: <
|
|
141
|
-
createMany: <
|
|
142
|
-
findOrFail: <
|
|
144
|
+
create: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, values: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>>;
|
|
145
|
+
createMany: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, values: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>[], options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>[]>;
|
|
146
|
+
findOrFail: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>>;
|
|
143
147
|
findBy: {
|
|
144
|
-
<
|
|
145
|
-
<
|
|
148
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, clause: Record<string, unknown>, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<null | InstanceType<T>>;
|
|
149
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, key: string, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<null | InstanceType<T>>;
|
|
146
150
|
};
|
|
147
151
|
findByOrFail: {
|
|
148
|
-
<
|
|
149
|
-
<
|
|
152
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, clause: Record<string, unknown>, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>>;
|
|
153
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, key: string, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>>;
|
|
150
154
|
};
|
|
151
155
|
findManyBy: {
|
|
152
|
-
<
|
|
153
|
-
<
|
|
156
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, clause: Record<string, unknown>, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>[]>;
|
|
157
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, key: string, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>[]>;
|
|
154
158
|
};
|
|
155
|
-
first: <
|
|
156
|
-
firstOrFail: <
|
|
157
|
-
findMany: <
|
|
158
|
-
firstOrNew: <
|
|
159
|
-
firstOrCreate: <
|
|
160
|
-
updateOrCreate: <
|
|
161
|
-
fetchOrNewUpMany: <
|
|
162
|
-
fetchOrCreateMany: <
|
|
163
|
-
updateOrCreateMany: <
|
|
164
|
-
all: <
|
|
165
|
-
query: <
|
|
166
|
-
|
|
159
|
+
first: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<null | InstanceType<T>>;
|
|
160
|
+
firstOrFail: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>>;
|
|
161
|
+
findMany: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, value: any[], options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>[]>;
|
|
162
|
+
firstOrNew: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, searchPayload: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, savePayload?: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>>;
|
|
163
|
+
firstOrCreate: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, searchPayload: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, savePayload?: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>>;
|
|
164
|
+
updateOrCreate: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, searchPayload: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, updatePayload: Partial<import("@adonisjs/lucid/types/model").ModelAttributes<InstanceType<T>>>, options?: import("@adonisjs/lucid/types/model").ModelAssignOptions) => Promise<InstanceType<T>>;
|
|
165
|
+
fetchOrNewUpMany: <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>[]>;
|
|
166
|
+
fetchOrCreateMany: <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>[]>;
|
|
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>[]>;
|
|
168
|
+
all: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>[]>;
|
|
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;
|
|
171
|
+
truncate: (cascade?: boolean) => Promise<void>;
|
|
167
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,65 +44,63 @@
|
|
|
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
|
-
"release": "
|
|
49
|
+
"release": "release-it",
|
|
50
50
|
"version": "npm run build",
|
|
51
|
-
"
|
|
52
|
-
"quick:test": "cross-env NODE_DEBUG=\"adonisjs:auth:*\" node --enable-source-maps --loader=ts-node/esm ./bin/test.js"
|
|
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": "^
|
|
58
|
-
"@adonisjs/
|
|
59
|
-
"@adonisjs/
|
|
60
|
-
"@adonisjs/
|
|
61
|
-
"@adonisjs/
|
|
62
|
-
"@adonisjs/
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@japa/api-client": "^2.0.3",
|
|
54
|
+
"@adonisjs/assembler": "^7.8.2",
|
|
55
|
+
"@adonisjs/core": "^6.17.0",
|
|
56
|
+
"@adonisjs/eslint-config": "^2.0.0-beta.7",
|
|
57
|
+
"@adonisjs/hash": "^9.0.5",
|
|
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",
|
|
66
64
|
"@japa/assert": "^3.0.0",
|
|
67
65
|
"@japa/browser-client": "^2.0.3",
|
|
68
66
|
"@japa/expect-type": "^2.0.2",
|
|
69
67
|
"@japa/file-system": "^2.3.0",
|
|
70
68
|
"@japa/plugin-adonisjs": "^3.0.1",
|
|
71
69
|
"@japa/runner": "^3.1.4",
|
|
72
|
-
"@japa/snapshot": "^2.0.
|
|
73
|
-
"@
|
|
70
|
+
"@japa/snapshot": "^2.0.6",
|
|
71
|
+
"@release-it/conventional-changelog": "^9.0.3",
|
|
72
|
+
"@swc/core": "^1.10.1",
|
|
74
73
|
"@types/basic-auth": "^1.1.8",
|
|
75
74
|
"@types/luxon": "^3.4.2",
|
|
76
|
-
"@types/node": "^
|
|
77
|
-
"@types/set-cookie-parser": "^2.4.
|
|
75
|
+
"@types/node": "^22.10.2",
|
|
76
|
+
"@types/set-cookie-parser": "^2.4.10",
|
|
78
77
|
"@types/sinon": "^17.0.3",
|
|
79
|
-
"c8": "^10.1.
|
|
78
|
+
"c8": "^10.1.3",
|
|
80
79
|
"convert-hrtime": "^5.0.0",
|
|
81
80
|
"copyfiles": "^2.4.1",
|
|
82
81
|
"cross-env": "^7.0.3",
|
|
83
|
-
"del-cli": "^
|
|
84
|
-
"dotenv": "^16.4.
|
|
85
|
-
"eslint": "^
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"set-cookie-parser": "^2.6.0",
|
|
96
|
-
"sinon": "^18.0.0",
|
|
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",
|
|
91
|
+
"release-it": "^17.10.0",
|
|
92
|
+
"set-cookie-parser": "^2.7.1",
|
|
93
|
+
"sinon": "^19.0.2",
|
|
97
94
|
"sqlite3": "^5.1.7",
|
|
98
|
-
"tedious": "^18.
|
|
95
|
+
"tedious": "^18.6.1",
|
|
99
96
|
"timekeeper": "^2.3.1",
|
|
100
|
-
"ts-node": "^10.9.
|
|
101
|
-
"tsup": "^8.
|
|
102
|
-
"typescript": "^5.
|
|
97
|
+
"ts-node-maintained": "^10.9.4",
|
|
98
|
+
"tsup": "^8.3.5",
|
|
99
|
+
"typescript": "^5.7.2"
|
|
103
100
|
},
|
|
104
101
|
"dependencies": {
|
|
105
|
-
"@adonisjs/presets": "^2.
|
|
102
|
+
"@adonisjs/presets": "^2.6.3",
|
|
103
|
+
"@poppinss/utils": "^6.8.3",
|
|
106
104
|
"basic-auth": "^2.0.1"
|
|
107
105
|
},
|
|
108
106
|
"peerDependencies": {
|
|
@@ -130,7 +128,10 @@
|
|
|
130
128
|
"optional": true
|
|
131
129
|
}
|
|
132
130
|
},
|
|
133
|
-
"author": "adonisjs
|
|
131
|
+
"author": "Harminder Virk <virk@adonisjs.com>",
|
|
132
|
+
"contributors": [
|
|
133
|
+
"Romain Lanz <romain.lanz@pm.me>"
|
|
134
|
+
],
|
|
134
135
|
"license": "MIT",
|
|
135
136
|
"homepage": "https://github.com/adonisjs/auth#readme",
|
|
136
137
|
"repository": {
|
|
@@ -158,11 +159,29 @@
|
|
|
158
159
|
"access": "public",
|
|
159
160
|
"tag": "latest"
|
|
160
161
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
"release-it": {
|
|
163
|
+
"git": {
|
|
164
|
+
"requireCleanWorkingDir": true,
|
|
165
|
+
"requireUpstream": true,
|
|
166
|
+
"commitMessage": "chore(release): ${version}",
|
|
167
|
+
"tagAnnotation": "v${version}",
|
|
168
|
+
"push": true,
|
|
169
|
+
"tagName": "v${version}"
|
|
170
|
+
},
|
|
171
|
+
"github": {
|
|
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
|
+
}
|
|
184
|
+
}
|
|
166
185
|
},
|
|
167
186
|
"c8": {
|
|
168
187
|
"reporter": [
|