@mongoosejs/studio 0.5.0 → 0.5.1

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.
@@ -62,9 +62,7 @@ module.exports = ({ db }) => async function exportQueryResults(params, req, res)
62
62
  }
63
63
  const csv = stringify(rows);
64
64
 
65
- res.set({
66
- 'Content-Type': 'text/csv',
67
- 'Content-Disposition': `attachment; filename="${model.toLowerCase()}-export.csv"`
68
- });
65
+ res.setHeader('Content-Type', 'text/csv');
66
+ res.setHeader('Content-Disposition', `attachment; filename="${model.toLowerCase()}-export.csv"`);
69
67
  return csv;
70
68
  };
package/backend/next.js CHANGED
@@ -81,8 +81,12 @@ module.exports = function next(conn, options) {
81
81
  throw new Error(`Action ${actionName} not found`);
82
82
  }
83
83
 
84
- return actionFn(params)
84
+ return actionFn(params, req, res)
85
85
  .then(result => {
86
+ if (typeof result === 'string') {
87
+ res.status(200).send(result);
88
+ return result;
89
+ }
86
90
  res.status(200).json(result);
87
91
  return result;
88
92
  })
@@ -11697,7 +11697,7 @@ __webpack_require__.r(__webpack_exports__);
11697
11697
  /* harmony export */ });
11698
11698
  /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
11699
11699
  /**
11700
- * @vue/reactivity v3.5.33
11700
+ * @vue/reactivity v3.5.34
11701
11701
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
11702
11702
  * @license MIT
11703
11703
  **/
@@ -11729,12 +11729,18 @@ class EffectScope {
11729
11729
  */
11730
11730
  this.cleanups = [];
11731
11731
  this._isPaused = false;
11732
+ this._warnOnRun = true;
11732
11733
  this.__v_skip = true;
11733
- this.parent = activeEffectScope;
11734
11734
  if (!detached && activeEffectScope) {
11735
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
11736
- this
11737
- ) - 1;
11735
+ if (activeEffectScope.active) {
11736
+ this.parent = activeEffectScope;
11737
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
11738
+ this
11739
+ ) - 1;
11740
+ } else {
11741
+ this._active = false;
11742
+ this._warnOnRun = false;
11743
+ }
11738
11744
  }
11739
11745
  }
11740
11746
  get active() {
@@ -11782,7 +11788,7 @@ class EffectScope {
11782
11788
  } finally {
11783
11789
  activeEffectScope = currentEffectScope;
11784
11790
  }
11785
- } else if (true) {
11791
+ } else if ( true && this._warnOnRun) {
11786
11792
  warn(`cannot run an inactive effect scope.`);
11787
11793
  }
11788
11794
  }
@@ -11906,8 +11912,12 @@ class ReactiveEffect {
11906
11912
  */
11907
11913
  this.cleanup = void 0;
11908
11914
  this.scheduler = void 0;
11909
- if (activeEffectScope && activeEffectScope.active) {
11910
- activeEffectScope.effects.push(this);
11915
+ if (activeEffectScope) {
11916
+ if (activeEffectScope.active) {
11917
+ activeEffectScope.effects.push(this);
11918
+ } else {
11919
+ this.flags &= -2;
11920
+ }
11911
11921
  }
11912
11922
  }
11913
11923
  pause() {
@@ -13855,7 +13865,7 @@ __webpack_require__.r(__webpack_exports__);
13855
13865
  /* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
13856
13866
  /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
13857
13867
  /**
13858
- * @vue/runtime-core v3.5.33
13868
+ * @vue/runtime-core v3.5.34
13859
13869
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
13860
13870
  * @license MIT
13861
13871
  **/
@@ -19051,7 +19061,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
19051
19061
  const receivedType = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toRawType)(value);
19052
19062
  const expectedValue = styleValue(value, expectedType);
19053
19063
  const receivedValue = styleValue(value, receivedType);
19054
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
19064
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
19055
19065
  message += ` with value ${expectedValue}`;
19056
19066
  }
19057
19067
  message += `, got ${receivedType} `;
@@ -19061,7 +19071,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
19061
19071
  return message;
19062
19072
  }
