@karmaniverous/stan-cli 0.11.7 → 0.12.0
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 +16 -16
- package/dist/cjs/classifier-Bqzr65UC-D9z0tWqn.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cli/{capture-DKrVoDyl.js → capture-CiVimFuL.js} +1 -1
- package/dist/cli/classifier-Bqzr65UC-BlsMFS8t.js +7 -0
- package/dist/cli/{config-fallback-CV720XTz.js → config-fallback-CL_TDiMw.js} +1 -1
- package/dist/cli/{context-PS5ukh8q.js → context-BzEQ3A1v.js} +1 -1
- package/dist/cli/{index-Cq8YEju6.js → index-DXJaQ46Q.js} +1236 -867
- package/dist/cli/stan.js +904 -170
- package/dist/mjs/classifier-Bqzr65UC-DJLYQY2b.js +1 -0
- package/dist/mjs/index.js +1 -1
- package/dist/types/index.d.ts +30 -2
- package/package.json +27 -27
- package/dist/cjs/classifier-DeYwffC_-CjzCgatc.js +0 -1
- package/dist/cli/classifier-DeYwffC_-DftahF7h.js +0 -7
- package/dist/mjs/classifier-DeYwffC_-C7wwqop3.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { readFile, writeFile, copyFile, rm } from 'node:fs/promises';
|
|
4
|
-
import { w as within, e as ensureDirs, A as ARCH_DIR,
|
|
4
|
+
import { w as within, e as ensureDirs, A as ARCH_DIR, a as readJson, b as writeJson, S as STATE_FILE, c as SNAP_DIR } from './stan.js';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'fs-extra';
|
|
7
7
|
import 'node:process';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { stat, open, readFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
|
|
5
|
+
const s=1048576;async function o(o,i){const a=[],c=[],h=[];await Promise.all(i.map(async i=>{const l=i.replace(/\\/g,"/");const u=resolve(o,i);let p=0;try{p=(await stat(u)).size;}catch{return}let f,g=false;try{g=await(async t=>{try{const e=await open(t,"r");try{const t=Buffer.allocUnsafe(8192),{bytesRead:n}=await e.read(t,0,t.length,0);for(let e=0;e<n;e+=1)if(0===t[e])return !0;return !1}finally{await e.close().catch(()=>{});}}catch{return !1}})(u);}catch{g=false;}if(g)return void c.push({path:l,size:p});a.push(l);try{if(p<=s||p<5*s){f=(t=>{const e=t.replace(/\r\n/g,"\n");return 0===e.length?0:e.split("\n").length})(await readFile(u,"utf8"));}}catch{}(p>s||"number"==typeof f&&f>3e3)&&h.push({path:l,size:p,loc:f});}));const l=[];if(c.length>0){l.push(`Binary files excluded from archive (${c.length.toString()}):`);for(const t of c)l.push(` - ${t.path} (${t.size.toString()} bytes)`);l.push("");}if(h.length>0){l.push(`Large text files (included; consider excludes if unwanted) (${h.length.toString()}):`);for(const t of h){const e=[` - ${t.path}`,`(${t.size.toString()} bytes)`];"number"==typeof t.loc&&e.push(`${t.loc.toString()} LOC`),l.push(e.join(" "));}l.push(""),l.push(`Thresholds: size > ${s.toString()} bytes or LOC > ${3e3.toString()}`);}0===l.length&&l.push("No archive warnings.");const u=l.join("\n")+(l.length?"\n":"");return {textFiles:a,excludedBinaries:c,largeText:h,warningsBody:u}}
|
|
6
|
+
|
|
7
|
+
export { o as classifyForArchive };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { r as readRawConfigSync, p as pickCliNode, n as normalizeScriptsNode } from './stan.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:fs/promises';
|
|
5
5
|
import 'node:path';
|
|
@@ -94,7 +94,7 @@ async function resolveContext(cwd0) {
|
|
|
94
94
|
// evaluation-order hazards during module import.
|
|
95
95
|
let engine;
|
|
96
96
|
try {
|
|
97
|
-
const effModUnknown = (await import('./stan.js').then(function (n) { return n.
|
|
97
|
+
const effModUnknown = (await import('./stan.js').then(function (n) { return n.d; }));
|
|
98
98
|
// Decide if we should print a single success trace when STAN_DEBUG=1.
|
|
99
99
|
const debugOn = () => process.env.STAN_DEBUG === '1';
|
|
100
100
|
const debugTrace = (kind) => {
|