@jskit-ai/console-core 0.1.207 → 0.1.209
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/console-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.209",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"./shared/resources/consoleSettingsResource": "./src/shared/resources/consoleSettingsResource.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
15
|
-
"@jskit-ai/users-core": "0.1.
|
|
13
|
+
"@jskit-ai/database-runtime": "0.1.246",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.188",
|
|
15
|
+
"@jskit-ai/users-core": "0.1.259",
|
|
16
16
|
"json-rest-schema": "^1.0.17"
|
|
17
17
|
},
|
|
18
18
|
"description": "Console runtime: console settings schema, bootstrap flags, actions, and HTTP routes.",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@jskit-ai/auth-core": "0.1.
|
|
98
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
99
|
-
"@jskit-ai/kernel": "0.1.
|
|
97
|
+
"@jskit-ai/auth-core": "0.1.244",
|
|
98
|
+
"@jskit-ai/http-runtime": "0.1.244",
|
|
99
|
+
"@jskit-ai/kernel": "0.1.246"
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
emptyInputValidator
|
|
3
|
-
} from "@jskit-ai/kernel/
|
|
3
|
+
} from "@jskit-ai/kernel/server/actions/actionContributorHelpers";
|
|
4
4
|
import { returnJsonApiData } from "@jskit-ai/http-runtime/shared";
|
|
5
5
|
import { createEntityChangedActionEvent } from "@jskit-ai/kernel/server/actions";
|
|
6
6
|
import { consoleSettingsResource } from "../../shared/resources/consoleSettingsResource.js";
|
|
@@ -23,10 +23,6 @@ const consoleSettingsActionSpecifications = Object.freeze([
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
idempotency: "none",
|
|
26
|
-
audit: {
|
|
27
|
-
actionName: "console.settings.read"
|
|
28
|
-
},
|
|
29
|
-
observability: {},
|
|
30
26
|
async run(consoleSettingsService, _input, context) {
|
|
31
27
|
return returnJsonApiData(await consoleSettingsService.getSettings({
|
|
32
28
|
context
|
|
@@ -45,10 +41,6 @@ const consoleSettingsActionSpecifications = Object.freeze([
|
|
|
45
41
|
input: consoleSettingsResource.operations.replace.body,
|
|
46
42
|
output: null,
|
|
47
43
|
idempotency: "optional",
|
|
48
|
-
audit: {
|
|
49
|
-
actionName: "console.settings.update"
|
|
50
|
-
},
|
|
51
|
-
observability: {},
|
|
52
44
|
extensions: {
|
|
53
45
|
assistant: { exclude: "Application-owned console settings require an explicit assistant field allowlist; arbitrary configuration is not model-safe." },
|
|
54
46
|
realtime: {
|
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { deriveResourceRequiredMetadata } from "@jskit-ai/kernel/_testable";
|
|
7
|
-
import {
|
|
7
|
+
import { resolveSchemaTransportSchemaDefinition } from "@jskit-ai/kernel/shared/validators";
|
|
8
8
|
import { consoleSettingsResource } from "../src/shared/resources/consoleSettingsResource.js";
|
|
9
9
|
|
|
10
10
|
function assertResourceShape(resource, label) {
|
|
@@ -26,7 +26,7 @@ function assertResourceShape(resource, label) {
|
|
|
26
26
|
`${label}.operations.${operationName} must resolve messages from operation.messages or resource.messages.`
|
|
27
27
|
);
|
|
28
28
|
assert.equal(
|
|
29
|
-
typeof
|
|
29
|
+
typeof resolveSchemaTransportSchemaDefinition(operation.output, {
|
|
30
30
|
context: `${label}.operations.${operationName}.output`,
|
|
31
31
|
defaultMode: "replace"
|
|
32
32
|
}),
|
|
@@ -35,15 +35,15 @@ function assertResourceShape(resource, label) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
assert.equal(typeof
|
|
38
|
+
assert.equal(typeof resolveSchemaTransportSchemaDefinition(resource.operations.create.body, {
|
|
39
39
|
context: `${label}.operations.create.body`,
|
|
40
40
|
defaultMode: "create"
|
|
41
41
|
}), "object", `${label}.operations.create.body.schema is required.`);
|
|
42
|
-
assert.equal(typeof
|
|
42
|
+
assert.equal(typeof resolveSchemaTransportSchemaDefinition(resource.operations.replace.body, {
|
|
43
43
|
context: `${label}.operations.replace.body`,
|
|
44
44
|
defaultMode: "replace"
|
|
45
45
|
}), "object", `${label}.operations.replace.body.schema is required.`);
|
|
46
|
-
assert.equal(typeof
|
|
46
|
+
assert.equal(typeof resolveSchemaTransportSchemaDefinition(resource.operations.patch.body, {
|
|
47
47
|
context: `${label}.operations.patch.body`,
|
|
48
48
|
defaultMode: "patch"
|
|
49
49
|
}), "object", `${label}.operations.patch.body.schema is required.`);
|
|
@@ -62,12 +62,12 @@ test("console settings operations expose canonical validators", () => {
|
|
|
62
62
|
for (const operationName of ["view", "list", "create", "replace", "patch"]) {
|
|
63
63
|
const operation = consoleSettingsResource.operations?.[operationName];
|
|
64
64
|
assert.equal(typeof operation?.method, "string", `${operationName}.method must exist.`);
|
|
65
|
-
assert.equal(typeof
|
|
65
|
+
assert.equal(typeof resolveSchemaTransportSchemaDefinition(operation?.output, {
|
|
66
66
|
context: `${operationName}.output`,
|
|
67
67
|
defaultMode: "replace"
|
|
68
68
|
}), "object", `${operationName}.output.schema must exist.`);
|
|
69
69
|
if (operation?.body) {
|
|
70
|
-
assert.equal(typeof
|
|
70
|
+
assert.equal(typeof resolveSchemaTransportSchemaDefinition(operation.body, {
|
|
71
71
|
context: `${operationName}.body`,
|
|
72
72
|
defaultMode: operationName === "create" ? "create" : operationName === "replace" ? "replace" : "patch"
|
|
73
73
|
}), "object", `${operationName}.body.schema must exist.`);
|