@dotenvx/dotenvx-ops 0.23.4 → 0.23.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.23.4...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.23.5...main)
6
+
7
+ ## [0.23.5](https://github.com/dotenvx/dotenvx-ops/compare/v0.23.4...v0.23.5) (2025-12-10)
8
+
9
+ ### Added
10
+
11
+ * Prompt for username and password on `rotate npm connect` ([#14](https://github.com/dotenvx/dotenvx-ops/pull/14))
6
12
 
7
13
  ## [0.23.4](https://github.com/dotenvx/dotenvx-ops/compare/v0.23.3...v0.23.4) (2025-12-10)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.23.4",
2
+ "version": "0.23.5",
3
3
  "name": "@dotenvx/dotenvx-ops",
4
4
  "description": "Dotenvx Ops – commercial tooling for .env files",
5
5
  "author": "@motdotla",
@@ -1,4 +1,5 @@
1
1
  const { logger } = require('@dotenvx/dotenvx')
2
+ const prompts = require('@inquirer/prompts')
2
3
  const Session = require('./../../../../db/session')
3
4
  const RotateNpmConnect = require('./../../../../lib/services/rotateNpmConnect')
4
5
  const { createSpinner } = require('./../../../../lib/helpers/createSpinner')
@@ -10,16 +11,24 @@ async function connect () {
10
11
  logger.debug(`options: ${JSON.stringify(options)}`)
11
12
 
12
13
  try {
13
- spinner.start()
14
-
15
14
  const sesh = new Session()
16
15
  const hostname = options.hostname
17
16
  const token = options.token || sesh.token()
18
17
  const org = options.org
19
- const username = options.username
20
- const password = options.password
18
+ let username = options.username
19
+ let password = options.password
21
20
  const email = options.email
22
21
 
22
+ if (!username || username === '') {
23
+ username = await prompts.input({ message: 'npm username:' })
24
+ }
25
+
26
+ if (!password || password === '') {
27
+ password = await prompts.password({ message: 'npm password:' })
28
+ }
29
+
30
+ spinner.start()
31
+
23
32
  const { uid, url } = await new RotateNpmConnect(hostname, token, org, username, password, email).run()
24
33
 
25
34
  spinner.stop()
@@ -15,18 +15,11 @@ npm
15
15
  .command('connect')
16
16
  .description('connect passcard')
17
17
  .requiredOption('--org <organizationSlug>')
18
- .requiredOption('--username <username>')
19
- .requiredOption('--password <password>')
18
+ .option('--username <username>')
19
+ .option('--password <password>')
20
20
  .option('--email <email>')
21
21
  .option('--hostname <url>', 'set hostname', sesh.hostname())
22
22
  .option('--token <token>', 'set token')
23
23
  .action(connectAction)
24
24
 
25
- // // dotenvx-ops rotate npm rotate
26
- // const rotateAction = require('./../../actions/rotate/npm/rotate')
27
- // npm
28
- // .command('rotate')
29
- // .description('rotate api key')
30
- // .action(rotateAction)
31
-
32
25
  module.exports = npm