@mongoosejs/studio 0.0.98 → 0.0.100

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.
@@ -9,7 +9,7 @@ const DeleteDocumentsParams = new Archetype({
9
9
  $required: true
10
10
  },
11
11
  documentIds: {
12
- $type: 'string',
12
+ $type: ['string'],
13
13
  $required: true
14
14
  },
15
15
  roles: {
@@ -30,9 +30,7 @@ module.exports = ({ db }) => async function DeleteDocuments(params) {
30
30
 
31
31
  await Model.
32
32
  deleteMany({ _id: { $in: documentIds } }).
33
- setOptions({ sanitizeFilter: true }).
34
33
  orFail();
35
34
 
36
-
37
35
  return { };
38
36
  };
@@ -24,7 +24,7 @@ const UpdateDocumentsParams = new Archetype({
24
24
  module.exports = ({ db }) => async function updateDocument(params) {
25
25
  const { model, _id, update, roles } = new UpdateDocumentsParams(params);
26
26
 
27
- await authorize('Document.updateDocument', roles);
27
+ await authorize('Model.updateDocument', roles);
28
28
 
29
29
  const Model = db.models[model];
30
30
  if (Model == null) {
@@ -14,6 +14,7 @@ const actionsToRequiredRoles = {
14
14
  'Model.createDocument': ['owner', 'admin', 'member'],
15
15
  'Model.updateDocument': ['owner', 'admin', 'member'],
16
16
  'Model.deleteDocument': ['owner', 'admin', 'member'],
17
+ 'Model.deleteDocuments': ['owner', 'admin', 'member'],
17
18
  'Model.dropIndex': ['owner', 'admin'],
18
19
  'Model.exportQueryResults': ['owner', 'admin', 'member', 'readonly'],
19
20
  'Model.getDocument': ['owner', 'admin', 'member', 'readonly'],
@@ -1771,6 +1771,9 @@ if (typeof process === 'undefined') {
1771
1771
  __webpack_require__.g.process = { env: {} }; // To make `util` package work
1772
1772
  }
1773
1773
 
1774
+ const { version } = __webpack_require__(/*! ../../package.json */ "./package.json");
1775
+ console.log(`Mongoose Studio Version ${version}`);
1776
+
1774
1777
  const api = __webpack_require__(/*! ./api */ "./frontend/src/api.js");
1775
1778
  const mothership = __webpack_require__(/*! ./mothership */ "./frontend/src/mothership.js");
1776
1779
  const { routes } = __webpack_require__(/*! ./routes */ "./frontend/src/routes.js");
@@ -14562,6 +14565,17 @@ var bson = /*#__PURE__*/Object.freeze({
14562
14565
  //# sourceMappingURL=bson.mjs.map
14563
14566
 
14564
14567
 
14568
+ /***/ }),
14569
+
14570
+ /***/ "./package.json":
14571
+ /*!**********************!*\
14572
+ !*** ./package.json ***!
14573
+ \**********************/
14574
+ /***/ ((module) => {
14575
+
14576
+ "use strict";
14577
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.0.99","description":"A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.","homepage":"https://studio.mongoosejs.io/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"dependencies":{"archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"0.0.26","marked":"15.0.12","node-inspect-extracted":"3.x","tailwindcss":"3.4.0","vanillatoasts":"^1.6.0","vue":"3.x","webpack":"5.x"},"peerDependencies":{"bson":"^5.5.1 || 6.x","express":"4.x","mongoose":"7.x || 8.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongoose":"8.x"},"scripts":{"lint":"eslint .","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js"}}');
14578
+
14565
14579
  /***/ })
14566
14580
 
14567
14581
  /******/ });
@@ -4,6 +4,9 @@ if (typeof process === 'undefined') {
4
4
  global.process = { env: {} }; // To make `util` package work
5
5
  }
6
6
 
7
+ const { version } = require('../../package.json');
8
+ console.log(`Mongoose Studio Version ${version}`);
9
+
7
10
  const api = require('./api');
8
11
  const mothership = require('./mothership');
9
12
  const { routes } = require('./routes');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
4
4
  "description": "A sleek, powerful MongoDB UI with built-in dashboarding and auth, seamlessly integrated with your Express, Vercel, or Netlify app.",
5
5
  "homepage": "https://studio.mongoosejs.io/",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "scripts": {
36
36
  "lint": "eslint .",
37
37
  "tailwind": "tailwindcss -o ./frontend/public/tw.css",
38
- "tailwind:watch": "tailwindcss -o ./frontend/public/tw.css --watch"
38
+ "tailwind:watch": "tailwindcss -o ./frontend/public/tw.css --watch",
39
+ "test": "mocha test/*.test.js"
39
40
  }
40
41
  }
@@ -1,18 +0,0 @@
1
- name: Lint
2
- on:
3
- pull_request:
4
- push:
5
- jobs:
6
- lint:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- - name: Setting up the node version
11
- uses: actions/setup-node@v3
12
- with:
13
- node-version: 20.19.0
14
- - name: setup project
15
- run: npm i
16
- - name: run lint
17
- run: |
18
- npm run lint