youiyoux 0.1.18 → 0.1.19
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.
|
@@ -3249,16 +3249,20 @@ var BENIGN_ENV = /^(?:npm_|NPM_|PNPM_|NODE_|NVM_|TERM|COLORTERM|LANG$|LANGUAGE$|
|
|
|
3249
3249
|
var PLAIN_WORD = /^[A-Za-z]+$/;
|
|
3250
3250
|
var PLAIN = /^(?:true|false|yes|no|on|off|null|undefined|\d+(?:\.\d+)?)$/i;
|
|
3251
3251
|
var escapeRegExp = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3252
|
+
var PLACEHOLDERS = /\.env\.(?:example|sample|template)$/i;
|
|
3253
|
+
var PLAIN_NAME = /^[A-Za-z][A-Za-z0-9_.-]*$/;
|
|
3252
3254
|
async function dotenvValues(root) {
|
|
3253
|
-
const files =
|
|
3255
|
+
const files = await findFiles(root, [".env", ".env.*", "**/.env", "**/.env.*"]).catch(() => []);
|
|
3254
3256
|
const values = [];
|
|
3255
3257
|
for (const file of files) {
|
|
3256
3258
|
const text = await readFile7(join17(root, file), "utf8").catch(() => "");
|
|
3259
|
+
const placeholders = PLACEHOLDERS.test(file);
|
|
3257
3260
|
for (const line of text.split(/\r?\n/)) {
|
|
3258
3261
|
const match = /^\s*(?:export\s+)?[A-Za-z_][A-Za-z0-9_.-]*\s*=\s*(.*)$/.exec(line);
|
|
3259
3262
|
if (!match) continue;
|
|
3260
3263
|
const value = match[1].trim().replace(/^(['"`])(.*)\1$/, "$2").replace(/\s+#.*$/, "");
|
|
3261
|
-
if (value.length
|
|
3264
|
+
if (value.length < MIN_VALUE || placeholders && PLAIN_NAME.test(value) && !looksSecret(value)) continue;
|
|
3265
|
+
values.push(value);
|
|
3262
3266
|
}
|
|
3263
3267
|
}
|
|
3264
3268
|
return values;
|
package/dist/youi.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __youiRequire } from "node:module"; import { dirname as __youiDir } from "node:path"; import { fileURLToPath as __youiPath } from "node:url"; const require = __youiRequire(import.meta.url); const __youiDirname = __youiDir(__youiPath(import.meta.url));
|
|
3
3
|
import {
|
|
4
4
|
main
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-DHZDMZXE.js";
|
|
6
6
|
import "./chunks/chunk-2F2HM7FE.js";
|
|
7
7
|
import "./chunks/chunk-75LXBAYB.js";
|
|
8
8
|
import "./chunks/chunk-42YJX3W5.js";
|
package/dist/youiyoux.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire as __youiRequire } from "node:module"; import { dirname a
|
|
|
3
3
|
import {
|
|
4
4
|
COMMAND_NAMES,
|
|
5
5
|
main
|
|
6
|
-
} from "./chunks/chunk-
|
|
6
|
+
} from "./chunks/chunk-DHZDMZXE.js";
|
|
7
7
|
import "./chunks/chunk-2F2HM7FE.js";
|
|
8
8
|
import "./chunks/chunk-75LXBAYB.js";
|
|
9
9
|
import "./chunks/chunk-42YJX3W5.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "youiyoux",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Your agent rebuilds components you already have. youiyoux catches it: npx youiyoux turns any repo into a shareable report of near-duplicate components, hardcoded token values and off-library imports, with the fixes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"typescript": "6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@youiyoux/
|
|
50
|
-
"@youiyoux/
|
|
51
|
-
"@youiyoux/
|
|
49
|
+
"@youiyoux/cli": "0.1.19",
|
|
50
|
+
"@youiyoux/core": "0.1.19",
|
|
51
|
+
"@youiyoux/scanner": "0.1.19"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
"./package.json": "./package.json"
|