@dotenvx/primitives 0.6.0 → 0.7.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/dist/index.cjs +22 -2
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -5951,6 +5951,9 @@ var require_encrypted = __commonJS({
|
|
|
5951
5951
|
"src/encrypted.js"(exports2, module2) {
|
|
5952
5952
|
var PREFIX = "encrypted:";
|
|
5953
5953
|
function encrypted2(value) {
|
|
5954
|
+
if (!value) {
|
|
5955
|
+
return false;
|
|
5956
|
+
}
|
|
5954
5957
|
return value.startsWith(PREFIX);
|
|
5955
5958
|
}
|
|
5956
5959
|
module2.exports = encrypted2;
|
|
@@ -6099,6 +6102,21 @@ var require_expand = __commonJS({
|
|
|
6099
6102
|
}
|
|
6100
6103
|
});
|
|
6101
6104
|
|
|
6105
|
+
// src/keypair.js
|
|
6106
|
+
var require_keypair = __commonJS({
|
|
6107
|
+
"src/keypair.js"(exports2, module2) {
|
|
6108
|
+
var { PrivateKey } = require_dist();
|
|
6109
|
+
function keypair2() {
|
|
6110
|
+
const kp = new PrivateKey();
|
|
6111
|
+
return {
|
|
6112
|
+
publicKey: kp.publicKey.toHex(),
|
|
6113
|
+
privateKey: Buffer.from(kp.secret).toString("hex")
|
|
6114
|
+
};
|
|
6115
|
+
}
|
|
6116
|
+
module2.exports = keypair2;
|
|
6117
|
+
}
|
|
6118
|
+
});
|
|
6119
|
+
|
|
6102
6120
|
// src/scan.js
|
|
6103
6121
|
var require_scan = __commonJS({
|
|
6104
6122
|
"src/scan.js"(exports2, module2) {
|
|
@@ -6226,8 +6244,8 @@ var require_parse = __commonJS({
|
|
|
6226
6244
|
return Object.prototype.hasOwnProperty.call(processEnv, name);
|
|
6227
6245
|
}
|
|
6228
6246
|
let publicKeyHex;
|
|
6229
|
-
|
|
6230
|
-
|
|
6247
|
+
const runningParsed = {};
|
|
6248
|
+
const literals = {};
|
|
6231
6249
|
const { parsed } = scan2(src, ({ name, value, quote }) => {
|
|
6232
6250
|
let parsedValue = value;
|
|
6233
6251
|
if (name.startsWith("DOTENV_PUBLIC_KEY")) {
|
|
@@ -6279,6 +6297,7 @@ var encrypt = require_encrypt();
|
|
|
6279
6297
|
var encrypted = require_encrypted();
|
|
6280
6298
|
var evaluate = require_evaluate();
|
|
6281
6299
|
var expand = require_expand();
|
|
6300
|
+
var keypair = require_keypair();
|
|
6282
6301
|
var keyring = require_keyring();
|
|
6283
6302
|
var parse = require_parse();
|
|
6284
6303
|
var scan = require_scan();
|
|
@@ -6289,6 +6308,7 @@ module.exports = {
|
|
|
6289
6308
|
encrypted,
|
|
6290
6309
|
evaluate,
|
|
6291
6310
|
expand,
|
|
6311
|
+
keypair,
|
|
6292
6312
|
keyring,
|
|
6293
6313
|
parse,
|
|
6294
6314
|
scan
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.7.1",
|
|
3
3
|
"name": "@dotenvx/primitives",
|
|
4
4
|
"description": "a secure dotenv–from the creator of `dotenv`",
|
|
5
5
|
"author": "@motdotla",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
"standard:fix": "standard src --fix"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"eciesjs": "^0.5.0",
|
|
34
35
|
"esbuild": "^0.28.1",
|
|
35
|
-
"
|
|
36
|
+
"standard": "^17.1.2"
|
|
36
37
|
},
|
|
37
38
|
"publishConfig": {
|
|
38
39
|
"access": "public"
|