@dotenvx/dotenvx-ops 0.43.0 → 0.44.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/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.43.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.44.0...main)
6
+
7
+ ## [0.44.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.43.0...v0.44.0) (2026-05-07)
8
+
9
+ ### Added
10
+
11
+ * Prompt for team on `armor up` (if member of multiple teams) ([#65](https://github.com/dotenvx/dotenvx-ops/pull/65))
6
12
 
7
13
  ## [0.43.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.42.1...v0.43.0) (2026-05-06)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.43.0",
2
+ "version": "0.44.0",
3
3
  "name": "@dotenvx/dotenvx-ops",
4
4
  "description": "Secrets for agents–from the creator of `dotenv` and `dotenvx`",
5
5
  "author": "@motdotla",
@@ -4,12 +4,13 @@ const packageJson = require('../../lib/helpers/packageJson')
4
4
  const normalizeToken = require('../../lib/helpers/normalizeToken')
5
5
 
6
6
  class PostArmorUp {
7
- constructor (hostname, token, devicePublicKey, publicKey, privateKey) {
7
+ constructor (hostname, token, devicePublicKey, publicKey, privateKey, team) {
8
8
  this.hostname = hostname || 'https://ops.dotenvx.com'
9
9
  this.token = token
10
10
  this.devicePublicKey = devicePublicKey
11
11
  this.publicKey = publicKey
12
12
  this.privateKey = privateKey
13
+ this.team = team
13
14
  }
14
15
 
15
16
  async run () {
@@ -17,13 +18,15 @@ class PostArmorUp {
17
18
  const devicePublicKey = this.devicePublicKey
18
19
  const publicKey = this.publicKey
19
20
  const privateKey = this.privateKey
21
+ const team = this.team
20
22
  const url = `${this.hostname}/api/armor/up`
21
23
 
22
24
  const body = {
23
25
  device_public_key: devicePublicKey,
24
26
  cli_version: packageJson.version,
25
27
  public_key: publicKey,
26
- private_key: privateKey
28
+ private_key: privateKey,
29
+ team
27
30
  }
28
31
 
29
32
  const resp = await http(url, {
@@ -1,5 +1,7 @@
1
1
  const dotenvx = require('@dotenvx/dotenvx')
2
+ const prompts = require('@inquirer/prompts')
2
3
  const PostArmorUp = require('../api/postArmorUp')
4
+ const GetAccount = require('../api/getAccount')
3
5
  const keyNamesForEnvFile = require('../helpers/keyNamesForEnvFile')
4
6
  const removeEnvKey = require('../helpers/removeEnvKey')
5
7
 
@@ -24,7 +26,21 @@ class ArmorUp {
24
26
 
25
27
  const publicKey = dotenvx.get(publicKeyName, { path: envFile, strict: true, ignore: ['MISSING_PRIVATE_KEY'], noOps: true })
26
28
  const privateKey = dotenvx.get(privateKeyName, { path: '.env.keys', strict: true, ignore: ['MISSING_KEY'], noOps: true })
27
- const json = await new PostArmorUp(hostname, token, devicePublicKey, publicKey, privateKey).run()
29
+
30
+ const accountJson = await new GetAccount(hostname, token).run()
31
+ const choices = accountJson.organizations.map(o => ({
32
+ name: o.provider_slug,
33
+ value: o.provider_slug
34
+ }))
35
+ let team = choices[0] && choices[0].value
36
+ if (choices.length > 1) {
37
+ team = await prompts.select({
38
+ message: 'Select team',
39
+ choices
40
+ })
41
+ }
42
+
43
+ const json = await new PostArmorUp(hostname, token, devicePublicKey, publicKey, privateKey, team).run()
28
44
  removeEnvKey(privateKeyName)
29
45
 
30
46
  return {