@dotenvx/dotenvx-ops 0.30.1 → 0.30.3
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 +13 -1
- package/package.json +1 -1
- package/src/cli/actions/get.js +1 -1
- package/src/cli/actions/settings/device.js +1 -1
- package/src/cli/actions/settings/hostname.js +1 -1
- package/src/cli/actions/settings/path.js +1 -1
- package/src/cli/actions/settings/token.js +1 -1
- package/src/cli/actions/settings/username.js +1 -1
- package/src/cli/actions/status.js +1 -1
- package/src/cli/dotenvx-ops.js +2 -2
- package/src/lib/api/postSet.js +4 -1
- package/src/lib/main.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
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.30.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.3...main)
|
|
6
|
+
|
|
7
|
+
## [0.30.3](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.2...v0.30.3) (2026-01-17)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Switch to `console.log` ([#21](https://github.com/dotenvx/dotenvx-ops/pull/21) [dotenvx#386](https://github.com/dotenvx/dotenvx/issues/386))
|
|
12
|
+
|
|
13
|
+
## [0.30.2](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.1...v0.30.2) (2026-01-13)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
* Send `device.public_key` along with `set` ([#20](https://github.com/dotenvx/dotenvx-ops/pull/20))
|
|
6
18
|
|
|
7
19
|
## [0.30.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.0...v0.30.1) (2026-01-08)
|
|
8
20
|
|
package/package.json
CHANGED
package/src/cli/actions/get.js
CHANGED
|
@@ -10,7 +10,7 @@ function device () {
|
|
|
10
10
|
const sesh = new Session()
|
|
11
11
|
const devicePublicKey = sesh.devicePublicKey()
|
|
12
12
|
if (devicePublicKey && devicePublicKey.length > 1) {
|
|
13
|
-
|
|
13
|
+
console.log(smartMask(devicePublicKey, options.unmask, 11))
|
|
14
14
|
} else {
|
|
15
15
|
logger.error('missing device. Try generating one with [dotenvx-ops login].')
|
|
16
16
|
process.exit(1)
|
|
@@ -6,7 +6,7 @@ function hostname () {
|
|
|
6
6
|
const sesh = new Session()
|
|
7
7
|
const _hostname = sesh.hostname()
|
|
8
8
|
if (_hostname && _hostname.length > 1) {
|
|
9
|
-
|
|
9
|
+
console.log(_hostname)
|
|
10
10
|
} else {
|
|
11
11
|
logger.error('missing hostname. Try running [dotenvx-ops login].')
|
|
12
12
|
process.exit(1)
|
|
@@ -7,7 +7,7 @@ function path () {
|
|
|
7
7
|
const sesh = new Session()
|
|
8
8
|
const path = sesh.path()
|
|
9
9
|
if (path && path.length > 1) {
|
|
10
|
-
|
|
10
|
+
console.log(path)
|
|
11
11
|
} else {
|
|
12
12
|
logger.error('missing path. Try generating one with [dotenvx-ops login].')
|
|
13
13
|
process.exit(1)
|
|
@@ -10,7 +10,7 @@ function token () {
|
|
|
10
10
|
const sesh = new Session()
|
|
11
11
|
const token = sesh.token()
|
|
12
12
|
if (token && token.length > 1) {
|
|
13
|
-
|
|
13
|
+
console.log(smartMask(token, options.unmask, 11))
|
|
14
14
|
} else {
|
|
15
15
|
logger.error('missing token. Try generating one with [dotenvx-ops login].')
|
|
16
16
|
process.exit(1)
|
package/src/cli/dotenvx-ops.js
CHANGED
|
@@ -34,7 +34,7 @@ program
|
|
|
34
34
|
const backupAction = require('./actions/backup')
|
|
35
35
|
program
|
|
36
36
|
.command('backup')
|
|
37
|
-
.description('
|
|
37
|
+
.description('back up .env.keys')
|
|
38
38
|
.option('--org <organizationSlug>')
|
|
39
39
|
.option('-h, --hostname <url>', 'set hostname', sesh.hostname())
|
|
40
40
|
.action(backupAction)
|
|
@@ -65,7 +65,7 @@ program.command('observe')
|
|
|
65
65
|
const syncAction = require('./actions/sync')
|
|
66
66
|
program
|
|
67
67
|
.command('sync')
|
|
68
|
-
.description('sync .env
|
|
68
|
+
.description('sync .env*')
|
|
69
69
|
.option('-h, --hostname <url>', 'set hostname', sesh.hostname())
|
|
70
70
|
.option('--force', 'force changes')
|
|
71
71
|
.action(syncAction)
|
package/src/lib/api/postSet.js
CHANGED
|
@@ -2,15 +2,17 @@ const { http } = require('../../lib/helpers/http')
|
|
|
2
2
|
const buildApiError = require('../../lib/helpers/buildApiError')
|
|
3
3
|
|
|
4
4
|
class PostSet {
|
|
5
|
-
constructor (hostname, token, uri, value) {
|
|
5
|
+
constructor (hostname, token, devicePublicKey, uri, value) {
|
|
6
6
|
this.hostname = hostname || 'https://ops.dotenvx.com'
|
|
7
7
|
this.token = token
|
|
8
|
+
this.devicePublicKey = devicePublicKey
|
|
8
9
|
this.uri = uri
|
|
9
10
|
this.value = value
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
async run () {
|
|
13
14
|
const token = this.token
|
|
15
|
+
const devicePublicKey = this.devicePublicKey
|
|
14
16
|
const uri = this.uri
|
|
15
17
|
const value = this.value
|
|
16
18
|
const url = `${this.hostname}/api/set`
|
|
@@ -22,6 +24,7 @@ class PostSet {
|
|
|
22
24
|
'Content-Type': 'application/json'
|
|
23
25
|
},
|
|
24
26
|
body: JSON.stringify({
|
|
27
|
+
device_public_key: devicePublicKey,
|
|
25
28
|
uri,
|
|
26
29
|
value
|
|
27
30
|
})
|
package/src/lib/main.js
CHANGED
|
@@ -71,7 +71,9 @@ const set = async function (uri, value, options = {}) {
|
|
|
71
71
|
token = sesh.token()
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
const devicePublicKey = sesh.devicePublicKey()
|
|
75
|
+
|
|
76
|
+
return await new PostSet(hostname, token, devicePublicKey, uri, value).run()
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
const config = function (options = {}) {
|