@pgpmjs/export 0.28.1 → 0.29.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.
- package/esm/export-utils.js +3 -2
- package/export-utils.js +3 -2
- package/package.json +9 -9
package/esm/export-utils.js
CHANGED
|
@@ -246,7 +246,8 @@ export const installMissingModules = async (moduleDir, missingModules) => {
|
|
|
246
246
|
export const makeReplacer = ({ schemas, name, schemaPrefix }) => {
|
|
247
247
|
const replacements = ['constructive-extension-name', name];
|
|
248
248
|
const prefix = schemaPrefix || name;
|
|
249
|
-
const
|
|
249
|
+
const sortedSchemas = [...schemas].sort((a, b) => b.schema_name.length - a.schema_name.length || a.schema_name.localeCompare(b.schema_name));
|
|
250
|
+
const schemaReplacers = sortedSchemas.map((schema) => [
|
|
250
251
|
schema.schema_name,
|
|
251
252
|
toSnakeCase(`${prefix}_${schema.name}`)
|
|
252
253
|
]);
|
|
@@ -273,7 +274,7 @@ export const preparePackage = async ({ project, author, outdir, name, descriptio
|
|
|
273
274
|
mkdirSync(pgpmDir, { recursive: true });
|
|
274
275
|
process.chdir(pgpmDir);
|
|
275
276
|
try {
|
|
276
|
-
const plan = glob(path.join(pgpmDir, 'pgpm.plan'));
|
|
277
|
+
const plan = glob(path.join(pgpmDir, 'pgpm.plan')).sort((a, b) => a.localeCompare(b));
|
|
277
278
|
if (!plan.length) {
|
|
278
279
|
const { fullName, email } = parseAuthor(author);
|
|
279
280
|
// Always run non-interactively — all answers are pre-filled
|
package/export-utils.js
CHANGED
|
@@ -258,7 +258,8 @@ exports.installMissingModules = installMissingModules;
|
|
|
258
258
|
const makeReplacer = ({ schemas, name, schemaPrefix }) => {
|
|
259
259
|
const replacements = ['constructive-extension-name', name];
|
|
260
260
|
const prefix = schemaPrefix || name;
|
|
261
|
-
const
|
|
261
|
+
const sortedSchemas = [...schemas].sort((a, b) => b.schema_name.length - a.schema_name.length || a.schema_name.localeCompare(b.schema_name));
|
|
262
|
+
const schemaReplacers = sortedSchemas.map((schema) => [
|
|
262
263
|
schema.schema_name,
|
|
263
264
|
(0, inflekt_1.toSnakeCase)(`${prefix}_${schema.name}`)
|
|
264
265
|
]);
|
|
@@ -286,7 +287,7 @@ const preparePackage = async ({ project, author, outdir, name, description, exte
|
|
|
286
287
|
(0, fs_1.mkdirSync)(pgpmDir, { recursive: true });
|
|
287
288
|
process.chdir(pgpmDir);
|
|
288
289
|
try {
|
|
289
|
-
const plan = (0, glob_1.sync)(path_1.default.join(pgpmDir, 'pgpm.plan'));
|
|
290
|
+
const plan = (0, glob_1.sync)(path_1.default.join(pgpmDir, 'pgpm.plan')).sort((a, b) => a.localeCompare(b));
|
|
290
291
|
if (!plan.length) {
|
|
291
292
|
const { fullName, email } = (0, core_1.parseAuthor)(author);
|
|
292
293
|
// Always run non-interactively — all answers are pre-filled
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/export",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PGPM export tools for SQL and GraphQL database migration extraction",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"@pgsql/types": "^17.6.2",
|
|
42
42
|
"@types/pg": "^8.20.0",
|
|
43
43
|
"makage": "^0.3.0",
|
|
44
|
-
"pgsql-test": "^4.
|
|
44
|
+
"pgsql-test": "^4.19.1"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@pgpmjs/core": "^6.
|
|
48
|
-
"@pgpmjs/migrate-client": "^0.
|
|
49
|
-
"@pgpmjs/types": "^2.
|
|
50
|
-
"csv-to-pg": "^3.
|
|
47
|
+
"@pgpmjs/core": "^6.29.1",
|
|
48
|
+
"@pgpmjs/migrate-client": "^0.20.1",
|
|
49
|
+
"@pgpmjs/types": "^2.34.0",
|
|
50
|
+
"csv-to-pg": "^3.21.0",
|
|
51
51
|
"glob": "^13.0.6",
|
|
52
52
|
"inflekt": "^0.7.1",
|
|
53
53
|
"inquirerer": "^4.9.1",
|
|
54
54
|
"pg": "^8.21.0",
|
|
55
|
-
"pg-cache": "^3.
|
|
56
|
-
"pg-env": "^1.
|
|
55
|
+
"pg-cache": "^3.15.0",
|
|
56
|
+
"pg-env": "^1.18.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6235bf0645f56d423fa464404ec1e3283c49e532"
|
|
59
59
|
}
|