@dotenvx/dotenvx-ops 0.16.0 → 0.17.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 +31 -19
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/cli/actions/sync.js +34 -2
- package/src/cli/dotenvx-ops.js +1 -0
- package/src/lib/services/sync.js +2 -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.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.17.0...main)
|
|
6
|
+
|
|
7
|
+
## [0.17.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.16.1...v0.17.0) (2025-10-01)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* Write files on `sync` ([#1](https://github.com/dotenvx/dotenvx-ops/pull/1))
|
|
12
|
+
|
|
13
|
+
## [0.16.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.16.0...v0.16.1) (2025-09-18)
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
* Add `OPS` to install.sh script
|
|
6
18
|
|
|
7
19
|
## [0.16.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.15.6...v0.16.0) (2025-09-18)
|
|
8
20
|
|
|
@@ -14,25 +26,25 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
14
26
|
|
|
15
27
|
### Changed
|
|
16
28
|
|
|
17
|
-
* Send device public key along with sync ([#19](https://github.com/dotenvx/dotenvx-
|
|
29
|
+
* Send device public key along with sync ([#19](https://github.com/dotenvx/dotenvx-radar/pull/19))
|
|
18
30
|
|
|
19
31
|
## [0.15.5](https://github.com/dotenvx/dotenvx-ops/compare/v0.15.3...v0.15.5) (2025-08-23)
|
|
20
32
|
|
|
21
33
|
### Added
|
|
22
34
|
|
|
23
|
-
* Mark device during login handshake ([#18](https://github.com/dotenvx/dotenvx-
|
|
35
|
+
* Mark device during login handshake ([#18](https://github.com/dotenvx/dotenvx-radar/pull/18))
|
|
24
36
|
|
|
25
37
|
## [0.15.3](https://github.com/dotenvx/dotenvx-ops/compare/v0.15.2...v0.15.3) (2025-08-23)
|
|
26
38
|
|
|
27
39
|
### Changed
|
|
28
40
|
|
|
29
|
-
* Install latest dotenvx when installing dotenvx-ops ([#17](https://github.com/dotenvx/dotenvx-
|
|
41
|
+
* Install latest dotenvx when installing dotenvx-ops ([#17](https://github.com/dotenvx/dotenvx-radar/pull/17))
|
|
30
42
|
|
|
31
43
|
## [0.15.2](https://github.com/dotenvx/dotenvx-ops/compare/v0.15.1...v0.15.2) (2025-08-18)
|
|
32
44
|
|
|
33
45
|
### Changed
|
|
34
46
|
|
|
35
|
-
* Fix bad method name ([#15](https://github.com/dotenvx/dotenvx-
|
|
47
|
+
* Fix bad method name ([#15](https://github.com/dotenvx/dotenvx-radar/pull/15))
|
|
36
48
|
|
|
37
49
|
## [0.15.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.15.0...v0.15.1) (2025-08-18)
|
|
38
50
|
|
|
@@ -44,11 +56,11 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
44
56
|
|
|
45
57
|
### Added
|
|
46
58
|
|
|
47
|
-
* Add sync command ([#14](https://github.com/dotenvx/dotenvx-
|
|
59
|
+
* Add sync command ([#14](https://github.com/dotenvx/dotenvx-radar/pull/14))
|
|
48
60
|
|
|
49
61
|
## [0.14.2](https://github.com/dotenvx/dotenvx-ops/compare/v0.14.1...v0.14.2) (2025-07-21)
|
|
50
62
|
|
|
51
|
-
* Patch usage description ([#13](https://github.com/dotenvx/dotenvx-
|
|
63
|
+
* Patch usage description ([#13](https://github.com/dotenvx/dotenvx-radar/pull/13))
|
|
52
64
|
|
|
53
65
|
## [0.14.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.14.0...v0.14.1) (2025-07-21)
|
|
54
66
|
|
|
@@ -56,61 +68,61 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
56
68
|
|
|
57
69
|
## [0.14.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.13.0...v0.14.0) (2025-07-19)
|
|
58
70
|
|
|
59
|
-
* Add `dotenvx-ops status` ([#12](https://github.com/dotenvx/dotenvx-
|
|
71
|
+
* Add `dotenvx-ops status` ([#12](https://github.com/dotenvx/dotenvx-radar/pull/12))
|
|
60
72
|
|
|
61
73
|
## [0.13.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.12.0...v0.13.0) (2025-07-15)
|
|
62
74
|
|
|
63
|
-
* Add `dotenvx-ops settings` ([#11](https://github.com/dotenvx/dotenvx-
|
|
75
|
+
* Add `dotenvx-ops settings` ([#11](https://github.com/dotenvx/dotenvx-radar/pull/11))
|
|
64
76
|
|
|
65
77
|
## [0.12.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.11.0...v0.12.0) (2025-07-15)
|
|
66
78
|
|
|
67
|
-
* Add additional fields to observe ([#10](https://github.com/dotenvx/dotenvx-
|
|
79
|
+
* Add additional fields to observe ([#10](https://github.com/dotenvx/dotenvx-radar/pull/10))
|
|
68
80
|
|
|
69
81
|
## [0.11.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.10.0...v0.11.0) (2025-07-15)
|
|
70
82
|
|
|
71
|
-
* Add `observe` with git url ([#9](https://github.com/dotenvx/dotenvx-
|
|
83
|
+
* Add `observe` with git url ([#9](https://github.com/dotenvx/dotenvx-radar/pull/9))
|
|
72
84
|
|
|
73
85
|
## [0.10.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.9.1...v0.10.0) (2025-07-14)
|
|
74
86
|
|
|
75
87
|
### Added
|
|
76
88
|
|
|
77
|
-
* Add `dotenvx-ops logout` ([#8](https://github.com/dotenvx/dotenvx-
|
|
89
|
+
* Add `dotenvx-ops logout` ([#8](https://github.com/dotenvx/dotenvx-radar/pull/8))
|
|
78
90
|
|
|
79
91
|
## [0.9.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.9.0...v0.9.1) (2025-07-14)
|
|
80
92
|
|
|
81
93
|
### Changed
|
|
82
94
|
|
|
83
|
-
* Include `dotenv` in package.json ([#7](https://github.com/dotenvx/dotenvx-
|
|
95
|
+
* Include `dotenv` in package.json ([#7](https://github.com/dotenvx/dotenvx-radar/pull/7))
|
|
84
96
|
|
|
85
97
|
## [0.9.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.8.0...v0.9.0) (2025-07-14)
|
|
86
98
|
|
|
87
99
|
### Added
|
|
88
100
|
|
|
89
|
-
* Add bearer token support to `dotenvx-ops observe` ([#6](https://github.com/dotenvx/dotenvx-
|
|
101
|
+
* Add bearer token support to `dotenvx-ops observe` ([#6](https://github.com/dotenvx/dotenvx-radar/pull/6))
|
|
90
102
|
|
|
91
103
|
## [0.8.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.7.0...v0.8.0) (2025-07-14)
|
|
92
104
|
|
|
93
105
|
### Added
|
|
94
106
|
|
|
95
|
-
* Add `dotenvx-ops login` command ([#5](https://github.com/dotenvx/dotenvx-
|
|
107
|
+
* Add `dotenvx-ops login` command ([#5](https://github.com/dotenvx/dotenvx-radar/pull/5))
|
|
96
108
|
|
|
97
109
|
## [0.7.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.6.0...v0.7.0) (2025-07-11)
|
|
98
110
|
|
|
99
111
|
### Added
|
|
100
112
|
|
|
101
|
-
* Send observation data to api ([#4](https://github.com/dotenvx/dotenvx-
|
|
113
|
+
* Send observation data to api ([#4](https://github.com/dotenvx/dotenvx-radar/pull/4))
|
|
102
114
|
|
|
103
115
|
## [0.6.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.5.0...v0.6.0) (2025-07-09)
|
|
104
116
|
|
|
105
117
|
### Added
|
|
106
118
|
|
|
107
|
-
* Add `dotenvx-ops observe` cli that proxies to `main#observe` ([#3](https://github.com/dotenvx/dotenvx-
|
|
119
|
+
* Add `dotenvx-ops observe` cli that proxies to `main#observe` ([#3](https://github.com/dotenvx/dotenvx-radar/pull/3))
|
|
108
120
|
|
|
109
121
|
## [0.5.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.4.3...v0.5.0) (2025-07-09)
|
|
110
122
|
|
|
111
123
|
### Added
|
|
112
124
|
|
|
113
|
-
* Add `observe` function ([#2](https://github.com/dotenvx/dotenvx-
|
|
125
|
+
* Add `observe` function ([#2](https://github.com/dotenvx/dotenvx-radar/pull/2))
|
|
114
126
|
|
|
115
127
|
## 0.4.3
|
|
116
128
|
|
|
@@ -134,7 +146,7 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
134
146
|
|
|
135
147
|
### Added
|
|
136
148
|
|
|
137
|
-
* Add `run` command that proxies to `dotenvx run` ([#1](https://github.com/dotenvx/dotenvx-
|
|
149
|
+
* Add `run` command that proxies to `dotenvx run` ([#1](https://github.com/dotenvx/dotenvx-radar/pull/1))
|
|
138
150
|
|
|
139
151
|
## 0.3.0
|
|
140
152
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
[](https://dotenvx.com/ops)
|
|
1
|
+
[](https://dotenvx.com/ops)
|
|
2
2
|
|
|
3
|
-
> Dotenvx Ops is
|
|
3
|
+
> Dotenvx Ops is commercial tooling for [dotenvx](https://github.com/dotenvx/dotenvx).
|
|
4
4
|
|
|
5
5
|
*Use dotenvx across your team, infrastructure, agents, and more.*
|
|
6
6
|
|
package/package.json
CHANGED
package/src/cli/actions/sync.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const crypto = require('crypto')
|
|
3
|
+
|
|
1
4
|
const { logger } = require('@dotenvx/dotenvx')
|
|
2
5
|
|
|
3
6
|
const { createSpinner } = require('./../../lib/helpers/createSpinner')
|
|
7
|
+
const smartMask = require('./../../lib/helpers/smartMask')
|
|
4
8
|
|
|
5
9
|
const Sync = require('./../../lib/services/sync')
|
|
6
10
|
|
|
7
11
|
const spinner = createSpinner('syncing')
|
|
8
12
|
|
|
13
|
+
function sha256File (filepath) {
|
|
14
|
+
const buf = fs.readFileSync(filepath)
|
|
15
|
+
return crypto.createHash('sha256').update(buf).digest('hex')
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
async function sync () {
|
|
10
19
|
try {
|
|
11
20
|
// debug opts
|
|
@@ -14,11 +23,34 @@ async function sync () {
|
|
|
14
23
|
|
|
15
24
|
spinner.start()
|
|
16
25
|
|
|
17
|
-
const {
|
|
26
|
+
const {
|
|
27
|
+
dotenvxProjectId,
|
|
28
|
+
projectUsernameName,
|
|
29
|
+
envFiles
|
|
30
|
+
} = await new Sync(options.hostname).run()
|
|
31
|
+
logger.debug(`envFiles: ${JSON.stringify(envFiles)}`)
|
|
32
|
+
|
|
33
|
+
// write envFiles
|
|
34
|
+
for (const file of envFiles) {
|
|
35
|
+
const { filepath, src, sha } = file
|
|
36
|
+
|
|
37
|
+
let needsWrite = true
|
|
38
|
+
if (fs.existsSync(filepath)) {
|
|
39
|
+
const localSha = sha256File(filepath)
|
|
40
|
+
needsWrite = localSha !== sha
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (needsWrite) {
|
|
44
|
+
logger.debug(`writing ${filepath}`)
|
|
45
|
+
fs.writeFileSync(filepath, src, 'utf8')
|
|
46
|
+
} else {
|
|
47
|
+
logger.debug(`unchanged ${filepath} (skipped)`)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
18
50
|
|
|
19
51
|
spinner.stop()
|
|
20
52
|
|
|
21
|
-
logger.success(`✔ synced [${projectUsernameName}]`)
|
|
53
|
+
logger.success(`✔ synced [${projectUsernameName}] ${smartMask(dotenvxProjectId, options.unmask)}`)
|
|
22
54
|
} catch (error) {
|
|
23
55
|
spinner.stop()
|
|
24
56
|
if (error.message) {
|
package/src/cli/dotenvx-ops.js
CHANGED
package/src/lib/services/sync.js
CHANGED