pgpm 5.13.0 → 5.14.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/deploy.js +15 -2
- package/commands/package.js +12 -2
- package/esm/commands/deploy.js +15 -2
- package/esm/commands/package.js +12 -2
- package/package.json +8 -8
package/commands/deploy.js
CHANGED
|
@@ -21,7 +21,10 @@ Options:
|
|
|
21
21
|
--package <name> Target specific package
|
|
22
22
|
--to <target> Deploy to specific change or tag
|
|
23
23
|
--tx Use transactions (default: true)
|
|
24
|
-
--fast
|
|
24
|
+
--fast Fast strategy: one-shot SQL + bulk migration ledger,
|
|
25
|
+
reading each module's verified sql/*.bundle.tar.gz artifact
|
|
26
|
+
when present and building it from deploy/ when not
|
|
27
|
+
--bundled Alias for --fast
|
|
25
28
|
--logOnly Log-only mode, skip script execution
|
|
26
29
|
--usePlan Use deployment plan
|
|
27
30
|
--cache Enable caching
|
|
@@ -32,6 +35,7 @@ Examples:
|
|
|
32
35
|
pgpm deploy --createdb Deploy with database creation
|
|
33
36
|
pgpm deploy --package mypackage --to @v1.0.0 Deploy specific package to tag
|
|
34
37
|
pgpm deploy --fast --no-tx Fast deployment without transactions
|
|
38
|
+
pgpm deploy --bundled Same as --fast
|
|
35
39
|
`;
|
|
36
40
|
exports.default = async (argv, prompter, _options) => {
|
|
37
41
|
// Show usage if explicitly requested
|
|
@@ -90,6 +94,14 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
90
94
|
default: false,
|
|
91
95
|
required: false
|
|
92
96
|
},
|
|
97
|
+
{
|
|
98
|
+
name: 'bundled',
|
|
99
|
+
type: 'confirm',
|
|
100
|
+
message: 'Prefer prebuilt bundle artifacts (alias of fast)?',
|
|
101
|
+
useDefault: true,
|
|
102
|
+
default: false,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
93
105
|
{
|
|
94
106
|
name: 'logOnly',
|
|
95
107
|
type: 'confirm',
|
|
@@ -99,7 +111,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
99
111
|
required: false
|
|
100
112
|
}
|
|
101
113
|
];
|
|
102
|
-
let { yes, recursive, createdb, cwd, tx, fast, logOnly } = await prompter.prompt(argv, questions);
|
|
114
|
+
let { yes, recursive, createdb, cwd, tx, fast, bundled, logOnly } = await prompter.prompt(argv, questions);
|
|
103
115
|
if (!yes) {
|
|
104
116
|
log.info('Operation cancelled.');
|
|
105
117
|
return;
|
|
@@ -120,6 +132,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
120
132
|
deployment: {
|
|
121
133
|
useTx: tx !== false,
|
|
122
134
|
fast: fast !== false,
|
|
135
|
+
bundled: bundled === true,
|
|
123
136
|
usePlan: argv.usePlan !== false,
|
|
124
137
|
cache: argv.cache !== false,
|
|
125
138
|
logOnly: argv.logOnly !== false,
|
package/commands/package.js
CHANGED
|
@@ -14,12 +14,14 @@ Options:
|
|
|
14
14
|
--pretty Pretty-print output (default: true)
|
|
15
15
|
--functionDelimiter <delimiter> Function delimiter (default: $EOFCODE$)
|
|
16
16
|
--outputDiff Export AST diff files when round-trip mismatch detected (default: false)
|
|
17
|
+
--bundle Also emit sql/<name>--<version>.bundle.tar.gz (default: true)
|
|
17
18
|
--cwd <directory> Working directory (default: current directory)
|
|
18
19
|
|
|
19
20
|
Examples:
|
|
20
21
|
pgpm package Package with defaults
|
|
21
22
|
pgpm package --no-plan Package without plan
|
|
22
23
|
pgpm package --outputDiff Package and export AST diff files if mismatch detected
|
|
24
|
+
pgpm package --no-bundle Package without emitting the bundle artifact
|
|
23
25
|
`;
|
|
24
26
|
exports.default = async (argv, prompter, _options) => {
|
|
25
27
|
// Show usage if explicitly requested
|
|
@@ -55,9 +57,16 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
55
57
|
default: false,
|
|
56
58
|
useDefault: true,
|
|
57
59
|
required: false
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'confirm',
|
|
63
|
+
name: 'bundle',
|
|
64
|
+
default: true,
|
|
65
|
+
useDefault: true,
|
|
66
|
+
required: false
|
|
58
67
|
}
|
|
59
68
|
];
|
|
60
|
-
let { cwd, plan, pretty, functionDelimiter, outputDiff } = await prompter.prompt(argv, questions);
|
|
69
|
+
let { cwd, plan, pretty, functionDelimiter, outputDiff, bundle } = await prompter.prompt(argv, questions);
|
|
61
70
|
const project = new core_1.PgpmPackage(cwd);
|
|
62
71
|
project.ensureModule();
|
|
63
72
|
const info = project.getModuleInfo();
|
|
@@ -69,7 +78,8 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
69
78
|
packageDir: project.modulePath,
|
|
70
79
|
pretty,
|
|
71
80
|
functionDelimiter,
|
|
72
|
-
outputDiff
|
|
81
|
+
outputDiff,
|
|
82
|
+
bundle: bundle !== false
|
|
73
83
|
});
|
|
74
84
|
return argv;
|
|
75
85
|
};
|
package/esm/commands/deploy.js
CHANGED
|
@@ -19,7 +19,10 @@ Options:
|
|
|
19
19
|
--package <name> Target specific package
|
|
20
20
|
--to <target> Deploy to specific change or tag
|
|
21
21
|
--tx Use transactions (default: true)
|
|
22
|
-
--fast
|
|
22
|
+
--fast Fast strategy: one-shot SQL + bulk migration ledger,
|
|
23
|
+
reading each module's verified sql/*.bundle.tar.gz artifact
|
|
24
|
+
when present and building it from deploy/ when not
|
|
25
|
+
--bundled Alias for --fast
|
|
23
26
|
--logOnly Log-only mode, skip script execution
|
|
24
27
|
--usePlan Use deployment plan
|
|
25
28
|
--cache Enable caching
|
|
@@ -30,6 +33,7 @@ Examples:
|
|
|
30
33
|
pgpm deploy --createdb Deploy with database creation
|
|
31
34
|
pgpm deploy --package mypackage --to @v1.0.0 Deploy specific package to tag
|
|
32
35
|
pgpm deploy --fast --no-tx Fast deployment without transactions
|
|
36
|
+
pgpm deploy --bundled Same as --fast
|
|
33
37
|
`;
|
|
34
38
|
export default async (argv, prompter, _options) => {
|
|
35
39
|
// Show usage if explicitly requested
|
|
@@ -88,6 +92,14 @@ export default async (argv, prompter, _options) => {
|
|
|
88
92
|
default: false,
|
|
89
93
|
required: false
|
|
90
94
|
},
|
|
95
|
+
{
|
|
96
|
+
name: 'bundled',
|
|
97
|
+
type: 'confirm',
|
|
98
|
+
message: 'Prefer prebuilt bundle artifacts (alias of fast)?',
|
|
99
|
+
useDefault: true,
|
|
100
|
+
default: false,
|
|
101
|
+
required: false
|
|
102
|
+
},
|
|
91
103
|
{
|
|
92
104
|
name: 'logOnly',
|
|
93
105
|
type: 'confirm',
|
|
@@ -97,7 +109,7 @@ export default async (argv, prompter, _options) => {
|
|
|
97
109
|
required: false
|
|
98
110
|
}
|
|
99
111
|
];
|
|
100
|
-
let { yes, recursive, createdb, cwd, tx, fast, logOnly } = await prompter.prompt(argv, questions);
|
|
112
|
+
let { yes, recursive, createdb, cwd, tx, fast, bundled, logOnly } = await prompter.prompt(argv, questions);
|
|
101
113
|
if (!yes) {
|
|
102
114
|
log.info('Operation cancelled.');
|
|
103
115
|
return;
|
|
@@ -118,6 +130,7 @@ export default async (argv, prompter, _options) => {
|
|
|
118
130
|
deployment: {
|
|
119
131
|
useTx: tx !== false,
|
|
120
132
|
fast: fast !== false,
|
|
133
|
+
bundled: bundled === true,
|
|
121
134
|
usePlan: argv.usePlan !== false,
|
|
122
135
|
cache: argv.cache !== false,
|
|
123
136
|
logOnly: argv.logOnly !== false,
|
package/esm/commands/package.js
CHANGED
|
@@ -12,12 +12,14 @@ Options:
|
|
|
12
12
|
--pretty Pretty-print output (default: true)
|
|
13
13
|
--functionDelimiter <delimiter> Function delimiter (default: $EOFCODE$)
|
|
14
14
|
--outputDiff Export AST diff files when round-trip mismatch detected (default: false)
|
|
15
|
+
--bundle Also emit sql/<name>--<version>.bundle.tar.gz (default: true)
|
|
15
16
|
--cwd <directory> Working directory (default: current directory)
|
|
16
17
|
|
|
17
18
|
Examples:
|
|
18
19
|
pgpm package Package with defaults
|
|
19
20
|
pgpm package --no-plan Package without plan
|
|
20
21
|
pgpm package --outputDiff Package and export AST diff files if mismatch detected
|
|
22
|
+
pgpm package --no-bundle Package without emitting the bundle artifact
|
|
21
23
|
`;
|
|
22
24
|
export default async (argv, prompter, _options) => {
|
|
23
25
|
// Show usage if explicitly requested
|
|
@@ -53,9 +55,16 @@ export default async (argv, prompter, _options) => {
|
|
|
53
55
|
default: false,
|
|
54
56
|
useDefault: true,
|
|
55
57
|
required: false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'confirm',
|
|
61
|
+
name: 'bundle',
|
|
62
|
+
default: true,
|
|
63
|
+
useDefault: true,
|
|
64
|
+
required: false
|
|
56
65
|
}
|
|
57
66
|
];
|
|
58
|
-
let { cwd, plan, pretty, functionDelimiter, outputDiff } = await prompter.prompt(argv, questions);
|
|
67
|
+
let { cwd, plan, pretty, functionDelimiter, outputDiff, bundle } = await prompter.prompt(argv, questions);
|
|
59
68
|
const project = new PgpmPackage(cwd);
|
|
60
69
|
project.ensureModule();
|
|
61
70
|
const info = project.getModuleInfo();
|
|
@@ -67,7 +76,8 @@ export default async (argv, prompter, _options) => {
|
|
|
67
76
|
packageDir: project.modulePath,
|
|
68
77
|
pretty,
|
|
69
78
|
functionDelimiter,
|
|
70
|
-
outputDiff
|
|
79
|
+
outputDiff,
|
|
80
|
+
bundle: bundle !== false
|
|
71
81
|
});
|
|
72
82
|
return argv;
|
|
73
83
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgpm",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.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",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@inquirerer/utils": "^3.3.9",
|
|
49
|
-
"@pgpmjs/core": "^7.
|
|
50
|
-
"@pgpmjs/env": "^2.
|
|
51
|
-
"@pgpmjs/export": "^1.12.
|
|
49
|
+
"@pgpmjs/core": "^7.15.0",
|
|
50
|
+
"@pgpmjs/env": "^2.38.0",
|
|
51
|
+
"@pgpmjs/export": "^1.12.2",
|
|
52
52
|
"@pgpmjs/logger": "^2.22.0",
|
|
53
|
-
"@pgpmjs/slice": "^0.10.
|
|
54
|
-
"@pgpmjs/types": "^2.
|
|
53
|
+
"@pgpmjs/slice": "^0.10.1",
|
|
54
|
+
"@pgpmjs/types": "^2.46.0",
|
|
55
55
|
"@pgsql/quotes": "^18.1.0",
|
|
56
56
|
"appstash": "^0.7.0",
|
|
57
57
|
"find-and-require-package-json": "^0.9.1",
|
|
58
58
|
"genomic": "^5.6.2",
|
|
59
59
|
"inquirerer": "^4.9.1",
|
|
60
60
|
"js-yaml": "^4.1.0",
|
|
61
|
-
"pg-cache": "^3.23.
|
|
61
|
+
"pg-cache": "^3.23.1",
|
|
62
62
|
"pg-env": "^1.26.0",
|
|
63
63
|
"pgsql-deparser": "^18.1.1",
|
|
64
64
|
"semver": "^7.8.1",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"pg",
|
|
78
78
|
"pgsql"
|
|
79
79
|
],
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "5ef8341033a8fbd85841b770e996e468dd15333b"
|
|
81
81
|
}
|