@dotenvx/dotenvx-ops 0.19.0 → 0.20.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 +8 -2
- package/package.json +1 -1
- package/src/cli/actions/sync.js +1 -1
- package/src/cli/dotenvx-ops.js +1 -0
- package/src/lib/api/postSync.js +5 -2
- package/src/lib/services/sync.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +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.20.0...main)
|
|
6
|
+
|
|
7
|
+
## [0.20.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.19.0...v0.20.0) (2025-10-07)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* Add `--force` flag to `sync` ([#4](https://github.com/dotenvx/dotenvx-ops/pull/4))
|
|
6
12
|
|
|
7
13
|
## [0.19.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.18.0...v0.19.0) (2025-10-07)
|
|
8
14
|
|
|
9
15
|
### Added
|
|
10
16
|
|
|
11
|
-
* Surface any conflicts during `sync` ([#3](https://github.com/dotenvx/dotenvx-ops/
|
|
17
|
+
* Surface any conflicts during `sync` ([#3](https://github.com/dotenvx/dotenvx-ops/pull/3))
|
|
12
18
|
|
|
13
19
|
## [0.18.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.17.1...v0.18.0) (2025-10-06)
|
|
14
20
|
|
package/package.json
CHANGED
package/src/cli/actions/sync.js
CHANGED
|
@@ -30,7 +30,7 @@ async function sync () {
|
|
|
30
30
|
dotenvxProjectId,
|
|
31
31
|
projectUsernameName,
|
|
32
32
|
files
|
|
33
|
-
} = await new Sync(options.hostname).run()
|
|
33
|
+
} = await new Sync(options.hostname, options.force).run()
|
|
34
34
|
logger.debug(`files: ${JSON.stringify(files)}`)
|
|
35
35
|
|
|
36
36
|
// write output files
|
package/src/cli/dotenvx-ops.js
CHANGED
package/src/lib/api/postSync.js
CHANGED
|
@@ -3,7 +3,7 @@ const buildApiError = require('../../lib/helpers/buildApiError')
|
|
|
3
3
|
const packageJson = require('../../lib/helpers/packageJson')
|
|
4
4
|
|
|
5
5
|
class PostSync {
|
|
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, pwd = null, gitUrl = null, gitBranch = null, systemUuid = null, osPlatform = null, osArch = null, force = false) {
|
|
7
7
|
this.hostname = hostname || 'https://ops.dotenvx.com'
|
|
8
8
|
this.token = token
|
|
9
9
|
this.devicePublicKey = devicePublicKey
|
|
@@ -15,6 +15,7 @@ class PostSync {
|
|
|
15
15
|
this.systemUuid = systemUuid
|
|
16
16
|
this.osPlatform = osPlatform
|
|
17
17
|
this.osArch = osArch
|
|
18
|
+
this.force = force
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
async run () {
|
|
@@ -30,6 +31,7 @@ class PostSync {
|
|
|
30
31
|
const systemUuid = this.systemUuid
|
|
31
32
|
const osPlatform = this.osPlatform
|
|
32
33
|
const osArch = this.osArch
|
|
34
|
+
const force = this.force
|
|
33
35
|
|
|
34
36
|
const resp = await http(url, {
|
|
35
37
|
method: 'POST',
|
|
@@ -48,7 +50,8 @@ class PostSync {
|
|
|
48
50
|
system_uuid: systemUuid,
|
|
49
51
|
os_platform: osPlatform,
|
|
50
52
|
os_arch: osArch,
|
|
51
|
-
cli_version: packageJson.version
|
|
53
|
+
cli_version: packageJson.version,
|
|
54
|
+
force
|
|
52
55
|
})
|
|
53
56
|
})
|
|
54
57
|
|
package/src/lib/services/sync.js
CHANGED
|
@@ -13,8 +13,9 @@ const Errors = require('./../helpers/errors')
|
|
|
13
13
|
const PostSync = require('./../api/postSync')
|
|
14
14
|
|
|
15
15
|
class Sync {
|
|
16
|
-
constructor (hostname) {
|
|
16
|
+
constructor (hostname, force = false) {
|
|
17
17
|
this.hostname = hostname
|
|
18
|
+
this.force = force
|
|
18
19
|
this.cwd = process.cwd()
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -42,7 +43,7 @@ class Sync {
|
|
|
42
43
|
const _osPlatform = osInfo.platform
|
|
43
44
|
const _osArch = osInfo.arch
|
|
44
45
|
|
|
45
|
-
const data = await new PostSync(this.hostname, token, devicePublicKey, encoded, dotenvxProjectId, _pwd, _gitUrl, _gitBranch, _systemUuid, _osPlatform, _osArch).run()
|
|
46
|
+
const data = await new PostSync(this.hostname, token, devicePublicKey, encoded, dotenvxProjectId, _pwd, _gitUrl, _gitBranch, _systemUuid, _osPlatform, _osArch, this.force).run()
|
|
46
47
|
|
|
47
48
|
return {
|
|
48
49
|
id: data.id,
|