ultraenv 1.0.3 → 1.0.5
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/{chunk-OBLMAUCF.js → chunk-VAVZYQZO.js} +8 -5
- package/dist/{ci-scan-5D7QBN5X.js → ci-scan-HUBHPYZK.js} +1 -1
- package/dist/cli/index.cjs +9 -5
- package/dist/cli/index.js +3 -3
- package/dist/index.cjs +8 -5
- package/dist/index.js +1 -1
- package/dist/{scan-4BXGHR33.js → scan-P7KVYKKH.js} +1 -1
- package/dist/{sync-MYLMDDY6.js → sync-PZVGYIAB.js} +1 -0
- package/package.json +8 -4
|
@@ -1168,9 +1168,12 @@ function isInSkippedDirectory(filePath) {
|
|
|
1168
1168
|
const parts = filePath.replace(/\\/g, "/").split("/");
|
|
1169
1169
|
return parts.some((part) => DEFAULT_SKIP_PATHS.has(part));
|
|
1170
1170
|
}
|
|
1171
|
+
function escapeRegex(s) {
|
|
1172
|
+
return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
|
|
1173
|
+
}
|
|
1171
1174
|
function matchesExcludePattern(relPath, excludes) {
|
|
1172
1175
|
for (const pattern of excludes) {
|
|
1173
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
1176
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
1174
1177
|
if (normalizedPattern.includes("**")) {
|
|
1175
1178
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
1176
1179
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -1190,7 +1193,7 @@ function matchesExcludePattern(relPath, excludes) {
|
|
|
1190
1193
|
function matchesIncludePattern(relPath, includes) {
|
|
1191
1194
|
if (includes.length === 0) return true;
|
|
1192
1195
|
for (const pattern of includes) {
|
|
1193
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
1196
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
1194
1197
|
if (normalizedPattern.includes("**")) {
|
|
1195
1198
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
1196
1199
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -1445,7 +1448,7 @@ async function scanDiff(from, to, cwd) {
|
|
|
1445
1448
|
const diffFiles = extractDiffFiles(diffContent);
|
|
1446
1449
|
for (const filePath of diffFiles) {
|
|
1447
1450
|
const fileDiffRegex = new RegExp(
|
|
1448
|
-
`diff --git a/${
|
|
1451
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
1449
1452
|
"g"
|
|
1450
1453
|
);
|
|
1451
1454
|
let fileMatch;
|
|
@@ -1513,7 +1516,7 @@ async function scanGitHistory(options) {
|
|
|
1513
1516
|
for (const filePath of commitFiles) {
|
|
1514
1517
|
filesScanned.add(filePath);
|
|
1515
1518
|
const fileDiffRegex = new RegExp(
|
|
1516
|
-
`diff --git a/${
|
|
1519
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
1517
1520
|
"g"
|
|
1518
1521
|
);
|
|
1519
1522
|
let fileMatch;
|
|
@@ -1533,7 +1536,7 @@ async function scanGitHistory(options) {
|
|
|
1533
1536
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1534
1537
|
};
|
|
1535
1538
|
}
|
|
1536
|
-
function
|
|
1539
|
+
function escapeRegex2(str) {
|
|
1537
1540
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1538
1541
|
}
|
|
1539
1542
|
|
package/dist/cli/index.cjs
CHANGED
|
@@ -3421,6 +3421,7 @@ async function watchSync(envPath, examplePath) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
}, 200);
|
|
3423
3423
|
});
|
|
3424
|
+
process.setMaxListeners(process.getMaxListeners() + 1);
|
|
3424
3425
|
process.on("SIGINT", () => {
|
|
3425
3426
|
if (watcher !== null) watcher.close();
|
|
3426
3427
|
writeLine("");
|
|
@@ -4641,9 +4642,12 @@ function isInSkippedDirectory(filePath) {
|
|
|
4641
4642
|
const parts = filePath.replace(/\\/g, "/").split("/");
|
|
4642
4643
|
return parts.some((part) => DEFAULT_SKIP_PATHS.has(part));
|
|
4643
4644
|
}
|
|
4645
|
+
function escapeRegex(s) {
|
|
4646
|
+
return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
|
|
4647
|
+
}
|
|
4644
4648
|
function matchesExcludePattern(relPath, excludes) {
|
|
4645
4649
|
for (const pattern of excludes) {
|
|
4646
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
4650
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
4647
4651
|
if (normalizedPattern.includes("**")) {
|
|
4648
4652
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
4649
4653
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -4663,7 +4667,7 @@ function matchesExcludePattern(relPath, excludes) {
|
|
|
4663
4667
|
function matchesIncludePattern(relPath, includes) {
|
|
4664
4668
|
if (includes.length === 0) return true;
|
|
4665
4669
|
for (const pattern of includes) {
|
|
4666
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
4670
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
4667
4671
|
if (normalizedPattern.includes("**")) {
|
|
4668
4672
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
4669
4673
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -5009,7 +5013,7 @@ async function scanDiff(from, to, cwd) {
|
|
|
5009
5013
|
const diffFiles = extractDiffFiles(diffContent);
|
|
5010
5014
|
for (const filePath of diffFiles) {
|
|
5011
5015
|
const fileDiffRegex = new RegExp(
|
|
5012
|
-
`diff --git a/${
|
|
5016
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
5013
5017
|
"g"
|
|
5014
5018
|
);
|
|
5015
5019
|
let fileMatch;
|
|
@@ -5077,7 +5081,7 @@ async function scanGitHistory(options) {
|
|
|
5077
5081
|
for (const filePath of commitFiles) {
|
|
5078
5082
|
filesScanned.add(filePath);
|
|
5079
5083
|
const fileDiffRegex = new RegExp(
|
|
5080
|
-
`diff --git a/${
|
|
5084
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
5081
5085
|
"g"
|
|
5082
5086
|
);
|
|
5083
5087
|
let fileMatch;
|
|
@@ -5097,7 +5101,7 @@ async function scanGitHistory(options) {
|
|
|
5097
5101
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
5098
5102
|
};
|
|
5099
5103
|
}
|
|
5100
|
-
function
|
|
5104
|
+
function escapeRegex2(str) {
|
|
5101
5105
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5102
5106
|
}
|
|
5103
5107
|
var import_node_child_process2, import_node_util2, execFileAsync2;
|
package/dist/cli/index.js
CHANGED
|
@@ -192,8 +192,8 @@ var COMMAND_REGISTRY = {
|
|
|
192
192
|
runner: m.run,
|
|
193
193
|
description: "Generate TypeScript types"
|
|
194
194
|
})),
|
|
195
|
-
sync: () => import("../sync-
|
|
196
|
-
scan: () => import("../scan-
|
|
195
|
+
sync: () => import("../sync-PZVGYIAB.js").then((m) => ({ runner: m.run, description: "Sync .env.example" })),
|
|
196
|
+
scan: () => import("../scan-P7KVYKKH.js").then((m) => ({ runner: m.run, description: "Scan for secrets" })),
|
|
197
197
|
debug: () => import("../debug-6VCX3QSP.js").then((m) => ({ runner: m.run, description: "Show diagnostics" })),
|
|
198
198
|
protect: () => import("../protect-A4G7LQFJ.js").then((m) => ({
|
|
199
199
|
runner: m.run,
|
|
@@ -258,7 +258,7 @@ var COMMAND_REGISTRY = {
|
|
|
258
258
|
runner: m.run,
|
|
259
259
|
description: "CI sync check"
|
|
260
260
|
})),
|
|
261
|
-
"ci.scan": () => import("../ci-scan-
|
|
261
|
+
"ci.scan": () => import("../ci-scan-HUBHPYZK.js").then((m) => ({ runner: m.run, description: "CI scan" })),
|
|
262
262
|
"ci.setup": () => import("../ci-setup-J34DS6KD.js").then((m) => ({ runner: m.run, description: "CI setup" })),
|
|
263
263
|
// Utility commands
|
|
264
264
|
"install-hook": () => import("../install-hook-42F22BLY.js").then((m) => ({
|
package/dist/index.cjs
CHANGED
|
@@ -8133,9 +8133,12 @@ function isInSkippedDirectory(filePath) {
|
|
|
8133
8133
|
const parts = filePath.replace(/\\/g, "/").split("/");
|
|
8134
8134
|
return parts.some((part) => DEFAULT_SKIP_PATHS.has(part));
|
|
8135
8135
|
}
|
|
8136
|
+
function escapeRegex(s) {
|
|
8137
|
+
return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
|
|
8138
|
+
}
|
|
8136
8139
|
function matchesExcludePattern(relPath, excludes) {
|
|
8137
8140
|
for (const pattern of excludes) {
|
|
8138
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
8141
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
8139
8142
|
if (normalizedPattern.includes("**")) {
|
|
8140
8143
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
8141
8144
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -8155,7 +8158,7 @@ function matchesExcludePattern(relPath, excludes) {
|
|
|
8155
8158
|
function matchesIncludePattern(relPath, includes) {
|
|
8156
8159
|
if (includes.length === 0) return true;
|
|
8157
8160
|
for (const pattern of includes) {
|
|
8158
|
-
const normalizedPattern = pattern.replace(/\\/g, "/")
|
|
8161
|
+
const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
|
|
8159
8162
|
if (normalizedPattern.includes("**")) {
|
|
8160
8163
|
const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
|
|
8161
8164
|
const regex = new RegExp(`^${regexStr}$`);
|
|
@@ -8411,7 +8414,7 @@ async function scanDiff(from, to, cwd) {
|
|
|
8411
8414
|
const diffFiles = extractDiffFiles(diffContent);
|
|
8412
8415
|
for (const filePath of diffFiles) {
|
|
8413
8416
|
const fileDiffRegex = new RegExp(
|
|
8414
|
-
`diff --git a/${
|
|
8417
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
8415
8418
|
"g"
|
|
8416
8419
|
);
|
|
8417
8420
|
let fileMatch;
|
|
@@ -8479,7 +8482,7 @@ async function scanGitHistory(options) {
|
|
|
8479
8482
|
for (const filePath of commitFiles) {
|
|
8480
8483
|
filesScanned.add(filePath);
|
|
8481
8484
|
const fileDiffRegex = new RegExp(
|
|
8482
|
-
`diff --git a/${
|
|
8485
|
+
`diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
|
|
8483
8486
|
"g"
|
|
8484
8487
|
);
|
|
8485
8488
|
let fileMatch;
|
|
@@ -8499,7 +8502,7 @@ async function scanGitHistory(options) {
|
|
|
8499
8502
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
8500
8503
|
};
|
|
8501
8504
|
}
|
|
8502
|
-
function
|
|
8505
|
+
function escapeRegex2(str) {
|
|
8503
8506
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
8504
8507
|
}
|
|
8505
8508
|
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultraenv",
|
|
3
|
-
|
|
4
|
-
"description": "The Ultimate Environment Variable Manager
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "The Ultimate Environment Variable Manager \u2014 Validate, Type, Encrypt, Sync, and Never Ship Broken Configs Again",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -94,13 +94,17 @@
|
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@types/node": "^22.0.0",
|
|
97
|
-
"@vitest/coverage-v8": "^
|
|
97
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
98
98
|
"eslint": "^9.0.0",
|
|
99
99
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
100
100
|
"@typescript-eslint/parser": "^8.0.0",
|
|
101
101
|
"prettier": "^3.3.0",
|
|
102
102
|
"tsup": "^8.0.0",
|
|
103
103
|
"typescript": "^5.5.0",
|
|
104
|
-
"vitest": "^
|
|
104
|
+
"vitest": "^4.0.0"
|
|
105
|
+
},
|
|
106
|
+
"overrides": {
|
|
107
|
+
"esbuild": ">=0.25.0",
|
|
108
|
+
"vite": ">=6.2.0"
|
|
105
109
|
}
|
|
106
110
|
}
|