mango-cms 0.2.41 → 0.2.43

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.
@@ -22,10 +22,10 @@
22
22
  "s3Region": null,
23
23
  "s3Bucket": "exampleBucket",
24
24
 
25
- "emailProvider": "",
25
+ "emailProvider": "resend",
26
26
  "resendKey": null,
27
27
  "mailgunKey": null,
28
- "mailgunDomain": null,
28
+ "emailDomain": null,
29
29
 
30
30
  "algoliaAppId": null,
31
31
  "algoliaSearchKey": null,
@@ -7,6 +7,9 @@ SETTINGS_FILE="$SCRIPT_DIR/../config/settings.json"
7
7
  # Read serverIp from settings.json
8
8
  SERVER_IP=$(grep -o '"serverIp"[[:space:]]*:[[:space:]]*"[^"]*"' "$SETTINGS_FILE" | sed 's/.*"\([^"]*\)".*/\1/')
9
9
 
10
+ # Read database name from settings.json
11
+ DATABASE=$(grep -o '"database"[[:space:]]*:[[:space:]]*"[^"]*"' "$SETTINGS_FILE" | sed 's/.*"\([^"]*\)".*/\1/')
12
+
10
13
  # Check if serverIp is null or not set
11
14
  if grep -q '"serverIp"[[:space:]]*:[[:space:]]*null' "$SETTINGS_FILE"; then
12
15
  echo "Error: serverIp is set to null in settings.json"
@@ -20,11 +23,18 @@ if [ -z "$SERVER_IP" ]; then
20
23
  exit 1
21
24
  fi
22
25
 
26
+ if [ -z "$DATABASE" ]; then
27
+ echo "Error: database not found in settings.json"
28
+ echo "Please add database to $SETTINGS_FILE"
29
+ exit 1
30
+ fi
31
+
23
32
  echo "Using server IP: $SERVER_IP"
33
+ echo "Using database: $DATABASE"
24
34
 
25
35
  cd ~/Downloads;
26
- ssh root@$SERVER_IP 'rm -rf dump.zip; mongodump; zip -r dump.zip dump'
27
- rsync root@$SERVER_IP:~/Downloads/dump.zip ~/Downloads/dump.zip;
36
+ ssh root@$SERVER_IP "rm -rf dump.zip; mongodump --db $DATABASE; zip -r dump.zip dump"
37
+ rsync root@$SERVER_IP:~/dump.zip ~/Downloads/dump.zip;
28
38
  unzip -o dump.zip;
29
39
  mongorestore --drop dump;
30
40
  rm -rf dump;
@@ -10,7 +10,6 @@ const subscribe = ({ io, collection, document, request, individual, originalDocu
10
10
  subscription.to((document?.id||originalDocument?.id)).emit(`${collection.name}:${method}d`, payload);
11
11
 
12
12
  // Send to each custom room
13
- console.log(collection.subscribe)
14
13
  for (let room of (collection.subscribe?.rooms||[])) {
15
14
  let keys = room.split('.')
16
15
  let target = document
@@ -25,7 +25,7 @@
25
25
  "dayjs": "^1.10.7",
26
26
  "express": "^4.18.1",
27
27
  "google-maps": "^4.3.3",
28
- "mango-cms": "^0.2.41",
28
+ "mango-cms": "^0.2.43",
29
29
  "mapbox-gl": "^2.7.0",
30
30
  "sweetalert2": "^11.4.0",
31
31
  "vite": "^6.2.2",
@@ -148,7 +148,7 @@ export default {
148
148
 
149
149
  var data = {
150
150
  ...this.user,
151
- title: `${this.user.firstName} ${this.user.lastName || ''}`.trim()
151
+ // title: `${this.user.firstName} ${this.user.lastName || ''}`.trim()
152
152
  }
153
153
 
154
154
  let response = await this.$mango.members.save(data)
@@ -145,6 +145,7 @@ const Mango = collections.reduce((a, c) => {
145
145
  let mangoSave = (data, options = {}) => {
146
146
  let { id } = data
147
147
  let method = id ? 'put' : 'post'
148
+ data = { ...data }
148
149
 
149
150
  // // Remove _id and computed fields
150
151
  delete data.collection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.2.41",
3
+ "version": "0.2.43",
4
4
  "main": "./index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -46,6 +46,7 @@
46
46
  "algoliasearch": "^4.10.3",
47
47
  "apollo-server": "^2.19.1",
48
48
  "apollo-server-express": "^2.19.1",
49
+ "archiver": "^7.0.1",
49
50
  "aws-sdk": "^2.1469.0",
50
51
  "axios": "^0.21.4",
51
52
  "babel-loader": "^8.2.2",
@@ -53,10 +54,12 @@
53
54
  "cli-progress": "^3.12.0",
54
55
  "connect-multiparty": "^2.2.0",
55
56
  "cors": "^2.8.5",
57
+ "country-state-city": "^3.2.1",
56
58
  "crypto": "^1.0.1",
57
59
  "dayjs": "^1.11.6",
58
60
  "dotenv": "^8.2.0",
59
61
  "express": "^4.17.1",
62
+ "fast-csv": "^5.0.5",
60
63
  "fs-extra": "^11.3.0",
61
64
  "get-audio-duration": "^3.1.0",
62
65
  "googleapis": "^109.0.1",
@@ -90,6 +93,7 @@
90
93
  "socket.io": "^4.8.0",
91
94
  "socket.io-redis": "^6.1.1",
92
95
  "source-map-support": "^0.5.19",
96
+ "ssh2-sftp-client": "^12.0.1",
93
97
  "stream": "^0.0.2",
94
98
  "subscriptions-transport-ws": "^0.9.18",
95
99
  "util": "^0.12.3",