@pgpmjs/core 6.6.3 → 6.6.5
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.
|
@@ -190,7 +190,11 @@ const exportMigrationsToDisk = async ({ project, options, database, databaseId,
|
|
|
190
190
|
: schemas.rows.filter((schema) => schema_names.includes(schema.schema_name));
|
|
191
191
|
const metaReplacer = makeReplacer({
|
|
192
192
|
schemas: metaSchemasForReplacement,
|
|
193
|
-
name: metaExtensionName
|
|
193
|
+
name: metaExtensionName,
|
|
194
|
+
// Use extensionName for schema prefix — the services metadata references
|
|
195
|
+
// schemas owned by the application package (e.g. agent_db_auth_public),
|
|
196
|
+
// not the services package (agent_db_services_auth_public)
|
|
197
|
+
schemaPrefix: name
|
|
194
198
|
});
|
|
195
199
|
// Create separate files for each table type
|
|
196
200
|
const metaPackage = [];
|
|
@@ -388,11 +392,12 @@ const preparePackage = async ({ project, author, outdir, name, description, exte
|
|
|
388
392
|
/**
|
|
389
393
|
* Generates a function for replacing schema names and extension names in strings.
|
|
390
394
|
*/
|
|
391
|
-
const makeReplacer = ({ schemas, name }) => {
|
|
395
|
+
const makeReplacer = ({ schemas, name, schemaPrefix }) => {
|
|
392
396
|
const replacements = ['constructive-extension-name', name];
|
|
397
|
+
const prefix = schemaPrefix || name;
|
|
393
398
|
const schemaReplacers = schemas.map((schema) => [
|
|
394
399
|
schema.schema_name,
|
|
395
|
-
toSnakeCase(`${
|
|
400
|
+
toSnakeCase(`${prefix}_${schema.name}`)
|
|
396
401
|
]);
|
|
397
402
|
const replace = [...schemaReplacers, replacements].map(([from, to]) => [new RegExp(from, 'g'), to]);
|
|
398
403
|
const replacer = (str, n = 0) => {
|
|
@@ -196,7 +196,11 @@ const exportMigrationsToDisk = async ({ project, options, database, databaseId,
|
|
|
196
196
|
: schemas.rows.filter((schema) => schema_names.includes(schema.schema_name));
|
|
197
197
|
const metaReplacer = makeReplacer({
|
|
198
198
|
schemas: metaSchemasForReplacement,
|
|
199
|
-
name: metaExtensionName
|
|
199
|
+
name: metaExtensionName,
|
|
200
|
+
// Use extensionName for schema prefix — the services metadata references
|
|
201
|
+
// schemas owned by the application package (e.g. agent_db_auth_public),
|
|
202
|
+
// not the services package (agent_db_services_auth_public)
|
|
203
|
+
schemaPrefix: name
|
|
200
204
|
});
|
|
201
205
|
// Create separate files for each table type
|
|
202
206
|
const metaPackage = [];
|
|
@@ -395,11 +399,12 @@ const preparePackage = async ({ project, author, outdir, name, description, exte
|
|
|
395
399
|
/**
|
|
396
400
|
* Generates a function for replacing schema names and extension names in strings.
|
|
397
401
|
*/
|
|
398
|
-
const makeReplacer = ({ schemas, name }) => {
|
|
402
|
+
const makeReplacer = ({ schemas, name, schemaPrefix }) => {
|
|
399
403
|
const replacements = ['constructive-extension-name', name];
|
|
404
|
+
const prefix = schemaPrefix || name;
|
|
400
405
|
const schemaReplacers = schemas.map((schema) => [
|
|
401
406
|
schema.schema_name,
|
|
402
|
-
(0, komoji_1.toSnakeCase)(`${
|
|
407
|
+
(0, komoji_1.toSnakeCase)(`${prefix}_${schema.name}`)
|
|
403
408
|
]);
|
|
404
409
|
const replace = [...schemaReplacers, replacements].map(([from, to]) => [new RegExp(from, 'g'), to]);
|
|
405
410
|
const replacer = (str, n = 0) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/core",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.5",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PGPM Package and Migration Tools",
|
|
6
6
|
"main": "index.js",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
"makage": "^0.1.12"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@pgpmjs/env": "^2.15.
|
|
52
|
-
"@pgpmjs/logger": "^2.4.
|
|
53
|
-
"@pgpmjs/server-utils": "^3.4.
|
|
54
|
-
"@pgpmjs/types": "^2.19.
|
|
55
|
-
"csv-to-pg": "^3.10.
|
|
51
|
+
"@pgpmjs/env": "^2.15.3",
|
|
52
|
+
"@pgpmjs/logger": "^2.4.3",
|
|
53
|
+
"@pgpmjs/server-utils": "^3.4.4",
|
|
54
|
+
"@pgpmjs/types": "^2.19.3",
|
|
55
|
+
"csv-to-pg": "^3.10.4",
|
|
56
56
|
"genomic": "^5.3.8",
|
|
57
57
|
"glob": "^13.0.6",
|
|
58
58
|
"komoji": "^0.8.1",
|
|
59
59
|
"minimatch": "^10.2.4",
|
|
60
60
|
"parse-package-name": "^1.0.0",
|
|
61
61
|
"pg": "^8.20.0",
|
|
62
|
-
"pg-cache": "^3.3.
|
|
63
|
-
"pg-env": "^1.7.
|
|
62
|
+
"pg-cache": "^3.3.4",
|
|
63
|
+
"pg-env": "^1.7.3",
|
|
64
64
|
"pgsql-deparser": "^17.18.1",
|
|
65
65
|
"pgsql-parser": "^17.9.13",
|
|
66
66
|
"yanse": "^0.2.1"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "9c322f47ca08b5b853fcb395fe2bfc224f8c4c27"
|
|
69
69
|
}
|