@jskit-ai/console-core 0.1.113 → 0.1.116
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/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/console-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.116",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@jskit-ai/auth-core": "0.1.
|
|
10
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
11
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
12
|
-
"@jskit-ai/kernel": "0.1.
|
|
13
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
14
|
-
"@jskit-ai/users-core": "0.1.
|
|
9
|
+
"@jskit-ai/auth-core": "0.1.151",
|
|
10
|
+
"@jskit-ai/database-runtime": "0.1.153",
|
|
11
|
+
"@jskit-ai/http-runtime": "0.1.151",
|
|
12
|
+
"@jskit-ai/kernel": "0.1.153",
|
|
13
|
+
"@jskit-ai/resource-crud-core": "0.1.95",
|
|
14
|
+
"@jskit-ai/users-core": "0.1.166",
|
|
15
15
|
"json-rest-schema": "^1.0.17"
|
|
16
16
|
},
|
|
17
17
|
"description": "Console runtime: console settings schema, bootstrap flags, actions, and HTTP routes.",
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
"mutations": {
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"runtime": {
|
|
94
|
-
"@jskit-ai/auth-core": "0.1.
|
|
95
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
96
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
97
|
-
"@jskit-ai/kernel": "0.1.
|
|
98
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
99
|
-
"@jskit-ai/users-core": "0.1.
|
|
94
|
+
"@jskit-ai/auth-core": "0.1.151",
|
|
95
|
+
"@jskit-ai/database-runtime": "0.1.153",
|
|
96
|
+
"@jskit-ai/http-runtime": "0.1.151",
|
|
97
|
+
"@jskit-ai/kernel": "0.1.153",
|
|
98
|
+
"@jskit-ai/resource-crud-core": "0.1.95",
|
|
99
|
+
"@jskit-ai/users-core": "0.1.166"
|
|
100
100
|
},
|
|
101
101
|
"dev": {}
|
|
102
102
|
},
|
|
@@ -55,7 +55,7 @@ function createConsoleAuthServiceDecorator({ consoleService } = {}) {
|
|
|
55
55
|
|
|
56
56
|
const authenticatedUserId =
|
|
57
57
|
authResult?.authenticated === true
|
|
58
|
-
? normalizeRecordId(authResult?.
|
|
58
|
+
? normalizeRecordId(authResult?.actor?.id, { fallback: null })
|
|
59
59
|
: null;
|
|
60
60
|
|
|
61
61
|
if (!authenticatedUserId) {
|
|
@@ -56,7 +56,11 @@ test("bootstrap payload preserves consoleowner for authenticated users after use
|
|
|
56
56
|
assert.equal(actionId, "auth.session.read");
|
|
57
57
|
return {
|
|
58
58
|
authenticated: true,
|
|
59
|
-
|
|
59
|
+
actor: {
|
|
60
|
+
id: profile.id,
|
|
61
|
+
displayName: profile.displayName,
|
|
62
|
+
email: profile.email
|
|
63
|
+
},
|
|
60
64
|
session: {
|
|
61
65
|
csrfToken: "csrf-1"
|
|
62
66
|
}
|
|
@@ -17,7 +17,7 @@ test("console auth service decorator seeds first owner during session reads only
|
|
|
17
17
|
async authenticateRequest(request) {
|
|
18
18
|
return {
|
|
19
19
|
authenticated: true,
|
|
20
|
-
|
|
20
|
+
actor: {
|
|
21
21
|
id: request.profileId
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -71,7 +71,7 @@ test("console auth service decorator safely shadows authenticateRequest on a fro
|
|
|
71
71
|
calls.push({ request, args });
|
|
72
72
|
return {
|
|
73
73
|
authenticated: true,
|
|
74
|
-
|
|
74
|
+
actor: {
|
|
75
75
|
id: request.profileId
|
|
76
76
|
}
|
|
77
77
|
};
|
|
@@ -105,7 +105,7 @@ test("console auth service decorator safely shadows authenticateRequest on a fro
|
|
|
105
105
|
assert.equal(Object.getPrototypeOf(decoratedAuthService), originalAuthService);
|
|
106
106
|
assert.equal(originalAuthService.authenticateRequest, originalAuthenticateRequest);
|
|
107
107
|
assert.equal(decoratedAuthService.readMarker(), "original-service");
|
|
108
|
-
assert.equal(result.
|
|
108
|
+
assert.equal(result.actor.id, "42");
|
|
109
109
|
assert.deepEqual(ownerSeeds, ["42"]);
|
|
110
110
|
assert.equal(calls.length, 1);
|
|
111
111
|
assert.deepEqual(calls[0].args, ["forwarded-argument"]);
|