@jskit-ai/users-core 0.1.66 → 0.1.67
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.descriptor.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
packageVersion: 1,
|
|
3
3
|
packageId: "@jskit-ai/users-core",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.67",
|
|
5
5
|
kind: "runtime",
|
|
6
6
|
description: "Users/account runtime plus HTTP routes for account features.",
|
|
7
7
|
dependsOn: [
|
|
@@ -132,16 +132,16 @@ export default Object.freeze({
|
|
|
132
132
|
mutations: {
|
|
133
133
|
dependencies: {
|
|
134
134
|
runtime: {
|
|
135
|
-
"@jskit-ai/auth-core": "0.1.
|
|
136
|
-
"@jskit-ai/crud-core": "0.1.
|
|
137
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
138
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
139
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
140
|
-
"@jskit-ai/kernel": "0.1.
|
|
141
|
-
"@jskit-ai/resource-core": "0.1.
|
|
142
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
135
|
+
"@jskit-ai/auth-core": "0.1.56",
|
|
136
|
+
"@jskit-ai/crud-core": "0.1.65",
|
|
137
|
+
"@jskit-ai/database-runtime": "0.1.57",
|
|
138
|
+
"@jskit-ai/http-runtime": "0.1.56",
|
|
139
|
+
"@jskit-ai/json-rest-api-core": "0.1.2",
|
|
140
|
+
"@jskit-ai/kernel": "0.1.57",
|
|
141
|
+
"@jskit-ai/resource-core": "0.1.2",
|
|
142
|
+
"@jskit-ai/resource-crud-core": "0.1.2",
|
|
143
143
|
"@local/users": "file:packages/users",
|
|
144
|
-
"@jskit-ai/uploads-runtime": "0.1.
|
|
144
|
+
"@jskit-ai/uploads-runtime": "0.1.35"
|
|
145
145
|
},
|
|
146
146
|
dev: {}
|
|
147
147
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/users-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.67",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"./shared/resources/userSettingsResource": "./src/shared/resources/userSettingsResource.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@jskit-ai/auth-core": "0.1.
|
|
15
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
16
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
17
|
-
"@jskit-ai/json-rest-api-core": "0.1.
|
|
18
|
-
"@jskit-ai/kernel": "0.1.
|
|
19
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
20
|
-
"@jskit-ai/resource-core": "0.1.
|
|
21
|
-
"@jskit-ai/uploads-runtime": "0.1.
|
|
14
|
+
"@jskit-ai/auth-core": "0.1.56",
|
|
15
|
+
"@jskit-ai/database-runtime": "0.1.57",
|
|
16
|
+
"@jskit-ai/http-runtime": "0.1.56",
|
|
17
|
+
"@jskit-ai/json-rest-api-core": "0.1.2",
|
|
18
|
+
"@jskit-ai/kernel": "0.1.57",
|
|
19
|
+
"@jskit-ai/resource-crud-core": "0.1.2",
|
|
20
|
+
"@jskit-ai/resource-core": "0.1.2",
|
|
21
|
+
"@jskit-ai/uploads-runtime": "0.1.35",
|
|
22
22
|
"json-rest-schema": "1.x.x"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -3,7 +3,7 @@ import { defineCrudResource } from "@jskit-ai/resource-crud-core/shared/crudReso
|
|
|
3
3
|
const resource = defineCrudResource({
|
|
4
4
|
namespace: "users",
|
|
5
5
|
tableName: "users",
|
|
6
|
-
crudOperations: ["list", "view"
|
|
6
|
+
crudOperations: ["list", "view"],
|
|
7
7
|
schema: {
|
|
8
8
|
name: {
|
|
9
9
|
type: "string",
|
|
@@ -2,7 +2,7 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import test from "node:test";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import descriptor from "../package.descriptor.mjs";
|
|
7
7
|
import crudCorePackage from "../../crud-core/package.json" with { type: "json" };
|
|
8
8
|
import resourceCrudCorePackage from "../../resource-crud-core/package.json" with { type: "json" };
|
|
@@ -163,3 +163,14 @@ test("users-core workspace users package templates stay aligned with workspace a
|
|
|
163
163
|
assert.match(serviceSource, /throw new TypeError\("createService requires usersRepository\."\);/);
|
|
164
164
|
assert.match(serviceSource, /returnJsonApiDocument/);
|
|
165
165
|
});
|
|
166
|
+
|
|
167
|
+
test("users-core local users resource scaffold stays read-only and canonical", async () => {
|
|
168
|
+
const resourceModule = await import(
|
|
169
|
+
pathToFileURL(path.join(PACKAGE_ROOT, "templates/packages/users/src/shared/userResource.js")).href
|
|
170
|
+
);
|
|
171
|
+
const resource = resourceModule?.resource;
|
|
172
|
+
|
|
173
|
+
assert.equal(typeof resource, "object");
|
|
174
|
+
assert.deepEqual(Object.keys(resource.operations), ["list", "view"]);
|
|
175
|
+
assert.equal(Object.hasOwn(resource.operations, "create"), false);
|
|
176
|
+
});
|