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
|
-
|
|
194
|
+
mangoDomain: `api.${projectSlug}.com`,
|
|
195
195
|
database: `${projectSlug}`,
|
|
196
196
|
s3Bucket: `${projectSlug}`
|
|
197
197
|
};
|
|
@@ -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,
|
|
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://${
|
|
20
|
-
let ws = `wss://${
|
|
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
|
}
|
package/default/src/main.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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
|
|