@dotenvx/dotenvx 3.0.0-rc1 → 3.0.0-rc3

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/bin/dotenvx.cjs CHANGED
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  const { spawn } = require('node:child_process')
3
3
  const { resolveCli } = require('../lib/cli.cjs')
4
+ const { currentPlatform } = require('../lib/platforms.cjs')
4
5
 
5
- const libc = process.platform === 'linux' ? (process.report.getReport().header.glibcVersionRuntime ? '-gnu' : '-musl') : ''
6
- const platform = `${process.platform}-${process.arch}${libc}`
7
6
  let binary
8
7
  try {
9
8
  binary = resolveCli()
@@ -22,7 +21,7 @@ const cleanup = () => {
22
21
 
23
22
  child.on('error', error => {
24
23
  cleanup()
25
- console.error(`Could not launch the dotenvx CLI for ${platform}: ${error.message}`)
24
+ console.error(`Could not launch the dotenvx CLI for ${currentPlatform()}: ${error.message}`)
26
25
  console.error('Reinstall @dotenvx/dotenvx with its native files included. For a local Forge checkout, run npm run build:dotenvx-nodejs.')
27
26
  console.error('To use a standalone installation, set DOTENVX_CLI to the absolute path of its executable.')
28
27
  process.exitCode = 1
package/lib/cli.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  const fs = require('node:fs')
2
2
  const path = require('node:path')
3
3
  const { resolveNativeFile } = require('./native-package.cjs')
4
+ const { currentPlatform } = require('./platforms.cjs')
4
5
 
5
6
  // Only standalone executables qualify. npm shims (including older dotenvx
6
7
  // JavaScript CLIs) must not call another shim and recurse through PATH.
@@ -36,8 +37,7 @@ function resolveCli ({ env = process.env, platform = process.platform, arch = pr
36
37
  if (isStandalone(candidate)) return candidate
37
38
  }
38
39
 
39
- if (libc === undefined) libc = platform === 'linux' ? (process.report.getReport().header.glibcVersionRuntime ? '-gnu' : '-musl') : ''
40
- return resolveNativeFile(executable, { platform: `${platform}-${arch}${libc}`, root })
40
+ return resolveNativeFile(executable, { platform: currentPlatform(platform, arch, libc), root })
41
41
  }
42
42
 
43
43
  module.exports = { resolveCli }
package/lib/platforms.cjs CHANGED
@@ -10,9 +10,11 @@ const platforms = {
10
10
  'win32-arm64': { name: '@dotenvx/dotenvx-windows-arm64', os: 'win32', cpu: 'arm64', target: 'aarch64-pc-windows-msvc', runner: 'windows-11-arm' }
11
11
  }
12
12
 
13
- function currentPlatform () {
14
- const libc = process.platform === 'linux' ? (process.report.getReport().header.glibcVersionRuntime ? '-gnu' : '-musl') : ''
15
- return `${process.platform}-${process.arch}${libc}`
13
+ function currentPlatform (platform = process.platform, arch = process.arch, libc) {
14
+ const base = `${platform}-${arch}`
15
+ if (libc !== undefined) return base + libc
16
+ if (platform !== 'linux') return base
17
+ return base + (process.report.getReport().header.glibcVersionRuntime ? '-gnu' : '-musl')
16
18
  }
17
19
 
18
20
  module.exports = { platforms, currentPlatform }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotenvx/dotenvx",
3
- "version": "3.0.0-rc1",
4
- "description": "a secure dotenv—from the creator of dotenv",
3
+ "version": "3.0.0-rc3",
4
+ "description": "the secure dotenv—from the creator of dotenv",
5
5
  "license": "BSD-3-Clause",
6
6
  "homepage": "https://dotenvx.com",
7
7
  "repository": {
@@ -60,14 +60,14 @@
60
60
  "provenance": false
61
61
  },
62
62
  "optionalDependencies": {
63
- "@dotenvx/dotenvx-darwin-arm64": "3.0.0-rc1",
64
- "@dotenvx/dotenvx-darwin-x86_64": "3.0.0-rc1",
65
- "@dotenvx/dotenvx-linux-x86_64": "3.0.0-rc1",
66
- "@dotenvx/dotenvx-linux-arm64": "3.0.0-rc1",
67
- "@dotenvx/dotenvx-linux-x86_64-musl": "3.0.0-rc1",
68
- "@dotenvx/dotenvx-linux-arm64-musl": "3.0.0-rc1",
69
- "@dotenvx/dotenvx-windows-x86_64": "3.0.0-rc1",
70
- "@dotenvx/dotenvx-windows-arm64": "3.0.0-rc1"
63
+ "@dotenvx/dotenvx-darwin-arm64": "3.0.0-rc3",
64
+ "@dotenvx/dotenvx-darwin-x86_64": "3.0.0-rc3",
65
+ "@dotenvx/dotenvx-linux-x86_64": "3.0.0-rc3",
66
+ "@dotenvx/dotenvx-linux-arm64": "3.0.0-rc3",
67
+ "@dotenvx/dotenvx-linux-x86_64-musl": "3.0.0-rc3",
68
+ "@dotenvx/dotenvx-linux-arm64-musl": "3.0.0-rc3",
69
+ "@dotenvx/dotenvx-windows-x86_64": "3.0.0-rc3",
70
+ "@dotenvx/dotenvx-windows-arm64": "3.0.0-rc3"
71
71
  },
72
72
  "private": false
73
73
  }