@adonisjs/auth 10.0.0-next.2 → 10.0.0-next.3
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/auth_manager-BMz_OJXq.js +129 -0
- package/build/debug-Ckko95-M.js +3 -0
- package/build/errors-BQxhZmkE.js +128 -0
- package/build/index.js +59 -100
- package/build/modules/access_tokens_guard/main.js +647 -1309
- package/build/modules/access_tokens_guard/types.js +1 -0
- package/build/modules/basic_auth_guard/main.js +106 -236
- package/build/modules/basic_auth_guard/types.js +1 -0
- package/build/modules/session_guard/main.js +377 -966
- package/build/modules/session_guard/types.js +1 -0
- package/build/providers/auth_provider.js +16 -40
- package/build/services/auth.js +3 -8
- package/build/src/debug.d.ts +1 -1
- package/build/src/middleware/initialize_auth_middleware.js +6 -24
- package/build/src/mixins/lucid.js +43 -95
- package/build/src/plugins/japa/api_client.js +43 -56
- package/build/src/plugins/japa/browser_client.js +45 -64
- package/build/src/types.js +1 -0
- package/build/symbols-Ct253Khf.js +8 -0
- package/package.json +40 -37
- package/build/chunk-2VRS2VHB.js +0 -7
- package/build/chunk-MSPAYMZE.js +0 -351
- package/build/chunk-S5G5RTJX.js +0 -236
- package/build/chunk-UXA4FHST.js +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
} from "../
|
|
4
|
-
import "../chunk-2VRS2VHB.js";
|
|
5
|
-
import "../chunk-S5G5RTJX.js";
|
|
6
|
-
import "../chunk-UXA4FHST.js";
|
|
7
|
-
|
|
8
|
-
// providers/auth_provider.ts
|
|
9
|
-
import { configProvider } from "@adonisjs/core";
|
|
1
|
+
import "../errors-BQxhZmkE.js";
|
|
2
|
+
import "../debug-Ckko95-M.js";
|
|
3
|
+
import { t as AuthManager } from "../auth_manager-BMz_OJXq.js";
|
|
10
4
|
import { RuntimeException } from "@adonisjs/core/exceptions";
|
|
5
|
+
import { configProvider } from "@adonisjs/core";
|
|
11
6
|
var AuthProvider = class {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* // This method is called automatically by AdonisJS
|
|
26
|
-
* // The auth manager becomes available as 'auth.manager'
|
|
27
|
-
*/
|
|
28
|
-
register() {
|
|
29
|
-
this.app.container.singleton("auth.manager", async () => {
|
|
30
|
-
const authConfigProvider = this.app.config.get("auth");
|
|
31
|
-
const config = await configProvider.resolve(this.app, authConfigProvider);
|
|
32
|
-
if (!config) {
|
|
33
|
-
throw new RuntimeException(
|
|
34
|
-
'Invalid config exported from "config/auth.ts" file. Make sure to use the defineConfig method'
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return new AuthManager(config);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
AuthProvider as default
|
|
7
|
+
constructor(app) {
|
|
8
|
+
this.app = app;
|
|
9
|
+
}
|
|
10
|
+
register() {
|
|
11
|
+
this.app.container.singleton("auth.manager", async () => {
|
|
12
|
+
const authConfigProvider = this.app.config.get("auth");
|
|
13
|
+
const config = await configProvider.resolve(this.app, authConfigProvider);
|
|
14
|
+
if (!config) throw new RuntimeException("Invalid config exported from \"config/auth.ts\" file. Make sure to use the defineConfig method");
|
|
15
|
+
return new AuthManager(config);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
43
18
|
};
|
|
19
|
+
export { AuthProvider as default };
|
package/build/services/auth.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import "../chunk-UXA4FHST.js";
|
|
2
|
-
|
|
3
|
-
// services/auth.ts
|
|
4
1
|
import app from "@adonisjs/core/services/app";
|
|
5
|
-
|
|
2
|
+
let auth;
|
|
6
3
|
await app.booted(async () => {
|
|
7
|
-
|
|
4
|
+
auth = await app.container.make("auth.manager");
|
|
8
5
|
});
|
|
9
|
-
export {
|
|
10
|
-
auth as default
|
|
11
|
-
};
|
|
6
|
+
export { auth as default };
|
package/build/src/debug.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("util").DebugLogger;
|
|
1
|
+
declare const _default: import("node:util").DebugLogger;
|
|
2
2
|
export default _default;
|
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import "../../chunk-UXA4FHST.js";
|
|
2
|
-
|
|
3
|
-
// src/middleware/initialize_auth_middleware.ts
|
|
4
1
|
var InitializeAuthMiddleware = class {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* // This middleware runs automatically when registered
|
|
13
|
-
* // It adds ctx.auth to every HTTP request
|
|
14
|
-
*/
|
|
15
|
-
async handle(ctx, next) {
|
|
16
|
-
const auth = await ctx.containerResolver.make("auth.manager");
|
|
17
|
-
ctx.auth = auth.createAuthenticator(ctx);
|
|
18
|
-
if ("view" in ctx) {
|
|
19
|
-
ctx.view.share({ auth: ctx.auth });
|
|
20
|
-
}
|
|
21
|
-
return next();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
InitializeAuthMiddleware as default
|
|
2
|
+
async handle(ctx, next) {
|
|
3
|
+
ctx.auth = (await ctx.containerResolver.make("auth.manager")).createAuthenticator(ctx);
|
|
4
|
+
if ("view" in ctx) ctx.view.share({ auth: ctx.auth });
|
|
5
|
+
return next();
|
|
6
|
+
}
|
|
26
7
|
};
|
|
8
|
+
export { InitializeAuthMiddleware as default };
|
|
@@ -1,99 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
E_INVALID_CREDENTIALS
|
|
3
|
-
} from "../../chunk-S5G5RTJX.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "../../chunk-UXA4FHST.js";
|
|
7
|
-
|
|
8
|
-
// src/mixins/lucid.ts
|
|
1
|
+
import { t as E_INVALID_CREDENTIALS } from "../../errors-BQxhZmkE.js";
|
|
9
2
|
import { RuntimeException } from "@adonisjs/core/exceptions";
|
|
10
3
|
import { beforeSave } from "@adonisjs/lucid/orm";
|
|
4
|
+
function __decorate(decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
|
+
}
|
|
11
10
|
function withAuthFinder(hash, options) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @throws {E_INVALID_CREDENTIALS} When credentials are invalid
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* const user = await User.verifyCredentials('john@example.com', 'password123')
|
|
51
|
-
* console.log('Authenticated user:', user.email)
|
|
52
|
-
*/
|
|
53
|
-
static async verifyCredentials(uid, password) {
|
|
54
|
-
if (!uid || !password) {
|
|
55
|
-
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
56
|
-
}
|
|
57
|
-
const user = await this.findForAuth(normalizedOptions.uids, uid);
|
|
58
|
-
if (!user) {
|
|
59
|
-
await hashFactory().make(password);
|
|
60
|
-
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
61
|
-
}
|
|
62
|
-
if (await user.verifyPassword(password)) {
|
|
63
|
-
return user;
|
|
64
|
-
}
|
|
65
|
-
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Verifies the plain password against the user's password
|
|
69
|
-
* hash
|
|
70
|
-
*
|
|
71
|
-
* @param plainPassword - The plain text password to verify
|
|
72
|
-
*
|
|
73
|
-
* @throws {RuntimeException} When password column value is undefined or null
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* const isValid = await user.verifyPassword('password123')
|
|
77
|
-
* if (isValid) {
|
|
78
|
-
* console.log('Password is correct')
|
|
79
|
-
* }
|
|
80
|
-
*/
|
|
81
|
-
verifyPassword(plainPassword) {
|
|
82
|
-
const passwordHash = this[normalizedOptions.passwordColumnName];
|
|
83
|
-
if (!passwordHash) {
|
|
84
|
-
throw new RuntimeException(
|
|
85
|
-
`Cannot verify password. The value for "${normalizedOptions.passwordColumnName}" column is undefined or null`
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
return hashFactory().verify(passwordHash, plainPassword);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
__decorateClass([
|
|
92
|
-
beforeSave()
|
|
93
|
-
], UserWithUserFinder, "hashPassword", 1);
|
|
94
|
-
return UserWithUserFinder;
|
|
95
|
-
};
|
|
11
|
+
let normalizedOptions = {
|
|
12
|
+
uids: ["email"],
|
|
13
|
+
passwordColumnName: "password",
|
|
14
|
+
...options
|
|
15
|
+
};
|
|
16
|
+
let hashFactory = typeof hash === "function" ? hash : () => hash.use();
|
|
17
|
+
return function(superclass) {
|
|
18
|
+
class UserWithUserFinder extends superclass {
|
|
19
|
+
static async hashPassword(user) {
|
|
20
|
+
if (user.$dirty[normalizedOptions.passwordColumnName]) user[normalizedOptions.passwordColumnName] = await hashFactory().make(user[normalizedOptions.passwordColumnName]);
|
|
21
|
+
}
|
|
22
|
+
static findForAuth(uids, value) {
|
|
23
|
+
const query = this.query();
|
|
24
|
+
uids.forEach((uid) => query.orWhere(uid, value));
|
|
25
|
+
return query.limit(1).first();
|
|
26
|
+
}
|
|
27
|
+
static async verifyCredentials(uid, password) {
|
|
28
|
+
if (!uid || !password) throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
29
|
+
const user = await this.findForAuth(normalizedOptions.uids, uid);
|
|
30
|
+
if (!user) {
|
|
31
|
+
await hashFactory().make(password);
|
|
32
|
+
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
33
|
+
}
|
|
34
|
+
if (await user.verifyPassword(password)) return user;
|
|
35
|
+
throw new E_INVALID_CREDENTIALS("Invalid user credentials");
|
|
36
|
+
}
|
|
37
|
+
verifyPassword(plainPassword) {
|
|
38
|
+
const passwordHash = this[normalizedOptions.passwordColumnName];
|
|
39
|
+
if (!passwordHash) throw new RuntimeException(`Cannot verify password. The value for "${normalizedOptions.passwordColumnName}" column is undefined or null`);
|
|
40
|
+
return hashFactory().verify(passwordHash, plainPassword);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
__decorate([beforeSave()], UserWithUserFinder, "hashPassword", null);
|
|
44
|
+
return UserWithUserFinder;
|
|
45
|
+
};
|
|
96
46
|
}
|
|
97
|
-
export {
|
|
98
|
-
withAuthFinder
|
|
99
|
-
};
|
|
47
|
+
export { withAuthFinder };
|
|
@@ -1,58 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
debug_default
|
|
3
|
-
} from "../../../chunk-2VRS2VHB.js";
|
|
4
|
-
import "../../../chunk-UXA4FHST.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/japa/api_client.ts
|
|
1
|
+
import { t as debug_default } from "../../../debug-Ckko95-M.js";
|
|
7
2
|
import { ApiClient, ApiRequest } from "@japa/api-client";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
debug_default("defining session with api client request %O", requestData.session);
|
|
50
|
-
request.cookies(requestData.cookies);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
return pluginFn;
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
authApiClient
|
|
3
|
+
const authApiClient = (app) => {
|
|
4
|
+
const pluginFn = function() {
|
|
5
|
+
debug_default("installing auth api client plugin");
|
|
6
|
+
ApiRequest.macro("loginAs", function(user, ...args) {
|
|
7
|
+
this.authData = {
|
|
8
|
+
guard: "__default__",
|
|
9
|
+
args: [user, ...args]
|
|
10
|
+
};
|
|
11
|
+
return this;
|
|
12
|
+
});
|
|
13
|
+
ApiRequest.macro("withGuard", function(guard) {
|
|
14
|
+
return { loginAs: (...args) => {
|
|
15
|
+
this.authData = {
|
|
16
|
+
guard,
|
|
17
|
+
args
|
|
18
|
+
};
|
|
19
|
+
return this;
|
|
20
|
+
} };
|
|
21
|
+
});
|
|
22
|
+
ApiClient.setup(async (request) => {
|
|
23
|
+
const auth = await app.container.make("auth.manager");
|
|
24
|
+
const authData = request["authData"];
|
|
25
|
+
if (!authData) return;
|
|
26
|
+
const client = auth.createAuthenticatorClient();
|
|
27
|
+
const requestData = await (authData.guard === "__default__" ? client.use() : client.use(authData.guard)).authenticateAsClient(...authData.args);
|
|
28
|
+
/* c8 ignore next 13 */
|
|
29
|
+
if (requestData.headers) {
|
|
30
|
+
debug_default("defining headers with api client request %O", requestData.headers);
|
|
31
|
+
request.headers(requestData.headers);
|
|
32
|
+
}
|
|
33
|
+
if (requestData.session) {
|
|
34
|
+
debug_default("defining session with api client request %O", requestData.session);
|
|
35
|
+
request.withSession(requestData.session);
|
|
36
|
+
}
|
|
37
|
+
if (requestData.cookies) {
|
|
38
|
+
debug_default("defining session with api client request %O", requestData.session);
|
|
39
|
+
request.cookies(requestData.cookies);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return pluginFn;
|
|
58
44
|
};
|
|
45
|
+
export { authApiClient };
|
|
@@ -1,66 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
debug_default
|
|
3
|
-
} from "../../../chunk-2VRS2VHB.js";
|
|
4
|
-
import "../../../chunk-UXA4FHST.js";
|
|
5
|
-
|
|
6
|
-
// src/plugins/japa/browser_client.ts
|
|
7
|
-
import { decoratorsCollection } from "@japa/browser-client";
|
|
1
|
+
import { t as debug_default } from "../../../debug-Ckko95-M.js";
|
|
8
2
|
import { RuntimeException } from "@adonisjs/core/exceptions";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (requestData.session) {
|
|
55
|
-
debug_default("defining session with browser context %O", requestData.session);
|
|
56
|
-
context.setSession(requestData.session);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
return pluginFn;
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
authBrowserClient
|
|
3
|
+
import { decoratorsCollection } from "@japa/browser-client";
|
|
4
|
+
const authBrowserClient = (app) => {
|
|
5
|
+
const pluginFn = async function() {
|
|
6
|
+
debug_default("installing auth browser client plugin");
|
|
7
|
+
const auth = await app.container.make("auth.manager");
|
|
8
|
+
decoratorsCollection.register({ context(context) {
|
|
9
|
+
context.withGuard = function(guardName) {
|
|
10
|
+
return { async loginAs(...args) {
|
|
11
|
+
const guard = auth.createAuthenticatorClient().use(guardName);
|
|
12
|
+
const requestData = await guard.authenticateAsClient(...args);
|
|
13
|
+
/* c8 ignore next 17 */
|
|
14
|
+
if (requestData.headers) throw new RuntimeException(`Cannot use "${guard.driverName}" guard with browser client`);
|
|
15
|
+
if (requestData.cookies) {
|
|
16
|
+
debug_default("defining cookies with browser context %O", requestData.cookies);
|
|
17
|
+
Object.keys(requestData.cookies).forEach((cookie) => {
|
|
18
|
+
context.setCookie(cookie, requestData.cookies[cookie]);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (requestData.session) {
|
|
22
|
+
debug_default("defining session with browser context %O", requestData.session);
|
|
23
|
+
context.setSession(requestData.session);
|
|
24
|
+
}
|
|
25
|
+
} };
|
|
26
|
+
};
|
|
27
|
+
context.loginAs = async function(user, ...args) {
|
|
28
|
+
const guard = auth.createAuthenticatorClient().use();
|
|
29
|
+
const requestData = await guard.authenticateAsClient(user, ...args);
|
|
30
|
+
/* c8 ignore next 15 */
|
|
31
|
+
if (requestData.headers) throw new RuntimeException(`Cannot use "${guard.driverName}" guard with browser client`);
|
|
32
|
+
if (requestData.cookies) {
|
|
33
|
+
debug_default("defining cookies with browser context %O", requestData.cookies);
|
|
34
|
+
Object.keys(requestData.cookies).forEach((cookie) => {
|
|
35
|
+
context.setCookie(cookie, requestData.cookies[cookie]);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (requestData.session) {
|
|
39
|
+
debug_default("defining session with browser context %O", requestData.session);
|
|
40
|
+
context.setSession(requestData.session);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
} });
|
|
44
|
+
};
|
|
45
|
+
return pluginFn;
|
|
66
46
|
};
|
|
47
|
+
export { authBrowserClient };
|
package/build/src/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { i as __export } from "./errors-BQxhZmkE.js";
|
|
2
|
+
var symbols_exports = /* @__PURE__ */ __export({
|
|
3
|
+
GUARD_KNOWN_EVENTS: () => GUARD_KNOWN_EVENTS,
|
|
4
|
+
PROVIDER_REAL_USER: () => PROVIDER_REAL_USER
|
|
5
|
+
});
|
|
6
|
+
const PROVIDER_REAL_USER = Symbol.for("PROVIDER_REAL_USER");
|
|
7
|
+
const GUARD_KNOWN_EVENTS = Symbol.for("GUARD_KNOWN_EVENTS");
|
|
8
|
+
export { symbols_exports as t };
|
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": "10.0.0-next.
|
|
4
|
+
"version": "10.0.0-next.3",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
7
7
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"clean": "del-cli build",
|
|
43
43
|
"copy:templates": "copyfiles \"stubs/**/*.stub\" --up=\"1\" build",
|
|
44
44
|
"precompile": "npm run lint && npm run clean",
|
|
45
|
-
"compile": "
|
|
45
|
+
"compile": "tsdown && tsc --emitDeclarationOnly --declaration",
|
|
46
46
|
"postcompile": "npm run copy:templates",
|
|
47
47
|
"build": "npm run compile",
|
|
48
48
|
"prepublishOnly": "npm run build",
|
|
@@ -51,49 +51,49 @@
|
|
|
51
51
|
"quick:test": "cross-env NODE_DEBUG=\"adonisjs:auth:*\" node --enable-source-maps --import=@poppinss/ts-exec ./bin/test.js"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@adonisjs/assembler": "^8.0.0-next.
|
|
55
|
-
"@adonisjs/core": "^7.0.0-next.
|
|
56
|
-
"@adonisjs/eslint-config": "^3.0.0-next.
|
|
57
|
-
"@adonisjs/i18n": "^3.0.0-next.
|
|
54
|
+
"@adonisjs/assembler": "^8.0.0-next.26",
|
|
55
|
+
"@adonisjs/core": "^7.0.0-next.16",
|
|
56
|
+
"@adonisjs/eslint-config": "^3.0.0-next.5",
|
|
57
|
+
"@adonisjs/i18n": "^3.0.0-next.2",
|
|
58
58
|
"@adonisjs/lucid": "^22.0.0-next.1",
|
|
59
59
|
"@adonisjs/prettier-config": "^1.4.5",
|
|
60
|
-
"@adonisjs/session": "^8.0.0-next.
|
|
61
|
-
"@adonisjs/tsconfig": "^2.0.0-next.
|
|
62
|
-
"@japa/api-client": "^3.1.
|
|
63
|
-
"@japa/assert": "^4.
|
|
64
|
-
"@japa/browser-client": "^2.
|
|
65
|
-
"@japa/expect-type": "^2.0.
|
|
66
|
-
"@japa/file-system": "^
|
|
67
|
-
"@japa/plugin-adonisjs": "^5.
|
|
68
|
-
"@japa/runner": "^
|
|
69
|
-
"@japa/snapshot": "^2.0.
|
|
60
|
+
"@adonisjs/session": "^8.0.0-next.1",
|
|
61
|
+
"@adonisjs/tsconfig": "^2.0.0-next.3",
|
|
62
|
+
"@japa/api-client": "^3.1.1",
|
|
63
|
+
"@japa/assert": "^4.2.0",
|
|
64
|
+
"@japa/browser-client": "^2.2.0",
|
|
65
|
+
"@japa/expect-type": "^2.0.4",
|
|
66
|
+
"@japa/file-system": "^3.0.0",
|
|
67
|
+
"@japa/plugin-adonisjs": "^5.1.0-next.0",
|
|
68
|
+
"@japa/runner": "^5.0.0",
|
|
69
|
+
"@japa/snapshot": "^2.0.10",
|
|
70
70
|
"@poppinss/ts-exec": "^1.4.1",
|
|
71
|
-
"@release-it/conventional-changelog": "^10.0.
|
|
71
|
+
"@release-it/conventional-changelog": "^10.0.4",
|
|
72
72
|
"@types/basic-auth": "^1.1.8",
|
|
73
73
|
"@types/luxon": "^3.7.1",
|
|
74
|
-
"@types/node": "^
|
|
74
|
+
"@types/node": "^25.0.3",
|
|
75
75
|
"@types/set-cookie-parser": "^2.4.10",
|
|
76
|
-
"@types/sinon": "^
|
|
76
|
+
"@types/sinon": "^21.0.0",
|
|
77
77
|
"c8": "^10.1.3",
|
|
78
78
|
"convert-hrtime": "^5.0.0",
|
|
79
79
|
"copyfiles": "^2.4.1",
|
|
80
80
|
"cross-env": "^10.1.0",
|
|
81
81
|
"del-cli": "^7.0.0",
|
|
82
82
|
"dotenv": "^17.2.3",
|
|
83
|
-
"eslint": "^9.
|
|
83
|
+
"eslint": "^9.39.2",
|
|
84
84
|
"luxon": "^3.7.2",
|
|
85
|
-
"mysql2": "^3.
|
|
85
|
+
"mysql2": "^3.16.0",
|
|
86
86
|
"nock": "^14.0.10",
|
|
87
87
|
"pg": "^8.16.3",
|
|
88
|
-
"playwright": "^1.
|
|
89
|
-
"prettier": "^3.
|
|
90
|
-
"release-it": "^19.0
|
|
91
|
-
"set-cookie-parser": "^2.7.
|
|
88
|
+
"playwright": "^1.57.0",
|
|
89
|
+
"prettier": "^3.7.4",
|
|
90
|
+
"release-it": "^19.1.0",
|
|
91
|
+
"set-cookie-parser": "^2.7.2",
|
|
92
92
|
"sinon": "^21.0.0",
|
|
93
93
|
"sqlite3": "^5.1.7",
|
|
94
|
-
"tedious": "^
|
|
94
|
+
"tedious": "^19.1.3",
|
|
95
95
|
"timekeeper": "^2.3.1",
|
|
96
|
-
"
|
|
96
|
+
"tsdown": "^0.18.1",
|
|
97
97
|
"typescript": "^5.9.3"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"basic-auth": "^2.0.1"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@adonisjs/assembler": "^8.0.0-next.
|
|
105
|
-
"@adonisjs/core": "^7.0.0-next.
|
|
106
|
-
"@adonisjs/i18n": "^3.0.0-next.
|
|
107
|
-
"@adonisjs/lucid": "^22.0.0-next.
|
|
108
|
-
"@adonisjs/session": "^8.0.0-next.
|
|
109
|
-
"@japa/api-client": "^3.1.
|
|
110
|
-
"@japa/browser-client": "^2.
|
|
111
|
-
"@japa/plugin-adonisjs": "^5.
|
|
104
|
+
"@adonisjs/assembler": "^8.0.0-next.26",
|
|
105
|
+
"@adonisjs/core": "^7.0.0-next.16",
|
|
106
|
+
"@adonisjs/i18n": "^3.0.0-next.2",
|
|
107
|
+
"@adonisjs/lucid": "^22.0.0-next.1",
|
|
108
|
+
"@adonisjs/session": "^8.0.0-next.1",
|
|
109
|
+
"@japa/api-client": "^3.1.1",
|
|
110
|
+
"@japa/browser-client": "^2.2.0",
|
|
111
|
+
"@japa/plugin-adonisjs": "^5.1.0-next.0"
|
|
112
112
|
},
|
|
113
113
|
"peerDependenciesMeta": {
|
|
114
114
|
"@adonisjs/assembler": {
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
"
|
|
182
|
+
"tsdown": {
|
|
183
183
|
"entry": [
|
|
184
184
|
"./index.ts",
|
|
185
185
|
"./src/types.ts",
|
|
@@ -199,8 +199,11 @@
|
|
|
199
199
|
"outDir": "./build",
|
|
200
200
|
"clean": true,
|
|
201
201
|
"format": "esm",
|
|
202
|
+
"minify": "dce-only",
|
|
203
|
+
"fixedExtension": false,
|
|
202
204
|
"dts": false,
|
|
203
|
-
"
|
|
205
|
+
"treeshake": false,
|
|
206
|
+
"sourcemaps": false,
|
|
204
207
|
"target": "esnext"
|
|
205
208
|
},
|
|
206
209
|
"c8": {
|