@jskit-ai/json-rest-api-core 0.1.5 → 0.1.6
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/json-rest-api-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"hooked-api": "1.x.x",
|
|
13
13
|
"json-rest-api": "1.x.x",
|
|
14
|
-
"@jskit-ai/kernel": "0.1.
|
|
14
|
+
"@jskit-ai/kernel": "0.1.61"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -133,6 +133,30 @@ test("createJsonRestApiHost installs normalizeRecordId as the default resource i
|
|
|
133
133
|
assert.equal(api.vars.normalizeId(7.5), null);
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
+
test("createJsonRestApiHost configures the internal json-rest logger at error level", async () => {
|
|
137
|
+
const fakeKnex = Object.assign(() => {}, {
|
|
138
|
+
client: {
|
|
139
|
+
config: {
|
|
140
|
+
client: "sqlite3"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
async raw() {
|
|
144
|
+
return [
|
|
145
|
+
{
|
|
146
|
+
version: "3.35.5"
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
},
|
|
150
|
+
transaction() {}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const api = await createJsonRestApiHost({
|
|
154
|
+
knex: fakeKnex
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
assert.equal(api.options.logging.level, "error");
|
|
158
|
+
});
|
|
159
|
+
|
|
136
160
|
test("shared query/document helpers build json-rest-api request shapes", () => {
|
|
137
161
|
assert.deepEqual(
|
|
138
162
|
buildJsonRestQueryParams("contacts", {
|