pgpm 5.14.0 → 5.15.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/commands/deploy.js +16 -4
- package/commands/revert.js +1 -0
- package/commands/verify.js +1 -0
- package/commands.js +48 -1
- package/esm/commands/deploy.js +17 -5
- package/esm/commands/revert.js +1 -0
- package/esm/commands/verify.js +1 -0
- package/esm/commands.js +49 -2
- package/esm/utils/display.js +5 -0
- package/esm/utils/driver.js +4 -3
- package/esm/utils/engine-gating.js +28 -0
- package/esm/utils/engine.js +91 -0
- package/esm/utils/index.js +2 -0
- package/package.json +8 -8
- package/utils/display.d.ts +1 -1
- package/utils/display.js +5 -0
- package/utils/driver.js +3 -2
- package/utils/engine-gating.d.ts +6 -0
- package/utils/engine-gating.js +32 -0
- package/utils/engine.d.ts +57 -0
- package/utils/engine.js +99 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +2 -0
package/commands/deploy.js
CHANGED
|
@@ -17,6 +17,10 @@ Deploy Command:
|
|
|
17
17
|
Options:
|
|
18
18
|
--help, -h Show this help message
|
|
19
19
|
--createdb Create database if it doesn't exist
|
|
20
|
+
--engine <name> Migration backend to deploy to (default: pg).
|
|
21
|
+
Built-in engines: pg (Postgres server), pglite (in-process WASM).
|
|
22
|
+
--driver <pkg> Driver plugin package to deploy through (escape hatch for --engine)
|
|
23
|
+
--pglite[=dataDir] Sugar for --engine pglite; persists to <dataDir> when given
|
|
20
24
|
--recursive Deploy recursively through dependencies
|
|
21
25
|
--package <name> Target specific package
|
|
22
26
|
--to <target> Deploy to specific change or tag
|
|
@@ -36,6 +40,8 @@ Examples:
|
|
|
36
40
|
pgpm deploy --package mypackage --to @v1.0.0 Deploy specific package to tag
|
|
37
41
|
pgpm deploy --fast --no-tx Fast deployment without transactions
|
|
38
42
|
pgpm deploy --bundled Same as --fast
|
|
43
|
+
pgpm deploy --engine pglite Deploy into in-process PGlite (no server)
|
|
44
|
+
pgpm deploy --pglite=./.pglite Deploy into a persisted PGlite data directory
|
|
39
45
|
`;
|
|
40
46
|
exports.default = async (argv, prompter, _options) => {
|
|
41
47
|
// Show usage if explicitly requested
|
|
@@ -117,11 +123,17 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
117
123
|
return;
|
|
118
124
|
}
|
|
119
125
|
log.debug(`Using current directory: ${cwd}`);
|
|
126
|
+
const { engine, capabilities } = (0, utils_1.getActiveEngine)();
|
|
120
127
|
if (createdb) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
if (capabilities.createdb) {
|
|
129
|
+
log.info(`Creating database ${database}...`);
|
|
130
|
+
(0, child_process_1.execSync)(`createdb ${database}`, {
|
|
131
|
+
env: (0, pg_env_1.getSpawnEnvWithPg)(pgEnv)
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
log.info(`Skipping createdb: the "${engine.name}" engine's instance is the database.`);
|
|
136
|
+
}
|
|
125
137
|
}
|
|
126
138
|
let packageName;
|
|
127
139
|
if (recursive) {
|
package/commands/revert.js
CHANGED
|
@@ -22,6 +22,7 @@ Options:
|
|
|
22
22
|
--to <target> Revert to specific change or tag
|
|
23
23
|
--to Interactive selection of deployed changes
|
|
24
24
|
--tx Use transactions (default: true)
|
|
25
|
+
--engine <name> Migration backend to revert in (default: pg; also pglite)
|
|
25
26
|
--cwd <directory> Working directory (default: current directory)
|
|
26
27
|
|
|
27
28
|
Examples:
|
package/commands/verify.js
CHANGED
|
@@ -21,6 +21,7 @@ Options:
|
|
|
21
21
|
--package <name> Verify specific package
|
|
22
22
|
--to <target> Verify up to specific change or tag
|
|
23
23
|
--to Interactive selection of deployed changes
|
|
24
|
+
--engine <name> Migration backend to verify against (default: pg; also pglite)
|
|
24
25
|
--cwd <directory> Working directory (default: current directory)
|
|
25
26
|
|
|
26
27
|
Examples:
|
package/commands.js
CHANGED
|
@@ -37,6 +37,33 @@ const update_1 = __importDefault(require("./commands/update"));
|
|
|
37
37
|
const upgrade_1 = __importDefault(require("./commands/upgrade"));
|
|
38
38
|
const verify_1 = __importDefault(require("./commands/verify"));
|
|
39
39
|
const utils_2 = require("./utils");
|
|
40
|
+
/**
|
|
41
|
+
* Commands that never open a connection, so they must not activate a driver —
|
|
42
|
+
* a workspace-wide `engine` must not make plan/scaffolding commands depend on
|
|
43
|
+
* the driver plugin being installed. `init` additionally owns its own `--pglite`
|
|
44
|
+
* meaning (scaffold from the PGlite boilerplates), and runs before the plugin
|
|
45
|
+
* it scaffolds exists.
|
|
46
|
+
*/
|
|
47
|
+
const ENGINE_EXEMPT_COMMANDS = new Set([
|
|
48
|
+
'add',
|
|
49
|
+
'analyze',
|
|
50
|
+
'cache',
|
|
51
|
+
'doctor',
|
|
52
|
+
'env',
|
|
53
|
+
'extension',
|
|
54
|
+
'init',
|
|
55
|
+
'install',
|
|
56
|
+
'package',
|
|
57
|
+
'plan',
|
|
58
|
+
'remove',
|
|
59
|
+
'rename',
|
|
60
|
+
'slice',
|
|
61
|
+
'sync-versions',
|
|
62
|
+
'tag',
|
|
63
|
+
'up',
|
|
64
|
+
'update',
|
|
65
|
+
'upgrade'
|
|
66
|
+
]);
|
|
40
67
|
const withPgTeardown = (fn, skipTeardown = false) => async (...args) => {
|
|
41
68
|
try {
|
|
42
69
|
await fn(...args);
|
|
@@ -144,7 +171,27 @@ const commands = async (argv, prompter, options) => {
|
|
|
144
171
|
console.log(utils_2.usageText);
|
|
145
172
|
await (0, inquirerer_1.cliExitWithError)(`Unknown command: ${command}`, { beforeExit: pg_cache_1.teardownPgPools });
|
|
146
173
|
}
|
|
147
|
-
|
|
174
|
+
// Activate the selected migration backend (`--engine`/`--driver`/`--pglite` or
|
|
175
|
+
// pgpm.json) before the command runs: the driver plugin registers its
|
|
176
|
+
// pool/client factories, so the unmodified engine targets it. The built-in
|
|
177
|
+
// `pg` engine activates nothing and behaves exactly as before.
|
|
178
|
+
const engineArgv = newArgv;
|
|
179
|
+
const { engine, capabilities } = ENGINE_EXEMPT_COMMANDS.has(command)
|
|
180
|
+
? (0, utils_2.getActiveEngine)()
|
|
181
|
+
: await (0, utils_2.activateEngine)(engineArgv, engineArgv.cwd).catch(async (error) => {
|
|
182
|
+
await (0, inquirerer_1.cliExitWithError)(error.message, { beforeExit: pg_cache_1.teardownPgPools });
|
|
183
|
+
throw error;
|
|
184
|
+
});
|
|
185
|
+
try {
|
|
186
|
+
const blocked = (0, utils_2.engineCommandBlocker)(command, engine, capabilities);
|
|
187
|
+
if (blocked) {
|
|
188
|
+
await (0, inquirerer_1.cliExitWithError)(blocked, { beforeExit: pg_cache_1.teardownPgPools });
|
|
189
|
+
}
|
|
190
|
+
await commandFn(newArgv, prompter, options);
|
|
191
|
+
}
|
|
192
|
+
finally {
|
|
193
|
+
await (0, utils_2.deactivateEngine)();
|
|
194
|
+
}
|
|
148
195
|
prompter.close();
|
|
149
196
|
return argv;
|
|
150
197
|
};
|
package/esm/commands/deploy.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getEnvOptions } from '@pgpmjs/env';
|
|
|
3
3
|
import { Logger } from '@pgpmjs/logger';
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
5
|
import { getPgEnvOptions, getSpawnEnvWithPg, } from 'pg-env';
|
|
6
|
-
import { getTargetDatabase, resolvePackageAlias } from '../utils';
|
|
6
|
+
import { getActiveEngine, getTargetDatabase, resolvePackageAlias } from '../utils';
|
|
7
7
|
import { selectPackage } from '../utils/module-utils';
|
|
8
8
|
const deployUsageText = `
|
|
9
9
|
Deploy Command:
|
|
@@ -15,6 +15,10 @@ Deploy Command:
|
|
|
15
15
|
Options:
|
|
16
16
|
--help, -h Show this help message
|
|
17
17
|
--createdb Create database if it doesn't exist
|
|
18
|
+
--engine <name> Migration backend to deploy to (default: pg).
|
|
19
|
+
Built-in engines: pg (Postgres server), pglite (in-process WASM).
|
|
20
|
+
--driver <pkg> Driver plugin package to deploy through (escape hatch for --engine)
|
|
21
|
+
--pglite[=dataDir] Sugar for --engine pglite; persists to <dataDir> when given
|
|
18
22
|
--recursive Deploy recursively through dependencies
|
|
19
23
|
--package <name> Target specific package
|
|
20
24
|
--to <target> Deploy to specific change or tag
|
|
@@ -34,6 +38,8 @@ Examples:
|
|
|
34
38
|
pgpm deploy --package mypackage --to @v1.0.0 Deploy specific package to tag
|
|
35
39
|
pgpm deploy --fast --no-tx Fast deployment without transactions
|
|
36
40
|
pgpm deploy --bundled Same as --fast
|
|
41
|
+
pgpm deploy --engine pglite Deploy into in-process PGlite (no server)
|
|
42
|
+
pgpm deploy --pglite=./.pglite Deploy into a persisted PGlite data directory
|
|
37
43
|
`;
|
|
38
44
|
export default async (argv, prompter, _options) => {
|
|
39
45
|
// Show usage if explicitly requested
|
|
@@ -115,11 +121,17 @@ export default async (argv, prompter, _options) => {
|
|
|
115
121
|
return;
|
|
116
122
|
}
|
|
117
123
|
log.debug(`Using current directory: ${cwd}`);
|
|
124
|
+
const { engine, capabilities } = getActiveEngine();
|
|
118
125
|
if (createdb) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
if (capabilities.createdb) {
|
|
127
|
+
log.info(`Creating database ${database}...`);
|
|
128
|
+
execSync(`createdb ${database}`, {
|
|
129
|
+
env: getSpawnEnvWithPg(pgEnv)
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
log.info(`Skipping createdb: the "${engine.name}" engine's instance is the database.`);
|
|
134
|
+
}
|
|
123
135
|
}
|
|
124
136
|
let packageName;
|
|
125
137
|
if (recursive) {
|
package/esm/commands/revert.js
CHANGED
|
@@ -20,6 +20,7 @@ Options:
|
|
|
20
20
|
--to <target> Revert to specific change or tag
|
|
21
21
|
--to Interactive selection of deployed changes
|
|
22
22
|
--tx Use transactions (default: true)
|
|
23
|
+
--engine <name> Migration backend to revert in (default: pg; also pglite)
|
|
23
24
|
--cwd <directory> Working directory (default: current directory)
|
|
24
25
|
|
|
25
26
|
Examples:
|
package/esm/commands/verify.js
CHANGED
|
@@ -19,6 +19,7 @@ Options:
|
|
|
19
19
|
--package <name> Verify specific package
|
|
20
20
|
--to <target> Verify up to specific change or tag
|
|
21
21
|
--to Interactive selection of deployed changes
|
|
22
|
+
--engine <name> Migration backend to verify against (default: pg; also pglite)
|
|
22
23
|
--cwd <directory> Working directory (default: current directory)
|
|
23
24
|
|
|
24
25
|
Examples:
|
package/esm/commands.js
CHANGED
|
@@ -30,7 +30,34 @@ import tune from './commands/tune';
|
|
|
30
30
|
import updateCmd from './commands/update';
|
|
31
31
|
import upgrade from './commands/upgrade';
|
|
32
32
|
import verify from './commands/verify';
|
|
33
|
-
import { usageText } from './utils';
|
|
33
|
+
import { activateEngine, deactivateEngine, engineCommandBlocker, getActiveEngine, usageText } from './utils';
|
|
34
|
+
/**
|
|
35
|
+
* Commands that never open a connection, so they must not activate a driver —
|
|
36
|
+
* a workspace-wide `engine` must not make plan/scaffolding commands depend on
|
|
37
|
+
* the driver plugin being installed. `init` additionally owns its own `--pglite`
|
|
38
|
+
* meaning (scaffold from the PGlite boilerplates), and runs before the plugin
|
|
39
|
+
* it scaffolds exists.
|
|
40
|
+
*/
|
|
41
|
+
const ENGINE_EXEMPT_COMMANDS = new Set([
|
|
42
|
+
'add',
|
|
43
|
+
'analyze',
|
|
44
|
+
'cache',
|
|
45
|
+
'doctor',
|
|
46
|
+
'env',
|
|
47
|
+
'extension',
|
|
48
|
+
'init',
|
|
49
|
+
'install',
|
|
50
|
+
'package',
|
|
51
|
+
'plan',
|
|
52
|
+
'remove',
|
|
53
|
+
'rename',
|
|
54
|
+
'slice',
|
|
55
|
+
'sync-versions',
|
|
56
|
+
'tag',
|
|
57
|
+
'up',
|
|
58
|
+
'update',
|
|
59
|
+
'upgrade'
|
|
60
|
+
]);
|
|
34
61
|
const withPgTeardown = (fn, skipTeardown = false) => async (...args) => {
|
|
35
62
|
try {
|
|
36
63
|
await fn(...args);
|
|
@@ -137,7 +164,27 @@ export const commands = async (argv, prompter, options) => {
|
|
|
137
164
|
console.log(usageText);
|
|
138
165
|
await cliExitWithError(`Unknown command: ${command}`, { beforeExit: teardownPgPools });
|
|
139
166
|
}
|
|
140
|
-
|
|
167
|
+
// Activate the selected migration backend (`--engine`/`--driver`/`--pglite` or
|
|
168
|
+
// pgpm.json) before the command runs: the driver plugin registers its
|
|
169
|
+
// pool/client factories, so the unmodified engine targets it. The built-in
|
|
170
|
+
// `pg` engine activates nothing and behaves exactly as before.
|
|
171
|
+
const engineArgv = newArgv;
|
|
172
|
+
const { engine, capabilities } = ENGINE_EXEMPT_COMMANDS.has(command)
|
|
173
|
+
? getActiveEngine()
|
|
174
|
+
: await activateEngine(engineArgv, engineArgv.cwd).catch(async (error) => {
|
|
175
|
+
await cliExitWithError(error.message, { beforeExit: teardownPgPools });
|
|
176
|
+
throw error;
|
|
177
|
+
});
|
|
178
|
+
try {
|
|
179
|
+
const blocked = engineCommandBlocker(command, engine, capabilities);
|
|
180
|
+
if (blocked) {
|
|
181
|
+
await cliExitWithError(blocked, { beforeExit: teardownPgPools });
|
|
182
|
+
}
|
|
183
|
+
await commandFn(newArgv, prompter, options);
|
|
184
|
+
}
|
|
185
|
+
finally {
|
|
186
|
+
await deactivateEngine();
|
|
187
|
+
}
|
|
141
188
|
prompter.close();
|
|
142
189
|
return argv;
|
|
143
190
|
};
|
package/esm/utils/display.js
CHANGED
|
@@ -50,6 +50,11 @@ export const usageText = `
|
|
|
50
50
|
-h, --help Display this help information
|
|
51
51
|
-v, --version Display version information
|
|
52
52
|
--cwd <directory> Working directory (default: current directory)
|
|
53
|
+
--engine <name> Migration backend: pg (default, Postgres server) or
|
|
54
|
+
pglite (in-process WASM Postgres, no server). Also set by
|
|
55
|
+
the "engine" key of pgpm.json or PGPM_ENGINE.
|
|
56
|
+
--driver <pkg> Driver plugin package backing the engine (escape hatch)
|
|
57
|
+
--pglite[=dataDir] Sugar for --engine pglite, persisted to <dataDir> if given
|
|
53
58
|
|
|
54
59
|
Individual Command Help:
|
|
55
60
|
pgpm <command> --help Display detailed help for specific command
|
package/esm/utils/driver.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PGPM_DRIVER_EXPORT, } from '@pgpmjs/types';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
4
|
/** Package name of the built-in PGlite driver plugin (the `--pglite` alias). */
|
|
5
5
|
export const PGLITE_DRIVER_PLUGIN = '@pgpmjs/pglite-adapter';
|
|
6
6
|
/**
|
|
@@ -56,8 +56,9 @@ export async function activateDriver(configured, override, cwd) {
|
|
|
56
56
|
if (!cfg)
|
|
57
57
|
return undefined;
|
|
58
58
|
// A require bound to the consumer's project directory. `createRequire` is the
|
|
59
|
-
// one primitive available and identical in both CJS and ESM runtimes
|
|
60
|
-
|
|
59
|
+
// one primitive available and identical in both CJS and ESM runtimes; it
|
|
60
|
+
// requires an absolute path, and `cwd` may come from a relative `--cwd`.
|
|
61
|
+
const requireFrom = createRequire(resolve(cwd, 'package.json'));
|
|
61
62
|
let mod;
|
|
62
63
|
try {
|
|
63
64
|
const entry = requireFrom.resolve(cfg.plugin);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands that need a capability the backend may not have. Gating is declared
|
|
3
|
+
* here rather than branching per backend inside each command, so a new driver
|
|
4
|
+
* plugin only has to describe itself through {@link PgpmDriverCapabilities}.
|
|
5
|
+
*/
|
|
6
|
+
const COMMAND_REQUIREMENTS = {
|
|
7
|
+
docker: 'serverLifecycle',
|
|
8
|
+
kill: 'serverLifecycle',
|
|
9
|
+
tune: 'serverLifecycle',
|
|
10
|
+
'admin-users': 'multiConnection',
|
|
11
|
+
dump: 'dump',
|
|
12
|
+
};
|
|
13
|
+
const REQUIREMENT_REASONS = {
|
|
14
|
+
createdb: 'it cannot create databases (the instance is the database)',
|
|
15
|
+
dump: 'it has no pg_dump',
|
|
16
|
+
serverLifecycle: 'it has no server to manage',
|
|
17
|
+
multiConnection: 'it is a single-session backend',
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The reason a command cannot run on the active engine, or undefined when it can.
|
|
21
|
+
*/
|
|
22
|
+
export const engineCommandBlocker = (command, engine, capabilities) => {
|
|
23
|
+
const requirement = COMMAND_REQUIREMENTS[command];
|
|
24
|
+
if (!requirement || capabilities[requirement])
|
|
25
|
+
return undefined;
|
|
26
|
+
return (`pgpm ${command} is not supported by the "${engine.name}" engine — ` +
|
|
27
|
+
`${REQUIREMENT_REASONS[requirement]}.`);
|
|
28
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { getEnvOptions } from '@pgpmjs/env';
|
|
2
|
+
import { BUILTIN_ENGINES, DEFAULT_ENGINE, } from '@pgpmjs/types';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { activateDriver, driverOverrideFromArgv, PGLITE_DRIVER_PLUGIN } from './driver';
|
|
5
|
+
/** Everything a real Postgres server can do — the built-in `pg` engine. */
|
|
6
|
+
export const SERVER_CAPABILITIES = {
|
|
7
|
+
createdb: true,
|
|
8
|
+
dump: true,
|
|
9
|
+
serverLifecycle: true,
|
|
10
|
+
multiConnection: true,
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The engines available by name: the built-ins, overridden/extended by the
|
|
14
|
+
* `engines` block of `pgpm.json` (sqitch's `[engine "name"]` sections).
|
|
15
|
+
*
|
|
16
|
+
* A configured entry is merged over its built-in, so declaring only options
|
|
17
|
+
* (e.g. `engines.pglite.options.dataDir`) keeps the built-in plugin.
|
|
18
|
+
*/
|
|
19
|
+
export const engineDefinitions = (config) => {
|
|
20
|
+
const definitions = { ...BUILTIN_ENGINES };
|
|
21
|
+
for (const [name, configured] of Object.entries(config.engines ?? {})) {
|
|
22
|
+
definitions[name] = { ...definitions[name], ...configured };
|
|
23
|
+
}
|
|
24
|
+
return definitions;
|
|
25
|
+
};
|
|
26
|
+
const definitionToDriver = (definition, options) => definition.plugin
|
|
27
|
+
? { plugin: definition.plugin, options: { ...definition.options, ...options } }
|
|
28
|
+
: undefined;
|
|
29
|
+
const lookupEngine = (name, config, options) => {
|
|
30
|
+
const definition = engineDefinitions(config)[name];
|
|
31
|
+
if (!definition) {
|
|
32
|
+
const known = Object.keys(engineDefinitions(config)).sort().join(', ');
|
|
33
|
+
throw new Error(`Unknown pgpm engine "${name}". Known engines: ${known}.\n` +
|
|
34
|
+
'Declare it in the "engines" block of pgpm.json, or name its plugin with --driver <package>.');
|
|
35
|
+
}
|
|
36
|
+
return { name, driver: definitionToDriver(definition, options) };
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Resolve which engine a command targets, mirroring sqitch's `core.engine` model:
|
|
40
|
+
* a short engine name selects the backend, and the built-in default is `pg`.
|
|
41
|
+
*
|
|
42
|
+
* Precedence (first match wins):
|
|
43
|
+
* 1. `--driver <package>` — name a driver plugin directly (escape hatch)
|
|
44
|
+
* 2. `--pglite[=dataDir]` — sugar for `--engine pglite`
|
|
45
|
+
* 3. `--engine <name>`
|
|
46
|
+
* 4. the `driver` block of `pgpm.json` — plugin-level configuration
|
|
47
|
+
* 5. the `engine` key of `pgpm.json` / `PGPM_ENGINE`
|
|
48
|
+
* 6. `pg`, the built-in server path
|
|
49
|
+
*/
|
|
50
|
+
export const resolveEngine = (argv, config) => {
|
|
51
|
+
const override = driverOverrideFromArgv(argv);
|
|
52
|
+
if (override) {
|
|
53
|
+
if (override.plugin === PGLITE_DRIVER_PLUGIN && !argv.driver) {
|
|
54
|
+
// `--pglite` is the pglite engine, so it inherits that engine's configured
|
|
55
|
+
// options (e.g. a dataDir declared in pgpm.json) instead of bypassing them.
|
|
56
|
+
return lookupEngine('pglite', config, override.options);
|
|
57
|
+
}
|
|
58
|
+
return { name: override.plugin, driver: override };
|
|
59
|
+
}
|
|
60
|
+
if (argv.engine)
|
|
61
|
+
return lookupEngine(argv.engine, config);
|
|
62
|
+
if (config.driver)
|
|
63
|
+
return { name: config.driver.plugin, driver: config.driver };
|
|
64
|
+
return lookupEngine(config.engine ?? DEFAULT_ENGINE, config);
|
|
65
|
+
};
|
|
66
|
+
let active;
|
|
67
|
+
/**
|
|
68
|
+
* The engine activated for the running command. Commands read this to skip
|
|
69
|
+
* server-only steps (e.g. `deploy --createdb`) instead of hard-coding backends.
|
|
70
|
+
* Defaults to the built-in server path when nothing has been activated.
|
|
71
|
+
*/
|
|
72
|
+
export const getActiveEngine = () => active ?? { engine: { name: DEFAULT_ENGINE }, capabilities: SERVER_CAPABILITIES };
|
|
73
|
+
/**
|
|
74
|
+
* Resolve the engine from argv + `pgpm.json` and activate its driver plugin.
|
|
75
|
+
* The driver has registered its pool/client factories by the time this resolves,
|
|
76
|
+
* so the unmodified pgpm engine runs against the selected backend.
|
|
77
|
+
*/
|
|
78
|
+
export const activateEngine = async (argv, cwd = process.cwd()) => {
|
|
79
|
+
const dir = resolve(cwd);
|
|
80
|
+
const config = getEnvOptions({}, dir);
|
|
81
|
+
const engine = resolveEngine(argv, config);
|
|
82
|
+
const session = await activateDriver(engine.driver, undefined, dir);
|
|
83
|
+
active = { engine, session, capabilities: session?.capabilities ?? SERVER_CAPABILITIES };
|
|
84
|
+
return active;
|
|
85
|
+
};
|
|
86
|
+
/** Tear down the active driver session and restore the built-in server path. */
|
|
87
|
+
export const deactivateEngine = async () => {
|
|
88
|
+
const session = active?.session;
|
|
89
|
+
active = undefined;
|
|
90
|
+
await session?.teardown();
|
|
91
|
+
};
|
package/esm/utils/index.js
CHANGED
|
@@ -3,6 +3,8 @@ export * from './deployed-changes';
|
|
|
3
3
|
export * from './display';
|
|
4
4
|
export * from './doctor';
|
|
5
5
|
export * from './driver';
|
|
6
|
+
export * from './engine';
|
|
7
|
+
export * from './engine-gating';
|
|
6
8
|
export * from './module-utils';
|
|
7
9
|
export * from './npm-version';
|
|
8
10
|
export * from './package-alias';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgpm",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.15.1",
|
|
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.17.0",
|
|
50
|
+
"@pgpmjs/env": "^2.39.1",
|
|
51
|
+
"@pgpmjs/export": "^1.12.4",
|
|
52
52
|
"@pgpmjs/logger": "^2.22.0",
|
|
53
|
-
"@pgpmjs/slice": "^0.
|
|
54
|
-
"@pgpmjs/types": "^2.
|
|
53
|
+
"@pgpmjs/slice": "^0.11.0",
|
|
54
|
+
"@pgpmjs/types": "^2.48.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.3",
|
|
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": "2832d5632d11eb22e1437df773706ac6a99175fe"
|
|
81
81
|
}
|
package/utils/display.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const usageText = "\n Usage: pgpm <command> [options]\n\n Core Database Operations:\n add Add database changes to plans and create SQL files\n deploy Deploy database changes and migrations\n verify Verify database state and migrations\n revert Revert database changes and migrations\n\n Project Management:\n init Initialize workspace or module\n extension Manage module dependencies\n plan Generate module deployment plans\n package Package module for distribution\n sync-versions Sync .control/Makefile/sql metadata to package.json versions\n export Export database migrations from existing databases\n update Update pgpm to the latest version\n cache Manage cached templates (clean)\n upgrade Upgrade installed pgpm modules to latest versions (alias: up)\n\n Database Administration:\n dump Dump a database to a sql file\n kill Terminate database connections and optionally drop databases\n install Install database modules\n tag Add tags to changes for versioning\n clear Clear database state\n remove Remove database changes\n analyze Analyze database structure\n rename Rename database changes\n admin-users Manage admin users\n tune Tune PostgreSQL for throwaway environments (CI/test)\n\n Testing:\n test-packages Run integration tests on all workspace packages\n\n Migration Tools:\n migrate Migration management subcommands\n init Initialize migration tracking\n status Show migration status\n list List all changes\n deps Show change dependencies\n \n Development Tools:\n docker Manage Docker containers (start/stop/ls, --minio)\n doctor Check local dependencies (node, docker, psql) with install guidance\n env Manage environment variables (--supabase, --minio)\n test-packages Run integration tests on workspace packages\n \n Global Options:\n -h, --help Display this help information\n -v, --version Display version information\n --cwd <directory> Working directory (default: current directory)\n\n Individual Command Help:\n pgpm <command> --help Display detailed help for specific command\n pgpm <command> -h Display detailed help for specific command\n\n Examples:\n pgpm deploy --help Show deploy command options\n pgpm init workspace Initialize new workspace\n pgpm install @pgpm/base32 Install a database module\n ";
|
|
1
|
+
export declare const usageText = "\n Usage: pgpm <command> [options]\n\n Core Database Operations:\n add Add database changes to plans and create SQL files\n deploy Deploy database changes and migrations\n verify Verify database state and migrations\n revert Revert database changes and migrations\n\n Project Management:\n init Initialize workspace or module\n extension Manage module dependencies\n plan Generate module deployment plans\n package Package module for distribution\n sync-versions Sync .control/Makefile/sql metadata to package.json versions\n export Export database migrations from existing databases\n update Update pgpm to the latest version\n cache Manage cached templates (clean)\n upgrade Upgrade installed pgpm modules to latest versions (alias: up)\n\n Database Administration:\n dump Dump a database to a sql file\n kill Terminate database connections and optionally drop databases\n install Install database modules\n tag Add tags to changes for versioning\n clear Clear database state\n remove Remove database changes\n analyze Analyze database structure\n rename Rename database changes\n admin-users Manage admin users\n tune Tune PostgreSQL for throwaway environments (CI/test)\n\n Testing:\n test-packages Run integration tests on all workspace packages\n\n Migration Tools:\n migrate Migration management subcommands\n init Initialize migration tracking\n status Show migration status\n list List all changes\n deps Show change dependencies\n \n Development Tools:\n docker Manage Docker containers (start/stop/ls, --minio)\n doctor Check local dependencies (node, docker, psql) with install guidance\n env Manage environment variables (--supabase, --minio)\n test-packages Run integration tests on workspace packages\n \n Global Options:\n -h, --help Display this help information\n -v, --version Display version information\n --cwd <directory> Working directory (default: current directory)\n --engine <name> Migration backend: pg (default, Postgres server) or\n pglite (in-process WASM Postgres, no server). Also set by\n the \"engine\" key of pgpm.json or PGPM_ENGINE.\n --driver <pkg> Driver plugin package backing the engine (escape hatch)\n --pglite[=dataDir] Sugar for --engine pglite, persisted to <dataDir> if given\n\n Individual Command Help:\n pgpm <command> --help Display detailed help for specific command\n pgpm <command> -h Display detailed help for specific command\n\n Examples:\n pgpm deploy --help Show deploy command options\n pgpm init workspace Initialize new workspace\n pgpm install @pgpm/base32 Install a database module\n ";
|
package/utils/display.js
CHANGED
|
@@ -53,6 +53,11 @@ exports.usageText = `
|
|
|
53
53
|
-h, --help Display this help information
|
|
54
54
|
-v, --version Display version information
|
|
55
55
|
--cwd <directory> Working directory (default: current directory)
|
|
56
|
+
--engine <name> Migration backend: pg (default, Postgres server) or
|
|
57
|
+
pglite (in-process WASM Postgres, no server). Also set by
|
|
58
|
+
the "engine" key of pgpm.json or PGPM_ENGINE.
|
|
59
|
+
--driver <pkg> Driver plugin package backing the engine (escape hatch)
|
|
60
|
+
--pglite[=dataDir] Sugar for --engine pglite, persisted to <dataDir> if given
|
|
56
61
|
|
|
57
62
|
Individual Command Help:
|
|
58
63
|
pgpm <command> --help Display detailed help for specific command
|
package/utils/driver.js
CHANGED
|
@@ -62,8 +62,9 @@ async function activateDriver(configured, override, cwd) {
|
|
|
62
62
|
if (!cfg)
|
|
63
63
|
return undefined;
|
|
64
64
|
// A require bound to the consumer's project directory. `createRequire` is the
|
|
65
|
-
// one primitive available and identical in both CJS and ESM runtimes
|
|
66
|
-
|
|
65
|
+
// one primitive available and identical in both CJS and ESM runtimes; it
|
|
66
|
+
// requires an absolute path, and `cwd` may come from a relative `--cwd`.
|
|
67
|
+
const requireFrom = (0, node_module_1.createRequire)((0, node_path_1.resolve)(cwd, 'package.json'));
|
|
67
68
|
let mod;
|
|
68
69
|
try {
|
|
69
70
|
const entry = requireFrom.resolve(cfg.plugin);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PgpmDriverCapabilities } from '@pgpmjs/types';
|
|
2
|
+
import { ResolvedEngine } from './engine';
|
|
3
|
+
/**
|
|
4
|
+
* The reason a command cannot run on the active engine, or undefined when it can.
|
|
5
|
+
*/
|
|
6
|
+
export declare const engineCommandBlocker: (command: string, engine: ResolvedEngine, capabilities: PgpmDriverCapabilities) => string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.engineCommandBlocker = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Commands that need a capability the backend may not have. Gating is declared
|
|
6
|
+
* here rather than branching per backend inside each command, so a new driver
|
|
7
|
+
* plugin only has to describe itself through {@link PgpmDriverCapabilities}.
|
|
8
|
+
*/
|
|
9
|
+
const COMMAND_REQUIREMENTS = {
|
|
10
|
+
docker: 'serverLifecycle',
|
|
11
|
+
kill: 'serverLifecycle',
|
|
12
|
+
tune: 'serverLifecycle',
|
|
13
|
+
'admin-users': 'multiConnection',
|
|
14
|
+
dump: 'dump',
|
|
15
|
+
};
|
|
16
|
+
const REQUIREMENT_REASONS = {
|
|
17
|
+
createdb: 'it cannot create databases (the instance is the database)',
|
|
18
|
+
dump: 'it has no pg_dump',
|
|
19
|
+
serverLifecycle: 'it has no server to manage',
|
|
20
|
+
multiConnection: 'it is a single-session backend',
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The reason a command cannot run on the active engine, or undefined when it can.
|
|
24
|
+
*/
|
|
25
|
+
const engineCommandBlocker = (command, engine, capabilities) => {
|
|
26
|
+
const requirement = COMMAND_REQUIREMENTS[command];
|
|
27
|
+
if (!requirement || capabilities[requirement])
|
|
28
|
+
return undefined;
|
|
29
|
+
return (`pgpm ${command} is not supported by the "${engine.name}" engine — ` +
|
|
30
|
+
`${REQUIREMENT_REASONS[requirement]}.`);
|
|
31
|
+
};
|
|
32
|
+
exports.engineCommandBlocker = engineCommandBlocker;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PgpmDriverCapabilities, PgpmDriverConfig, PgpmDriverSession, PgpmEngineConfig, PgpmOptions } from '@pgpmjs/types';
|
|
2
|
+
/** Everything a real Postgres server can do — the built-in `pg` engine. */
|
|
3
|
+
export declare const SERVER_CAPABILITIES: PgpmDriverCapabilities;
|
|
4
|
+
/** The engine/driver selectors every command accepts. */
|
|
5
|
+
export interface EngineArgv {
|
|
6
|
+
engine?: string;
|
|
7
|
+
driver?: string;
|
|
8
|
+
pglite?: boolean | string;
|
|
9
|
+
}
|
|
10
|
+
/** The engine a command runs against, plus the driver plugin backing it. */
|
|
11
|
+
export interface ResolvedEngine {
|
|
12
|
+
/** Engine name, for messages: a registered name or a plugin package. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Driver plugin to activate; undefined = built-in `pg` (server) path. */
|
|
15
|
+
driver?: PgpmDriverConfig;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The engines available by name: the built-ins, overridden/extended by the
|
|
19
|
+
* `engines` block of `pgpm.json` (sqitch's `[engine "name"]` sections).
|
|
20
|
+
*
|
|
21
|
+
* A configured entry is merged over its built-in, so declaring only options
|
|
22
|
+
* (e.g. `engines.pglite.options.dataDir`) keeps the built-in plugin.
|
|
23
|
+
*/
|
|
24
|
+
export declare const engineDefinitions: (config: PgpmOptions) => Record<string, PgpmEngineConfig>;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve which engine a command targets, mirroring sqitch's `core.engine` model:
|
|
27
|
+
* a short engine name selects the backend, and the built-in default is `pg`.
|
|
28
|
+
*
|
|
29
|
+
* Precedence (first match wins):
|
|
30
|
+
* 1. `--driver <package>` — name a driver plugin directly (escape hatch)
|
|
31
|
+
* 2. `--pglite[=dataDir]` — sugar for `--engine pglite`
|
|
32
|
+
* 3. `--engine <name>`
|
|
33
|
+
* 4. the `driver` block of `pgpm.json` — plugin-level configuration
|
|
34
|
+
* 5. the `engine` key of `pgpm.json` / `PGPM_ENGINE`
|
|
35
|
+
* 6. `pg`, the built-in server path
|
|
36
|
+
*/
|
|
37
|
+
export declare const resolveEngine: (argv: EngineArgv, config: PgpmOptions) => ResolvedEngine;
|
|
38
|
+
/** The engine activated for the running command. */
|
|
39
|
+
export interface ActiveEngine {
|
|
40
|
+
engine: ResolvedEngine;
|
|
41
|
+
session?: PgpmDriverSession;
|
|
42
|
+
capabilities: PgpmDriverCapabilities;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The engine activated for the running command. Commands read this to skip
|
|
46
|
+
* server-only steps (e.g. `deploy --createdb`) instead of hard-coding backends.
|
|
47
|
+
* Defaults to the built-in server path when nothing has been activated.
|
|
48
|
+
*/
|
|
49
|
+
export declare const getActiveEngine: () => ActiveEngine;
|
|
50
|
+
/**
|
|
51
|
+
* Resolve the engine from argv + `pgpm.json` and activate its driver plugin.
|
|
52
|
+
* The driver has registered its pool/client factories by the time this resolves,
|
|
53
|
+
* so the unmodified pgpm engine runs against the selected backend.
|
|
54
|
+
*/
|
|
55
|
+
export declare const activateEngine: (argv: EngineArgv, cwd?: string) => Promise<ActiveEngine>;
|
|
56
|
+
/** Tear down the active driver session and restore the built-in server path. */
|
|
57
|
+
export declare const deactivateEngine: () => Promise<void>;
|
package/utils/engine.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deactivateEngine = exports.activateEngine = exports.getActiveEngine = exports.resolveEngine = exports.engineDefinitions = exports.SERVER_CAPABILITIES = void 0;
|
|
4
|
+
const env_1 = require("@pgpmjs/env");
|
|
5
|
+
const types_1 = require("@pgpmjs/types");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const driver_1 = require("./driver");
|
|
8
|
+
/** Everything a real Postgres server can do — the built-in `pg` engine. */
|
|
9
|
+
exports.SERVER_CAPABILITIES = {
|
|
10
|
+
createdb: true,
|
|
11
|
+
dump: true,
|
|
12
|
+
serverLifecycle: true,
|
|
13
|
+
multiConnection: true,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The engines available by name: the built-ins, overridden/extended by the
|
|
17
|
+
* `engines` block of `pgpm.json` (sqitch's `[engine "name"]` sections).
|
|
18
|
+
*
|
|
19
|
+
* A configured entry is merged over its built-in, so declaring only options
|
|
20
|
+
* (e.g. `engines.pglite.options.dataDir`) keeps the built-in plugin.
|
|
21
|
+
*/
|
|
22
|
+
const engineDefinitions = (config) => {
|
|
23
|
+
const definitions = { ...types_1.BUILTIN_ENGINES };
|
|
24
|
+
for (const [name, configured] of Object.entries(config.engines ?? {})) {
|
|
25
|
+
definitions[name] = { ...definitions[name], ...configured };
|
|
26
|
+
}
|
|
27
|
+
return definitions;
|
|
28
|
+
};
|
|
29
|
+
exports.engineDefinitions = engineDefinitions;
|
|
30
|
+
const definitionToDriver = (definition, options) => definition.plugin
|
|
31
|
+
? { plugin: definition.plugin, options: { ...definition.options, ...options } }
|
|
32
|
+
: undefined;
|
|
33
|
+
const lookupEngine = (name, config, options) => {
|
|
34
|
+
const definition = (0, exports.engineDefinitions)(config)[name];
|
|
35
|
+
if (!definition) {
|
|
36
|
+
const known = Object.keys((0, exports.engineDefinitions)(config)).sort().join(', ');
|
|
37
|
+
throw new Error(`Unknown pgpm engine "${name}". Known engines: ${known}.\n` +
|
|
38
|
+
'Declare it in the "engines" block of pgpm.json, or name its plugin with --driver <package>.');
|
|
39
|
+
}
|
|
40
|
+
return { name, driver: definitionToDriver(definition, options) };
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Resolve which engine a command targets, mirroring sqitch's `core.engine` model:
|
|
44
|
+
* a short engine name selects the backend, and the built-in default is `pg`.
|
|
45
|
+
*
|
|
46
|
+
* Precedence (first match wins):
|
|
47
|
+
* 1. `--driver <package>` — name a driver plugin directly (escape hatch)
|
|
48
|
+
* 2. `--pglite[=dataDir]` — sugar for `--engine pglite`
|
|
49
|
+
* 3. `--engine <name>`
|
|
50
|
+
* 4. the `driver` block of `pgpm.json` — plugin-level configuration
|
|
51
|
+
* 5. the `engine` key of `pgpm.json` / `PGPM_ENGINE`
|
|
52
|
+
* 6. `pg`, the built-in server path
|
|
53
|
+
*/
|
|
54
|
+
const resolveEngine = (argv, config) => {
|
|
55
|
+
const override = (0, driver_1.driverOverrideFromArgv)(argv);
|
|
56
|
+
if (override) {
|
|
57
|
+
if (override.plugin === driver_1.PGLITE_DRIVER_PLUGIN && !argv.driver) {
|
|
58
|
+
// `--pglite` is the pglite engine, so it inherits that engine's configured
|
|
59
|
+
// options (e.g. a dataDir declared in pgpm.json) instead of bypassing them.
|
|
60
|
+
return lookupEngine('pglite', config, override.options);
|
|
61
|
+
}
|
|
62
|
+
return { name: override.plugin, driver: override };
|
|
63
|
+
}
|
|
64
|
+
if (argv.engine)
|
|
65
|
+
return lookupEngine(argv.engine, config);
|
|
66
|
+
if (config.driver)
|
|
67
|
+
return { name: config.driver.plugin, driver: config.driver };
|
|
68
|
+
return lookupEngine(config.engine ?? types_1.DEFAULT_ENGINE, config);
|
|
69
|
+
};
|
|
70
|
+
exports.resolveEngine = resolveEngine;
|
|
71
|
+
let active;
|
|
72
|
+
/**
|
|
73
|
+
* The engine activated for the running command. Commands read this to skip
|
|
74
|
+
* server-only steps (e.g. `deploy --createdb`) instead of hard-coding backends.
|
|
75
|
+
* Defaults to the built-in server path when nothing has been activated.
|
|
76
|
+
*/
|
|
77
|
+
const getActiveEngine = () => active ?? { engine: { name: types_1.DEFAULT_ENGINE }, capabilities: exports.SERVER_CAPABILITIES };
|
|
78
|
+
exports.getActiveEngine = getActiveEngine;
|
|
79
|
+
/**
|
|
80
|
+
* Resolve the engine from argv + `pgpm.json` and activate its driver plugin.
|
|
81
|
+
* The driver has registered its pool/client factories by the time this resolves,
|
|
82
|
+
* so the unmodified pgpm engine runs against the selected backend.
|
|
83
|
+
*/
|
|
84
|
+
const activateEngine = async (argv, cwd = process.cwd()) => {
|
|
85
|
+
const dir = (0, node_path_1.resolve)(cwd);
|
|
86
|
+
const config = (0, env_1.getEnvOptions)({}, dir);
|
|
87
|
+
const engine = (0, exports.resolveEngine)(argv, config);
|
|
88
|
+
const session = await (0, driver_1.activateDriver)(engine.driver, undefined, dir);
|
|
89
|
+
active = { engine, session, capabilities: session?.capabilities ?? exports.SERVER_CAPABILITIES };
|
|
90
|
+
return active;
|
|
91
|
+
};
|
|
92
|
+
exports.activateEngine = activateEngine;
|
|
93
|
+
/** Tear down the active driver session and restore the built-in server path. */
|
|
94
|
+
const deactivateEngine = async () => {
|
|
95
|
+
const session = active?.session;
|
|
96
|
+
active = undefined;
|
|
97
|
+
await session?.teardown();
|
|
98
|
+
};
|
|
99
|
+
exports.deactivateEngine = deactivateEngine;
|
package/utils/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './deployed-changes';
|
|
|
3
3
|
export * from './display';
|
|
4
4
|
export * from './doctor';
|
|
5
5
|
export * from './driver';
|
|
6
|
+
export * from './engine';
|
|
7
|
+
export * from './engine-gating';
|
|
6
8
|
export * from './module-utils';
|
|
7
9
|
export * from './npm-version';
|
|
8
10
|
export * from './package-alias';
|
package/utils/index.js
CHANGED
|
@@ -19,6 +19,8 @@ __exportStar(require("./deployed-changes"), exports);
|
|
|
19
19
|
__exportStar(require("./display"), exports);
|
|
20
20
|
__exportStar(require("./doctor"), exports);
|
|
21
21
|
__exportStar(require("./driver"), exports);
|
|
22
|
+
__exportStar(require("./engine"), exports);
|
|
23
|
+
__exportStar(require("./engine-gating"), exports);
|
|
22
24
|
__exportStar(require("./module-utils"), exports);
|
|
23
25
|
__exportStar(require("./npm-version"), exports);
|
|
24
26
|
__exportStar(require("./package-alias"), exports);
|