pgpm 4.40.6 → 4.41.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/export.js +13 -2
- package/esm/commands/export.js +13 -2
- package/package.json +3 -3
package/commands/export.js
CHANGED
|
@@ -23,10 +23,13 @@ Options:
|
|
|
23
23
|
--author <name> Project author (default: from git config)
|
|
24
24
|
--extensionName <name> Extension name
|
|
25
25
|
--metaExtensionName <name> Meta extension name (default: svc)
|
|
26
|
+
--exclude-categories <list> Comma-separated sql_actions categories to omit
|
|
27
|
+
(e.g. security,permissions,auth,memberships). Works in SQL and GraphQL modes.
|
|
26
28
|
--cwd <directory> Working directory (default: current directory)
|
|
27
29
|
|
|
28
30
|
Examples:
|
|
29
31
|
pgpm export Export migrations from selected database (SQL mode)
|
|
32
|
+
pgpm export --exclude-categories security,permissions,auth,memberships
|
|
30
33
|
pgpm export --graphql-endpoint 'http://[::1]:3002/graphql' --migrate-endpoint 'http://[::1]:3000/graphql' --migrate-host db_migrate.localhost:3000
|
|
31
34
|
`;
|
|
32
35
|
exports.default = async (argv, prompter, _options) => {
|
|
@@ -45,6 +48,12 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
45
48
|
const migrateHost = argv['migrate-host'] || argv.migrateHost;
|
|
46
49
|
const migrateHeadersRaw = argv['migrate-headers'] || argv.migrateHeaders;
|
|
47
50
|
const token = argv.token;
|
|
51
|
+
const excludeCategoriesRaw = argv['exclude-categories'] || argv.excludeCategories;
|
|
52
|
+
const excludeCategories = typeof excludeCategoriesRaw === 'string'
|
|
53
|
+
? excludeCategoriesRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
|
54
|
+
: Array.isArray(excludeCategoriesRaw)
|
|
55
|
+
? excludeCategoriesRaw
|
|
56
|
+
: undefined;
|
|
48
57
|
if (graphqlEndpoint) {
|
|
49
58
|
// =========================================================================
|
|
50
59
|
// GraphQL export mode
|
|
@@ -140,7 +149,8 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
140
149
|
metaExtensionName,
|
|
141
150
|
prompter,
|
|
142
151
|
argv,
|
|
143
|
-
username
|
|
152
|
+
username,
|
|
153
|
+
excludeCategories
|
|
144
154
|
});
|
|
145
155
|
}
|
|
146
156
|
else {
|
|
@@ -259,7 +269,8 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
259
269
|
metaExtensionName,
|
|
260
270
|
prompter,
|
|
261
271
|
argv,
|
|
262
|
-
username
|
|
272
|
+
username,
|
|
273
|
+
excludeCategories
|
|
263
274
|
});
|
|
264
275
|
}
|
|
265
276
|
prompter.close();
|
package/esm/commands/export.js
CHANGED
|
@@ -21,10 +21,13 @@ Options:
|
|
|
21
21
|
--author <name> Project author (default: from git config)
|
|
22
22
|
--extensionName <name> Extension name
|
|
23
23
|
--metaExtensionName <name> Meta extension name (default: svc)
|
|
24
|
+
--exclude-categories <list> Comma-separated sql_actions categories to omit
|
|
25
|
+
(e.g. security,permissions,auth,memberships). Works in SQL and GraphQL modes.
|
|
24
26
|
--cwd <directory> Working directory (default: current directory)
|
|
25
27
|
|
|
26
28
|
Examples:
|
|
27
29
|
pgpm export Export migrations from selected database (SQL mode)
|
|
30
|
+
pgpm export --exclude-categories security,permissions,auth,memberships
|
|
28
31
|
pgpm export --graphql-endpoint 'http://[::1]:3002/graphql' --migrate-endpoint 'http://[::1]:3000/graphql' --migrate-host db_migrate.localhost:3000
|
|
29
32
|
`;
|
|
30
33
|
export default async (argv, prompter, _options) => {
|
|
@@ -43,6 +46,12 @@ export default async (argv, prompter, _options) => {
|
|
|
43
46
|
const migrateHost = argv['migrate-host'] || argv.migrateHost;
|
|
44
47
|
const migrateHeadersRaw = argv['migrate-headers'] || argv.migrateHeaders;
|
|
45
48
|
const token = argv.token;
|
|
49
|
+
const excludeCategoriesRaw = argv['exclude-categories'] || argv.excludeCategories;
|
|
50
|
+
const excludeCategories = typeof excludeCategoriesRaw === 'string'
|
|
51
|
+
? excludeCategoriesRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
|
52
|
+
: Array.isArray(excludeCategoriesRaw)
|
|
53
|
+
? excludeCategoriesRaw
|
|
54
|
+
: undefined;
|
|
46
55
|
if (graphqlEndpoint) {
|
|
47
56
|
// =========================================================================
|
|
48
57
|
// GraphQL export mode
|
|
@@ -138,7 +147,8 @@ export default async (argv, prompter, _options) => {
|
|
|
138
147
|
metaExtensionName,
|
|
139
148
|
prompter,
|
|
140
149
|
argv,
|
|
141
|
-
username
|
|
150
|
+
username,
|
|
151
|
+
excludeCategories
|
|
142
152
|
});
|
|
143
153
|
}
|
|
144
154
|
else {
|
|
@@ -257,7 +267,8 @@ export default async (argv, prompter, _options) => {
|
|
|
257
267
|
metaExtensionName,
|
|
258
268
|
prompter,
|
|
259
269
|
argv,
|
|
260
|
-
username
|
|
270
|
+
username,
|
|
271
|
+
excludeCategories
|
|
261
272
|
});
|
|
262
273
|
}
|
|
263
274
|
prompter.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgpm",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.41.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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@inquirerer/utils": "^3.3.9",
|
|
49
49
|
"@pgpmjs/core": "^6.34.0",
|
|
50
50
|
"@pgpmjs/env": "^2.28.2",
|
|
51
|
-
"@pgpmjs/export": "^0.
|
|
51
|
+
"@pgpmjs/export": "^0.33.0",
|
|
52
52
|
"@pgpmjs/logger": "^2.14.0",
|
|
53
53
|
"@pgpmjs/types": "^2.35.1",
|
|
54
54
|
"@pgsql/quotes": "^17.1.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"pg",
|
|
77
77
|
"pgsql"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "72f5ac47febe3af0edb689c51a021d57644cc2fa"
|
|
80
80
|
}
|