@adonisjs/auth 9.2.3 → 9.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/build/src/debug.d.ts +0 -1
- package/build/src/errors.d.ts +17 -18
- package/build/src/mixins/lucid.d.ts +57 -59
- package/package.json +22 -11
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
|
*/
|
|
@@ -46,20 +45,20 @@ export declare const E_UNAUTHORIZED_ACCESS: {
|
|
|
46
45
|
*/
|
|
47
46
|
handle(error: 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
|
*/
|
|
@@ -86,20 +85,20 @@ export declare const E_INVALID_CREDENTIALS: {
|
|
|
86
85
|
*/
|
|
87
86
|
handle(error: 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,7 +15,7 @@ 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[]): {
|
|
19
20
|
$attributes: import("@adonisjs/lucid/types/model").ModelObject;
|
|
20
21
|
$extras: import("@adonisjs/lucid/types/model").ModelObject;
|
|
@@ -24,52 +25,49 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
24
25
|
};
|
|
25
26
|
$columns: undefined;
|
|
26
27
|
$sideloaded: import("@adonisjs/lucid/types/model").ModelObject;
|
|
27
|
-
$primaryKeyValue?:
|
|
28
|
+
$primaryKeyValue?: number | string;
|
|
28
29
|
$isPersisted: boolean;
|
|
29
30
|
$isNew: boolean;
|
|
30
31
|
$isLocal: boolean;
|
|
31
32
|
$dirty: import("@adonisjs/lucid/types/model").ModelObject;
|
|
32
33
|
$isDirty: boolean;
|
|
33
34
|
$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
|
|
35
|
+
$options?: import("@adonisjs/lucid/types/model").ModelOptions;
|
|
36
|
+
$trx?: import("@adonisjs/lucid/types/database").TransactionClientContract;
|
|
37
|
+
$setOptionsAndTrx(options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): void;
|
|
37
38
|
useTransaction(trx: import("@adonisjs/lucid/types/database").TransactionClientContract): any;
|
|
38
39
|
useConnection(connection: string): any;
|
|
39
|
-
$getQueryFor(action: "insert", client: import("@adonisjs/lucid/types/database").QueryClientContract): import("@adonisjs/lucid/types/
|
|
40
|
-
$getQueryFor(action: "
|
|
40
|
+
$getQueryFor(action: "insert", client: import("@adonisjs/lucid/types/database").QueryClientContract): ReturnType<import("@adonisjs/lucid/types/database").QueryClientContract["insertQuery"]>;
|
|
41
|
+
$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
42
|
$setAttribute(key: string, value: any): void;
|
|
42
43
|
$getAttribute(key: string): any;
|
|
43
|
-
$getAttributeFromCache(key: string, callback: (
|
|
44
|
+
$getAttributeFromCache(key: string, callback: import("@adonisjs/lucid/types/model").CacheNode["getter"]): any;
|
|
44
45
|
$hasRelated(key: string): boolean;
|
|
45
46
|
$setRelated(key: string, result: import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | null): void;
|
|
46
47
|
$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
|
|
48
|
+
$getRelated(key: string, defaultValue?: any): import("@adonisjs/lucid/types/querybuilder").OneOrMany<import("@adonisjs/lucid/types/model").LucidRow> | undefined | null;
|
|
49
|
+
$consumeAdapterResult(adapterResult: import("@adonisjs/lucid/types/model").ModelObject, sideloadAttributes?: import("@adonisjs/lucid/types/model").ModelObject): void;
|
|
49
50
|
$hydrateOriginals(): void;
|
|
50
|
-
fill(value: Partial<{}>, allowExtraProperties?: boolean
|
|
51
|
-
merge(value: Partial<{}>, allowExtraProperties?: boolean
|
|
51
|
+
fill(value: Partial<{}>, allowExtraProperties?: boolean): any;
|
|
52
|
+
merge(value: Partial<{}>, allowExtraProperties?: boolean): any;
|
|
52
53
|
enableForceUpdate(): any;
|
|
53
54
|
save(): Promise<any>;
|
|
54
55
|
lockForUpdate<T>(callback: (user: any) => T | Promise<T>): Promise<T>;
|
|
55
56
|
delete(): Promise<void>;
|
|
56
57
|
refresh(): Promise<any>;
|
|
57
58
|
load: import("@adonisjs/lucid/types/model").LucidRowPreload<any>;
|
|
59
|
+
loadOnce: import("@adonisjs/lucid/types/model").LucidRowPreloadOnce<any>;
|
|
58
60
|
preload: import("@adonisjs/lucid/types/model").LucidRowPreload<any>;
|
|
59
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>;
|
|
60
|
-
loadCount: <
|
|
61
|
-
serializeAttributes(fields?: import("@adonisjs/lucid/types/model").CherryPickFields
|
|
62
|
-
serializeComputed(fields?: import("@adonisjs/lucid/types/model").CherryPickFields
|
|
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
|
+
serializeAttributes(fields?: import("@adonisjs/lucid/types/model").CherryPickFields, raw?: boolean): import("@adonisjs/lucid/types/model").ModelObject;
|
|
64
|
+
serializeComputed(fields?: import("@adonisjs/lucid/types/model").CherryPickFields): import("@adonisjs/lucid/types/model").ModelObject;
|
|
63
65
|
serializeRelations(fields: undefined, raw: true): {
|
|
64
66
|
[key: string]: import("@adonisjs/lucid/types/model").LucidRow | import("@adonisjs/lucid/types/model").LucidRow[];
|
|
65
67
|
};
|
|
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;
|
|
68
|
+
serializeRelations(cherryPick: import("@adonisjs/lucid/types/model").CherryPick["relations"] | undefined, raw: false | undefined): import("@adonisjs/lucid/types/model").ModelObject;
|
|
69
|
+
serializeRelations(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick["relations"], raw?: boolean): import("@adonisjs/lucid/types/model").ModelObject;
|
|
70
|
+
serialize(cherryPick?: import("@adonisjs/lucid/types/model").CherryPick): import("@adonisjs/lucid/types/model").ModelObject;
|
|
73
71
|
toObject(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
74
72
|
toJSON(): import("@adonisjs/lucid/types/model").ModelObject;
|
|
75
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;
|
|
@@ -78,20 +76,20 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
78
76
|
* Hook to verify user password when creating or updating
|
|
79
77
|
* the user model.
|
|
80
78
|
*/
|
|
81
|
-
hashPassword<
|
|
79
|
+
hashPassword<T extends any & Model>(this: T, user: InstanceType<T>): Promise<void>;
|
|
82
80
|
/**
|
|
83
81
|
* Finds the user for authentication via "verifyCredentials".
|
|
84
82
|
* Feel free to override this method customize the user
|
|
85
83
|
* lookup behavior.
|
|
86
84
|
*/
|
|
87
|
-
findForAuth<
|
|
85
|
+
findForAuth<T extends any & Model>(this: T, uids: string[], value: string): Promise<InstanceType<T> | null>;
|
|
88
86
|
/**
|
|
89
87
|
* Find a user by uid and verify their password. This method is
|
|
90
88
|
* safe from timing attacks.
|
|
91
89
|
*/
|
|
92
|
-
verifyCredentials<
|
|
90
|
+
verifyCredentials<T extends any & Model>(this: T, uid: string, password: string): Promise<InstanceType<T>>;
|
|
93
91
|
readonly booted: boolean;
|
|
94
|
-
find: <
|
|
92
|
+
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
93
|
$columnsDefinitions: Map<string, import("@adonisjs/lucid/types/model").ModelColumnOptions>;
|
|
96
94
|
$relationsDefinitions: Map<string, import("@adonisjs/lucid/types/relations").RelationshipsContract>;
|
|
97
95
|
$computedDefinitions: Map<string, import("@adonisjs/lucid/types/model").ComputedOptions>;
|
|
@@ -111,57 +109,57 @@ export declare function withAuthFinder(hash: () => Hash, options: {
|
|
|
111
109
|
serializedToColumns: import("@adonisjs/lucid/types/model").ModelKeysContract;
|
|
112
110
|
serializedToAttributes: import("@adonisjs/lucid/types/model").ModelKeysContract;
|
|
113
111
|
};
|
|
114
|
-
$createFromAdapterResult: <
|
|
115
|
-
$createMultipleFromAdapterResult: <
|
|
112
|
+
$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>;
|
|
113
|
+
$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
114
|
$addColumn: (name: string, options: Partial<import("@adonisjs/lucid/types/model").ColumnOptions>) => import("@adonisjs/lucid/types/model").ColumnOptions;
|
|
117
115
|
$hasColumn: (name: string) => boolean;
|
|
118
116
|
$getColumn: (name: string) => import("@adonisjs/lucid/types/model").ModelColumnOptions | undefined;
|
|
119
117
|
$addComputed: (name: string, options: Partial<import("@adonisjs/lucid/types/model").ComputedOptions>) => import("@adonisjs/lucid/types/model").ComputedOptions;
|
|
120
118
|
$hasComputed: (name: string) => boolean;
|
|
121
119
|
$getComputed: (name: string) => import("@adonisjs/lucid/types/model").ComputedOptions | undefined;
|
|
122
|
-
$addRelation: (name: string, type: "
|
|
120
|
+
$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
121
|
$hasRelation: (name: string) => boolean;
|
|
124
122
|
$getRelation: {
|
|
125
|
-
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel,
|
|
126
|
-
<
|
|
123
|
+
<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;
|
|
124
|
+
<Model_1 extends import("@adonisjs/lucid/types/model").LucidModel>(this: Model_1, name: string): import("@adonisjs/lucid/types/relations").RelationshipsContract;
|
|
127
125
|
};
|
|
128
|
-
$defineProperty: <
|
|
126
|
+
$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
127
|
boot: () => void;
|
|
130
128
|
before: {
|
|
131
|
-
<
|
|
132
|
-
<
|
|
133
|
-
<
|
|
129
|
+
<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;
|
|
130
|
+
<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;
|
|
131
|
+
<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
132
|
};
|
|
135
133
|
after: {
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
<
|
|
134
|
+
<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;
|
|
135
|
+
<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;
|
|
136
|
+
<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
137
|
};
|
|
140
|
-
create: <
|
|
141
|
-
createMany: <
|
|
142
|
-
findOrFail: <
|
|
138
|
+
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>>;
|
|
139
|
+
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>[]>;
|
|
140
|
+
findOrFail: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, value: any, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>>;
|
|
143
141
|
findBy: {
|
|
144
|
-
<
|
|
145
|
-
<
|
|
142
|
+
<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>>;
|
|
143
|
+
<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
144
|
};
|
|
147
145
|
findByOrFail: {
|
|
148
|
-
<
|
|
149
|
-
<
|
|
146
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, clause: Record<string, unknown>, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>>;
|
|
147
|
+
<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
148
|
};
|
|
151
149
|
findManyBy: {
|
|
152
|
-
<
|
|
153
|
-
<
|
|
150
|
+
<T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, clause: Record<string, unknown>, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions): Promise<InstanceType<T>[]>;
|
|
151
|
+
<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
152
|
};
|
|
155
|
-
first: <
|
|
156
|
-
firstOrFail: <
|
|
157
|
-
findMany: <
|
|
158
|
-
firstOrNew: <
|
|
159
|
-
firstOrCreate: <
|
|
160
|
-
updateOrCreate: <
|
|
161
|
-
fetchOrNewUpMany: <
|
|
162
|
-
fetchOrCreateMany: <
|
|
163
|
-
updateOrCreateMany: <
|
|
164
|
-
all: <
|
|
165
|
-
query: <
|
|
166
|
-
truncate: (cascade?: boolean
|
|
153
|
+
first: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<null | InstanceType<T>>;
|
|
154
|
+
firstOrFail: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>>;
|
|
155
|
+
findMany: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, value: any[], options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>[]>;
|
|
156
|
+
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>>;
|
|
157
|
+
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>>;
|
|
158
|
+
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>>;
|
|
159
|
+
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>[]>;
|
|
160
|
+
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>[]>;
|
|
161
|
+
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
|
+
all: <T extends import("@adonisjs/lucid/types/model").LucidModel>(this: T, options?: import("@adonisjs/lucid/types/model").ModelAdapterOptions) => Promise<InstanceType<T>[]>;
|
|
163
|
+
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>;
|
|
164
|
+
truncate: (cascade?: boolean) => Promise<void>;
|
|
167
165
|
} & Model;
|
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.2.
|
|
4
|
+
"version": "9.2.4",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.16.0"
|
|
7
7
|
},
|
|
@@ -46,15 +46,16 @@
|
|
|
46
46
|
"prepublishOnly": "npm run build",
|
|
47
47
|
"lint": "eslint . --ext=.ts",
|
|
48
48
|
"format": "prettier --write .",
|
|
49
|
-
"release": "
|
|
49
|
+
"release": "release-it",
|
|
50
50
|
"version": "npm run build",
|
|
51
51
|
"sync-labels": "github-label-sync --labels .github/labels.json adonisjs/auth",
|
|
52
|
-
"quick:test": "cross-env NODE_DEBUG=\"adonisjs:auth:*\" node --enable-source-maps --
|
|
52
|
+
"quick:test": "cross-env NODE_DEBUG=\"adonisjs:auth:*\" node --enable-source-maps --import=ts-node-maintained/register/esm ./bin/test.js"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@adonisjs/assembler": "^7.7.0",
|
|
56
56
|
"@adonisjs/core": "^6.11.0",
|
|
57
57
|
"@adonisjs/eslint-config": "^1.3.0",
|
|
58
|
+
"@adonisjs/hash": "^9.0.5",
|
|
58
59
|
"@adonisjs/i18n": "^2.1.0",
|
|
59
60
|
"@adonisjs/lucid": "^21.0.1",
|
|
60
61
|
"@adonisjs/prettier-config": "^1.3.0",
|
|
@@ -88,21 +89,22 @@
|
|
|
88
89
|
"luxon": "^3.4.4",
|
|
89
90
|
"mysql2": "^3.10.1",
|
|
90
91
|
"nock": "^13.5.4",
|
|
91
|
-
"np": "^10.0.6",
|
|
92
92
|
"pg": "^8.12.0",
|
|
93
93
|
"playwright": "^1.44.1",
|
|
94
94
|
"prettier": "^3.3.2",
|
|
95
|
+
"release-it": "^17.10.0",
|
|
95
96
|
"set-cookie-parser": "^2.6.0",
|
|
96
97
|
"sinon": "^18.0.0",
|
|
97
98
|
"sqlite3": "^5.1.7",
|
|
98
99
|
"tedious": "^18.2.0",
|
|
99
100
|
"timekeeper": "^2.3.1",
|
|
100
|
-
"ts-node": "^10.9.
|
|
101
|
+
"ts-node-maintained": "^10.9.4",
|
|
101
102
|
"tsup": "^8.1.0",
|
|
102
103
|
"typescript": "^5.4.5"
|
|
103
104
|
},
|
|
104
105
|
"dependencies": {
|
|
105
106
|
"@adonisjs/presets": "^2.5.1",
|
|
107
|
+
"@poppinss/utils": "^6.8.3",
|
|
106
108
|
"basic-auth": "^2.0.1"
|
|
107
109
|
},
|
|
108
110
|
"peerDependencies": {
|
|
@@ -130,7 +132,10 @@
|
|
|
130
132
|
"optional": true
|
|
131
133
|
}
|
|
132
134
|
},
|
|
133
|
-
"author": "adonisjs
|
|
135
|
+
"author": "Harminder Virk <virk@adonisjs.com>",
|
|
136
|
+
"contributors": [
|
|
137
|
+
"Romain Lanz <romain.lanz@pm.me>"
|
|
138
|
+
],
|
|
134
139
|
"license": "MIT",
|
|
135
140
|
"homepage": "https://github.com/adonisjs/auth#readme",
|
|
136
141
|
"repository": {
|
|
@@ -158,11 +163,17 @@
|
|
|
158
163
|
"access": "public",
|
|
159
164
|
"tag": "latest"
|
|
160
165
|
},
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
"release-it": {
|
|
167
|
+
"git": {
|
|
168
|
+
"commitMessage": "chore(release): ${version}",
|
|
169
|
+
"tagAnnotation": "v${version}",
|
|
170
|
+
"tagName": "v${version}"
|
|
171
|
+
},
|
|
172
|
+
"github": {
|
|
173
|
+
"release": true,
|
|
174
|
+
"releaseName": "v${version}",
|
|
175
|
+
"web": true
|
|
176
|
+
}
|
|
166
177
|
},
|
|
167
178
|
"c8": {
|
|
168
179
|
"reporter": [
|