@mongoosejs/studio 0.0.40 → 0.0.41

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.
@@ -1644,8 +1644,9 @@ module.exports = app => app.component('models', {
1644
1644
  } else {
1645
1645
  this.filter = {};
1646
1646
  delete this.query.search;
1647
+ this.$router.push({ query: this.query });
1647
1648
  }
1648
- await this.loadMoreDocuments(true);
1649
+ await this.loadMoreDocuments();
1649
1650
  },
1650
1651
  async getDocuments() {
1651
1652
  const { docs, schemaPaths, numDocs } = await api.Model.getDocuments({
@@ -1677,7 +1678,7 @@ module.exports = app => app.component('models', {
1677
1678
  this.filteredPaths = [...this.schemaPaths];
1678
1679
  this.selectedPaths = [...this.schemaPaths];
1679
1680
  },
1680
- async loadMoreDocuments(updateQuery) {
1681
+ async loadMoreDocuments() {
1681
1682
  const { docs } = await api.Model.getDocuments({
1682
1683
  model: this.currentModel,
1683
1684
  filter: this.filter,
@@ -1688,9 +1689,6 @@ module.exports = app => app.component('models', {
1688
1689
  if (docs.length < limit) {
1689
1690
  this.loadedAllDocs = true;
1690
1691
  }
1691
- if (updateQuery) {
1692
- this.$router.push({ query: this.query });
1693
- }
1694
1692
  },
1695
1693
  addOrRemove(path) {
1696
1694
  const exists = this.selectedPaths.findIndex(x => x.path == path.path);
@@ -10634,7 +10632,7 @@ app.component('app-component', {
10634
10632
  `,
10635
10633
  errorCaptured(err) {
10636
10634
  vanillatoasts.create({
10637
- title: `Error: ${err.response?.data?.message || err.message}`,
10635
+ title: `Error: ${err.message}`,
10638
10636
  icon: 'images/failure.jpg',
10639
10637
  timeout: 10000,
10640
10638
  positionClass: 'bottomRight'
package/index.d.ts CHANGED
@@ -3,5 +3,9 @@ declare module '@mongoosejs/studio' {
3
3
 
4
4
  const express: (path: string) => RequestHandler;
5
5
 
6
- export express;
6
+ const studio: {
7
+ express: typeof express;
8
+ };
9
+
10
+ export = studio;
7
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "dependencies": {
5
5
  "archetype": "0.13.0",
6
6
  "csv-stringify": "6.3.0",