@mongoosejs/studio 0.0.51 → 0.0.53

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.
@@ -5,6 +5,7 @@ const { toNetlifyFunction } = require('extrovert');
5
5
 
6
6
  module.exports = function netlify(options) {
7
7
  const backend = Backend();
8
+ const mothershipUrl = options?._mothershipUrl || 'https://mongoose-js.netlify.app/.netlify/functions';
8
9
 
9
10
  return toNetlifyFunction(async function wrappedNetlifyFunction(params) {
10
11
  const actionName = params?.action;
package/frontend/index.js CHANGED
@@ -4,6 +4,8 @@ const { execSync, exec } = require('child_process');
4
4
  const webpack = require('webpack');
5
5
 
6
6
  module.exports = async function frontend(apiUrl, isLambda, options, workspace) {
7
+ const mothershipUrl = options?._mothershipUrl || 'https://mongoose-js.netlify.app/.netlify/functions';
8
+
7
9
  if (workspace == null && options?.apiKey) {
8
10
  ({ workspace } = await fetch(`${mothershipUrl}/getWorkspace`, {
9
11
  method: 'POST',
@@ -40,7 +42,7 @@ module.exports = async function frontend(apiUrl, isLambda, options, workspace) {
40
42
  }
41
43
  if (options?.apiKey) {
42
44
  config.plugins.push(new webpack.DefinePlugin({
43
- config__mothershipUrl: `'${options?._mothershipUrl}'` || '\'https://mongoose-js.netlify.app/.netlify/functions\''
45
+ config__mothershipUrl: options?._mothershipUrl ? `'${options?._mothershipUrl}'` : '\'https://mongoose-js.netlify.app/.netlify/functions\''
44
46
  }));
45
47
  } else {
46
48
  config.plugins.push(new webpack.DefinePlugin({
@@ -1863,10 +1863,10 @@ module.exports = app => app.component('models', {
1863
1863
 
1864
1864
  const axios = __webpack_require__(/*! axios */ "./node_modules/axios/dist/browser/axios.cjs");
1865
1865
  const client = axios.create({
1866
- baseURL: 'http://localhost:8888/.netlify/functions'
1866
+ baseURL: ''
1867
1867
  });
1868
1868
 
1869
- client.hasAPIKey = !!'http://localhost:8888/.netlify/functions';
1869
+ client.hasAPIKey = !!'';
1870
1870
 
1871
1871
  client.interceptors.request.use(req => {
1872
1872
  const accessToken = window.localStorage.getItem('_mongooseStudioAccessToken') || null;
@@ -1882,11 +1882,11 @@ exports.githubLogin = function githubLogin() {
1882
1882
  };
1883
1883
 
1884
1884
  exports.github = function github(code) {
1885
- return client.post('/github', { code, workspaceId: {"_id":"679a83f5e1a8219e1aa0c195","ownerId":"67993a84c9988e44997ac98e","members":[{"userId":"67993a84c9988e44997ac98e","roles":["owner"]}],"createdAt":"2025-01-29T19:39:33.970Z","updatedAt":"2025-01-29T21:07:54.715Z","__v":0,"baseUrl":"https://web.zevo.io","name":"ZEVO Dev"}._id }).then(res => res.data);
1885
+ return client.post('/github', { code, workspaceId: {}._id }).then(res => res.data);
1886
1886
  };
1887
1887
 
1888
1888
  exports.me = function me() {
1889
- return client.post('/me', { workspaceId: {"_id":"679a83f5e1a8219e1aa0c195","ownerId":"67993a84c9988e44997ac98e","members":[{"userId":"67993a84c9988e44997ac98e","roles":["owner"]}],"createdAt":"2025-01-29T19:39:33.970Z","updatedAt":"2025-01-29T21:07:54.715Z","__v":0,"baseUrl":"https://web.zevo.io","name":"ZEVO Dev"}._id }).then(res => res.data);
1889
+ return client.post('/me', { workspaceId: {}._id }).then(res => res.data);
1890
1890
  };
1891
1891
 
1892
1892
  exports.hasAPIKey = client.hasAPIKey;
@@ -2024,7 +2024,7 @@ module.exports = app => app.component('splash', {
2024
2024
  data: () => ({ error: null }),
2025
2025
  computed: {
2026
2026
  workspaceName() {
2027
- return {"_id":"679a83f5e1a8219e1aa0c195","ownerId":"67993a84c9988e44997ac98e","members":[{"userId":"67993a84c9988e44997ac98e","roles":["owner"]}],"createdAt":"2025-01-29T19:39:33.970Z","updatedAt":"2025-01-29T21:07:54.715Z","__v":0,"baseUrl":"https://web.zevo.io","name":"ZEVO Dev"}.name;
2027
+ return {}.name;
2028
2028
  }
2029
2029
  },
2030
2030
  async mounted() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "dependencies": {
5
5
  "archetype": "0.13.1",
6
6
  "csv-stringify": "6.3.0",