axiodb 2.30.90 → 2.30.92
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/README.md +0 -2
- package/Scripts/versionController.sh +88 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -260,8 +260,6 @@ We're committed to continuously enhancing AxioDB with cutting-edge features:
|
|
|
260
260
|
|
|
261
261
|
- **Inbuilt Web-Based GUI Dashboard:** Provide a user-friendly, web-based interface similar to PhpMyAdmin for managing databases, collections, and data visually.
|
|
262
262
|
- **Data Export and Import Mechanisms:** Enable seamless export and import of data in various formats like JSON, CSV, and more.
|
|
263
|
-
- **Advanced Indexing:** Implement multi-level indexing for lightning-fast queries.
|
|
264
|
-
- **Replication and Sharding:** Introduce support for distributed data replication and sharding for high availability and scalability.
|
|
265
263
|
- **Improved Query Optimization:** Enhance query performance with advanced optimization techniques.
|
|
266
264
|
- **Data Backup and Restore:** Implement robust backup and restore mechanisms for data safety.
|
|
267
265
|
- **Comprehensive Documentation:** Expand tutorials, examples, and API references for developers.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Version Controller Script for AxioDB
|
|
4
|
+
# This script compares the local package.json version with the remote version
|
|
5
|
+
# Used as a pre-commit hook to ensure version is updated
|
|
6
|
+
|
|
7
|
+
# Colors for output
|
|
8
|
+
RED='\033[0;31m'
|
|
9
|
+
GREEN='\033[0;32m'
|
|
10
|
+
YELLOW='\033[0;33m'
|
|
11
|
+
NC='\033[0m' # No Color
|
|
12
|
+
|
|
13
|
+
# Local package.json path (assuming the script is in the Scripts directory)
|
|
14
|
+
LOCAL_PACKAGE_JSON="package.json"
|
|
15
|
+
|
|
16
|
+
# Remote package.json URL
|
|
17
|
+
REMOTE_URL="https://raw.githubusercontent.com/AnkanSaha/AxioDB/main/package.json"
|
|
18
|
+
|
|
19
|
+
echo "AxioDB Version Controller"
|
|
20
|
+
echo "========================="
|
|
21
|
+
|
|
22
|
+
# Check if local package.json exists
|
|
23
|
+
if [ ! -f "$LOCAL_PACKAGE_JSON" ]; then
|
|
24
|
+
echo -e "${RED}Error: Local package.json not found at $LOCAL_PACKAGE_JSON${NC}"
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Get local version
|
|
29
|
+
LOCAL_VERSION=$(grep -o '"version": "[^"]*' "$LOCAL_PACKAGE_JSON" | cut -d'"' -f4)
|
|
30
|
+
if [ -z "$LOCAL_VERSION" ]; then
|
|
31
|
+
echo -e "${RED}Error: Could not determine local version${NC}"
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
echo -e "Local version: ${GREEN}$LOCAL_VERSION${NC}"
|
|
36
|
+
|
|
37
|
+
# Create temporary file for remote package.json
|
|
38
|
+
TEMP_FILE=$(mktemp)
|
|
39
|
+
|
|
40
|
+
# Fetch remote package.json
|
|
41
|
+
echo "Fetching remote version..."
|
|
42
|
+
if ! curl -s "$REMOTE_URL" -o "$TEMP_FILE"; then
|
|
43
|
+
echo -e "${RED}Error: Failed to fetch remote package.json${NC}"
|
|
44
|
+
rm "$TEMP_FILE"
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Get remote version
|
|
49
|
+
REMOTE_VERSION=$(grep -o '"version": "[^"]*' "$TEMP_FILE" | cut -d'"' -f4)
|
|
50
|
+
if [ -z "$REMOTE_VERSION" ]; then
|
|
51
|
+
echo -e "${RED}Error: Could not determine remote version${NC}"
|
|
52
|
+
rm "$TEMP_FILE"
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
echo -e "Remote version: ${YELLOW}$REMOTE_VERSION${NC}"
|
|
57
|
+
|
|
58
|
+
# Clean up temp file
|
|
59
|
+
rm "$TEMP_FILE"
|
|
60
|
+
|
|
61
|
+
# Compare versions using sort (this handles semantic versioning correctly)
|
|
62
|
+
if [ "$(printf '%s\n' "$LOCAL_VERSION" "$REMOTE_VERSION" | sort -V | head -n1)" == "$REMOTE_VERSION" ]; then
|
|
63
|
+
# Local version is higher than remote (remote is listed first in the sort)
|
|
64
|
+
if [ "$LOCAL_VERSION" == "$REMOTE_VERSION" ]; then
|
|
65
|
+
echo -e "${RED}ERROR: Your version ($LOCAL_VERSION) is the same as the remote version.${NC}"
|
|
66
|
+
echo -e "${YELLOW}You must update the package version before committing.${NC}"
|
|
67
|
+
exit 1
|
|
68
|
+
else
|
|
69
|
+
echo -e "${GREEN}SUCCESS: Your version ($LOCAL_VERSION) is ahead of the remote version ($REMOTE_VERSION).${NC}"
|
|
70
|
+
exit 0
|
|
71
|
+
fi
|
|
72
|
+
else
|
|
73
|
+
# Local version is lower than remote
|
|
74
|
+
echo -e "${RED}ERROR: Your version ($LOCAL_VERSION) is behind the remote version ($REMOTE_VERSION).${NC}"
|
|
75
|
+
echo -e "${YELLOW}Please update to the latest version.${NC}"
|
|
76
|
+
|
|
77
|
+
# Ask if user wants to open the GitHub repository
|
|
78
|
+
read -p "Would you like to open the GitHub repository? (y/n): " -n 1 -r
|
|
79
|
+
echo
|
|
80
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
81
|
+
"$BROWSER" "https://github.com/AnkanSaha/AxioDB"
|
|
82
|
+
fi
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# If script reaches here, it should still exit with an error
|
|
87
|
+
echo -e "${RED}ERROR: Version check failed.${NC}"
|
|
88
|
+
exit 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axiodb",
|
|
3
|
-
"version": "2.30.
|
|
3
|
+
"version": "2.30.92",
|
|
4
4
|
"description": "A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.",
|
|
5
5
|
"main": "./lib/config/DB.js",
|
|
6
6
|
"types": "./lib/config/DB.d.ts",
|