pgserve 2.1.3 โ 2.2.0
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/CHANGELOG.md +86 -0
- package/README.md +105 -1
- package/bin/autopg-wrapper.cjs +16 -0
- package/bin/pgserve-wrapper.cjs +31 -6
- package/bin/postgres-server.js +56 -0
- package/console/README.md +131 -0
- package/console/api.js +173 -0
- package/console/app.jsx +483 -0
- package/console/colors_and_type.css +227 -0
- package/console/components.jsx +167 -0
- package/console/console.css +1666 -0
- package/console/data.jsx +350 -0
- package/console/index.html +31 -0
- package/console/screens/databases.jsx +5 -0
- package/console/screens/health.jsx +5 -0
- package/console/screens/ingress.jsx +5 -0
- package/console/screens/optimizer.jsx +5 -0
- package/console/screens/rlm-sim.jsx +5 -0
- package/console/screens/rlm-trace.jsx +5 -0
- package/console/screens/security.jsx +5 -0
- package/console/screens/settings.jsx +611 -0
- package/console/screens/sql.jsx +5 -0
- package/console/screens/sync.jsx +5 -0
- package/console/screens/tables.jsx +5 -0
- package/console/tweaks-panel.jsx +425 -0
- package/package.json +11 -1
- package/src/cli-config.cjs +310 -0
- package/src/cli-install.cjs +98 -11
- package/src/cli-restart.cjs +228 -0
- package/src/cli-ui.cjs +580 -0
- package/src/cluster.js +43 -38
- package/src/postgres.js +141 -19
- package/src/settings-loader.cjs +235 -0
- package/src/settings-migrate.cjs +212 -0
- package/src/settings-pg-args.cjs +146 -0
- package/src/settings-schema.cjs +422 -0
- package/src/settings-validator.cjs +416 -0
- package/src/settings-writer.cjs +288 -0
- package/.claude/context/windows-debug.md +0 -119
- package/.genie/AGENTS.md +0 -15
- package/.genie/agents/README.md +0 -110
- package/.genie/agents/analyze.md +0 -176
- package/.genie/agents/forge.md +0 -290
- package/.genie/agents/garbage-cleaner.md +0 -324
- package/.genie/agents/garbage-collector.md +0 -596
- package/.genie/agents/github-issue-gc.md +0 -618
- package/.genie/agents/review.md +0 -380
- package/.genie/agents/semantic-analyzer/find-duplicates.md +0 -90
- package/.genie/agents/semantic-analyzer/find-orphans.md +0 -99
- package/.genie/agents/semantic-analyzer.md +0 -101
- package/.genie/agents/update.md +0 -182
- package/.genie/agents/wish.md +0 -357
- package/.genie/brainstorms/pgserve-v2/DESIGN.md +0 -174
- package/.genie/code/AGENTS.md +0 -694
- package/.genie/code/agents/audit/risk.md +0 -173
- package/.genie/code/agents/audit/security.md +0 -189
- package/.genie/code/agents/audit.md +0 -145
- package/.genie/code/agents/challenge.md +0 -230
- package/.genie/code/agents/change-reviewer.md +0 -295
- package/.genie/code/agents/code-garbage-collector.md +0 -425
- package/.genie/code/agents/code-quality.md +0 -410
- package/.genie/code/agents/commit-suggester.md +0 -255
- package/.genie/code/agents/commit.md +0 -124
- package/.genie/code/agents/consensus.md +0 -204
- package/.genie/code/agents/daily-standup.md +0 -722
- package/.genie/code/agents/docgen.md +0 -48
- package/.genie/code/agents/explore.md +0 -79
- package/.genie/code/agents/fix.md +0 -100
- package/.genie/code/agents/git/commit-advisory.md +0 -219
- package/.genie/code/agents/git/workflows/issue.md +0 -244
- package/.genie/code/agents/git/workflows/pr.md +0 -179
- package/.genie/code/agents/git/workflows/release.md +0 -460
- package/.genie/code/agents/git/workflows/report.md +0 -342
- package/.genie/code/agents/git.md +0 -432
- package/.genie/code/agents/implementor.md +0 -161
- package/.genie/code/agents/install.md +0 -515
- package/.genie/code/agents/issue-creator.md +0 -344
- package/.genie/code/agents/polish.md +0 -116
- package/.genie/code/agents/qa.md +0 -653
- package/.genie/code/agents/refactor.md +0 -294
- package/.genie/code/agents/release.md +0 -1129
- package/.genie/code/agents/roadmap.md +0 -885
- package/.genie/code/agents/tests.md +0 -557
- package/.genie/code/agents/tracer.md +0 -50
- package/.genie/code/agents/update/upstream-update.md +0 -85
- package/.genie/code/agents/update/versions/generic-update.md +0 -305
- package/.genie/code/agents/vibe.md +0 -1317
- package/.genie/code/spells/agent-configuration.md +0 -58
- package/.genie/code/spells/automated-rc-publishing.md +0 -106
- package/.genie/code/spells/branch-tracker-guidance.md +0 -28
- package/.genie/code/spells/debug.md +0 -320
- package/.genie/code/spells/emoji-naming-convention.md +0 -303
- package/.genie/code/spells/evidence-storage.md +0 -26
- package/.genie/code/spells/file-naming-rules.md +0 -35
- package/.genie/code/spells/forge-code-blueprints.md +0 -195
- package/.genie/code/spells/genie-integration.md +0 -153
- package/.genie/code/spells/publishing-protocol.md +0 -61
- package/.genie/code/spells/team-consultation-protocol.md +0 -284
- package/.genie/code/spells/tool-requirements.md +0 -20
- package/.genie/code/spells/triad-maintenance-protocol.md +0 -154
- package/.genie/code/teams/tech-council/council.md +0 -328
- package/.genie/code/teams/tech-council/jt.md +0 -352
- package/.genie/code/teams/tech-council/nayr.md +0 -305
- package/.genie/code/teams/tech-council/oettam.md +0 -375
- package/.genie/neurons/README.md +0 -193
- package/.genie/neurons/forge.md +0 -106
- package/.genie/neurons/genie.md +0 -63
- package/.genie/neurons/review.md +0 -106
- package/.genie/neurons/wish.md +0 -104
- package/.genie/product/README.md +0 -20
- package/.genie/product/cli-automation.md +0 -359
- package/.genie/product/environment.md +0 -60
- package/.genie/product/mission.md +0 -60
- package/.genie/product/roadmap.md +0 -44
- package/.genie/product/tech-stack.md +0 -34
- package/.genie/product/templates/context-template.md +0 -218
- package/.genie/product/templates/qa-done-report-template.md +0 -68
- package/.genie/product/templates/review-report-template.md +0 -89
- package/.genie/product/templates/wish-template.md +0 -120
- package/.genie/scripts/helpers/analyze-commit.js +0 -195
- package/.genie/scripts/helpers/bullet-counter.js +0 -194
- package/.genie/scripts/helpers/bullet-find.js +0 -289
- package/.genie/scripts/helpers/bullet-id.js +0 -244
- package/.genie/scripts/helpers/check-secrets.js +0 -237
- package/.genie/scripts/helpers/count-tokens.js +0 -200
- package/.genie/scripts/helpers/create-frontmatter.js +0 -456
- package/.genie/scripts/helpers/detect-markers.js +0 -293
- package/.genie/scripts/helpers/detect-todos.js +0 -267
- package/.genie/scripts/helpers/detect-unlabeled-blocks.js +0 -135
- package/.genie/scripts/helpers/embeddings.js +0 -344
- package/.genie/scripts/helpers/find-empty-sections.js +0 -158
- package/.genie/scripts/helpers/index.js +0 -319
- package/.genie/scripts/helpers/validate-frontmatter.js +0 -578
- package/.genie/scripts/helpers/validate-links.js +0 -207
- package/.genie/scripts/helpers/validate-paths.js +0 -373
- package/.genie/spells/README.md +0 -9
- package/.genie/spells/ace-protocol.md +0 -118
- package/.genie/spells/ask-one-at-a-time.md +0 -175
- package/.genie/spells/backup-analyzer.md +0 -542
- package/.genie/spells/blocker.md +0 -12
- package/.genie/spells/break-things-move-fast.md +0 -56
- package/.genie/spells/context-candidates.md +0 -72
- package/.genie/spells/context-critic.md +0 -51
- package/.genie/spells/defer-to-expertise.md +0 -278
- package/.genie/spells/delegate-dont-do.md +0 -292
- package/.genie/spells/error-investigation-protocol.md +0 -328
- package/.genie/spells/evidence-based-completion.md +0 -273
- package/.genie/spells/experiment.md +0 -65
- package/.genie/spells/file-creation-protocol.md +0 -229
- package/.genie/spells/forge-integration.md +0 -281
- package/.genie/spells/forge-orchestration.md +0 -514
- package/.genie/spells/gather-context.md +0 -18
- package/.genie/spells/global-health-check.md +0 -34
- package/.genie/spells/global-noop-roundtrip.md +0 -25
- package/.genie/spells/install-genie.md +0 -1232
- package/.genie/spells/install.md +0 -82
- package/.genie/spells/investigate-before-commit.md +0 -112
- package/.genie/spells/know-yourself.md +0 -288
- package/.genie/spells/learn.md +0 -828
- package/.genie/spells/mcp-diagnostic-protocol.md +0 -246
- package/.genie/spells/mcp-first.md +0 -124
- package/.genie/spells/multi-step-execution.md +0 -67
- package/.genie/spells/orchestration-boundary-protocol.md +0 -256
- package/.genie/spells/orchestrator-not-implementor.md +0 -189
- package/.genie/spells/prompt.md +0 -746
- package/.genie/spells/reflect.md +0 -404
- package/.genie/spells/routing-decision-matrix.md +0 -368
- package/.genie/spells/run-in-parallel.md +0 -12
- package/.genie/spells/session-state-updater-example.md +0 -196
- package/.genie/spells/session-state-updater.md +0 -220
- package/.genie/spells/track-long-running-tasks.md +0 -133
- package/.genie/spells/troubleshoot-infrastructure.md +0 -176
- package/.genie/spells/upgrade-genie.md +0 -415
- package/.genie/spells/url-presentation-protocol.md +0 -301
- package/.genie/spells/wish-initiation.md +0 -158
- package/.genie/spells/wish-issue-linkage.md +0 -410
- package/.genie/spells/wish-lifecycle.md +0 -100
- package/.genie/state/provider-status.json +0 -3
- package/.genie/state/version.json +0 -16
- package/.genie/wishes/canonical-pgserve-pm2-supervision/WISH.md +0 -290
- package/.genie/wishes/pgserve-v2/BRIEF-from-genie-pgserve.md +0 -99
- package/.genie/wishes/pgserve-v2/WISH.md +0 -442
- package/.genie/wishes/release-system-genie-pattern/WISH.md +0 -268
- package/.genie/wishes/release-system-genie-pattern/validation.md +0 -205
- package/.gitguardian.yaml +0 -29
- package/.gitguardianignore +0 -16
- package/.github/workflows/ci.yml +0 -122
- package/.github/workflows/release.yml +0 -289
- package/.github/workflows/version.yml +0 -228
- package/.husky/pre-commit +0 -2
- package/AGENTS.md +0 -433
- package/CLAUDE.md +0 -1
- package/Makefile +0 -285
- package/assets/icon.ico +0 -0
- package/bun.lock +0 -435
- package/bunfig.toml +0 -28
- package/ecosystem.config.cjs +0 -23
- package/eslint.config.js +0 -63
- package/examples/multi-tenant-demo.js +0 -104
- package/install.sh +0 -123
- package/knip.json +0 -9
- package/scripts/test-bun-self-heal.sh +0 -163
- package/scripts/test-npx.sh +0 -60
- package/tests/audit.test.js +0 -189
- package/tests/backpressure.test.js +0 -167
- package/tests/benchmarks/runner.js +0 -1197
- package/tests/benchmarks/vector-generator.js +0 -368
- package/tests/cli-install.test.js +0 -322
- package/tests/control-db.test.js +0 -285
- package/tests/daemon-args.test.js +0 -86
- package/tests/daemon-control.test.js +0 -171
- package/tests/daemon-fingerprint-integration.test.js +0 -111
- package/tests/daemon-pr24-regression.test.js +0 -198
- package/tests/fingerprint.test.js +0 -263
- package/tests/fixtures/240-orphan-seed.sql +0 -30
- package/tests/multi-tenant.test.js +0 -374
- package/tests/orphan-cleanup.test.js +0 -390
- package/tests/pg-version-regex.test.js +0 -129
- package/tests/quick-bench.js +0 -135
- package/tests/router-handshake-retry.test.js +0 -119
- package/tests/router-handshake-watchdog.test.js +0 -110
- package/tests/sdk.test.js +0 -71
- package/tests/stale-postmaster-pid.test.js +0 -85
- package/tests/stress-test.js +0 -439
- package/tests/sync-perf-test.js +0 -150
- package/tests/tcp-listen.test.js +0 -368
- package/tests/tenancy.test.js +0 -403
- package/tests/wrapper-supervision.test.js +0 -107
package/Makefile
DELETED
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
# ==========================================
|
|
2
|
-
# ๐ฆ pgserve - Embedded PostgreSQL Server
|
|
3
|
-
# ==========================================
|
|
4
|
-
|
|
5
|
-
.DEFAULT_GOAL := help
|
|
6
|
-
SHELL := /bin/bash
|
|
7
|
-
|
|
8
|
-
# Colors
|
|
9
|
-
GREEN := $(shell tput setaf 2)
|
|
10
|
-
YELLOW := $(shell tput setaf 3)
|
|
11
|
-
RED := $(shell tput setaf 1)
|
|
12
|
-
CYAN := $(shell tput setaf 6)
|
|
13
|
-
PURPLE := $(shell tput setaf 5)
|
|
14
|
-
BOLD := $(shell tput bold)
|
|
15
|
-
RESET := $(shell tput sgr0)
|
|
16
|
-
|
|
17
|
-
# Package info
|
|
18
|
-
PACKAGE_NAME := pgserve
|
|
19
|
-
VERSION := $(shell grep '"version"' package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')
|
|
20
|
-
|
|
21
|
-
# ==========================================
|
|
22
|
-
# ๐ Help
|
|
23
|
-
# ==========================================
|
|
24
|
-
.PHONY: help
|
|
25
|
-
help: ## Show this help
|
|
26
|
-
@echo ""
|
|
27
|
-
@echo "$(PURPLE)$(BOLD)๐ฆ pgserve$(RESET) - v$(VERSION)"
|
|
28
|
-
@echo "$(CYAN)Embedded PostgreSQL server with multi-tenant support$(RESET)"
|
|
29
|
-
@echo ""
|
|
30
|
-
@echo "$(BOLD)Quick Commands:$(RESET)"
|
|
31
|
-
@echo " $(PURPLE)test-local$(RESET) Test server locally"
|
|
32
|
-
@echo " $(PURPLE)pm2-start$(RESET) Start server with PM2"
|
|
33
|
-
@echo ""
|
|
34
|
-
@echo "$(BOLD)Releasing:$(RESET)"
|
|
35
|
-
@echo " Manual: bump locally with 'npm version patch|minor|major', PR to main."
|
|
36
|
-
@echo " Bot: 'gh workflow run release.yml -f bump=patch' (or minor/major)."
|
|
37
|
-
@echo " Skip: any commit message starting with [skip ci] is ignored."
|
|
38
|
-
@echo ""
|
|
39
|
-
@echo "$(BOLD)Build Executables:$(RESET)"
|
|
40
|
-
@echo " $(PURPLE)build$(RESET) Build for current platform"
|
|
41
|
-
@echo " $(PURPLE)build-all$(RESET) Build for all platforms (Linux, macOS, Windows)"
|
|
42
|
-
@echo " $(PURPLE)build-linux$(RESET) Build for Linux (x64 + arm64)"
|
|
43
|
-
@echo " $(PURPLE)build-macos$(RESET) Build for macOS (x64 + arm64)"
|
|
44
|
-
@echo " $(PURPLE)build-windows$(RESET) Build for Windows (x64)"
|
|
45
|
-
@echo ""
|
|
46
|
-
@echo "$(BOLD)Development:$(RESET)"
|
|
47
|
-
@echo " $(PURPLE)install$(RESET) Install dependencies"
|
|
48
|
-
@echo " $(PURPLE)clean$(RESET) Clean generated files"
|
|
49
|
-
@echo ""
|
|
50
|
-
@echo "$(BOLD)Status:$(RESET)"
|
|
51
|
-
@echo " Version: $(VERSION)"
|
|
52
|
-
@echo " Package: $(PACKAGE_NAME)"
|
|
53
|
-
@echo ""
|
|
54
|
-
|
|
55
|
-
# ==========================================
|
|
56
|
-
# ๐ Installation
|
|
57
|
-
# ==========================================
|
|
58
|
-
.PHONY: install
|
|
59
|
-
install: ## Install dependencies
|
|
60
|
-
@echo "$(CYAN)๐ฆ Installing dependencies...$(RESET)"
|
|
61
|
-
@bun install
|
|
62
|
-
@echo "$(GREEN)โ
Dependencies installed!$(RESET)"
|
|
63
|
-
|
|
64
|
-
.PHONY: test
|
|
65
|
-
test: ## Run tests
|
|
66
|
-
@echo "$(CYAN)๐งช Running tests...$(RESET)"
|
|
67
|
-
@bun test
|
|
68
|
-
@echo "$(GREEN)โ
Tests passed!$(RESET)"
|
|
69
|
-
|
|
70
|
-
.PHONY: bench
|
|
71
|
-
bench: ## Run benchmarks
|
|
72
|
-
@echo "$(CYAN)๐ Running benchmarks...$(RESET)"
|
|
73
|
-
@bun tests/benchmarks/runner.js
|
|
74
|
-
@echo "$(GREEN)โ
Benchmarks complete!$(RESET)"
|
|
75
|
-
|
|
76
|
-
# ==========================================
|
|
77
|
-
# ๐งช Testing
|
|
78
|
-
# ==========================================
|
|
79
|
-
.PHONY: test-local
|
|
80
|
-
test-local: ## Test server locally
|
|
81
|
-
@echo "$(CYAN)๐งช Testing server...$(RESET)"
|
|
82
|
-
@./bin/postgres-server.js start ./data/test-local --port 12050 --log info &
|
|
83
|
-
@TESTPID=$$!; \
|
|
84
|
-
sleep 3; \
|
|
85
|
-
./bin/postgres-server.js list; \
|
|
86
|
-
./bin/postgres-server.js health --port 12050; \
|
|
87
|
-
kill $$TESTPID 2>/dev/null || true; \
|
|
88
|
-
./bin/postgres-server.js cleanup
|
|
89
|
-
@echo "$(GREEN)โ
Server test passed!$(RESET)"
|
|
90
|
-
|
|
91
|
-
# ==========================================
|
|
92
|
-
# ๐ฆ PM2 Management
|
|
93
|
-
# ==========================================
|
|
94
|
-
.PHONY: pm2-start pm2-stop pm2-restart pm2-logs pm2-status
|
|
95
|
-
pm2-start: ## Start server with PM2
|
|
96
|
-
@echo "$(CYAN)๐ Starting PM2 instance...$(RESET)"
|
|
97
|
-
@pm2 start ecosystem.config.cjs
|
|
98
|
-
@pm2 save
|
|
99
|
-
@echo "$(GREEN)โ
PM2 instance started and saved!$(RESET)"
|
|
100
|
-
|
|
101
|
-
pm2-stop: ## Stop PM2 instance
|
|
102
|
-
@echo "$(CYAN)๐ Stopping PM2 instance...$(RESET)"
|
|
103
|
-
@pm2 stop "pgserve" 2>/dev/null || true
|
|
104
|
-
@pm2 delete "pgserve" 2>/dev/null || true
|
|
105
|
-
@pm2 save
|
|
106
|
-
@echo "$(GREEN)โ
PM2 instance stopped!$(RESET)"
|
|
107
|
-
|
|
108
|
-
pm2-restart: ## Restart PM2 instance
|
|
109
|
-
@echo "$(CYAN)๐ Restarting PM2 instance...$(RESET)"
|
|
110
|
-
@pm2 restart "pgserve" 2>/dev/null || $(MAKE) pm2-start
|
|
111
|
-
@echo "$(GREEN)โ
PM2 instance restarted!$(RESET)"
|
|
112
|
-
|
|
113
|
-
pm2-logs: ## Show PM2 logs
|
|
114
|
-
@pm2 logs "pgserve" --lines 50
|
|
115
|
-
|
|
116
|
-
pm2-status: ## Show PM2 status
|
|
117
|
-
@pm2 status "pgserve"
|
|
118
|
-
|
|
119
|
-
# ==========================================
|
|
120
|
-
# ๐ Pre-publish Checks
|
|
121
|
-
# ==========================================
|
|
122
|
-
.PHONY: check-git check-npm check-version check-files
|
|
123
|
-
check-git: ## Check git status
|
|
124
|
-
@echo "$(CYAN)๐ Checking git status...$(RESET)"
|
|
125
|
-
@if [ -n "$$(git status --porcelain)" ]; then \
|
|
126
|
-
echo "$(RED)โ Uncommitted changes detected!$(RESET)"; \
|
|
127
|
-
git status --short; \
|
|
128
|
-
exit 1; \
|
|
129
|
-
fi
|
|
130
|
-
@echo "$(GREEN)โ
Git working directory clean$(RESET)"
|
|
131
|
-
|
|
132
|
-
check-npm: ## Check npm authentication
|
|
133
|
-
@echo "$(CYAN)๐ Checking npm authentication...$(RESET)"
|
|
134
|
-
@if ! npm whoami >/dev/null 2>&1; then \
|
|
135
|
-
echo "$(RED)โ Not logged in to npm!$(RESET)"; \
|
|
136
|
-
echo "$(YELLOW)Run: npm login --auth-type=legacy$(RESET)"; \
|
|
137
|
-
exit 1; \
|
|
138
|
-
fi
|
|
139
|
-
@echo "$(GREEN)โ
Logged in as: $$(npm whoami)$(RESET)"
|
|
140
|
-
@if [ -z "$$NPM_TOKEN" ] && ! grep -q "_authToken" ~/.npmrc 2>/dev/null; then \
|
|
141
|
-
echo "$(YELLOW)โ ๏ธ Consider using NPM_TOKEN or ~/.npmrc for non-interactive publish$(RESET)"; \
|
|
142
|
-
fi
|
|
143
|
-
|
|
144
|
-
check-version: ## Check if version tag exists
|
|
145
|
-
@echo "$(CYAN)๐ Checking version $(VERSION)...$(RESET)"
|
|
146
|
-
@if git tag | grep -q "^v$(VERSION)$$"; then \
|
|
147
|
-
echo "$(RED)โ Version v$(VERSION) already tagged!$(RESET)"; \
|
|
148
|
-
echo "$(YELLOW)Bump version first: npm version patch|minor|major$(RESET)"; \
|
|
149
|
-
exit 1; \
|
|
150
|
-
fi
|
|
151
|
-
@echo "$(GREEN)โ
Version $(VERSION) is new$(RESET)"
|
|
152
|
-
|
|
153
|
-
check-files: ## Check required files exist
|
|
154
|
-
@echo "$(CYAN)๐ Checking required files...$(RESET)"
|
|
155
|
-
@for file in package.json README.md LICENSE src/index.js bin/postgres-server.js; do \
|
|
156
|
-
if [ ! -f "$$file" ]; then \
|
|
157
|
-
echo "$(RED)โ Missing required file: $$file$(RESET)"; \
|
|
158
|
-
exit 1; \
|
|
159
|
-
fi; \
|
|
160
|
-
done
|
|
161
|
-
@echo "$(GREEN)โ
All required files present$(RESET)"
|
|
162
|
-
|
|
163
|
-
# ==========================================
|
|
164
|
-
# ๐จ Build Standalone Executables
|
|
165
|
-
# ==========================================
|
|
166
|
-
DIST_DIR := dist
|
|
167
|
-
|
|
168
|
-
.PHONY: build build-linux build-macos build-windows build-all clean-dist
|
|
169
|
-
|
|
170
|
-
$(DIST_DIR):
|
|
171
|
-
@mkdir -p $(DIST_DIR)
|
|
172
|
-
|
|
173
|
-
build: $(DIST_DIR) ## Build standalone executable for current platform
|
|
174
|
-
@echo "$(CYAN)๐จ Building standalone executable...$(RESET)"
|
|
175
|
-
@bun build --compile bin/postgres-server.js --outfile $(DIST_DIR)/pgserve
|
|
176
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve$(RESET)"
|
|
177
|
-
|
|
178
|
-
build-linux: $(DIST_DIR) ## Build for Linux (x64 + arm64)
|
|
179
|
-
@echo "$(CYAN)๐ง Building for Linux...$(RESET)"
|
|
180
|
-
@bun build --compile --target=bun-linux-x64 bin/postgres-server.js --outfile $(DIST_DIR)/pgserve-linux-x64
|
|
181
|
-
@bun build --compile --target=bun-linux-arm64 bin/postgres-server.js --outfile $(DIST_DIR)/pgserve-linux-arm64
|
|
182
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve-linux-x64$(RESET)"
|
|
183
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve-linux-arm64$(RESET)"
|
|
184
|
-
|
|
185
|
-
build-macos: $(DIST_DIR) ## Build for macOS (x64 + arm64)
|
|
186
|
-
@echo "$(CYAN)๐ Building for macOS...$(RESET)"
|
|
187
|
-
@bun build --compile --target=bun-darwin-x64 bin/postgres-server.js --outfile $(DIST_DIR)/pgserve-darwin-x64
|
|
188
|
-
@bun build --compile --target=bun-darwin-arm64 bin/postgres-server.js --outfile $(DIST_DIR)/pgserve-darwin-arm64
|
|
189
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve-darwin-x64$(RESET)"
|
|
190
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve-darwin-arm64$(RESET)"
|
|
191
|
-
|
|
192
|
-
build-windows: $(DIST_DIR) ## Build for Windows (x64)
|
|
193
|
-
@echo "$(CYAN)๐ช Building for Windows...$(RESET)"
|
|
194
|
-
@bun build --compile --target=bun-windows-x64 bin/postgres-server.js --outfile $(DIST_DIR)/pgserve-windows-x64.exe
|
|
195
|
-
@echo "$(GREEN)โ
Built: $(DIST_DIR)/pgserve-windows-x64.exe$(RESET)"
|
|
196
|
-
|
|
197
|
-
build-all: build-linux build-macos build-windows ## Build for all platforms
|
|
198
|
-
@echo ""
|
|
199
|
-
@echo "$(GREEN)$(BOLD)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ$(RESET)"
|
|
200
|
-
@echo "$(GREEN)$(BOLD)โ ๐ All platform builds complete! โ$(RESET)"
|
|
201
|
-
@echo "$(GREEN)$(BOLD)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ$(RESET)"
|
|
202
|
-
@echo ""
|
|
203
|
-
@ls -lh $(DIST_DIR)/
|
|
204
|
-
@echo ""
|
|
205
|
-
|
|
206
|
-
clean-dist: ## Clean build artifacts
|
|
207
|
-
@echo "$(CYAN)๐งน Cleaning dist...$(RESET)"
|
|
208
|
-
@rm -rf $(DIST_DIR)
|
|
209
|
-
@echo "$(GREEN)โ
Dist cleaned!$(RESET)"
|
|
210
|
-
|
|
211
|
-
# ==========================================
|
|
212
|
-
# ๐ Releasing
|
|
213
|
-
# ==========================================
|
|
214
|
-
# Releases are driven by .github/workflows/release.yml on push to main.
|
|
215
|
-
#
|
|
216
|
-
# Manual: bump locally with `npm version patch|minor|major`, commit, PR
|
|
217
|
-
# to main. Merge -> release fires automatically.
|
|
218
|
-
# Bot: `gh workflow run release.yml -f bump=patch` (or minor/major).
|
|
219
|
-
# The bot bumps, tags, builds binaries, publishes to npm via OIDC.
|
|
220
|
-
# Skip: any commit message starting with [skip ci] is ignored.
|
|
221
|
-
#
|
|
222
|
-
# There are no Make targets for releases โ versioning is intentionally
|
|
223
|
-
# centralized in CI to keep the local-vs-prod workflow paths identical.
|
|
224
|
-
# ==========================================
|
|
225
|
-
|
|
226
|
-
# ==========================================
|
|
227
|
-
# ๐ฆ Manual Publish (Deprecated)
|
|
228
|
-
# ==========================================
|
|
229
|
-
.PHONY: pre-publish publish publish-dry
|
|
230
|
-
pre-publish: check-git check-npm check-version check-files ## Run all pre-publish checks
|
|
231
|
-
@echo "$(GREEN)โ
All pre-publish checks passed!$(RESET)"
|
|
232
|
-
|
|
233
|
-
publish-dry: pre-publish ## Dry-run publish (test without actually publishing)
|
|
234
|
-
@echo "$(CYAN)๐งช Running dry-run publish...$(RESET)"
|
|
235
|
-
@npm publish --dry-run
|
|
236
|
-
@echo "$(GREEN)โ
Dry-run successful!$(RESET)"
|
|
237
|
-
@echo "$(YELLOW)To actually publish, run: make publish$(RESET)"
|
|
238
|
-
|
|
239
|
-
publish: ## โ ๏ธ [DEPRECATED] Releases run from CI on push to main
|
|
240
|
-
@echo ""
|
|
241
|
-
@echo "$(YELLOW)$(BOLD)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ$(RESET)"
|
|
242
|
-
@echo "$(YELLOW)$(BOLD)โ โ ๏ธ Manual publish is DEPRECATED โ$(RESET)"
|
|
243
|
-
@echo "$(YELLOW)$(BOLD)โ โ$(RESET)"
|
|
244
|
-
@echo "$(YELLOW)$(BOLD)โ Releases are driven by .github/workflows/release.yml: โ$(RESET)"
|
|
245
|
-
@echo "$(YELLOW)$(BOLD)โ Manual: npm version patch|minor|major, commit, PR to main โ$(RESET)"
|
|
246
|
-
@echo "$(YELLOW)$(BOLD)โ Bot: gh workflow run release.yml -f bump=patch โ$(RESET)"
|
|
247
|
-
@echo "$(YELLOW)$(BOLD)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ$(RESET)"
|
|
248
|
-
@echo ""
|
|
249
|
-
|
|
250
|
-
# ==========================================
|
|
251
|
-
# ๐งน Maintenance
|
|
252
|
-
# ==========================================
|
|
253
|
-
.PHONY: clean clean-all
|
|
254
|
-
clean: ## Clean generated files
|
|
255
|
-
@echo "$(CYAN)๐งน Cleaning...$(RESET)"
|
|
256
|
-
@rm -rf data/test-* data/genieos-local
|
|
257
|
-
@./bin/postgres-server.js cleanup
|
|
258
|
-
@echo "$(GREEN)โ
Cleaned!$(RESET)"
|
|
259
|
-
|
|
260
|
-
clean-all: clean ## Deep clean (including node_modules)
|
|
261
|
-
@echo "$(CYAN)๐งน Deep cleaning...$(RESET)"
|
|
262
|
-
@rm -rf node_modules package-lock.json pnpm-lock.yaml bun.lock
|
|
263
|
-
@echo "$(GREEN)โ
Deep clean complete!$(RESET)"
|
|
264
|
-
|
|
265
|
-
# ==========================================
|
|
266
|
-
# ๐ง Utility
|
|
267
|
-
# ==========================================
|
|
268
|
-
.PHONY: version bump-patch bump-minor bump-major
|
|
269
|
-
version: ## Show current version
|
|
270
|
-
@echo "$(CYAN)Current version: $(BOLD)$(VERSION)$(RESET)"
|
|
271
|
-
|
|
272
|
-
bump-patch: ## Bump patch version (0.1.0 โ 0.1.1)
|
|
273
|
-
@echo "$(CYAN)๐ Bumping patch version...$(RESET)"
|
|
274
|
-
@npm version patch -m "chore: bump version to %s"
|
|
275
|
-
@echo "$(GREEN)โ
Version bumped to $$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')$(RESET)"
|
|
276
|
-
|
|
277
|
-
bump-minor: ## Bump minor version (0.1.0 โ 0.2.0)
|
|
278
|
-
@echo "$(CYAN)๐ Bumping minor version...$(RESET)"
|
|
279
|
-
@npm version minor -m "chore: bump version to %s"
|
|
280
|
-
@echo "$(GREEN)โ
Version bumped to $$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')$(RESET)"
|
|
281
|
-
|
|
282
|
-
bump-major: ## Bump major version (0.1.0 โ 1.0.0)
|
|
283
|
-
@echo "$(CYAN)๐ Bumping major version...$(RESET)"
|
|
284
|
-
@npm version major -m "chore: bump version to %s"
|
|
285
|
-
@echo "$(GREEN)โ
Version bumped to $$(grep '"version"' package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')$(RESET)"
|
package/assets/icon.ico
DELETED
|
Binary file
|