@yawlabs/postgres-mcp 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -35439,8 +35439,10 @@ var adminTools = [
35439
35439
  }),
35440
35440
  handler: async (input) => {
35441
35441
  const { includeSystem } = input;
35442
- const filter = includeSystem ? "" : "WHERE r.rolname NOT LIKE 'pg\\_%' ESCAPE '\\\\'";
35442
+ const filter = includeSystem ? "" : "WHERE NOT starts_with(r.rolname, 'pg_')";
35443
35443
  return runInternal(
35444
+ // Cast member_of to text[] so node-pg parses it into a JS array.
35445
+ // Without the cast, it comes back as the postgres text form `{a,b}`.
35444
35446
  `SELECT
35445
35447
  r.rolname AS name,
35446
35448
  r.rolcanlogin AS can_login,
@@ -35450,11 +35452,11 @@ var adminTools = [
35450
35452
  r.rolreplication AS replication,
35451
35453
  r.rolbypassrls AS bypass_rls,
35452
35454
  COALESCE(
35453
- (SELECT array_agg(g.rolname ORDER BY g.rolname)
35455
+ (SELECT array_agg(g.rolname::text ORDER BY g.rolname)
35454
35456
  FROM pg_catalog.pg_auth_members m
35455
35457
  JOIN pg_catalog.pg_roles g ON g.oid = m.roleid
35456
35458
  WHERE m.member = r.oid),
35457
- ARRAY[]::name[]
35459
+ ARRAY[]::text[]
35458
35460
  ) AS member_of
35459
35461
  FROM pg_catalog.pg_roles r
35460
35462
  ${filter}
@@ -35902,10 +35904,10 @@ var schemaTools = [
35902
35904
  const foreignKeysQuery = `
35903
35905
  SELECT
35904
35906
  con.conname AS constraint_name,
35905
- array_agg(att.attname ORDER BY u.attposition) AS columns,
35907
+ array_agg(att.attname::text ORDER BY u.attposition) AS columns,
35906
35908
  cl.relname AS foreign_table,
35907
35909
  fn.nspname AS foreign_schema,
35908
- array_agg(fatt.attname ORDER BY u.attposition) AS foreign_columns
35910
+ array_agg(fatt.attname::text ORDER BY u.attposition) AS foreign_columns
35909
35911
  FROM pg_catalog.pg_constraint con
35910
35912
  JOIN pg_catalog.pg_class c ON c.oid = con.conrelid
35911
35913
  JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
@@ -36258,7 +36260,7 @@ function compareVersions(a, b) {
36258
36260
  }
36259
36261
 
36260
36262
  // src/index.ts
36261
- var version2 = true ? "0.3.0" : (await null).createRequire(import.meta.url)("../package.json").version;
36263
+ var version2 = true ? "0.3.1" : (await null).createRequire(import.meta.url)("../package.json").version;
36262
36264
  var subcommand = process.argv[2];
36263
36265
  if (subcommand === "version" || subcommand === "--version") {
36264
36266
  console.log(version2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/postgres-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "PostgreSQL MCP server — query, schema introspection, explain, and health checks for AI assistants",
5
5
  "license": "MIT",
6
6
  "author": "YawLabs <contact@yaw.sh>",
@@ -31,9 +31,9 @@
31
31
  "build": "tsc && node build.mjs",
32
32
  "dev": "tsc --watch",
33
33
  "start": "node dist/index.js",
34
- "test": "npm run build && node --test dist/**/*.test.js",
34
+ "test": "npm run build && node scripts/run-tests.mjs dist",
35
35
  "test:ci": "npm run test",
36
- "test:integration": "npm run build && node --test dist/**/*.integration.test.js",
36
+ "test:integration": "npm run build && node scripts/run-tests.mjs dist --integration",
37
37
  "lint": "biome check src/",
38
38
  "lint:fix": "biome check --write src/",
39
39
  "prepublishOnly": "npm run build"