@dotenvx/dotenvx-ops 0.29.2 → 0.30.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 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.29.2...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx-ops/compare/v0.30.0...main)
6
+
7
+ ## [0.30.0](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.3...v0.30.0) (2026-01-07)
8
+
9
+ ### Added
10
+
11
+ * Add `open` command to open project
12
+
13
+ ## [0.29.3](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.2...v0.29.3) (2026-01-07)
14
+
15
+ ### Changed
16
+
17
+ * Patch `sha256File` method signature
6
18
 
7
19
  ## [0.29.2](https://github.com/dotenvx/dotenvx-ops/compare/v0.29.1...v0.29.2) (2026-01-07)
8
20
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.29.2",
2
+ "version": "0.30.0",
3
3
  "name": "@dotenvx/dotenvx-ops",
4
4
  "description": "production grade dotenvx–with operational primitives",
5
5
  "author": "@motdotla",
@@ -8,7 +8,6 @@ const clipboardy = require('./../../lib/helpers/clipboardy')
8
8
  const confirm = require('./../../lib/helpers/confirm')
9
9
  const formatCode = require('./../../lib/helpers/formatCode')
10
10
  const truncate = require('./../../lib/helpers/truncate')
11
- const sha256File = require('./../../lib/helpers/sha256File')
12
11
 
13
12
  const LoggedIn = require('./../../lib/services/loggedIn')
14
13
  const Login = require('./../../lib/services/login')
@@ -64,7 +63,7 @@ async function backup () {
64
63
 
65
64
  // write .env.x
66
65
  if (projectEnvXFileNeedsWrite) {
67
- logger.debug(`writing .env.x`)
66
+ logger.debug('writing .env.x')
68
67
  fs.writeFileSync('.env.x', projectEnvXSrc, 'utf8')
69
68
  }
70
69
 
@@ -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
@@ -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')
@@ -43,7 +43,7 @@ class PostBackup {
43
43
  device_public_key: devicePublicKey,
44
44
  encoded,
45
45
  dotenvx_project_id: dotenvxProjectId,
46
- org: org,
46
+ org,
47
47
  backedup_at: backedupAt,
48
48
  pwd,
49
49
  git_url: gitUrl,
@@ -1,7 +1,7 @@
1
1
  const fs = require('fs')
2
2
  const crypto = require('crypto')
3
3
 
4
- function sha256File (word, count) {
4
+ function sha256File (filepath) {
5
5
  const buf = fs.readFileSync(filepath)
6
6
  return crypto.createHash('sha256').update(buf).digest('hex')
7
7
  }