ultraenv 1.0.4 → 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.
@@ -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, "/").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, "/").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/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
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/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
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 escapeRegex(str) {
1539
+ function escapeRegex2(str) {
1537
1540
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1538
1541
  }
1539
1542
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatScanResult,
3
3
  scan
4
- } from "./chunk-OBLMAUCF.js";
4
+ } from "./chunk-VAVZYQZO.js";
5
5
  import "./chunk-R7PZRSZ7.js";
6
6
  import "./chunk-TE7HPLA6.js";
7
7
 
@@ -4642,9 +4642,12 @@ function isInSkippedDirectory(filePath) {
4642
4642
  const parts = filePath.replace(/\\/g, "/").split("/");
4643
4643
  return parts.some((part) => DEFAULT_SKIP_PATHS.has(part));
4644
4644
  }
4645
+ function escapeRegex(s) {
4646
+ return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
4647
+ }
4645
4648
  function matchesExcludePattern(relPath, excludes) {
4646
4649
  for (const pattern of excludes) {
4647
- const normalizedPattern = pattern.replace(/\\/g, "/").replace(/\./g, "\\.");
4650
+ const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
4648
4651
  if (normalizedPattern.includes("**")) {
4649
4652
  const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
4650
4653
  const regex = new RegExp(`^${regexStr}$`);
@@ -4664,7 +4667,7 @@ function matchesExcludePattern(relPath, excludes) {
4664
4667
  function matchesIncludePattern(relPath, includes) {
4665
4668
  if (includes.length === 0) return true;
4666
4669
  for (const pattern of includes) {
4667
- const normalizedPattern = pattern.replace(/\\/g, "/").replace(/\./g, "\\.");
4670
+ const normalizedPattern = escapeRegex(pattern.replace(/\\/g, "/"));
4668
4671
  if (normalizedPattern.includes("**")) {
4669
4672
  const regexStr = normalizedPattern.replace(/\*\*/g, "<<DOUBLESTAR>>").replace(/\*/g, "[^/]*").replace(/<<DOUBLESTAR>>/g, ".*");
4670
4673
  const regex = new RegExp(`^${regexStr}$`);
@@ -5010,7 +5013,7 @@ async function scanDiff(from, to, cwd) {
5010
5013
  const diffFiles = extractDiffFiles(diffContent);
5011
5014
  for (const filePath of diffFiles) {
5012
5015
  const fileDiffRegex = new RegExp(
5013
- `diff --git a/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
5016
+ `diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
5014
5017
  "g"
5015
5018
  );
5016
5019
  let fileMatch;
@@ -5078,7 +5081,7 @@ async function scanGitHistory(options) {
5078
5081
  for (const filePath of commitFiles) {
5079
5082
  filesScanned.add(filePath);
5080
5083
  const fileDiffRegex = new RegExp(
5081
- `diff --git a/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
5084
+ `diff --git a/${escapeRegex2(filePath)} b/${escapeRegex2(filePath)}[\\s\\S]*?(?=diff --git |$)`,
5082
5085
  "g"
5083
5086
  );
5084
5087
  let fileMatch;
@@ -5098,7 +5101,7 @@ async function scanGitHistory(options) {
5098
5101
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
5099
5102
  };
5100
5103
  }
5101
- function escapeRegex(str) {
5104
+ function escapeRegex2(str) {
5102
5105
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5103
5106
  }
5104
5107
  var import_node_child_process2, import_node_util2, execFileAsync2;
package/dist/cli/index.js CHANGED
@@ -193,7 +193,7 @@ var COMMAND_REGISTRY = {
193
193
  description: "Generate TypeScript types"
194
194
  })),
195
195
  sync: () => import("../sync-PZVGYIAB.js").then((m) => ({ runner: m.run, description: "Sync .env.example" })),
196
- scan: () => import("../scan-4BXGHR33.js").then((m) => ({ runner: m.run, description: "Scan for secrets" })),
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-5D7QBN5X.js").then((m) => ({ runner: m.run, description: "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, "/").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, "/").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/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
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/${escapeRegex(filePath)} b/${escapeRegex(filePath)}[\\s\\S]*?(?=diff --git |$)`,
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 escapeRegex(str) {
8505
+ function escapeRegex2(str) {
8503
8506
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8504
8507
  }
8505
8508
 
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  scanLineForEntropy,
36
36
  scanStagedFiles,
37
37
  shannonEntropy
38
- } from "./chunk-OBLMAUCF.js";
38
+ } from "./chunk-VAVZYQZO.js";
39
39
  import {
40
40
  getEnvironmentData,
41
41
  getVaultEnvironments,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatScanResult,
3
3
  scan
4
- } from "./chunk-OBLMAUCF.js";
4
+ } from "./chunk-VAVZYQZO.js";
5
5
  import "./chunk-R7PZRSZ7.js";
6
6
  import "./chunk-TE7HPLA6.js";
7
7
  import {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultraenv",
3
- "version": "1.0.4",
4
- "description": "The Ultimate Environment Variable Manager Validate, Type, Encrypt, Sync, and Never Ship Broken Configs Again",
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": "^2.0.0",
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": "^2.0.0"
104
+ "vitest": "^4.0.0"
105
+ },
106
+ "overrides": {
107
+ "esbuild": ">=0.25.0",
108
+ "vite": ">=6.2.0"
105
109
  }
106
110
  }