@karmaniverous/stan-core 0.4.6 → 0.4.7
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/README.md +1 -1
- package/dist/cjs/classifier-ClvtQeTy.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/mjs/classifier-Bqzr65UC.js +1 -0
- package/dist/mjs/index.js +1 -1
- package/dist/stan.system.md +45 -0
- package/dist/types/index.d.ts +5 -5
- package/package.json +2 -2
- package/dist/cjs/classifier-D1njCQ3L.js +0 -1
- package/dist/mjs/classifier-DeYwffC_.js +0 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ APIs that accept anchors:
|
|
|
176
176
|
|
|
177
177
|
## Environment variables
|
|
178
178
|
|
|
179
|
-
See
|
|
179
|
+
See [Env Vars](./guides/env-vars.md) for a complete list of environment variable switches observed by the engine, tests, and release scripts.
|
|
180
180
|
|
|
181
181
|
## Migration (legacy configs)
|
|
182
182
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("node:fs/promises"),e=require("node:path");const n=1048576;exports.classifyForArchive=async function(r,s){const i=[],a=[],o=[];await Promise.all(s.map(async s=>{const c=s.replace(/\\/g,"/");const l=e.resolve(r,s);let h=0;try{h=(await t.stat(l)).size}catch{return}let u,p=!1;try{p=await(async e=>{try{const n=await t.open(e,"r");try{const t=Buffer.allocUnsafe(8192),{bytesRead:e}=await n.read(t,0,t.length,0);for(let n=0;n<e;n+=1)if(0===t[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(l)}catch{p=!1}if(p)return void a.push({path:c,size:h});i.push(c);try{if(h<=n||h<5*n){u=(t=>{const e=t.replace(/\r\n/g,"\n");return 0===e.length?0:e.split("\n").length})(await t.readFile(l,"utf8"))}}catch{}(h>n||"number"==typeof u&&u>3e3)&&o.push({path:c,size:h,loc:u})}));const c=[];if(a.length>0){c.push(`Binary files excluded from archive (${a.length.toString()}):`);for(const t of a)c.push(` - ${t.path} (${t.size.toString()} bytes)`);c.push("")}if(o.length>0){c.push(`Large text files (included; consider excludes if unwanted) (${o.length.toString()}):`);for(const t of o){const e=[` - ${t.path}`,`(${t.size.toString()} bytes)`];"number"==typeof t.loc&&e.push(`${t.loc.toString()} LOC`),c.push(e.join(" "))}c.push(""),c.push(`Thresholds: size > ${n.toString()} bytes or LOC > ${3e3.toString()}`)}0===c.length&&c.push("No archive warnings.");const l=c.join("\n")+(c.length?"\n":"");return{textFiles:i,excludedBinaries:a,largeText:o,warningsBody:l}};
|