@plures/pluresdb 1.4.0 → 1.5.1
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 +1 -1
- package/package.json +1 -1
- package/scripts/publish-crates.sh +95 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PluresDB
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/pluresdb)
|
|
3
|
+
[](https://badge.fury.io/js/@plures/pluresdb)
|
|
4
4
|
[](https://crates.io/crates/pluresdb-core)
|
|
5
5
|
[](https://deno.land)
|
|
6
6
|
[](https://opensource.org/licenses/AGPL-3.0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plures/pluresdb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "P2P Graph Database with SQLite Compatibility - Local-first, offline-first database for modern applications",
|
|
5
5
|
"main": "dist/node-index.js",
|
|
6
6
|
"types": "dist/node-index.d.ts",
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Publish all PluresDB crates to crates.io
|
|
3
|
+
# Usage: ./scripts/publish-crates.sh
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
echo "=========================================="
|
|
8
|
+
echo "Publishing PluresDB Crates to crates.io"
|
|
9
|
+
echo "=========================================="
|
|
10
|
+
echo ""
|
|
11
|
+
|
|
12
|
+
# Check if logged in
|
|
13
|
+
if ! cargo login --check 2>/dev/null; then
|
|
14
|
+
echo "Error: Not logged in to crates.io"
|
|
15
|
+
echo "Run: cargo login <your-api-token>"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Colors for output
|
|
20
|
+
GREEN='\033[0;32m'
|
|
21
|
+
YELLOW='\033[1;33m'
|
|
22
|
+
RED='\033[0;31m'
|
|
23
|
+
NC='\033[0m' # No Color
|
|
24
|
+
|
|
25
|
+
# Function to publish a crate
|
|
26
|
+
publish_crate() {
|
|
27
|
+
local crate_name=$1
|
|
28
|
+
local crate_path=$2
|
|
29
|
+
|
|
30
|
+
echo -e "${YELLOW}Publishing ${crate_name}...${NC}"
|
|
31
|
+
cd "$crate_path"
|
|
32
|
+
|
|
33
|
+
# Verify it builds
|
|
34
|
+
echo " Building..."
|
|
35
|
+
if ! cargo build --release > /dev/null 2>&1; then
|
|
36
|
+
echo -e "${RED} ✗ Build failed${NC}"
|
|
37
|
+
return 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Run tests
|
|
41
|
+
echo " Running tests..."
|
|
42
|
+
if ! cargo test > /dev/null 2>&1; then
|
|
43
|
+
echo -e "${RED} ✗ Tests failed${NC}"
|
|
44
|
+
return 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Check package
|
|
48
|
+
echo " Checking package..."
|
|
49
|
+
if ! cargo package > /dev/null 2>&1; then
|
|
50
|
+
echo -e "${RED} ✗ Package check failed${NC}"
|
|
51
|
+
return 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# Publish
|
|
55
|
+
echo " Publishing to crates.io..."
|
|
56
|
+
if cargo publish; then
|
|
57
|
+
echo -e "${GREEN} ✓ ${crate_name} published successfully${NC}"
|
|
58
|
+
cd - > /dev/null
|
|
59
|
+
return 0
|
|
60
|
+
else
|
|
61
|
+
echo -e "${RED} ✗ Publishing failed${NC}"
|
|
62
|
+
cd - > /dev/null
|
|
63
|
+
return 1
|
|
64
|
+
fi
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# Publish in dependency order
|
|
68
|
+
echo "Publishing crates in dependency order..."
|
|
69
|
+
echo ""
|
|
70
|
+
|
|
71
|
+
# Note: pluresdb-core and pluresdb-sync are already published
|
|
72
|
+
# Uncomment if you need to republish them:
|
|
73
|
+
# publish_crate "pluresdb-core" "crates/pluresdb-core"
|
|
74
|
+
# publish_crate "pluresdb-sync" "crates/pluresdb-sync"
|
|
75
|
+
|
|
76
|
+
# Publish storage (depends on core)
|
|
77
|
+
publish_crate "pluresdb-storage" "crates/pluresdb-storage"
|
|
78
|
+
echo ""
|
|
79
|
+
|
|
80
|
+
# Publish unified main crate (depends on core, storage, sync)
|
|
81
|
+
publish_crate "pluresdb" "crates/pluresdb"
|
|
82
|
+
echo ""
|
|
83
|
+
|
|
84
|
+
# Publish CLI (depends on core, storage, sync)
|
|
85
|
+
publish_crate "pluresdb-cli" "crates/pluresdb-cli"
|
|
86
|
+
echo ""
|
|
87
|
+
|
|
88
|
+
echo "=========================================="
|
|
89
|
+
echo -e "${GREEN}All crates published successfully!${NC}"
|
|
90
|
+
echo "=========================================="
|
|
91
|
+
echo ""
|
|
92
|
+
echo "Note: pluresdb-node and pluresdb-deno are published separately:"
|
|
93
|
+
echo " - pluresdb-node: npm publish (in crates/pluresdb-node)"
|
|
94
|
+
echo " - pluresdb-deno: deno publish (in crates/pluresdb-deno)"
|
|
95
|
+
|