@jskit-ai/crud-core 0.2.35 → 0.2.37
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/crud-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24.0.0"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"./locales/en.json": "./locales/en.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@jskit-ai/resource-core": "0.1.
|
|
24
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
23
|
+
"@jskit-ai/resource-core": "0.1.217",
|
|
24
|
+
"@jskit-ai/resource-crud-core": "0.1.219",
|
|
25
25
|
"json-rest-api": "3.1.9",
|
|
26
26
|
"json-rest-schema": "^1.0.20"
|
|
27
27
|
},
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@jskit-ai/http-runtime": "0.2.
|
|
53
|
-
"@jskit-ai/kernel": "0.2.
|
|
54
|
-
"@jskit-ai/resource-runtime": "0.2.
|
|
52
|
+
"@jskit-ai/http-runtime": "0.2.26",
|
|
53
|
+
"@jskit-ai/kernel": "0.2.26",
|
|
54
|
+
"@jskit-ai/resource-runtime": "0.2.33"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"./shared": "./src/shared/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jskit-ai/crud-core": "0.2.
|
|
13
|
-
"@jskit-ai/resource-core": "0.1.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
12
|
+
"@jskit-ai/crud-core": "0.2.37",
|
|
13
|
+
"@jskit-ai/resource-core": "0.1.217",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.219"
|
|
15
15
|
},
|
|
16
16
|
"jskit": {
|
|
17
17
|
"kind": "runtime",
|
|
@@ -256,7 +256,7 @@ test("defineCrudFeature makes workspace scope and permissions explicit", async (
|
|
|
256
256
|
await runtime.shutdown();
|
|
257
257
|
});
|
|
258
258
|
|
|
259
|
-
test("a scoped CRUD custom action's input keeps its own mode,
|
|
259
|
+
test("a scoped CRUD custom action's input keeps its own mode, one without a mode is create, and its extensions reach the action", async () => {
|
|
260
260
|
const routes = [];
|
|
261
261
|
const feature = defineCrudFeature({
|
|
262
262
|
crud: createBookResource({ ownership: "workspace" }),
|
|
@@ -271,6 +271,7 @@ test("a scoped CRUD custom action's input keeps its own mode, and one without a
|
|
|
271
271
|
actions: {
|
|
272
272
|
archive: {
|
|
273
273
|
input: { schema: createSchema({ recordId: { type: "string", required: true } }) },
|
|
274
|
+
extensions: { assistant: { unsaved: true } },
|
|
274
275
|
execute: ({ input }) => input
|
|
275
276
|
},
|
|
276
277
|
rename: {
|
|
@@ -299,6 +300,8 @@ test("a scoped CRUD custom action's input keeps its own mode, and one without a
|
|
|
299
300
|
assert.equal(archive.mode, "create");
|
|
300
301
|
assert.deepEqual(Object.keys(archive.schema.getFieldDefinitions()), ["workspaceSlug", "recordId"]);
|
|
301
302
|
assert.equal(rename.mode, "patch");
|
|
303
|
+
assert.deepEqual(actions.getDefinition("crud.books.archive").extensions, { assistant: { unsaved: true } },
|
|
304
|
+
"A custom action can be an unsaved assistant tool");
|
|
302
305
|
await runtime.shutdown();
|
|
303
306
|
});
|
|
304
307
|
|