@dotenvx/dotenvx-ops 0.29.3 → 0.30.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 +13 -1
- package/package.json +1 -1
- package/src/cli/actions/backup.js +1 -0
- package/src/cli/actions/open.js +36 -0
- package/src/cli/dotenvx-ops.js +8 -0
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.30.1...main)
|
|
6
|
+
|
|
7
|
+
## [0.30.1](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.0...v0.30.1) (2026-01-08)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Add help message after `backup`
|
|
12
|
+
|
|
13
|
+
## [0.30.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.3...v0.30.0) (2026-01-07)
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
* Add `open` command to open project
|
|
6
18
|
|
|
7
19
|
## [0.29.3](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.2...v0.29.3) (2026-01-07)
|
|
8
20
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const _open = require('open')
|
|
2
|
+
|
|
3
|
+
const { logger } = require('@dotenvx/dotenvx')
|
|
4
|
+
|
|
5
|
+
const dotenvxProjectId = require('./../../lib/helpers/dotenvxProjectId')
|
|
6
|
+
|
|
7
|
+
async function open () {
|
|
8
|
+
// debug opts
|
|
9
|
+
const options = this.opts()
|
|
10
|
+
const hostname = options.hostname
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const uid = dotenvxProjectId(this.cwd)
|
|
14
|
+
const url = `${hostname}/go/${uid}`
|
|
15
|
+
|
|
16
|
+
_open(url)
|
|
17
|
+
|
|
18
|
+
logger.success(`✔ opened [${url}]`)
|
|
19
|
+
} catch (error) {
|
|
20
|
+
if (error.message) {
|
|
21
|
+
logger.error(error.message)
|
|
22
|
+
} else {
|
|
23
|
+
logger.error(error)
|
|
24
|
+
}
|
|
25
|
+
if (error.help) {
|
|
26
|
+
logger.help(error.help)
|
|
27
|
+
}
|
|
28
|
+
if (error.stack) {
|
|
29
|
+
logger.debug(error.stack)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
process.exit(1)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = open
|
package/src/cli/dotenvx-ops.js
CHANGED
|
@@ -39,6 +39,14 @@ program
|
|
|
39
39
|
.option('-h, --hostname <url>', 'set hostname', sesh.hostname())
|
|
40
40
|
.action(backupAction)
|
|
41
41
|
|
|
42
|
+
// dotenvx-ops open
|
|
43
|
+
const openAction = require('./actions/open')
|
|
44
|
+
program
|
|
45
|
+
.command('open')
|
|
46
|
+
.description('open project')
|
|
47
|
+
.option('-h, --hostname <url>', 'set hostname', sesh.hostname())
|
|
48
|
+
.action(openAction)
|
|
49
|
+
|
|
42
50
|
// dotenvx-ops observe base64String
|
|
43
51
|
const observeAction = require('./actions/observe')
|
|
44
52
|
program.command('observe')
|