@plures/pluresdb 1.5.3 → 2.9.6
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 +106 -414
- package/crates/README.md +99 -0
- package/crates/pluresdb-node/README.md +181 -0
- package/crates/pluresdb-node/index.d.ts +0 -0
- package/crates/pluresdb-node/index.js +265 -0
- package/crates/pluresdb-node/package.json +35 -0
- package/dist/napi/index.js +60 -0
- package/embedded.d.ts +1 -0
- package/embedded.js +46 -0
- package/package.json +27 -10
- package/dist/.tsbuildinfo +0 -1
- package/dist/better-sqlite3-shared.d.ts +0 -12
- package/dist/better-sqlite3-shared.d.ts.map +0 -1
- package/dist/better-sqlite3-shared.js +0 -143
- package/dist/better-sqlite3-shared.js.map +0 -1
- package/dist/better-sqlite3.d.ts +0 -4
- package/dist/better-sqlite3.d.ts.map +0 -1
- package/dist/better-sqlite3.js +0 -8
- package/dist/better-sqlite3.js.map +0 -1
- package/dist/cli.d.ts +0 -7
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/node-index.d.ts +0 -148
- package/dist/node-index.d.ts.map +0 -1
- package/dist/node-index.js +0 -665
- package/dist/node-index.js.map +0 -1
- package/dist/node-wrapper.d.ts +0 -44
- package/dist/node-wrapper.d.ts.map +0 -1
- package/dist/node-wrapper.js +0 -296
- package/dist/node-wrapper.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/types/node-types.d.ts +0 -71
- package/dist/types/node-types.d.ts.map +0 -1
- package/dist/types/node-types.js +0 -6
- package/dist/types/node-types.js.map +0 -1
- package/dist/vscode/extension.d.ts +0 -81
- package/dist/vscode/extension.d.ts.map +0 -1
- package/dist/vscode/extension.js +0 -309
- package/dist/vscode/extension.js.map +0 -1
- package/examples/basic-usage.d.ts +0 -2
- package/examples/basic-usage.d.ts.map +0 -1
- package/examples/basic-usage.js +0 -26
- package/examples/basic-usage.js.map +0 -1
- package/examples/basic-usage.ts +0 -29
- package/examples/vscode-extension-example/README.md +0 -95
- package/examples/vscode-extension-example/package.json +0 -49
- package/examples/vscode-extension-example/src/extension.ts +0 -172
- package/examples/vscode-extension-example/tsconfig.json +0 -12
- package/examples/vscode-extension-integration.d.ts +0 -31
- package/examples/vscode-extension-integration.d.ts.map +0 -1
- package/examples/vscode-extension-integration.js +0 -319
- package/examples/vscode-extension-integration.js.map +0 -1
- package/examples/vscode-extension-integration.ts +0 -41
- package/legacy/benchmarks/memory-benchmarks.ts +0 -350
- package/legacy/benchmarks/run-benchmarks.ts +0 -315
- package/legacy/better-sqlite3-shared.ts +0 -157
- package/legacy/better-sqlite3.ts +0 -4
- package/legacy/cli.ts +0 -241
- package/legacy/config.ts +0 -50
- package/legacy/core/crdt.ts +0 -107
- package/legacy/core/database.ts +0 -529
- package/legacy/healthcheck.ts +0 -162
- package/legacy/http/api-server.ts +0 -438
- package/legacy/index.ts +0 -28
- package/legacy/logic/rules.ts +0 -46
- package/legacy/main.rs +0 -3
- package/legacy/main.ts +0 -197
- package/legacy/network/websocket-server.ts +0 -115
- package/legacy/node-index.ts +0 -823
- package/legacy/node-wrapper.ts +0 -329
- package/legacy/sqlite-compat.ts +0 -633
- package/legacy/sqlite3-compat.ts +0 -55
- package/legacy/storage/kv-storage.ts +0 -73
- package/legacy/tests/core.test.ts +0 -305
- package/legacy/tests/fixtures/performance-data.json +0 -71
- package/legacy/tests/fixtures/test-data.json +0 -129
- package/legacy/tests/integration/api-server.test.ts +0 -334
- package/legacy/tests/integration/mesh-network.test.ts +0 -303
- package/legacy/tests/logic.test.ts +0 -34
- package/legacy/tests/performance/load.test.ts +0 -290
- package/legacy/tests/security/input-validation.test.ts +0 -286
- package/legacy/tests/unit/core.test.ts +0 -226
- package/legacy/tests/unit/subscriptions.test.ts +0 -135
- package/legacy/tests/unit/vector-search.test.ts +0 -173
- package/legacy/tests/vscode_extension_test.ts +0 -281
- package/legacy/types/index.ts +0 -32
- package/legacy/types/node-types.ts +0 -80
- package/legacy/util/debug.ts +0 -14
- package/legacy/vector/index.ts +0 -59
- package/legacy/vscode/extension.ts +0 -387
- package/scripts/compiled-crud-verify.ts +0 -30
- package/scripts/dogfood.ts +0 -297
- package/scripts/postinstall.js +0 -156
- package/scripts/publish-crates.sh +0 -95
- package/scripts/release-check.js +0 -224
- package/scripts/run-tests.ts +0 -178
- package/scripts/setup-libclang.ps1 +0 -209
- package/scripts/update-changelog.js +0 -214
- package/web/README.md +0 -27
- package/web/svelte/package.json +0 -31
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<#
|
|
2
|
-
.SYNOPSIS
|
|
3
|
-
Ensures libclang (LLVM) is installed and configures the LIBCLANG_PATH required by bindgen-based crates.
|
|
4
|
-
|
|
5
|
-
.DESCRIPTION
|
|
6
|
-
This script automates the detection or installation of libclang on Windows machines.
|
|
7
|
-
It will:
|
|
8
|
-
1. Check existing environment variables and well-known locations for libclang.dll
|
|
9
|
-
2. Optionally install LLVM via winget or Chocolatey if libclang is missing
|
|
10
|
-
3. Configure the LIBCLANG_PATH environment variable (user scope) once libclang is found
|
|
11
|
-
4. Optionally append the path to the current session PATH so cargo build/test immediately picks it up
|
|
12
|
-
|
|
13
|
-
Run it from the repository root before building Rust components that depend on bindgen (e.g., zstd-sys).
|
|
14
|
-
|
|
15
|
-
.PARAMETER ForceInstall
|
|
16
|
-
Always attempt to (re)install LLVM even if libclang is already detected.
|
|
17
|
-
|
|
18
|
-
.PARAMETER ConfigureCurrentProcess
|
|
19
|
-
Also updates $env:LIBCLANG_PATH and $env:PATH for the current PowerShell session
|
|
20
|
-
in addition to setting the persisted user-level environment variable.
|
|
21
|
-
|
|
22
|
-
.PARAMETER SkipInstall
|
|
23
|
-
Do not attempt to install LLVM automatically. The script will fail if libclang is not found.
|
|
24
|
-
|
|
25
|
-
.EXAMPLE
|
|
26
|
-
pwsh ./scripts/setup-libclang.ps1
|
|
27
|
-
|
|
28
|
-
.EXAMPLE
|
|
29
|
-
pwsh ./scripts/setup-libclang.ps1 -ConfigureCurrentProcess
|
|
30
|
-
|
|
31
|
-
.NOTES
|
|
32
|
-
- Requires either winget or Chocolatey for automated installation.
|
|
33
|
-
- When installing via winget, administrative consent may be required for the first run.
|
|
34
|
-
- After the user-level environment variable is written you should restart your shell (unless ConfigureCurrentProcess was supplied).
|
|
35
|
-
#>
|
|
36
|
-
[CmdletBinding()]
|
|
37
|
-
param(
|
|
38
|
-
[switch]$ForceInstall,
|
|
39
|
-
[switch]$ConfigureCurrentProcess,
|
|
40
|
-
[switch]$SkipInstall
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
function Write-Info {
|
|
44
|
-
param([string]$Message)
|
|
45
|
-
Write-Host "[INFO] $Message" -ForegroundColor Cyan
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function Write-Success {
|
|
49
|
-
param([string]$Message)
|
|
50
|
-
Write-Host "[ OK ] $Message" -ForegroundColor Green
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function Write-WarningMessage {
|
|
54
|
-
param([string]$Message)
|
|
55
|
-
Write-Host "[WARN] $Message" -ForegroundColor Yellow
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function Write-ErrorMessage {
|
|
59
|
-
param([string]$Message)
|
|
60
|
-
Write-Host "[FAIL] $Message" -ForegroundColor Red
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function Test-CommandExists {
|
|
64
|
-
param([string]$Name)
|
|
65
|
-
return [bool](Get-Command $Name -ErrorAction SilentlyContinue)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function Get-EnvLibClangPath {
|
|
69
|
-
$env:LIBCLANG_PATH
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function Test-LibClangInPath {
|
|
73
|
-
param([string]$Directory)
|
|
74
|
-
if ([string]::IsNullOrWhiteSpace($Directory)) {
|
|
75
|
-
return $null
|
|
76
|
-
}
|
|
77
|
-
$candidate = Join-Path -Path $Directory -ChildPath "libclang.dll"
|
|
78
|
-
if (Test-Path $candidate) {
|
|
79
|
-
return (Get-Item $candidate).Directory.FullName
|
|
80
|
-
}
|
|
81
|
-
return $null
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function Get-KnownLibClangLocations {
|
|
85
|
-
$paths = @()
|
|
86
|
-
|
|
87
|
-
# Explicit environment variable first
|
|
88
|
-
$envPath = Get-EnvLibClangPath
|
|
89
|
-
if (-not [string]::IsNullOrWhiteSpace($envPath)) {
|
|
90
|
-
$paths += $envPath
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
# LLVM default installation
|
|
94
|
-
$paths += @(
|
|
95
|
-
"$env:ProgramFiles\LLVM\bin",
|
|
96
|
-
"$env:ProgramFiles\LLVM\lib",
|
|
97
|
-
"$env:ProgramFiles\LLVM\lib64",
|
|
98
|
-
"$env:ProgramFiles(x86)\LLVM\bin",
|
|
99
|
-
"$env:ProgramFiles(x86)\LLVM\lib"
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
# Visual Studio (MSVC) bundled LLVM/Clang
|
|
103
|
-
$vsRoot = Join-Path $env:ProgramFiles "Microsoft Visual Studio"
|
|
104
|
-
if (Test-Path $vsRoot) {
|
|
105
|
-
$paths += Get-ChildItem -Path $vsRoot -Directory -Recurse -Filter "libclang.dll" -ErrorAction SilentlyContinue |
|
|
106
|
-
ForEach-Object { $_.Directory.FullName } |
|
|
107
|
-
Select-Object -Unique
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
# Generic entries that appear in PATH (e.g., if user installed LLVM elsewhere)
|
|
111
|
-
$paths += [Environment]::GetEnvironmentVariable("PATH", "Machine").Split(';')
|
|
112
|
-
$paths += [Environment]::GetEnvironmentVariable("PATH", "User").Split(';')
|
|
113
|
-
|
|
114
|
-
# Remove duplicates/empty
|
|
115
|
-
return $paths | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | Select-Object -Unique
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function Find-LibClang {
|
|
119
|
-
$locations = Get-KnownLibClangLocations
|
|
120
|
-
foreach ($location in $locations) {
|
|
121
|
-
$resolved = Test-LibClangInPath -Directory $location
|
|
122
|
-
if ($resolved) {
|
|
123
|
-
return $resolved
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return $null
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function Install-LLVM {
|
|
130
|
-
Write-Info "Attempting to install LLVM (includes libclang)..."
|
|
131
|
-
|
|
132
|
-
if (Test-CommandExists -Name "winget") {
|
|
133
|
-
try {
|
|
134
|
-
winget install LLVM.LLVM --silent --accept-package-agreements --accept-source-agreements | Out-Null
|
|
135
|
-
Write-Success "LLVM installed via winget"
|
|
136
|
-
return $true
|
|
137
|
-
}
|
|
138
|
-
catch {
|
|
139
|
-
Write-WarningMessage "winget install failed: $($_.Exception.Message)"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
elseif (Test-CommandExists -Name "choco") {
|
|
143
|
-
try {
|
|
144
|
-
choco install llvm -y --no-progress | Out-Null
|
|
145
|
-
Write-Success "LLVM installed via Chocolatey"
|
|
146
|
-
return $true
|
|
147
|
-
}
|
|
148
|
-
catch {
|
|
149
|
-
Write-WarningMessage "Chocolatey install failed: $($_.Exception.Message)"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
Write-WarningMessage "Neither winget nor Chocolatey is available for automated installation."
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return $false
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function Set-LibClangEnvironment {
|
|
160
|
-
param(
|
|
161
|
-
[Parameter(Mandatory = $true)][string]$Directory,
|
|
162
|
-
[switch]$ConfigureProcess
|
|
163
|
-
)
|
|
164
|
-
|
|
165
|
-
Write-Info "Setting LIBCLANG_PATH user environment variable to '$Directory'"
|
|
166
|
-
[Environment]::SetEnvironmentVariable("LIBCLANG_PATH", $Directory, "User")
|
|
167
|
-
|
|
168
|
-
if ($ConfigureProcess) {
|
|
169
|
-
$env:LIBCLANG_PATH = $Directory
|
|
170
|
-
if ($env:PATH -notlike "*$Directory*") {
|
|
171
|
-
$env:PATH = "$Directory;$env:PATH"
|
|
172
|
-
}
|
|
173
|
-
Write-Info "Updated current session PATH for immediate use"
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
Write-Success "LIBCLANG_PATH configured. Restart PowerShell or open a new terminal to pick up user-level changes."
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
try {
|
|
180
|
-
if ($ForceInstall -and $SkipInstall) {
|
|
181
|
-
throw "Cannot use -ForceInstall together with -SkipInstall."
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
$libclangDir = Find-LibClang
|
|
185
|
-
|
|
186
|
-
if ($ForceInstall -or (-not $libclangDir)) {
|
|
187
|
-
if ($SkipInstall) {
|
|
188
|
-
throw "libclang was not found and installation is disabled (SkipInstall)."
|
|
189
|
-
}
|
|
190
|
-
$installed = Install-LLVM
|
|
191
|
-
if (-not $installed) {
|
|
192
|
-
throw "Automatic LLVM installation failed. Please install LLVM manually and rerun this script."
|
|
193
|
-
}
|
|
194
|
-
$libclangDir = Find-LibClang
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (-not $libclangDir) {
|
|
198
|
-
throw "libclang.dll could not be located even after installation. Please install LLVM manually and rerun."
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
Write-Success "Found libclang at '$libclangDir'"
|
|
202
|
-
Set-LibClangEnvironment -Directory $libclangDir -ConfigureProcess:$ConfigureCurrentProcess
|
|
203
|
-
|
|
204
|
-
Write-Info "You can now run 'cargo build' / 'cargo test' successfully."
|
|
205
|
-
}
|
|
206
|
-
catch {
|
|
207
|
-
Write-ErrorMessage $_
|
|
208
|
-
exit 1
|
|
209
|
-
}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Updates CHANGELOG.md with commits since the last tag
|
|
5
|
-
* This script is meant to be run during CI before version bumping
|
|
6
|
-
*
|
|
7
|
-
* Usage: node scripts/update-changelog.js <version>
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const { execSync } = require('child_process');
|
|
11
|
-
const fs = require('fs');
|
|
12
|
-
const path = require('path');
|
|
13
|
-
|
|
14
|
-
function run(cmd) {
|
|
15
|
-
try {
|
|
16
|
-
return execSync(cmd, { encoding: 'utf8', stdio: 'pipe' }).trim();
|
|
17
|
-
} catch (e) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getCommitsSinceLastTag() {
|
|
23
|
-
const lastTag = run('git describe --tags --abbrev=0 2>/dev/null');
|
|
24
|
-
if (!lastTag) {
|
|
25
|
-
console.log('No previous tags found, analyzing all commits');
|
|
26
|
-
const commits = run('git log --format="%s"');
|
|
27
|
-
return commits ? commits.split('\n').filter(Boolean) : [];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const range = `${lastTag}..HEAD`;
|
|
31
|
-
const commits = run(`git log --format="%s" ${range}`);
|
|
32
|
-
if (!commits) {
|
|
33
|
-
console.log('No commits since last tag');
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return commits.split('\n').filter(Boolean);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function categorizeCommits(commits) {
|
|
41
|
-
const categories = {
|
|
42
|
-
feat: [],
|
|
43
|
-
fix: [],
|
|
44
|
-
docs: [],
|
|
45
|
-
style: [],
|
|
46
|
-
refactor: [],
|
|
47
|
-
test: [],
|
|
48
|
-
chore: [],
|
|
49
|
-
perf: [],
|
|
50
|
-
ci: [],
|
|
51
|
-
build: [],
|
|
52
|
-
other: [],
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
commits.forEach((commit) => {
|
|
56
|
-
// Skip release commits
|
|
57
|
-
if (commit.match(/^chore\(release\):/)) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const match = commit.match(/^(\w+)(\(.+\))?: (.+)/);
|
|
62
|
-
if (match) {
|
|
63
|
-
const [, type, , description] = match;
|
|
64
|
-
if (categories[type]) {
|
|
65
|
-
categories[type].push(description);
|
|
66
|
-
} else {
|
|
67
|
-
categories.other.push(commit);
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
categories.other.push(commit);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
return categories;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function generateChangelogEntry(version, categories) {
|
|
78
|
-
const today = new Date().toISOString().split('T')[0];
|
|
79
|
-
let entry = `## [${version}] - ${today}\n\n`;
|
|
80
|
-
let hasContent = false;
|
|
81
|
-
|
|
82
|
-
if (categories.feat.length > 0) {
|
|
83
|
-
entry += '### Added\n\n';
|
|
84
|
-
categories.feat.forEach((item) => {
|
|
85
|
-
entry += `- ${item}\n`;
|
|
86
|
-
});
|
|
87
|
-
entry += '\n';
|
|
88
|
-
hasContent = true;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if (categories.fix.length > 0) {
|
|
92
|
-
entry += '### Fixed\n\n';
|
|
93
|
-
categories.fix.forEach((item) => {
|
|
94
|
-
entry += `- ${item}\n`;
|
|
95
|
-
});
|
|
96
|
-
entry += '\n';
|
|
97
|
-
hasContent = true;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (categories.refactor.length > 0 || categories.style.length > 0 || categories.perf.length > 0) {
|
|
101
|
-
entry += '### Changed\n\n';
|
|
102
|
-
[...categories.refactor, ...categories.style, ...categories.perf].forEach((item) => {
|
|
103
|
-
entry += `- ${item}\n`;
|
|
104
|
-
});
|
|
105
|
-
entry += '\n';
|
|
106
|
-
hasContent = true;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (categories.docs.length > 0) {
|
|
110
|
-
entry += '### Documentation\n\n';
|
|
111
|
-
categories.docs.forEach((item) => {
|
|
112
|
-
entry += `- ${item}\n`;
|
|
113
|
-
});
|
|
114
|
-
entry += '\n';
|
|
115
|
-
hasContent = true;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (categories.test.length > 0 || categories.chore.length > 0 || categories.ci.length > 0 || categories.build.length > 0) {
|
|
119
|
-
entry += '### Developer Experience\n\n';
|
|
120
|
-
[...categories.test, ...categories.chore, ...categories.ci, ...categories.build].forEach((item) => {
|
|
121
|
-
entry += `- ${item}\n`;
|
|
122
|
-
});
|
|
123
|
-
entry += '\n';
|
|
124
|
-
hasContent = true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (categories.other.length > 0) {
|
|
128
|
-
entry += '### Other\n\n';
|
|
129
|
-
categories.other.forEach((item) => {
|
|
130
|
-
entry += `- ${item}\n`;
|
|
131
|
-
});
|
|
132
|
-
entry += '\n';
|
|
133
|
-
hasContent = true;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (!hasContent) {
|
|
137
|
-
entry += '- Maintenance and improvements\n\n';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return entry;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function updateChangelog(newEntry) {
|
|
144
|
-
const changelogPath = path.join(process.cwd(), 'CHANGELOG.md');
|
|
145
|
-
|
|
146
|
-
if (!fs.existsSync(changelogPath)) {
|
|
147
|
-
console.log('CHANGELOG.md not found, creating new one');
|
|
148
|
-
const content = `# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n${newEntry}`;
|
|
149
|
-
fs.writeFileSync(changelogPath, content);
|
|
150
|
-
console.log('Created CHANGELOG.md');
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const content = fs.readFileSync(changelogPath, 'utf8');
|
|
155
|
-
const lines = content.split('\n');
|
|
156
|
-
let insertIndex = -1;
|
|
157
|
-
|
|
158
|
-
// Find the position after the header and before the first version entry
|
|
159
|
-
for (let i = 0; i < lines.length; i++) {
|
|
160
|
-
if (lines[i].startsWith('## [') && !lines[i].includes('[Unreleased]')) {
|
|
161
|
-
insertIndex = i;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (insertIndex === -1) {
|
|
167
|
-
// No previous releases found, insert after any "Unreleased" section
|
|
168
|
-
for (let i = 0; i < lines.length; i++) {
|
|
169
|
-
if (lines[i].startsWith('## [Unreleased]')) {
|
|
170
|
-
// Skip the unreleased section
|
|
171
|
-
let j = i + 1;
|
|
172
|
-
while (j < lines.length && !lines[j].startsWith('##')) {
|
|
173
|
-
j++;
|
|
174
|
-
}
|
|
175
|
-
insertIndex = j;
|
|
176
|
-
break;
|
|
177
|
-
} else if (lines[i].startsWith('# ')) {
|
|
178
|
-
// Found the main header, insert after it
|
|
179
|
-
insertIndex = i + 2;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (insertIndex === -1) {
|
|
186
|
-
// Last resort: append at the end
|
|
187
|
-
lines.push('', newEntry);
|
|
188
|
-
} else {
|
|
189
|
-
// Insert the new entry
|
|
190
|
-
lines.splice(insertIndex, 0, newEntry);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
fs.writeFileSync(changelogPath, lines.join('\n'));
|
|
194
|
-
console.log('✅ Updated CHANGELOG.md');
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function main() {
|
|
198
|
-
const version = process.argv[2];
|
|
199
|
-
if (!version) {
|
|
200
|
-
console.error('Usage: node scripts/update-changelog.js <version>');
|
|
201
|
-
process.exit(1);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const commits = getCommitsSinceLastTag();
|
|
205
|
-
if (commits.length === 0) {
|
|
206
|
-
console.log('No commits to add to changelog, creating minimal entry');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const categories = categorizeCommits(commits);
|
|
210
|
-
const entry = generateChangelogEntry(version, categories);
|
|
211
|
-
updateChangelog(entry);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
main();
|
package/web/README.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Web UI (Svelte)
|
|
2
|
-
|
|
3
|
-
This folder contains a Svelte-based reactive UI for PluresDB.
|
|
4
|
-
|
|
5
|
-
- svelte/ source using Vite
|
|
6
|
-
- Built assets go to web/dist/ and are served by the PluresDB HTTP server
|
|
7
|
-
|
|
8
|
-
## Dev
|
|
9
|
-
|
|
10
|
-
Use Node 18+.
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
cd web/svelte
|
|
14
|
-
npm i
|
|
15
|
-
npm run dev
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Configure the API base URL if needed (defaults to same origin).
|
|
19
|
-
|
|
20
|
-
## Build
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
cd web/svelte
|
|
24
|
-
npm run build
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This outputs to ../dist/. Start PluresDB serve and open the port+1 URL printed in the console.
|
package/web/svelte/package.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pluresdb-ui",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@codemirror/commands": "^6.6.0",
|
|
13
|
-
"@codemirror/lang-json": "^6.0.1",
|
|
14
|
-
"@codemirror/lint": "^6.8.0",
|
|
15
|
-
"@codemirror/state": "^6.4.0",
|
|
16
|
-
"@codemirror/theme-one-dark": "^6.1.2",
|
|
17
|
-
"@codemirror/view": "^6.28.1",
|
|
18
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
19
|
-
"ajv": "^8.12.0",
|
|
20
|
-
"svelte": "^5.17.3",
|
|
21
|
-
"vite": "^7.2.2"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@monaco-editor/loader": "^1.5.0",
|
|
25
|
-
"cytoscape": "^3.29.3",
|
|
26
|
-
"cytoscape-cola": "^2.5.1",
|
|
27
|
-
"cytoscape-cose-bilkent": "^4.1.0",
|
|
28
|
-
"cytoscape-dagre": "^2.5.0",
|
|
29
|
-
"monaco-editor": "^0.49.0"
|
|
30
|
-
}
|
|
31
|
-
}
|