@mongoosejs/studio 0.1.18 → 0.1.20
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/backend/actions/Model/getDocument.js +2 -1
- package/backend/actions/Model/getDocuments.js +3 -2
- package/backend/actions/Model/getDocumentsStream.js +3 -2
- package/backend/helpers/getRefFromSchemaType.js +5 -0
- package/frontend/public/app.js +15045 -605
- package/frontend/src/chat/chat-message/chat-message.js +2 -15
- package/frontend/src/chat/chat-message-script/chat-message-script.js +4 -29
- package/frontend/src/chat/chat.js +4 -29
- package/frontend/src/clone-document/clone-document.js +1 -8
- package/frontend/src/create-dashboard/create-dashboard.js +1 -8
- package/frontend/src/create-document/create-document.js +1 -8
- package/frontend/src/dashboard/dashboard.js +1 -8
- package/frontend/src/dashboard/edit-dashboard/edit-dashboard.js +1 -8
- package/frontend/src/dashboards/dashboards.js +1 -8
- package/frontend/src/document/document.js +3 -23
- package/frontend/src/export-query-results/export-query-results.js +1 -8
- package/frontend/src/index.js +13 -7
- package/frontend/src/list-default/list-default.js +1 -8
- package/frontend/src/list-json/json-node.html +1 -1
- package/frontend/src/list-json/list-json.js +28 -3
- package/frontend/src/list-mixed/list-mixed.js +1 -8
- package/frontend/src/list-string/list-string.js +1 -8
- package/frontend/src/list-subdocument/list-subdocument.js +1 -8
- package/frontend/src/models/models.html +7 -0
- package/frontend/src/models/models.js +16 -22
- package/frontend/src/update-document/update-document.js +1 -8
- package/package.json +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const Archetype = require('archetype');
|
|
4
|
+
const getRefFromSchemaType = require('../../helpers/getRefFromSchemaType');
|
|
4
5
|
const removeSpecifiedPaths = require('../../helpers/removeSpecifiedPaths');
|
|
5
6
|
const authorize = require('../../authorize');
|
|
6
7
|
|
|
@@ -37,7 +38,7 @@ module.exports = ({ db }) => async function getDocument(params) {
|
|
|
37
38
|
schemaPaths[path] = {
|
|
38
39
|
instance: Model.schema.paths[path].instance,
|
|
39
40
|
path,
|
|
40
|
-
ref: Model.schema.paths[path]
|
|
41
|
+
ref: getRefFromSchemaType(Model.schema.paths[path]),
|
|
41
42
|
required: Model.schema.paths[path].options?.required,
|
|
42
43
|
enum: Model.schema.paths[path].options?.enum
|
|
43
44
|
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const Archetype = require('archetype');
|
|
4
4
|
const removeSpecifiedPaths = require('../../helpers/removeSpecifiedPaths');
|
|
5
5
|
const evaluateFilter = require('../../helpers/evaluateFilter');
|
|
6
|
+
const getRefFromSchemaType = require('../../helpers/getRefFromSchemaType');
|
|
6
7
|
const authorize = require('../../authorize');
|
|
7
8
|
|
|
8
9
|
const GetDocumentsParams = new Archetype({
|
|
@@ -77,7 +78,7 @@ module.exports = ({ db }) => async function getDocuments(params) {
|
|
|
77
78
|
schemaPaths[path] = {
|
|
78
79
|
instance: schemaType.instance,
|
|
79
80
|
path,
|
|
80
|
-
ref: schemaType
|
|
81
|
+
ref: getRefFromSchemaType(schemaType),
|
|
81
82
|
required: schemaType.options?.required,
|
|
82
83
|
enum: schemaType.options?.enum
|
|
83
84
|
};
|
|
@@ -87,7 +88,7 @@ module.exports = ({ db }) => async function getDocuments(params) {
|
|
|
87
88
|
schemaPaths[path].schema[subpath] = {
|
|
88
89
|
instance: schemaType.schema.paths[subpath].instance,
|
|
89
90
|
path: subpath,
|
|
90
|
-
ref: schemaType.schema.paths[subpath]
|
|
91
|
+
ref: getRefFromSchemaType(schemaType.schema.paths[subpath]),
|
|
91
92
|
required: schemaType.schema.paths[subpath].options?.required,
|
|
92
93
|
enum: schemaType.schema.paths[subpath].options?.enum
|
|
93
94
|
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const Archetype = require('archetype');
|
|
4
4
|
const removeSpecifiedPaths = require('../../helpers/removeSpecifiedPaths');
|
|
5
5
|
const evaluateFilter = require('../../helpers/evaluateFilter');
|
|
6
|
+
const getRefFromSchemaType = require('../../helpers/getRefFromSchemaType');
|
|
6
7
|
const authorize = require('../../authorize');
|
|
7
8
|
|
|
8
9
|
const GetDocumentsParams = new Archetype({
|
|
@@ -67,7 +68,7 @@ module.exports = ({ db }) => async function* getDocumentsStream(params) {
|
|
|
67
68
|
schemaPaths[path] = {
|
|
68
69
|
instance: schemaType.instance,
|
|
69
70
|
path,
|
|
70
|
-
ref: schemaType
|
|
71
|
+
ref: getRefFromSchemaType(schemaType),
|
|
71
72
|
required: schemaType.options?.required,
|
|
72
73
|
enum: schemaType.options?.enum
|
|
73
74
|
};
|
|
@@ -77,7 +78,7 @@ module.exports = ({ db }) => async function* getDocumentsStream(params) {
|
|
|
77
78
|
schemaPaths[path].schema[subpath] = {
|
|
78
79
|
instance: schemaType.schema.paths[subpath].instance,
|
|
79
80
|
path: subpath,
|
|
80
|
-
ref: schemaType.schema.paths[subpath]
|
|
81
|
+
ref: getRefFromSchemaType(schemaType.schema.paths[subpath]),
|
|
81
82
|
required: schemaType.schema.paths[subpath].options?.required,
|
|
82
83
|
enum: schemaType.schema.paths[subpath].options?.enum
|
|
83
84
|
};
|