@webbies.dev/dotenvify 0.3.0 → 0.3.2
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/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webbies.dev/dotenvify",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A utility to convert environment variables from various sources into different formats",
|
|
5
|
-
"main": "bin/dotenvify.js",
|
|
6
5
|
"bin": {
|
|
7
|
-
"dotenvify": "
|
|
6
|
+
"dotenvify": "./dotenvify"
|
|
8
7
|
},
|
|
9
8
|
"scripts": {
|
|
10
|
-
"test": "
|
|
9
|
+
"test": "./dotenvify --help"
|
|
11
10
|
},
|
|
12
11
|
"keywords": [
|
|
13
12
|
"dotenv",
|
|
@@ -24,20 +23,9 @@
|
|
|
24
23
|
"url": "https://github.com/webb1es/dotenvify.git"
|
|
25
24
|
},
|
|
26
25
|
"files": [
|
|
27
|
-
"
|
|
28
|
-
"LICENSE",
|
|
29
|
-
"README.md"
|
|
26
|
+
"dotenvify"
|
|
30
27
|
],
|
|
31
28
|
"engines": {
|
|
32
29
|
"node": ">=12"
|
|
33
|
-
}
|
|
34
|
-
"os": [
|
|
35
|
-
"darwin",
|
|
36
|
-
"linux",
|
|
37
|
-
"win32"
|
|
38
|
-
],
|
|
39
|
-
"cpu": [
|
|
40
|
-
"x64",
|
|
41
|
-
"arm64"
|
|
42
|
-
]
|
|
30
|
+
}
|
|
43
31
|
}
|
package/bin/dotenvify.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require('child_process');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const os = require('os');
|
|
6
|
-
|
|
7
|
-
function getBinaryName() {
|
|
8
|
-
const platform = os.platform();
|
|
9
|
-
const arch = os.arch();
|
|
10
|
-
|
|
11
|
-
let osName;
|
|
12
|
-
switch (platform) {
|
|
13
|
-
case 'win32':
|
|
14
|
-
osName = 'windows';
|
|
15
|
-
break;
|
|
16
|
-
case 'darwin':
|
|
17
|
-
osName = 'darwin';
|
|
18
|
-
break;
|
|
19
|
-
case 'linux':
|
|
20
|
-
osName = 'linux';
|
|
21
|
-
break;
|
|
22
|
-
default:
|
|
23
|
-
throw new Error(`Unsupported platform: ${platform}`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let archName;
|
|
27
|
-
switch (arch) {
|
|
28
|
-
case 'x64':
|
|
29
|
-
archName = 'amd64';
|
|
30
|
-
break;
|
|
31
|
-
case 'arm64':
|
|
32
|
-
archName = 'arm64';
|
|
33
|
-
break;
|
|
34
|
-
default:
|
|
35
|
-
throw new Error(`Unsupported architecture: ${arch}`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const extension = platform === 'win32' ? '.exe' : '';
|
|
39
|
-
return `dotenvify_${osName}_${archName}${extension}`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function main() {
|
|
43
|
-
try {
|
|
44
|
-
const binaryName = getBinaryName();
|
|
45
|
-
const binaryPath = path.join(__dirname, binaryName);
|
|
46
|
-
|
|
47
|
-
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
48
|
-
stdio: 'inherit',
|
|
49
|
-
windowsHide: false,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
child.on('error', (error) => {
|
|
53
|
-
if (error.code === 'ENOENT') {
|
|
54
|
-
console.error(`Binary not found: ${binaryPath}`);
|
|
55
|
-
console.error(`Platform: ${os.platform()}, Architecture: ${os.arch()}`);
|
|
56
|
-
process.exit(1);
|
|
57
|
-
} else {
|
|
58
|
-
console.error('Failed to start dotenvify:', error.message);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
child.on('exit', (code, signal) => {
|
|
64
|
-
if (signal) {
|
|
65
|
-
process.kill(process.pid, signal);
|
|
66
|
-
} else {
|
|
67
|
-
process.exit(code);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} catch (error) {
|
|
71
|
-
console.error('Error:', error.message);
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (require.main === module) {
|
|
77
|
-
main();
|
|
78
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|