@mongoosejs/studio 0.0.137 → 0.0.139
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/updateDocument.js +2 -2
- package/backend/actions/Model/updateDocuments.js +2 -2
- package/express.js +3 -2
- package/frontend/index.js +2 -2
- package/frontend/public/app.js +396 -72
- package/frontend/public/tw.css +111 -0
- package/frontend/src/document-details/document-details.js +3 -3
- package/frontend/src/list-json/list-json.html +17 -3
- package/frontend/src/list-json/list-json.js +350 -25
- package/frontend/src/models/models.css +1 -0
- package/frontend/src/models/models.html +17 -2
- package/frontend/src/models/models.js +38 -27
- package/frontend/src/navbar/navbar.html +9 -0
- package/package.json +1 -1
- package/frontend/src/list-json/list-json.css +0 -3
|
@@ -31,8 +31,8 @@ module.exports = ({ db }) => async function updateDocument(params) {
|
|
|
31
31
|
throw new Error(`Model ${model} not found`);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const setFields = {};
|
|
35
|
+
const unsetFields = {};
|
|
36
36
|
|
|
37
37
|
if (Object.keys(update).length > 0) {
|
|
38
38
|
Object.entries(update).forEach(([key, value]) => {
|
|
@@ -31,8 +31,8 @@ module.exports = ({ db }) => async function updateDocuments(params) {
|
|
|
31
31
|
throw new Error(`Model ${model} not found`);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const setFields = {};
|
|
35
|
+
const unsetFields = {};
|
|
36
36
|
|
|
37
37
|
if (Object.keys(update).length > 0) {
|
|
38
38
|
Object.entries(update).forEach(([key, value]) => {
|
package/express.js
CHANGED
|
@@ -5,7 +5,7 @@ const express = require('express');
|
|
|
5
5
|
const frontend = require('./frontend');
|
|
6
6
|
const { toRoute, objectRouter } = require('extrovert');
|
|
7
7
|
|
|
8
|
-
module.exports = async function(apiUrl, conn, options) {
|
|
8
|
+
module.exports = async function mongooseStudioExpressApp(apiUrl, conn, options) {
|
|
9
9
|
const router = express.Router();
|
|
10
10
|
|
|
11
11
|
const mothershipUrl = options?._mothershipUrl || 'https://mongoose-js.netlify.app/.netlify/functions';
|
|
@@ -77,7 +77,6 @@ module.exports = async function(apiUrl, conn, options) {
|
|
|
77
77
|
objectRouter(backend, toRoute)
|
|
78
78
|
);
|
|
79
79
|
|
|
80
|
-
console.log('Workspace', workspace);
|
|
81
80
|
const { config } = await frontend(apiUrl, false, options, workspace);
|
|
82
81
|
router.get('/config.js', function (req, res) {
|
|
83
82
|
res.setHeader('Content-Type', 'application/javascript');
|
|
@@ -86,5 +85,7 @@ module.exports = async function(apiUrl, conn, options) {
|
|
|
86
85
|
|
|
87
86
|
router.use(express.static(`${__dirname}/frontend/public`));
|
|
88
87
|
|
|
88
|
+
console.log(`✔️ Mongoose Studio connected to workspace "${workspace.name}"`);
|
|
89
|
+
|
|
89
90
|
return router;
|
|
90
91
|
}
|
package/frontend/index.js
CHANGED
|
@@ -48,7 +48,7 @@ module.exports = async function frontend(apiUrl, isLambda, options, workspace) {
|
|
|
48
48
|
if (err) {
|
|
49
49
|
process.nextTick(() => { throw new Error('Error compiling bundle: ' + err.stack); });
|
|
50
50
|
}
|
|
51
|
-
console.log('Webpack compiled successfully');
|
|
51
|
+
console.log('[MONGOOSE STUDIO] Webpack compiled successfully');
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
const childProcess = exec('npm run tailwind:watch');
|
|
@@ -63,7 +63,7 @@ module.exports = async function frontend(apiUrl, isLambda, options, workspace) {
|
|
|
63
63
|
process.nextTick(() => { throw new Error('Error compiling bundle: ' + err.stack); });
|
|
64
64
|
}
|
|
65
65
|
resolve();
|
|
66
|
-
console.log('Webpack compiled successfully');
|
|
66
|
+
console.log('[MONGOOSE STUDIO] Webpack compiled successfully');
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|