beanbagdb 0.5.51 → 0.5.52
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/README.md +7 -129
- package/doc-src/0_about.md +115 -0
- package/doc-src/1_getting-started.md +1 -0
- package/doc-src/2_schema.md +1 -0
- package/doc-src/3_plugins.md +1 -0
- package/doc-src/contents.json +15 -0
- package/jsdoc.json +1 -1
- package/package.json +3 -2
- package/src/index.js +804 -437
- package/src/system_schema.js +1 -1
- package/test/operations.test.js +1 -1
- package/test/test1.js +5 -14
- /package/{docs → doc-src}/logo.png +0 -0
package/src/system_schema.js
CHANGED
package/test/operations.test.js
CHANGED
|
@@ -316,7 +316,7 @@ describe("Schema doc insertion gives errors when", async () => {
|
|
|
316
316
|
it(`${element[0]}`, async () => {
|
|
317
317
|
await rejects(
|
|
318
318
|
async () => {
|
|
319
|
-
await database.
|
|
319
|
+
await database.create("schema", element[1]);
|
|
320
320
|
},
|
|
321
321
|
ValidationError
|
|
322
322
|
);
|
package/test/test1.js
CHANGED
|
@@ -164,23 +164,14 @@ import {BeanBagDB} from '../src/index.js';
|
|
|
164
164
|
|
|
165
165
|
let schema_docs_invalid = [
|
|
166
166
|
{
|
|
167
|
-
name: "
|
|
168
|
-
description: "
|
|
169
|
-
schema: {
|
|
170
|
-
|
|
171
|
-
"properties":{"name":{"type":"string"},"address":{type:"object"},"secret":{"type":"string"}},
|
|
172
|
-
"additionalProperties":true
|
|
173
|
-
},
|
|
174
|
-
settings: {
|
|
175
|
-
primary_keys:["name"],
|
|
176
|
-
non_editable_fields:["address"],
|
|
177
|
-
single_record:false,
|
|
178
|
-
encrypted_fields:["name"]
|
|
179
|
-
},
|
|
167
|
+
name: "",
|
|
168
|
+
description: "",
|
|
169
|
+
schema: {},
|
|
170
|
+
settings: {},
|
|
180
171
|
}
|
|
181
172
|
]
|
|
182
173
|
let doc_obj = get_pdb_doc("test_database_26","qwertyuiopaqwsde1254")
|
|
183
174
|
let database = new BeanBagDB(doc_obj);
|
|
184
175
|
await database.ready()
|
|
185
|
-
let a = await database.
|
|
176
|
+
let a = await database.create("schema",schema_docs_invalid[0])
|
|
186
177
|
})()
|
|
File without changes
|