19063
19073
  function styleValue(value, type) {
19064
- if (type === "String") {
19074
+ if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSymbol)(value)) {
19075
+ return value.toString();
19076
+ } else if (type === "String") {
19065
19077
  return `"${value}"`;
19066
19078
  } else if (type === "Number") {
19067
19079
  return `${Number(value)}`;
@@ -19073,8 +19085,11 @@ function isExplicable(type) {
19073
19085
  const explicitTypes = ["string", "number", "boolean"];
19074
19086
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
19075
19087
  }
19076
- function isBoolean(...args) {
19077
- return args.some((elem) => elem.toLowerCase() === "boolean");
19088
+ function isCoercible(...args) {
19089
+ return args.every((elem) => {
19090
+ const value = elem.toLowerCase();
19091
+ return value !== "boolean" && value !== "symbol";
19092
+ });
19078
19093
  }
19079
19094
 
19080
19095
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -21120,13 +21135,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
21120
21135
  suspense.isHydrating = false;
21121
21136
  } else if (!resume) {
21122
21137
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
21138
+ let hasUpdatedAnchor = false;
21123
21139
  if (delayEnter) {
21124
21140
  activeBranch.transition.afterLeave = () => {
21125
21141
  if (pendingId === suspense.pendingId) {
21126
21142
  move(
21127
21143
  pendingBranch,
21128
21144
  container2,
21129
- anchor === initialAnchor ? next(activeBranch) : anchor,
21145
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
21130
21146
  0
21131
21147
  );
21132
21148
  queuePostFlushCb(effects);
@@ -21139,6 +21155,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
21139
21155
  if (activeBranch && !suspense.isFallbackMountPending) {
21140
21156
  if (parentNode(activeBranch.el) === container2) {
21141
21157
  anchor = next(activeBranch);
21158
+ hasUpdatedAnchor = true;
21142
21159
  }
21143
21160
  unmount(activeBranch, parentComponent2, suspense, true);
21144
21161
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -22447,7 +22464,7 @@ function isMemoSame(cached, memo) {
22447
22464
  return true;
22448
22465
  }
22449
22466
 
22450
- const version = "3.5.33";
22467
+ const version = "3.5.34";
22451
22468
  const warn = true ? warn$1 : 0;
22452
22469
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
22453
22470
  const devtools = true ? devtools$1 : 0;
@@ -22658,7 +22675,7 @@ __webpack_require__.r(__webpack_exports__);
22658
22675
  /* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
22659
22676
  /* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
22660
22677
  /**
22661
- * @vue/runtime-dom v3.5.33
22678
+ * @vue/runtime-dom v3.5.34
22662
22679
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
22663
22680
  * @license MIT
22664
22681
  **/
@@ -24745,7 +24762,7 @@ __webpack_require__.r(__webpack_exports__);
24745
24762
  /* harmony export */ toTypeString: () => (/* binding */ toTypeString)
24746
24763
  /* harmony export */ });
24747
24764
  /**
24748
- * @vue/shared v3.5.33
24765
+ * @vue/shared v3.5.34
24749
24766
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
24750
24767
  * @license MIT
24751
24768
  **/
@@ -50434,7 +50451,7 @@ __webpack_require__.r(__webpack_exports__);
50434
50451
  /* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
50435
50452
  /* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js");
50436
50453
  /**
50437
- * vue v3.5.33
50454
+ * vue v3.5.34
50438
50455
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
50439
50456
  * @license MIT
50440
50457
  **/
@@ -63766,7 +63783,7 @@ var src_default = VueToastificationPlugin;
63766
63783
  (module) {
63767
63784
 
63768
63785
  "use strict";
63769
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.5.0","description":"AI-Powered Data Workspace for MongoDB: Turn your MongoDB data into dashboards, maps, and interactive workflows - powered by your Mongoose models and AI.","homepage":"https://mongoosestudio.app/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"license":"Apache-2.0","dependencies":{"@ai-sdk/anthropic":"2.x","@ai-sdk/google":"2.x","@ai-sdk/openai":"2.x","ace-builds":"^1.43.6","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.0","marked":"15.0.12","node-inspect-extracted":"3.x","regexp.escape":"^2.0.1","tailwindcss":"3.4.0","time-commando":"1.0.1","typescript":"^6.0.2","vue":"3.x","vue-toastification":"^2.0.0-rc.5","webpack":"5.x","xss":"^1.0.15"},"peerDependencies":{"mongoose":"7.x || 8.x || ^9.0.0"},"optionalPeerDependencies":{"@mongoosejs/task":"0.5.x || 0.6.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongodb-memory-server":"^11.0.1","mongoose":"9.x","sinon":"^21.0.1"},"scripts":{"lint":"eslint .","seed":"node seed/index.js","start":"node ./local.js","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js","test:frontend":"mocha test/frontend/*.test.js"}}');
63786
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@mongoosejs/studio","version":"0.5.1","description":"AI-Powered Data Workspace for MongoDB: Turn your MongoDB data into dashboards, maps, and interactive workflows - powered by your Mongoose models and AI.","homepage":"https://mongoosestudio.app/","repository":{"type":"git","url":"https://github.com/mongoosejs/studio"},"license":"Apache-2.0","dependencies":{"@ai-sdk/anthropic":"2.x","@ai-sdk/google":"2.x","@ai-sdk/openai":"2.x","ace-builds":"^1.43.6","ai":"5.x","archetype":"0.13.1","csv-stringify":"6.3.0","ejson":"^2.2.3","extrovert":"^0.2.0","marked":"15.0.12","node-inspect-extracted":"3.x","regexp.escape":"^2.0.1","tailwindcss":"3.4.0","time-commando":"1.0.1","typescript":"^6.0.2","vue":"3.x","vue-toastification":"^2.0.0-rc.5","webpack":"5.x","xss":"^1.0.15"},"peerDependencies":{"mongoose":"7.x || 8.x || ^9.0.0"},"optionalPeerDependencies":{"@mongoosejs/task":"0.5.x || 0.6.x"},"devDependencies":{"@masteringjs/eslint-config":"0.1.1","axios":"1.2.2","dedent":"^1.6.0","eslint":"9.30.0","express":"4.x","mocha":"10.2.0","mongodb-memory-server":"^11.0.1","mongoose":"9.x","sinon":"^21.0.1"},"scripts":{"lint":"eslint .","seed":"node seed/index.js","start":"node ./local.js","tailwind":"tailwindcss -o ./frontend/public/tw.css","tailwind:watch":"tailwindcss -o ./frontend/public/tw.css --watch","test":"mocha test/*.test.js","test:frontend":"mocha test/frontend/*.test.js"}}');
63770
63787
 
63771
63788
  /***/ }
63772
63789
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "AI-Powered Data Workspace for MongoDB: Turn your MongoDB data into dashboards, maps, and interactive workflows - powered by your Mongoose models and AI.",
5
5
  "homepage": "https://mongoosestudio.app/",
6
6
  "repository": {