Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- **Rebranded to NexQL** — Complete rebranding from PostgreSQL Explorer (YAPE) to **NexQL - postgres explorer**.
- Updated all extension icons, assets, extension configurations, display names, and marketplace metadata.
- Redesigned the project website/documentation page at [docs/index.html](file:///home/ric-v/projects/ric-v/PgStudio/docs/index.html) and [nexql.html](file:///home/ric-v/projects/ric-v/PgStudio/nexql.html) featuring a beautiful dark layout with a new spectrum color palette (blue → indigo → magenta → amber) and interactive product tour.
- Redesigned the project website/documentation page at [docs/index.html](file:///home/ric-v/projects/ric-v/NexQL/docs/index.html) and [nexql.html](file:///home/ric-v/projects/ric-v/NexQL/nexql.html) featuring a beautiful dark layout with a new spectrum color palette (blue → indigo → magenta → amber) and interactive product tour.

### Added

Expand Down Expand Up @@ -265,7 +265,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
NexQL v1.0.0 is a major milestone release with comprehensive stability improvements, security hardening, and production-ready tooling.

#### Added
- **DDL Viewer SQL Preview toggle**: Added user-facing toggle command and setting (`pgstudio.ddlViewer.enabled`) to quickly enable/disable definition preview actions.
- **DDL Viewer SQL Preview toggle**: Added user-facing toggle command and setting (`nexql.ddlViewer.enabled`) to quickly enable/disable definition preview actions.
- **Definition Viewer workflow actions**: Improved DDL viewer command surface for opening editable copies, copying SQL, and routine execution scaffolding.

#### Changed
Expand Down
10 changes: 5 additions & 5 deletions MARKETPLACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ NexQL connects to **any PostgreSQL-wire-compatible database**:
- ✅ **YugabyteDB** (YSQL) — distributed Postgres, port 5433
- ✅ **AWS RDS / Aurora**, **Google Cloud SQL / AlloyDB**, **Azure Database for PostgreSQL**

See the [compatibility guide](https://github.com/dev-asterix/PgStudio/blob/main/docs/COMPATIBILITY.md) for per-platform connection settings and caveats.
See the [compatibility guide](https://github.com/dev-asterix/NexQL/blob/main/docs/COMPATIBILITY.md) for per-platform connection settings and caveats.

---

Expand Down Expand Up @@ -284,15 +284,15 @@ code --install-extension ric-v.postgres-explorer
## 📚 Resources

- 📖 [Full Documentation](https://nexql.astrx.dev/)
- 🐛 [Report Issues](https://github.com/dev-asterix/PgStudio/issues)
- 💡 [Request Features](https://github.com/dev-asterix/PgStudio/issues/new?template=feature_request.md)
- ⭐ [Star on GitHub](https://github.com/dev-asterix/PgStudio)
- 🐛 [Report Issues](https://github.com/dev-asterix/NexQL/issues)
- 💡 [Request Features](https://github.com/dev-asterix/NexQL/issues/new?template=feature_request.md)
- ⭐ [Star on GitHub](https://github.com/dev-asterix/NexQL)

---

## 📝 License

This extension is licensed under the [MIT License](https://github.com/dev-asterix/PgStudio/blob/main/LICENSE).
This extension is licensed under the [MIT License](https://github.com/dev-asterix/NexQL/blob/main/LICENSE).

---

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Version](https://img.shields.io/visual-studio-marketplace/v/ric-v.postgres-explorer?style=for-the-badge&logo=visual-studio-code&logoColor=white&color=0066CC)](https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer)
[![Downloads](https://img.shields.io/visual-studio-marketplace/d/ric-v.postgres-explorer?style=for-the-badge&logo=visual-studio-code&logoColor=white&color=2ECC71)](https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer)
[![Rating](https://img.shields.io/visual-studio-marketplace/r/ric-v.postgres-explorer?style=for-the-badge&logo=visual-studio-code&logoColor=white&color=F39C12)](https://marketplace.visualstudio.com/items?itemName=ric-v.postgres-explorer)
[![Status](https://img.shields.io/badge/status-stable%20v2.0.0%20%2B%20nightly-blue?style=for-the-badge&logo=git&logoColor=white)](https://github.com/dev-asterix/PgStudio/releases)
[![Status](https://img.shields.io/badge/status-stable%20v2.0.0%20%2B%20nightly-blue?style=for-the-badge&logo=git&logoColor=white)](https://github.com/dev-asterix/NexQL/releases)

**NexQL** (formerly YAPE) is a comprehensive PostgreSQL database management extension featuring interactive SQL notebooks, real-time monitoring dashboard, AI-powered assistance, and advanced database operations—all within VS Code.

Expand Down Expand Up @@ -360,7 +360,7 @@ Turn any query result into beautiful, interactive charts in seconds.

```bash
# Clone the repository
git clone https://github.com/dev-asterix/PgStudio.git
git clone https://github.com/dev-asterix/NexQL.git
cd NexQL

# Install dependencies
Expand Down Expand Up @@ -472,8 +472,8 @@ NexQL includes comprehensive testing infrastructure:

## 🤝 Contributing

- 🐛 [Report Bugs](https://github.com/dev-asterix/PgStudio/issues/new?template=bug_report.md)
- 💡 [Request Features](https://github.com/dev-asterix/PgStudio/issues/new?template=feature_request.md)
- 🐛 [Report Bugs](https://github.com/dev-asterix/NexQL/issues/new?template=bug_report.md)
- 💡 [Request Features](https://github.com/dev-asterix/NexQL/issues/new?template=feature_request.md)
- 🔧 Fork → Branch → PR
- 🧪 Ensure all tests pass: `npm run test:all && npm run coverage`

Expand Down
8 changes: 4 additions & 4 deletions api/_lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const https = require('https');

const FROM = process.env.LICENSE_EMAIL_FROM || 'PgStudio <licenses@pgstudio.dev>';
const FROM = process.env.LICENSE_EMAIL_FROM || 'NexQL <licenses@nexql.astrx.dev>';

function activateUri(licenseKey) {
return `vscode://ric-v.postgres-explorer/activate?key=${encodeURIComponent(licenseKey)}`;
Expand All @@ -14,13 +14,13 @@ function buildHtml(licenseKey, tier) {
const tierName = tier ? tier[0].toUpperCase() + tier.slice(1) : 'Pro';
return `
<div style="font-family:Inter,Arial,sans-serif;max-width:520px;margin:auto">
<h2>Welcome to PgStudio ${tierName} 🎉</h2>
<h2>Welcome to NexQL ${tierName} 🎉</h2>
<p>Your license key:</p>
<p style="font-size:18px;font-weight:700;letter-spacing:1px;background:#f4f4f8;padding:12px 16px;border-radius:8px">${licenseKey}</p>
<p><a href="${activateUri(licenseKey)}"
style="display:inline-block;background:#6C4CF0;color:#fff;text-decoration:none;padding:12px 20px;border-radius:8px;font-weight:600">
Activate in VS Code</a></p>
<p style="color:#666;font-size:13px">Or run <b>PgStudio: Activate License</b> from the command palette and paste the key above.</p>
<p style="color:#666;font-size:13px">Or run <b>NexQL: Activate License</b> from the command palette and paste the key above.</p>
</div>`;
}

Expand All @@ -35,7 +35,7 @@ function sendLicenseEmail(to, licenseKey, tier) {
const payload = JSON.stringify({
from: FROM,
to: [to],
subject: 'Your PgStudio license key',
subject: 'Your NexQL license key',
html: buildHtml(licenseKey, tier),
});

Expand Down
58 changes: 29 additions & 29 deletions api/_lib/license-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ async function ensureSchema() {
if (!schemaReady) {
schemaReady = (async () => {
const db = getSql();
await db`CREATE SCHEMA IF NOT EXISTS pgstudio_license`;
await db`CREATE SCHEMA IF NOT EXISTS nexql_license`;
await db`
CREATE TABLE IF NOT EXISTS pgstudio_license.licenses (
CREATE TABLE IF NOT EXISTS nexql_license.licenses (
license_key TEXT PRIMARY KEY,
tier TEXT NOT NULL CHECK (tier IN ('sponsor','singularity')),
period TEXT NOT NULL DEFAULT 'monthly',
Expand All @@ -93,11 +93,11 @@ async function ensureSchema() {
`;
await db`
CREATE INDEX IF NOT EXISTS licenses_email_idx
ON pgstudio_license.licenses (lower(email))
ON nexql_license.licenses (lower(email))
`;
await db`
CREATE TABLE IF NOT EXISTS pgstudio_license.devices (
license_key TEXT NOT NULL REFERENCES pgstudio_license.licenses(license_key),
CREATE TABLE IF NOT EXISTS nexql_license.devices (
license_key TEXT NOT NULL REFERENCES nexql_license.licenses(license_key),
instance_id TEXT NOT NULL,
device_name TEXT,
first_seen TIMESTAMPTZ NOT NULL DEFAULT now(),
Expand All @@ -107,7 +107,7 @@ async function ensureSchema() {
)
`;
await db`
CREATE TABLE IF NOT EXISTS pgstudio_license.license_events (
CREATE TABLE IF NOT EXISTS nexql_license.license_events (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
license_key TEXT NOT NULL,
event_type TEXT NOT NULL,
Expand All @@ -118,10 +118,10 @@ async function ensureSchema() {
`;
await db`
CREATE INDEX IF NOT EXISTS license_events_key_created_idx
ON pgstudio_license.license_events (license_key, created_at DESC)
ON nexql_license.license_events (license_key, created_at DESC)
`;
await db`
CREATE TABLE IF NOT EXISTS pgstudio_license.webhook_events (
CREATE TABLE IF NOT EXISTS nexql_license.webhook_events (
razorpay_event_id TEXT PRIMARY KEY,
received_at TIMESTAMPTZ NOT NULL DEFAULT now()
)
Expand All @@ -137,7 +137,7 @@ async function fetchLicenseRow(licenseKey) {
const key = normalizeKey(licenseKey);
const rows = await db`
SELECT *
FROM pgstudio_license.licenses
FROM nexql_license.licenses
WHERE license_key = ${key}
LIMIT 1
`;
Expand All @@ -150,7 +150,7 @@ async function fetchDeviceRows(licenseKey) {
const key = normalizeKey(licenseKey);
return db`
SELECT instance_id, device_name, first_seen, last_seen, revoked_at
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${key}
ORDER BY last_seen DESC
`;
Expand All @@ -169,7 +169,7 @@ async function getLicenseBySubscription(subscriptionId) {
const db = getSql();
const rows = await db`
SELECT license_key
FROM pgstudio_license.licenses
FROM nexql_license.licenses
WHERE subscription_id = ${subscriptionId}
LIMIT 1
`;
Expand All @@ -184,7 +184,7 @@ async function getLicenseByEmail(email) {
const db = getSql();
const rows = await db`
SELECT license_key
FROM pgstudio_license.licenses
FROM nexql_license.licenses
WHERE lower(email) = ${norm}
ORDER BY updated_at DESC
LIMIT 1
Expand All @@ -197,7 +197,7 @@ async function appendEvent(licenseKey, eventType, detail, source) {
await ensureSchema();
const db = getSql();
await db`
INSERT INTO pgstudio_license.license_events (license_key, event_type, detail, source)
INSERT INTO nexql_license.license_events (license_key, event_type, detail, source)
VALUES (
${normalizeKey(licenseKey)},
${eventType},
Expand All @@ -212,7 +212,7 @@ async function countRenewals(licenseKey) {
const db = getSql();
const rows = await db`
SELECT COUNT(*)::int AS n
FROM pgstudio_license.license_events
FROM nexql_license.license_events
WHERE license_key = ${normalizeKey(licenseKey)}
AND event_type IN ('renewed', 'expiry_extended')
`;
Expand All @@ -224,7 +224,7 @@ async function getRecentEvents(licenseKey, limit = 50) {
const db = getSql();
const rows = await db`
SELECT event_type, detail, source, created_at
FROM pgstudio_license.license_events
FROM nexql_license.license_events
WHERE license_key = ${normalizeKey(licenseKey)}
ORDER BY created_at DESC
LIMIT ${limit}
Expand All @@ -242,7 +242,7 @@ async function recordWebhookEvent(razorpayEventId) {
await ensureSchema();
const db = getSql();
const rows = await db`
INSERT INTO pgstudio_license.webhook_events (razorpay_event_id)
INSERT INTO nexql_license.webhook_events (razorpay_event_id)
VALUES (${razorpayEventId})
ON CONFLICT (razorpay_event_id) DO NOTHING
RETURNING razorpay_event_id
Expand All @@ -258,7 +258,7 @@ async function syncDevicesFromEntitlement(licenseKey, instanceIds) {
const db = getSql();
for (const instanceId of ids) {
await db`
INSERT INTO pgstudio_license.devices (license_key, instance_id, last_seen, revoked_at)
INSERT INTO nexql_license.devices (license_key, instance_id, last_seen, revoked_at)
VALUES (${key}, ${instanceId}, now(), NULL)
ON CONFLICT (license_key, instance_id) DO UPDATE SET
last_seen = now(),
Expand All @@ -283,7 +283,7 @@ async function upsertLicense(entitlement, meta = {}) {
const createdAt = msToIso(ent.createdAt) || (existing && existing.created_at) || new Date().toISOString();

await db`
INSERT INTO pgstudio_license.licenses (
INSERT INTO nexql_license.licenses (
license_key, tier, period, currency, status, subscription_id, email,
expires_at, created_at, updated_at
)
Expand All @@ -304,8 +304,8 @@ async function upsertLicense(entitlement, meta = {}) {
period = EXCLUDED.period,
currency = EXCLUDED.currency,
status = EXCLUDED.status,
subscription_id = COALESCE(EXCLUDED.subscription_id, pgstudio_license.licenses.subscription_id),
email = COALESCE(EXCLUDED.email, pgstudio_license.licenses.email),
subscription_id = COALESCE(EXCLUDED.subscription_id, nexql_license.licenses.subscription_id),
email = COALESCE(EXCLUDED.email, nexql_license.licenses.email),
expires_at = EXCLUDED.expires_at,
updated_at = now()
`;
Expand Down Expand Up @@ -359,7 +359,7 @@ async function countActiveDevices(licenseKey) {
const db = getSql();
const rows = await db`
SELECT COUNT(*)::int AS n
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${normalizeKey(licenseKey)}
AND revoked_at IS NULL
`;
Expand All @@ -371,7 +371,7 @@ async function isDeviceActive(licenseKey, instanceId) {
const db = getSql();
const rows = await db`
SELECT 1
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${normalizeKey(licenseKey)}
AND instance_id = ${instanceId}
AND revoked_at IS NULL
Expand All @@ -388,7 +388,7 @@ async function bindDevice(licenseKey, instanceId, meta = {}) {
const db = getSql();
const existing = await db`
SELECT instance_id, revoked_at, last_seen
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${key} AND instance_id = ${instanceId}
LIMIT 1
`;
Expand All @@ -397,14 +397,14 @@ async function bindDevice(licenseKey, instanceId, meta = {}) {
const isNew = existing.length === 0;

await db`
INSERT INTO pgstudio_license.devices (license_key, instance_id, device_name, last_seen, revoked_at)
INSERT INTO nexql_license.devices (license_key, instance_id, device_name, last_seen, revoked_at)
VALUES (${key}, ${instanceId}, ${meta.deviceName || null}, now(), NULL)
ON CONFLICT (license_key, instance_id) DO UPDATE SET
last_seen = now(),
revoked_at = NULL,
device_name = CASE
WHEN EXCLUDED.device_name IS NOT NULL THEN EXCLUDED.device_name
ELSE pgstudio_license.devices.device_name
ELSE nexql_license.devices.device_name
END
`;

Expand All @@ -428,7 +428,7 @@ async function removeDevice(licenseKey, instanceId, meta = {}) {
await ensureSchema();
const db = getSql();
const rows = await db`
UPDATE pgstudio_license.devices
UPDATE nexql_license.devices
SET revoked_at = now()
WHERE license_key = ${key}
AND instance_id = ${instanceId}
Expand All @@ -447,7 +447,7 @@ async function listActiveDevicesOldestFirst(licenseKey) {
const db = getSql();
const rows = await db`
SELECT instance_id, device_name, first_seen, last_seen
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${normalizeKey(licenseKey)}
AND revoked_at IS NULL
ORDER BY last_seen ASC NULLS FIRST, first_seen ASC
Expand Down Expand Up @@ -489,7 +489,7 @@ async function listActiveDevices(licenseKey) {
const db = getSql();
const rows = await db`
SELECT instance_id, device_name, first_seen, last_seen
FROM pgstudio_license.devices
FROM nexql_license.devices
WHERE license_key = ${normalizeKey(licenseKey)}
AND revoked_at IS NULL
ORDER BY last_seen DESC
Expand All @@ -506,7 +506,7 @@ async function expirePastDueLicenses() {
await ensureSchema();
const db = getSql();
const rows = await db`
UPDATE pgstudio_license.licenses
UPDATE nexql_license.licenses
SET status = 'expired', updated_at = now()
WHERE status = 'active'
AND expires_at IS NOT NULL
Expand Down
2 changes: 1 addition & 1 deletion api/_lib/store.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Entitlement store abstraction.
//
// Primary store: Neon Postgres (pgstudio_license schema) when DATABASE_URL is set.
// Primary store: Neon Postgres (nexql_license schema) when DATABASE_URL is set.
// Legacy dual-write: Vercel KV (Upstash Redis) when KV_REST_API_URL is present.
// Dev fallback: local JSON file (.kv-dev.json at repo root) when neither is configured.
//
Expand Down
Loading
Loading