@dotenvx/dotenvx-ops 0.31.0 → 0.31.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 +7 -1
- package/package.json +1 -1
- package/src/cli/actions/settings/device.js +1 -1
- package/src/db/session.js +3 -8
- package/src/lib/main.js +6 -6
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.31.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.31.1...main)
|
|
6
|
+
|
|
7
|
+
## [0.31.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.31.0...v0.31.1) (2026-03-07)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Shortened default showable device id for `dotenvx-ops settings device` ([#24](https://github.com/dotenvx/dotenvx-ops/pull/24))
|
|
6
12
|
|
|
7
13
|
## [0.31.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.3...v0.31.0) (2026-01-17)
|
|
8
14
|
|
package/package.json
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
|
-
console.log(smartMask(devicePublicKey, options.unmask,
|
|
13
|
+
console.log(smartMask(devicePublicKey, options.unmask, 6))
|
|
14
14
|
} else {
|
|
15
15
|
logger.error('missing device. Try generating one with [dotenvx-ops login].')
|
|
16
16
|
process.exit(1)
|
package/src/db/session.js
CHANGED
|
@@ -36,15 +36,15 @@ class Session {
|
|
|
36
36
|
// Get
|
|
37
37
|
//
|
|
38
38
|
hostname () {
|
|
39
|
-
return this.store.get('DOTENVX_OPS_HOSTNAME') ||
|
|
39
|
+
return this.store.get('DOTENVX_OPS_HOSTNAME') || 'https://ops.dotenvx.com'
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
username () {
|
|
43
|
-
return this.store.get('DOTENVX_OPS_USERNAME') ||
|
|
43
|
+
return this.store.get('DOTENVX_OPS_USERNAME') || undefined
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
token () {
|
|
47
|
-
return this.store.get('DOTENVX_OPS_TOKEN') ||
|
|
47
|
+
return this.store.get('DOTENVX_OPS_TOKEN') || undefined
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
devicePublicKey () {
|
|
@@ -111,11 +111,6 @@ class Session {
|
|
|
111
111
|
this.store.delete('DOTENVX_OPS_USERNAME')
|
|
112
112
|
this.store.delete('DOTENVX_OPS_TOKEN')
|
|
113
113
|
this.store.delete('DOTENVX_OPS_HOSTNAME')
|
|
114
|
-
this.store.delete('DOTENVX_RADAR_USER')
|
|
115
|
-
this.store.delete('DOTENVX_RADAR_USERNAME')
|
|
116
|
-
this.store.delete('DOTENVX_RADAR_TOKEN')
|
|
117
|
-
this.store.delete('DOTENVX_RADAR_HOSTNAME')
|
|
118
|
-
|
|
119
114
|
return true
|
|
120
115
|
}
|
|
121
116
|
}
|
package/src/lib/main.js
CHANGED
|
@@ -13,12 +13,12 @@ const dotenvxProjectId = require('./helpers/dotenvxProjectId')
|
|
|
13
13
|
const observe = async function (encoded, options = {}) {
|
|
14
14
|
const sesh = new Session() // TODO: handle scenario where constructor fails
|
|
15
15
|
|
|
16
|
-
let hostname = process.env.DOTENVX_OPS_HOSTNAME ||
|
|
16
|
+
let hostname = process.env.DOTENVX_OPS_HOSTNAME || options.hostname
|
|
17
17
|
if (!hostname) {
|
|
18
18
|
hostname = sesh.hostname()
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
let token = process.env.DOTENVX_OPS_TOKEN ||
|
|
21
|
+
let token = process.env.DOTENVX_OPS_TOKEN || options.token
|
|
22
22
|
if (!token) {
|
|
23
23
|
token = sesh.token()
|
|
24
24
|
}
|
|
@@ -44,12 +44,12 @@ const observe = async function (encoded, options = {}) {
|
|
|
44
44
|
const get = async function (uri, options = {}) {
|
|
45
45
|
const sesh = new Session() // TODO: handle scenario where constructor fails
|
|
46
46
|
|
|
47
|
-
let hostname = process.env.DOTENVX_OPS_HOSTNAME ||
|
|
47
|
+
let hostname = process.env.DOTENVX_OPS_HOSTNAME || options.hostname
|
|
48
48
|
if (!hostname) {
|
|
49
49
|
hostname = sesh.hostname()
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
let token = process.env.DOTENVX_OPS_TOKEN ||
|
|
52
|
+
let token = process.env.DOTENVX_OPS_TOKEN || options.token
|
|
53
53
|
if (!token) {
|
|
54
54
|
token = sesh.token()
|
|
55
55
|
}
|
|
@@ -61,12 +61,12 @@ const get = async function (uri, options = {}) {
|
|
|
61
61
|
const set = async function (uri, value, options = {}) {
|
|
62
62
|
const sesh = new Session() // TODO: handle scenario where constructor fails
|
|
63
63
|
|
|
64
|
-
let hostname = process.env.DOTENVX_OPS_HOSTNAME ||
|
|
64
|
+
let hostname = process.env.DOTENVX_OPS_HOSTNAME || options.hostname
|
|
65
65
|
if (!hostname) {
|
|
66
66
|
hostname = sesh.hostname()
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
let token = process.env.DOTENVX_OPS_TOKEN ||
|
|
69
|
+
let token = process.env.DOTENVX_OPS_TOKEN || options.token
|
|
70
70
|
if (!token) {
|
|
71
71
|
token = sesh.token()
|
|
72
72
|
}
|