pgpm 4.3.0 → 4.4.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/commands/dump.js CHANGED
@@ -9,7 +9,7 @@ const pg_cache_1 = require("pg-cache");
9
9
  const child_process_1 = require("child_process");
10
10
  const fs_1 = __importDefault(require("fs"));
11
11
  const path_1 = __importDefault(require("path"));
12
- const quote_utils_1 = require("pgsql-deparser/utils/quote-utils");
12
+ const quotes_1 = require("@pgsql/quotes");
13
13
  const utils_1 = require("../utils");
14
14
  const log = new logger_1.Logger('dump');
15
15
  const dumpUsageText = `
@@ -95,14 +95,14 @@ async function buildPruneSql(dbname, databaseId) {
95
95
  const schema = String(row.table_schema);
96
96
  const table = String(row.table_name);
97
97
  // Use QuoteUtils for robust identifier quoting
98
- const qualified = quote_utils_1.QuoteUtils.quoteQualifiedIdentifier(schema, table);
98
+ const qualified = quotes_1.QuoteUtils.quoteQualifiedIdentifier(schema, table);
99
99
  // Use formatEString to safely escape the UUID/string literal
100
- const dbIdLiteral = quote_utils_1.QuoteUtils.formatEString(databaseId);
100
+ const dbIdLiteral = quotes_1.QuoteUtils.formatEString(databaseId);
101
101
  lines.push(`delete from ${qualified} where database_id <> ${dbIdLiteral};`);
102
102
  }
103
103
  // Handle metaschema_public.database deletion
104
- const metaschemaDb = quote_utils_1.QuoteUtils.quoteQualifiedIdentifier('metaschema_public', 'database');
105
- const dbIdLiteral = quote_utils_1.QuoteUtils.formatEString(databaseId);
104
+ const metaschemaDb = quotes_1.QuoteUtils.quoteQualifiedIdentifier('metaschema_public', 'database');
105
+ const dbIdLiteral = quotes_1.QuoteUtils.formatEString(databaseId);
106
106
  lines.push(`delete from ${metaschemaDb} where id <> ${dbIdLiteral};`);
107
107
  lines.push('set session_replication_role = origin;');
108
108
  lines.push('do $$ begin');
@@ -442,6 +442,7 @@ async function handleModuleInit(argv, prompter, ctx, wasExplicitModuleRequest =
442
442
  answers: templateAnswers,
443
443
  noTty: ctx.noTty,
444
444
  pgpm: isPgpmTemplate,
445
+ prompter,
445
446
  });
446
447
  const isRoot = path_1.default.resolve(project.workspacePath) === path_1.default.resolve(ctx.cwd);
447
448
  modulePath = isRoot
@@ -4,7 +4,7 @@ import { getPgPool } from 'pg-cache';
4
4
  import { spawn } from 'child_process';
5
5
  import fs from 'fs';
6
6
  import path from 'path';
7
- import { QuoteUtils } from 'pgsql-deparser/utils/quote-utils';
7
+ import { QuoteUtils } from '@pgsql/quotes';
8
8
  import { getTargetDatabase } from '../utils';
9
9
  const log = new Logger('dump');
10
10
  const dumpUsageText = `
@@ -435,6 +435,7 @@ async function handleModuleInit(argv, prompter, ctx, wasExplicitModuleRequest =
435
435
  answers: templateAnswers,
436
436
  noTty: ctx.noTty,
437
437
  pgpm: isPgpmTemplate,
438
+ prompter,
438
439
  });
439
440
  const isRoot = path.resolve(project.workspacePath) === path.resolve(ctx.cwd);
440
441
  modulePath = isRoot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgpm",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PostgreSQL Package Manager - Database migration and package management CLI",
6
6
  "main": "index.js",
@@ -33,7 +33,7 @@
33
33
  "test:watch": "jest --watch"
34
34
  },
35
35
  "devDependencies": {
36
- "@inquirerer/test": "^1.3.0",
36
+ "@inquirerer/test": "^1.3.3",
37
37
  "@types/js-yaml": "^4.0.9",
38
38
  "@types/node": "^20.12.7",
39
39
  "@types/pg": "^8.16.0",
@@ -45,15 +45,16 @@
45
45
  "ts-node": "^10.9.2"
46
46
  },
47
47
  "dependencies": {
48
- "@inquirerer/utils": "^3.3.0",
49
- "@pgpmjs/core": "^6.4.0",
48
+ "@inquirerer/utils": "^3.3.1",
49
+ "@pgpmjs/core": "^6.4.1",
50
50
  "@pgpmjs/env": "^2.13.0",
51
51
  "@pgpmjs/logger": "^2.2.0",
52
52
  "@pgpmjs/types": "^2.17.0",
53
+ "@pgsql/quotes": "^17.1.0",
53
54
  "appstash": "^0.3.0",
54
55
  "find-and-require-package-json": "^0.9.0",
55
- "genomic": "^5.3.0",
56
- "inquirerer": "^4.4.0",
56
+ "genomic": "^5.3.5",
57
+ "inquirerer": "^4.5.2",
57
58
  "js-yaml": "^4.1.0",
58
59
  "pg-cache": "^3.1.0",
59
60
  "pg-env": "^1.5.0",
@@ -74,5 +75,5 @@
74
75
  "pg",
75
76
  "pgsql"
76
77
  ],
77
- "gitHead": "1e0c774144be23a4c57a15ffe54ea0ec9fbd7c55"
78
+ "gitHead": "16e3a687cf1d629d1eff1a9146e71bec14796196"
78
79
  }