@dotenvx/dotenvx-ops 0.44.0 → 0.45.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.44.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.45.0...main)
6
+
7
+ ## [0.45.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.44.0...v0.45.0) (2026-05-07)
8
+
9
+ ### Added
10
+
11
+ * Prompt for team on `armor push`(if member of multiple teams) ([#66](https://github.com/dotenvx/dotenvx-ops/pull/66))
6
12
 
7
13
  ## [0.44.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.43.0...v0.44.0) (2026-05-07)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.44.0",
2
+ "version": "0.45.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,23 +4,26 @@ const packageJson = require('../../lib/helpers/packageJson')
4
4
  const normalizeToken = require('../../lib/helpers/normalizeToken')
5
5
 
6
6
  class PostArmorPush {
7
- constructor (hostname, token, devicePublicKey, privateKey) {
7
+ constructor (hostname, token, devicePublicKey, privateKey, team) {
8
8
  this.hostname = hostname || 'https://ops.dotenvx.com'
9
9
  this.token = token
10
10
  this.devicePublicKey = devicePublicKey
11
11
  this.privateKey = privateKey
12
+ this.team = team
12
13
  }
13
14
 
14
15
  async run () {
15
16
  const token = normalizeToken(this.token)
16
17
  const devicePublicKey = this.devicePublicKey
17
18
  const privateKey = this.privateKey
19
+ const team = this.team
18
20
  const url = `${this.hostname}/api/armor/push`
19
21
 
20
22
  const body = {
21
23
  device_public_key: devicePublicKey,
22
24
  cli_version: packageJson.version,
23
- private_key: privateKey
25
+ private_key: privateKey,
26
+ team
24
27
  }
25
28
 
26
29
  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 PostArmorPush = require('../api/postArmorPush')
4
+ const GetAccount = require('../api/getAccount')
3
5
  const keyNamesForEnvFile = require('../helpers/keyNamesForEnvFile')
4
6
 
5
7
  class ArmorPush {
@@ -19,7 +21,21 @@ class ArmorPush {
19
21
  const { privateKeyName } = keyNamesForEnvFile(envFile)
20
22
 
21
23
  const privateKey = dotenvx.get(privateKeyName, { path: '.env.keys', strict: true, noOps: true })
22
- const json = await new PostArmorPush(hostname, token, devicePublicKey, privateKey).run()
24
+
25
+ const accountJson = await new GetAccount(hostname, token).run()
26
+ const choices = accountJson.organizations.map(o => ({
27
+ name: o.provider_slug,
28
+ value: o.provider_slug
29
+ }))
30
+ let team = choices[0] && choices[0].value
31
+ if (choices.length > 1) {
32
+ team = await prompts.select({
33
+ message: 'Select team',
34
+ choices
35
+ })
36
+ }
37
+
38
+ const json = await new PostArmorPush(hostname, token, devicePublicKey, privateKey, team).run()
23
39
 
24
40
  return {
25
41
  ...json,