@dotenvx/dotenvx-ops 0.29.0 → 0.29.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/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.29.0...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.1...main)
6
+
7
+ ## [0.29.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.0...v0.29.1) (2026-01-07)
8
+
9
+ ### Changed
10
+
11
+ * Send `org` with post to `/backup`
6
12
 
7
13
  ## [0.29.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.28.1...v0.29.0) (2026-01-07)
8
14
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.29.0",
2
+ "version": "0.29.1",
3
3
  "name": "@dotenvx/dotenvx-ops",
4
4
  "description": "production grade dotenvx–with operational primitives",
5
5
  "author": "@motdotla",
@@ -33,7 +33,7 @@ async function connect () {
33
33
  org = choices[0].value // just use first choice
34
34
  } else {
35
35
  org = await prompts.select({
36
- message: 'Select dotenvx organization',
36
+ message: 'Select org',
37
37
  choices
38
38
  })
39
39
  }
@@ -33,7 +33,7 @@ async function connect () {
33
33
  org = choices[0].value // just use first choice
34
34
  } else {
35
35
  org = await prompts.select({
36
- message: 'Select dotenvx organization',
36
+ message: 'Select org',
37
37
  choices
38
38
  })
39
39
  }
@@ -33,7 +33,7 @@ async function connect () {
33
33
  org = choices[0].value // just use first choice
34
34
  } else {
35
35
  org = await prompts.select({
36
- message: 'Select dotenvx organization',
36
+ message: 'Select org',
37
37
  choices
38
38
  })
39
39
  }
@@ -3,12 +3,13 @@ const buildApiError = require('../../lib/helpers/buildApiError')
3
3
  const packageJson = require('../../lib/helpers/packageJson')
4
4
 
5
5
  class PostBackup {
6
- constructor (hostname, token, devicePublicKey, encoded, dotenvxProjectId, pwd = null, gitUrl = null, gitBranch = null, systemUuid = null, osPlatform = null, osArch = null) {
6
+ constructor (hostname, token, devicePublicKey, encoded, dotenvxProjectId = null, org = null, pwd = null, gitUrl = null, gitBranch = null, systemUuid = null, osPlatform = null, osArch = null) {
7
7
  this.hostname = hostname || 'https://ops.dotenvx.com'
8
8
  this.token = token
9
9
  this.devicePublicKey = devicePublicKey
10
10
  this.encoded = encoded
11
11
  this.dotenvxProjectId = dotenvxProjectId
12
+ this.org = org
12
13
  this.pwd = pwd
13
14
  this.gitUrl = gitUrl
14
15
  this.gitBranch = gitBranch
@@ -23,6 +24,7 @@ class PostBackup {
23
24
  const url = `${this.hostname}/api/backup`
24
25
  const encoded = this.encoded
25
26
  const dotenvxProjectId = this.dotenvxProjectId
27
+ const org = this.org
26
28
  const backedupAt = new Date().toISOString()
27
29
  const pwd = this.pwd
28
30
  const gitUrl = this.gitUrl
@@ -41,6 +43,7 @@ class PostBackup {
41
43
  device_public_key: devicePublicKey,
42
44
  encoded,
43
45
  dotenvx_project_id: dotenvxProjectId,
46
+ org: org,
44
47
  backedup_at: backedupAt,
45
48
  pwd,
46
49
  git_url: gitUrl,
@@ -25,7 +25,7 @@ class Backup {
25
25
  const sesh = new Session()
26
26
  const token = sesh.token()
27
27
  const devicePublicKey = sesh.devicePublicKey()
28
- let org = this.org
28
+ let _org = this.org
29
29
 
30
30
  // required
31
31
  const files = this._files()
@@ -41,17 +41,17 @@ class Backup {
41
41
  // missing .env.x file
42
42
  if (!_dotenvxProjectId) {
43
43
  // set org
44
- if (!org) {
44
+ if (!_org) {
45
45
  const choices = accountJson.organizations.map(o => ({
46
46
  name: o.provider_slug,
47
47
  value: o.provider_slug
48
48
  }))
49
49
 
50
50
  if (choices.length === 1) {
51
- org = choices[0].value // just use first choice
51
+ _org = choices[0].value // just use first choice
52
52
  } else {
53
- org = await prompts.select({
54
- message: 'Select dotenvx organization',
53
+ _org = await prompts.select({
54
+ message: 'Select org',
55
55
  choices
56
56
  })
57
57
  }
@@ -70,7 +70,7 @@ class Backup {
70
70
  const _osPlatform = osInfo.platform
71
71
  const _osArch = osInfo.arch
72
72
 
73
- const data = await new PostBackup(this.hostname, token, devicePublicKey, encoded, _dotenvxProjectId, _pwd, _gitUrl, _gitBranch, _systemUuid, _osPlatform, _osArch).run()
73
+ const data = await new PostBackup(this.hostname, token, devicePublicKey, encoded, _dotenvxProjectId, _org, _pwd, _gitUrl, _gitBranch, _systemUuid, _osPlatform, _osArch).run()
74
74
 
75
75
  return {
76
76
  id: data.id,