cortad 0.3.2 → 0.3.3
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/local.mjs +6 -12
- package/package.json +1 -1
package/local.mjs
CHANGED
|
@@ -133,15 +133,10 @@ if (viaToken) await holdProject();
|
|
|
133
133
|
|
|
134
134
|
// ---- what leaves the machine: the source git would commit, and nothing git is told to ignore
|
|
135
135
|
const SKIP_DIR = /^(node_modules|\.git|dist|build|out|coverage|vendor|venv|\.venv|env|target|tmp|\.next|\.nuxt|\.turbo|\.cache|__pycache__|\.terraform|\.wrangler|\.svelte-kit|\.output|\.parcel-cache|\.idea|\.vscode|secrets?|\.secrets?)$/i;
|
|
136
|
-
// Env files by any name (scripts/books.env is one), keys,
|
|
137
|
-
const SKIP_FILE = /^\.env(\..*)?$|^\.envrc$|\.env$|\.(pem|key|p12|pfx|jks|keystore|sqlite|sqlite3|db|log|lock|map|zip|tar|gz|tgz|7z|rar|png|jpe?g|gif|webp|ico|svg|mp3|mp4|wav|mov|pdf|woff2?|ttf|otf|eot|bin|exe|dll|so|dylib|wasm|onnx|pt|pth|safetensors|
|
|
138
|
-
const MAX_FILE =
|
|
139
|
-
|
|
140
|
-
// and datasets are where projects keep what they would never paste into a chat.
|
|
141
|
-
const MAX_DATA = 200_000;
|
|
142
|
-
const DATA_FILE = /\.(json|ya?ml)$/i;
|
|
143
|
-
const MANIFEST_FILE = /^(package|tsconfig|composer|app|manifest)\.json$/i;
|
|
144
|
-
const MAX_TOTAL = 80_000_000;
|
|
136
|
+
// Env files by any name (scripts/books.env is one), keys, credentials, media and compiled output.
|
|
137
|
+
const SKIP_FILE = /^\.env(\..*)?$|^\.envrc$|\.env$|\.(pem|key|p12|pfx|jks|keystore|sqlite|sqlite3|db|log|lock|map|zip|tar|gz|tgz|7z|rar|png|jpe?g|gif|webp|ico|svg|mp3|mp4|wav|mov|pdf|woff2?|ttf|otf|eot|bin|exe|dll|so|dylib|wasm|onnx|pt|pth|safetensors|numbers|DS_Store)$/i;
|
|
138
|
+
const MAX_FILE = 25_000_000;
|
|
139
|
+
const MAX_TOTAL = 256_000_000;
|
|
145
140
|
const ENV_FILE = /^\.env(\.(local|staging|stage|development|dev|test|example|sample))?$/;
|
|
146
141
|
|
|
147
142
|
function walk(dir, depth, out, envs, total) {
|
|
@@ -156,7 +151,6 @@ function walk(dir, depth, out, envs, total) {
|
|
|
156
151
|
let size;
|
|
157
152
|
try { size = statSync(full).size; } catch { continue; }
|
|
158
153
|
if (size > MAX_FILE || total + size > MAX_TOTAL) continue;
|
|
159
|
-
if (size > MAX_DATA && DATA_FILE.test(e.name) && !MANIFEST_FILE.test(e.name)) continue;
|
|
160
154
|
if (!shareable(relative(root, full), false)) continue;
|
|
161
155
|
out.push(relative(root, full));
|
|
162
156
|
total += size;
|
|
@@ -1150,8 +1144,8 @@ if (explain) {
|
|
|
1150
1144
|
`talks to ${origin.origin}, localhost (your app's port only), and your own model providers, to ask each which models your key can use`,
|
|
1151
1145
|
`would send ${files.length} source files, ${Math.round(bytes / 1024)} KB, once${listed ? " (what git would commit)" : ""}`,
|
|
1152
1146
|
...(kept.length ? [`kept here ${kept.length} file${kept.length === 1 ? " that holds" : "s that hold"} keys: ${kept.slice(0, 6).join(", ")}${kept.length > 6 ? ", ..." : ""}`] : []),
|
|
1153
|
-
...(left.length ? [`also not sent ${left.length} tracked
|
|
1154
|
-
`not sent anything git ignores, env files (${envFiles.length} here: ${envFiles.slice(0, 6).map(rel).join(", ") || "none"}), key files,
|
|
1147
|
+
...(left.length ? [`also not sent ${left.length} tracked media or lock file${left.length === 1 ? "" : "s"}: ${left.slice(0, 6).join(", ")}${left.length > 6 ? ", ..." : ""}`] : []),
|
|
1148
|
+
`not sent anything git ignores, env files (${envFiles.length} here: ${envFiles.slice(0, 6).map(rel).join(", ") || "none"}), key files, node_modules, .git`,
|
|
1155
1149
|
`env files values read here only: to hide them in replies, to sign in a test account, and to ask your providers what your keys reach. Variable names and whether a switch is on or off go up; no value does`,
|
|
1156
1150
|
`would start ${flag("--port") ? `nothing: uses your app on port ${flag("--port")}` : plan?.cmd ? `${plan.cmd} (in ${rel(plan.cwd)})` : plan?.noServer ? "nothing: this repository has no server to run" : "asks you how your app starts"}`,
|
|
1157
1151
|
`would raise ${flag("--port") ? "nothing: your app's own request limits stay as they are" : `${Object.keys(liftedLimits(envFiles, files.map((f) => join(root, f)))).join(", ") || "no request limits found"} (only after your yes, for this session only)`}`,
|
package/package.json
CHANGED