mango-cms 0.2.3 → 0.2.4

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/cli.js CHANGED
@@ -191,7 +191,7 @@ program
191
191
  license: answers.license,
192
192
  siteName: answers.projectName,
193
193
  siteDomain: `${projectSlug}.com`,
194
- domain: `api.${projectSlug}.com`,
194
+ mangoDomain: `api.${projectSlug}.com`,
195
195
  database: `${projectSlug}`,
196
196
  s3Bucket: `${projectSlug}`
197
197
  };
@@ -2,8 +2,9 @@
2
2
  "port": 6646,
3
3
  "siteName": "Example",
4
4
  "siteDomain": "example.com",
5
+ "mangoDomain": "api.example.com",
5
6
 
6
- "domain": "api.example.com",
7
+ "useDevAPI": false,
7
8
 
8
9
  "mongoURI":"mongodb://127.0.0.1:27017",
9
10
  "database":"exampleMongoDB",
@@ -1,7 +1,7 @@
1
1
  // import collections from '../../../mango/config/.collections.json'
2
2
  // import { algoliaAppId, algoliaSearchKey, algoliaIndex, port, domain } from '../../../mango/config/settings'
3
3
  import collections from '@collections'
4
- import { algoliaAppId, algoliaSearchKey, algoliaIndex, port, domain } from '@settings'
4
+ import { algoliaAppId, algoliaSearchKey, algoliaIndex, port, mangoDomain, useDevAPI } from '@settings'
5
5
  import axios from "axios";
6
6
  import { ref } from 'vue'
7
7
  import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser'
@@ -16,10 +16,10 @@ let endpoints = {
16
16
  const client = algoliasearch(algoliaAppId, algoliaSearchKey);
17
17
  const algolia = client.initIndex(algoliaIndex);
18
18
 
19
- let api = `https://${domain}`
20
- let ws = `wss://${domain}/graphql`
19
+ let api = `https://${mangoDomain}`
20
+ let ws = `wss://${mangoDomain}/graphql`
21
21
 
22
- if (process.env.NODE_ENV != 'production') {
22
+ if (process.env.NODE_ENV != 'production' && useDevAPI) {
23
23
  api = `http://localhost:${port}`
24
24
  ws = `ws://localhost:${port}/graphql`
25
25
  }
@@ -2,7 +2,7 @@ import axios from 'axios'
2
2
  import { computed, createApp, defineAsyncComponent, reactive, ref } from 'vue'
3
3
  import { createRouter, createWebHistory } from 'vue-router'
4
4
  import { MotionPlugin } from '@vueuse/motion'
5
- import { port, domain } from '@settings'
5
+ import { port, mangoDomain, useDevAPI } from '@settings'
6
6
  import VueClipboard from 'vue3-clipboard'
7
7
  import Vue3TouchEvents from "vue3-touch-events";
8
8
  import App from './App.vue'
@@ -68,9 +68,8 @@ app.provide('darkMode', darkMode().darkMode)
68
68
 
69
69
  const user = initUser()
70
70
 
71
- let api = `http://localhost:${port}`
72
- // let api = `https://${domain}`
73
- if (!isDev) api = `https://${domain}`
71
+ let api = useDevAPI ? `http://localhost:${port}` : `https://${mangoDomain}`
72
+ if (!isDev) api = `https://${mangoDomain}`
74
73
 
75
74
  const store = reactive({
76
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "main": "./index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",