pgpm 2.6.0 → 2.7.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.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@pgpmjs/core");
4
4
  const logger_1 = require("@pgpmjs/logger");
5
+ const inquirerer_1 = require("inquirerer");
5
6
  const logger = new logger_1.Logger('pgpm');
6
7
  const installUsageText = `
7
8
  Install Command:
@@ -38,17 +39,25 @@ exports.default = async (argv, prompter, _options) => {
38
39
  }
39
40
  // If no packages specified, install missing modules from .control file
40
41
  if (argv._.length === 0) {
42
+ const checkSpinner = (0, inquirerer_1.createSpinner)('Checking for missing modules...');
43
+ checkSpinner.start();
41
44
  const requiredExtensions = project.getRequiredModules();
42
45
  const installedModules = project.getWorkspaceInstalledModules();
43
46
  const missingModules = (0, core_1.getMissingInstallableModules)(requiredExtensions, installedModules);
44
47
  if (missingModules.length === 0) {
45
- logger.success('All modules are already installed.');
48
+ checkSpinner.succeed('All modules are already installed.');
46
49
  return;
47
50
  }
48
51
  const missingNames = missingModules.map(m => m.npmName);
49
- logger.info(`Installing missing modules: ${missingNames.join(', ')}`);
52
+ checkSpinner.succeed(`Found ${missingModules.length} missing module(s): ${missingNames.join(', ')}`);
53
+ const installSpinner = (0, inquirerer_1.createSpinner)(`Installing ${missingModules.length} module(s)...`);
54
+ installSpinner.start();
50
55
  await project.installModules(...missingNames);
56
+ installSpinner.succeed(`Installed ${missingModules.length} module(s) successfully.`);
51
57
  return;
52
58
  }
59
+ const installSpinner = (0, inquirerer_1.createSpinner)(`Installing ${argv._.length} module(s)...`);
60
+ installSpinner.start();
53
61
  await project.installModules(...argv._);
62
+ installSpinner.succeed(`Installed ${argv._.length} module(s) successfully.`);
54
63
  };
@@ -18,7 +18,7 @@ Options:
18
18
  --cwd <directory> Working directory (default: current directory)
19
19
  -i, --interactive Show outdated modules and select which ones to upgrade
20
20
  --dry-run Show what would be upgraded without making changes
21
- --workspace Upgrade modules across all packages in the workspace
21
+ -w, --workspace Upgrade modules across all packages in the workspace
22
22
 
23
23
  Examples:
24
24
  pgpm upgrade Upgrade all installed modules
@@ -118,7 +118,7 @@ exports.default = async (argv, prompter, _options) => {
118
118
  const { cwd = process.cwd() } = argv;
119
119
  const dryRun = Boolean(argv['dry-run']);
120
120
  const interactive = Boolean(argv.i || argv.interactive);
121
- const workspaceMode = Boolean(argv.workspace);
121
+ const workspaceMode = Boolean(argv.w || argv.workspace);
122
122
  // Get specific modules from positional arguments (argv._)
123
123
  const specificModules = argv._ && argv._.length > 0
124
124
  ? argv._.map((m) => String(m).trim())
@@ -1,5 +1,6 @@
1
1
  import { getMissingInstallableModules, PgpmPackage } from '@pgpmjs/core';
2
2
  import { Logger } from '@pgpmjs/logger';
3
+ import { createSpinner } from 'inquirerer';
3
4
  const logger = new Logger('pgpm');
4
5
  const installUsageText = `
5
6
  Install Command:
@@ -36,17 +37,25 @@ export default async (argv, prompter, _options) => {
36
37
  }
37
38
  // If no packages specified, install missing modules from .control file
38
39
  if (argv._.length === 0) {
40
+ const checkSpinner = createSpinner('Checking for missing modules...');
41
+ checkSpinner.start();
39
42
  const requiredExtensions = project.getRequiredModules();
40
43
  const installedModules = project.getWorkspaceInstalledModules();
41
44
  const missingModules = getMissingInstallableModules(requiredExtensions, installedModules);
42
45
  if (missingModules.length === 0) {
43
- logger.success('All modules are already installed.');
46
+ checkSpinner.succeed('All modules are already installed.');
44
47
  return;
45
48
  }
46
49
  const missingNames = missingModules.map(m => m.npmName);
47
- logger.info(`Installing missing modules: ${missingNames.join(', ')}`);
50
+ checkSpinner.succeed(`Found ${missingModules.length} missing module(s): ${missingNames.join(', ')}`);
51
+ const installSpinner = createSpinner(`Installing ${missingModules.length} module(s)...`);
52
+ installSpinner.start();
48
53
  await project.installModules(...missingNames);
54
+ installSpinner.succeed(`Installed ${missingModules.length} module(s) successfully.`);
49
55
  return;
50
56
  }
57
+ const installSpinner = createSpinner(`Installing ${argv._.length} module(s)...`);
58
+ installSpinner.start();
51
59
  await project.installModules(...argv._);
60
+ installSpinner.succeed(`Installed ${argv._.length} module(s) successfully.`);
52
61
  };
@@ -16,7 +16,7 @@ Options:
16
16
  --cwd <directory> Working directory (default: current directory)
17
17
  -i, --interactive Show outdated modules and select which ones to upgrade
18
18
  --dry-run Show what would be upgraded without making changes
19
- --workspace Upgrade modules across all packages in the workspace
19
+ -w, --workspace Upgrade modules across all packages in the workspace
20
20
 
21
21
  Examples:
22
22
  pgpm upgrade Upgrade all installed modules
@@ -116,7 +116,7 @@ export default async (argv, prompter, _options) => {
116
116
  const { cwd = process.cwd() } = argv;
117
117
  const dryRun = Boolean(argv['dry-run']);
118
118
  const interactive = Boolean(argv.i || argv.interactive);
119
- const workspaceMode = Boolean(argv.workspace);
119
+ const workspaceMode = Boolean(argv.w || argv.workspace);
120
120
  // Get specific modules from positional arguments (argv._)
121
121
  const specificModules = argv._ && argv._.length > 0
122
122
  ? argv._.map((m) => String(m).trim())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgpm",
3
- "version": "2.6.0",
3
+ "version": "2.7.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",
@@ -75,5 +75,5 @@
75
75
  "pg",
76
76
  "pgsql"
77
77
  ],
78
- "gitHead": "09721f934b339bd8c55d2e633abaded6d20b0f65"
78
+ "gitHead": "d735f6ce2898036e8f78e2a060b93993a4c5a2ad"
79
79
  }