lintpage 0.5.0 → 0.5.2

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.
@@ -0,0 +1,7 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`chalk`);l=c(l);function u(e){let t=0,n=``;for(let r of e){let e=encodeURIComponent(r).length;if(t+e>255)break;t+=e,n+=r}return n}function d(e,t,n){let r=new URLSearchParams({utm_source:`lintpage`,utm_medium:e,utm_campaign:`fix-it`});return t&&r.set(`utm_content`,u(t)),n&&r.set(`utm_term`,`scan_${n}`),`https://calendly.com/bludesksoft/30min?${r.toString()}`}const f={CRITICAL:l.default.red.bold(`✗`),WARNING:l.default.yellow(`⚠`),INFO:l.default.blue(`ℹ`)};function p(e,t){let n=`${e.warn} ${e.warn===1?`warning`:`warnings`}`;return t===`FAIL`?`DEPLOY BLOCKED · ${e.crit} critical · ${n} · ${e.info} info`:t===`AI-FAIL`?`AI VISIBILITY FAIL · ${e.crit} AI critical · ${n} · ${e.info} info`:`READY TO SHIP · ${n} · ${e.info} info`}function m(e,t){let n=[],r={crit:e.results.filter(e=>e.severity===`CRITICAL`).length,warn:e.results.filter(e=>e.severity===`WARNING`).length,info:e.results.filter(e=>e.severity===`INFO`).length};if(t)return n.push(` ${l.default.red.bold(`${r.crit} critical`)} ${l.default.yellow(`${r.warn} ${r.warn===1?`warning`:`warnings`}`)} ${l.default.blue(`${r.info} info`)}`),n.push(``),e.localhost&&(n.push(l.default.dim(` localhost: ${e.localhost.notRun.length} not run, ${e.localhost.downgraded.length} downgraded`)),n.push(``)),e.vercelDeployment&&(n.push(l.default.dim(` vercel: ${e.vercelDeployment.downgraded.length} downgraded`)),n.push(``)),n.join(`
2
+ `);if(n.push(``),e.results.length===0)n.push(l.default.green(` No issues found.`)),n.push(``);else{let t=[...e.results].sort((e,t)=>g(t.severity)-g(e.severity));t.forEach((e,r)=>{let i=f[e.severity],a=`${e.category.toLowerCase()}/${e.ruleId}`;n.push(`${i} ${l.default.bold(a)} — ${e.message}`),e.fix&&n.push(` ${l.default.dim(e.fix)}`),r<t.length-1&&n.push(``)}),n.push(``)}let i=p(r,e.overallStatus),a=e.overallStatus===`FAIL`?l.default.red.bold:e.overallStatus===`AI-FAIL`?l.default.yellow.bold:l.default.green.bold;if(n.push(a(i)),n.push(``),e.localhost){let{host:t,notRun:r,downgraded:i}=e.localhost,a=r.length===1;n.push(l.default.dim(` localhost mode (${t}): ${r.length} ${a?`check`:`checks`} not run (${a?`it needs`:`they need`} a public origin), ${i.length} downgraded to info.`)),n.push(``)}return e.vercelDeployment&&(n.push(l.default.dim(` ${h(e.vercelDeployment.downgraded)}`)),n.push(``)),r.crit>0&&(n.push(l.default.dim(` Want these fixed for you? Free 30-min call with the LintPage team: ${d(`cli`,e.url)}`)),n.push(``)),n.join(`
3
+ `)}function h(e){return`Vercel deployment URL: the X-Robots-Tag noindex header (${e.join(`, `)}) was reported as info, because Vercel adds it to deployment URLs to keep them out of search results. If this URL is your production domain, set a severity for x-robots-tag in your config (for example CRITICAL) to restore the check; otherwise audit your production domain to check its indexing.`}function g(e){return e===`CRITICAL`?3:e===`WARNING`?2:1}function _(e){return JSON.stringify(e,null,2)}const v={CRITICAL:`error`,WARNING:`warning`,INFO:`notice`};function y(e){return e.replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`)}function b(e){return y(e).replace(/:/g,`%3A`).replace(/,/g,`%2C`)}function x(e){try{let t=new URL(e);return`${t.host}${t.pathname===`/`?``:t.pathname}`}catch{return e}}function S(e,t=!1,n=!1){let r=[],i=x(e.url),a=p({crit:e.results.filter(e=>e.severity===`CRITICAL`).length,warn:e.results.filter(e=>e.severity===`WARNING`).length,info:e.results.filter(e=>e.severity===`INFO`).length},e.overallStatus),o=y(`${e.url} — ${a}`);if(r.push(`::notice title=LintPage Verdict::${o}`),e.localhost){let{host:t,notRun:n,downgraded:i}=e.localhost,a=i.length?`. ${i.length} downgraded to info: ${i.join(`, `)}`:``;r.push(`::notice title=LintPage Localhost::${y(`${n.length} ${n.length===1?`check`:`checks`} not run against ${t}: ${n.join(`, `)}${a}`)}`)}e.vercelDeployment&&r.push(`::notice title=LintPage Vercel::${y(h(e.vercelDeployment.downgraded))}`);for(let a of e.results){if(t&&a.severity!==`CRITICAL`&&!(n&&a.severity===`WARNING`))continue;let e=v[a.severity],o=b(`[${a.ruleId}] ${a.ruleName} (${i})`),s=y(a.message);r.push(`::${e} title=${o}::${s}`)}return r.join(`
4
+ `)}function C(e,t){return`::error title=${b(`LintPage (${x(e)})`)}::${y(`The audit could not run: ${t}`)}`}const w={FAIL:`Deploy blocked`,"AI-FAIL":`AI visibility fail`,PASS:`Ready to ship`},T={CRITICAL:`Critical`,WARNING:`Warning`,INFO:`Info`};function E(e){try{let t=new URL(e);return`${t.origin}${t.pathname}`}catch{return e}}function D(e){let t=e.replace(/[\r\n]+/g,` `);return(t.length>300?`${t.slice(0,300)}...`:t).replace(/[!-/:-@[-`{-~]/g,`\\$&`)}function O(e){let t={crit:e.results.filter(e=>e.severity===`CRITICAL`).length,warn:e.results.filter(e=>e.severity===`WARNING`).length,info:e.results.filter(e=>e.severity===`INFO`).length},n=[`### LintPage: ${D(x(e.url))}`,``,`| Verdict | Score | Critical | Warnings | Info |`,`|---|---|---|---|---|`,`| **${w[e.overallStatus]}** | ${e.score} | ${t.crit} | ${t.warn} | ${t.info} |`,``];if(e.finalUrl&&n.push(`Redirected to ${D(E(e.finalUrl))}`,``),e.localhost){let{notRun:t,downgraded:r}=e.localhost;n.push(`Localhost mode: ${t.length} ${t.length===1?`check`:`checks`} not run, ${r.length} downgraded to info.`,``)}e.vercelDeployment&&n.push(h(e.vercelDeployment.downgraded),``);let r=[...e.results].sort((e,t)=>g(t.severity)-g(e.severity)),i=r.slice(0,10);if(i.length>0){n.push(`| Severity | Check | Finding |`,`|---|---|---|`);for(let e of i)n.push(`| ${T[e.severity]} | ${D(`[${e.ruleId}] ${e.ruleName}`)} | ${D(e.message)} |`);n.push(``),r.length>i.length&&n.push(`${r.length-i.length} more in the job log.`,``)}else n.push(`No issues found.`,``);return n.join(`
5
+ `)}function k(e,t){return[`### LintPage: ${D(x(e))}`,``,`The audit could not run: ${D(t)}`,``].join(`
6
+ `)}function A(e,t,n,r=!1){switch(t){case`json`:return _(e);case`github`:return S(e,n,r);default:return m(e,n)}}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return A}});
7
+ //# sourceMappingURL=formatter-AOdVjmxi.cjs.map
@@ -0,0 +1,7 @@
1
+ import e from"chalk";function t(e){let t=0,n=``;for(let r of e){let e=encodeURIComponent(r).length;if(t+e>255)break;t+=e,n+=r}return n}function n(e,n,r){let i=new URLSearchParams({utm_source:`lintpage`,utm_medium:e,utm_campaign:`fix-it`});return n&&i.set(`utm_content`,t(n)),r&&i.set(`utm_term`,`scan_${r}`),`https://calendly.com/bludesksoft/30min?${i.toString()}`}const r={CRITICAL:e.red.bold(`✗`),WARNING:e.yellow(`⚠`),INFO:e.blue(`ℹ`)};function i(e,t){let n=`${e.warn} ${e.warn===1?`warning`:`warnings`}`;return t===`FAIL`?`DEPLOY BLOCKED · ${e.crit} critical · ${n} · ${e.info} info`:t===`AI-FAIL`?`AI VISIBILITY FAIL · ${e.crit} AI critical · ${n} · ${e.info} info`:`READY TO SHIP · ${n} · ${e.info} info`}function a(t,a){let c=[],l={crit:t.results.filter(e=>e.severity===`CRITICAL`).length,warn:t.results.filter(e=>e.severity===`WARNING`).length,info:t.results.filter(e=>e.severity===`INFO`).length};if(a)return c.push(` ${e.red.bold(`${l.crit} critical`)} ${e.yellow(`${l.warn} ${l.warn===1?`warning`:`warnings`}`)} ${e.blue(`${l.info} info`)}`),c.push(``),t.localhost&&(c.push(e.dim(` localhost: ${t.localhost.notRun.length} not run, ${t.localhost.downgraded.length} downgraded`)),c.push(``)),t.vercelDeployment&&(c.push(e.dim(` vercel: ${t.vercelDeployment.downgraded.length} downgraded`)),c.push(``)),c.join(`
2
+ `);if(c.push(``),t.results.length===0)c.push(e.green(` No issues found.`)),c.push(``);else{let n=[...t.results].sort((e,t)=>s(t.severity)-s(e.severity));n.forEach((t,i)=>{let a=r[t.severity],o=`${t.category.toLowerCase()}/${t.ruleId}`;c.push(`${a} ${e.bold(o)} — ${t.message}`),t.fix&&c.push(` ${e.dim(t.fix)}`),i<n.length-1&&c.push(``)}),c.push(``)}let u=i(l,t.overallStatus),d=t.overallStatus===`FAIL`?e.red.bold:t.overallStatus===`AI-FAIL`?e.yellow.bold:e.green.bold;if(c.push(d(u)),c.push(``),t.localhost){let{host:n,notRun:r,downgraded:i}=t.localhost,a=r.length===1;c.push(e.dim(` localhost mode (${n}): ${r.length} ${a?`check`:`checks`} not run (${a?`it needs`:`they need`} a public origin), ${i.length} downgraded to info.`)),c.push(``)}return t.vercelDeployment&&(c.push(e.dim(` ${o(t.vercelDeployment.downgraded)}`)),c.push(``)),l.crit>0&&(c.push(e.dim(` Want these fixed for you? Free 30-min call with the LintPage team: ${n(`cli`,t.url)}`)),c.push(``)),c.join(`
3
+ `)}function o(e){return`Vercel deployment URL: the X-Robots-Tag noindex header (${e.join(`, `)}) was reported as info, because Vercel adds it to deployment URLs to keep them out of search results. If this URL is your production domain, set a severity for x-robots-tag in your config (for example CRITICAL) to restore the check; otherwise audit your production domain to check its indexing.`}function s(e){return e===`CRITICAL`?3:e===`WARNING`?2:1}function c(e){return JSON.stringify(e,null,2)}const l={CRITICAL:`error`,WARNING:`warning`,INFO:`notice`};function u(e){return e.replace(/%/g,`%25`).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`)}function d(e){return u(e).replace(/:/g,`%3A`).replace(/,/g,`%2C`)}function f(e){try{let t=new URL(e);return`${t.host}${t.pathname===`/`?``:t.pathname}`}catch{return e}}function p(e,t=!1,n=!1){let r=[],a=f(e.url),s=i({crit:e.results.filter(e=>e.severity===`CRITICAL`).length,warn:e.results.filter(e=>e.severity===`WARNING`).length,info:e.results.filter(e=>e.severity===`INFO`).length},e.overallStatus),c=u(`${e.url} — ${s}`);if(r.push(`::notice title=LintPage Verdict::${c}`),e.localhost){let{host:t,notRun:n,downgraded:i}=e.localhost,a=i.length?`. ${i.length} downgraded to info: ${i.join(`, `)}`:``;r.push(`::notice title=LintPage Localhost::${u(`${n.length} ${n.length===1?`check`:`checks`} not run against ${t}: ${n.join(`, `)}${a}`)}`)}e.vercelDeployment&&r.push(`::notice title=LintPage Vercel::${u(o(e.vercelDeployment.downgraded))}`);for(let i of e.results){if(t&&i.severity!==`CRITICAL`&&!(n&&i.severity===`WARNING`))continue;let e=l[i.severity],o=d(`[${i.ruleId}] ${i.ruleName} (${a})`),s=u(i.message);r.push(`::${e} title=${o}::${s}`)}return r.join(`
4
+ `)}function m(e,t){return`::error title=${d(`LintPage (${f(e)})`)}::${u(`The audit could not run: ${t}`)}`}const h={FAIL:`Deploy blocked`,"AI-FAIL":`AI visibility fail`,PASS:`Ready to ship`},g={CRITICAL:`Critical`,WARNING:`Warning`,INFO:`Info`};function _(e){try{let t=new URL(e);return`${t.origin}${t.pathname}`}catch{return e}}function v(e){let t=e.replace(/[\r\n]+/g,` `);return(t.length>300?`${t.slice(0,300)}...`:t).replace(/[!-/:-@[-`{-~]/g,`\\$&`)}function y(e){let t={crit:e.results.filter(e=>e.severity===`CRITICAL`).length,warn:e.results.filter(e=>e.severity===`WARNING`).length,info:e.results.filter(e=>e.severity===`INFO`).length},n=[`### LintPage: ${v(f(e.url))}`,``,`| Verdict | Score | Critical | Warnings | Info |`,`|---|---|---|---|---|`,`| **${h[e.overallStatus]}** | ${e.score} | ${t.crit} | ${t.warn} | ${t.info} |`,``];if(e.finalUrl&&n.push(`Redirected to ${v(_(e.finalUrl))}`,``),e.localhost){let{notRun:t,downgraded:r}=e.localhost;n.push(`Localhost mode: ${t.length} ${t.length===1?`check`:`checks`} not run, ${r.length} downgraded to info.`,``)}e.vercelDeployment&&n.push(o(e.vercelDeployment.downgraded),``);let r=[...e.results].sort((e,t)=>s(t.severity)-s(e.severity)),i=r.slice(0,10);if(i.length>0){n.push(`| Severity | Check | Finding |`,`|---|---|---|`);for(let e of i)n.push(`| ${g[e.severity]} | ${v(`[${e.ruleId}] ${e.ruleName}`)} | ${v(e.message)} |`);n.push(``),r.length>i.length&&n.push(`${r.length-i.length} more in the job log.`,``)}else n.push(`No issues found.`,``);return n.join(`
5
+ `)}function b(e,t){return[`### LintPage: ${v(f(e))}`,``,`The audit could not run: ${v(t)}`,``].join(`
6
+ `)}function x(e,t,n,r=!1){switch(t){case`json`:return c(e);case`github`:return p(e,n,r);default:return a(e,n)}}export{y as a,b as i,p as n,c as o,m as r,a as s,x as t};
7
+ //# sourceMappingURL=formatter-yk86KB59.mjs.map
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./formatter-DGoiZDhP.cjs`);exports.format=e.t,exports.formatGithub=e.n,exports.formatJson=e.r,exports.formatText=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./formatter-AOdVjmxi.cjs`);exports.format=e.t,exports.formatGithub=e.n,exports.formatJson=e.o,exports.formatText=e.s;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { URL, URLSearchParams as URLSearchParams$1 } from "node:url";
2
+ import { URL as URL$1, URLSearchParams as URLSearchParams$1 } from "node:url";
3
3
  import { Duplex, Readable, Writable } from "node:stream";
4
4
  import { EventEmitter } from "node:events";
5
5
  import { Blob, File } from "node:buffer";
@@ -273,7 +273,7 @@ type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaq
273
273
  * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
274
274
  */
275
275
  declare class Client extends Dispatcher {
276
- constructor(url: string | URL, options?: Client.Options);
276
+ constructor(url: string | URL$1, options?: Client.Options);
277
277
  /** Property to get and set the pipelining factor. */
278
278
  pipelining: number;
279
279
  /** `true` after `client.close()` has been called. */
@@ -601,53 +601,53 @@ declare class Dispatcher extends EventEmitter {
601
601
  destroy(callback: () => void): void;
602
602
  destroy(err: Error | null): Promise<void>;
603
603
  destroy(): Promise<void>;
604
- on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
605
- on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
606
- on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
607
- on(eventName: 'drain', callback: (origin: URL) => void): this;
608
- once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
609
- once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
610
- once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
611
- once(eventName: 'drain', callback: (origin: URL) => void): this;
612
- off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
613
- off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
614
- off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
615
- off(eventName: 'drain', callback: (origin: URL) => void): this;
616
- addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
617
- addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
618
- addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
619
- addListener(eventName: 'drain', callback: (origin: URL) => void): this;
620
- removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
621
- removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
622
- removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
623
- removeListener(eventName: 'drain', callback: (origin: URL) => void): this;
624
- prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
625
- prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
626
- prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
627
- prependListener(eventName: 'drain', callback: (origin: URL) => void): this;
628
- prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
629
- prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
630
- prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
631
- prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this;
632
- listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[];
633
- listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
634
- listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
635
- listeners(eventName: 'drain'): ((origin: URL) => void)[];
636
- rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[];
637
- rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
638
- rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
639
- rawListeners(eventName: 'drain'): ((origin: URL) => void)[];
640
- emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean;
641
- emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
642
- emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
643
- emit(eventName: 'drain', origin: URL): boolean;
604
+ on(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
605
+ on(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
606
+ on(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
607
+ on(eventName: 'drain', callback: (origin: URL$1) => void): this;
608
+ once(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
609
+ once(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
610
+ once(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
611
+ once(eventName: 'drain', callback: (origin: URL$1) => void): this;
612
+ off(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
613
+ off(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
614
+ off(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
615
+ off(eventName: 'drain', callback: (origin: URL$1) => void): this;
616
+ addListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
617
+ addListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
618
+ addListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
619
+ addListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
620
+ removeListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
621
+ removeListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
622
+ removeListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
623
+ removeListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
624
+ prependListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
625
+ prependListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
626
+ prependListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
627
+ prependListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
628
+ prependOnceListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
629
+ prependOnceListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
630
+ prependOnceListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
631
+ prependOnceListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
632
+ listeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
633
+ listeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
634
+ listeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
635
+ listeners(eventName: 'drain'): ((origin: URL$1) => void)[];
636
+ rawListeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
637
+ rawListeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
638
+ rawListeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
639
+ rawListeners(eventName: 'drain'): ((origin: URL$1) => void)[];
640
+ emit(eventName: 'connect', origin: URL$1, targets: readonly Dispatcher[]): boolean;
641
+ emit(eventName: 'disconnect', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
642
+ emit(eventName: 'connectionError', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
643
+ emit(eventName: 'drain', origin: URL$1): boolean;
644
644
  }
645
645
  declare namespace Dispatcher {
646
646
  export interface ComposedDispatcher extends Dispatcher {}
647
647
  export type Dispatch = Dispatcher['dispatch'];
648
648
  export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch;
649
649
  export interface DispatchOptions {
650
- origin?: string | URL;
650
+ origin?: string | URL$1;
651
651
  path: string;
652
652
  method: HttpMethod;
653
653
  /** Default: `null` */
@@ -674,7 +674,7 @@ declare namespace Dispatcher {
674
674
  expectContinue?: boolean;
675
675
  }
676
676
  export interface ConnectOptions<TOpaque = null> {
677
- origin: string | URL;
677
+ origin: string | URL$1;
678
678
  path: string;
679
679
  /** Default: `null` */
680
680
  headers?: UndiciHeaders;
@@ -895,6 +895,19 @@ interface PageResult {
895
895
  max: number;
896
896
  deductionPercent: number;
897
897
  }>;
898
+ /**
899
+ * Where the page fetch ended up after redirects, when that differs from
900
+ * `url`. Absent when the page did not redirect or could not be fetched.
901
+ */
902
+ finalUrl?: string;
903
+ /**
904
+ * Present when the CLI audited a Vercel deployment URL and reported a
905
+ * finding at a lower severity because Vercel, not the site, caused it (for
906
+ * example the `X-Robots-Tag: noindex` Vercel sends on deployment URLs).
907
+ */
908
+ vercelDeployment?: {
909
+ downgraded: string[];
910
+ };
898
911
  /**
899
912
  * Present when the audit ran against a loopback origin. `notRun` are rules
900
913
  * that could not reach it; `downgraded` ran but were reported at a lower
@@ -911,8 +924,18 @@ interface PageResult {
911
924
  type Format = 'text' | 'json' | 'github';
912
925
  declare function formatText(result: PageResult, quiet: boolean): string;
913
926
  declare function formatJson(result: PageResult): string;
914
- declare function formatGithub(result: PageResult): string;
915
- declare function format(result: PageResult, fmt: Format, quiet: boolean): string;
927
+ /**
928
+ * GitHub workflow commands: the verdict notice, the localhost notice (on a
929
+ * loopback audit) and the Vercel notice (when Vercel's noindex was reported as
930
+ * info) first, then one annotation per finding. Notices go first so a
931
+ * per-step annotation limit drops findings rather than the verdict.
932
+ *
933
+ * `quiet` keeps only the findings that decide the exit code: CRITICAL ones,
934
+ * plus warnings when `failOnWarning` is set, so a run that fails always shows
935
+ * why. All three notices are always kept.
936
+ */
937
+ declare function formatGithub(result: PageResult, quiet?: boolean, failOnWarning?: boolean): string;
938
+ declare function format(result: PageResult, fmt: Format, quiet: boolean, failOnWarning?: boolean): string;
916
939
  //#endregion
917
940
  export { type Format, format, formatGithub, formatJson, formatText };
918
941
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -5,7 +5,7 @@ import { EventEmitter } from "node:events";
5
5
  import { Blob, File } from "node:buffer";
6
6
  import { ConnectionOptions, TLSSocket } from "node:tls";
7
7
  import { SessionOptions } from "node:http2";
8
- import { URL, URLSearchParams as URLSearchParams$1 } from "node:url";
8
+ import { URL as URL$1, URLSearchParams as URLSearchParams$1 } from "node:url";
9
9
 
10
10
  //#region ../../node_modules/undici/types/utility.d.ts
11
11
  type AutocompletePrimitiveBaseType<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : never;
@@ -273,7 +273,7 @@ type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaq
273
273
  * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
274
274
  */
275
275
  declare class Client extends Dispatcher {
276
- constructor(url: string | URL, options?: Client.Options);
276
+ constructor(url: string | URL$1, options?: Client.Options);
277
277
  /** Property to get and set the pipelining factor. */
278
278
  pipelining: number;
279
279
  /** `true` after `client.close()` has been called. */
@@ -601,53 +601,53 @@ declare class Dispatcher extends EventEmitter {
601
601
  destroy(callback: () => void): void;
602
602
  destroy(err: Error | null): Promise<void>;
603
603
  destroy(): Promise<void>;
604
- on(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
605
- on(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
606
- on(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
607
- on(eventName: 'drain', callback: (origin: URL) => void): this;
608
- once(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
609
- once(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
610
- once(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
611
- once(eventName: 'drain', callback: (origin: URL) => void): this;
612
- off(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
613
- off(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
614
- off(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
615
- off(eventName: 'drain', callback: (origin: URL) => void): this;
616
- addListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
617
- addListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
618
- addListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
619
- addListener(eventName: 'drain', callback: (origin: URL) => void): this;
620
- removeListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
621
- removeListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
622
- removeListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
623
- removeListener(eventName: 'drain', callback: (origin: URL) => void): this;
624
- prependListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
625
- prependListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
626
- prependListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
627
- prependListener(eventName: 'drain', callback: (origin: URL) => void): this;
628
- prependOnceListener(eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this;
629
- prependOnceListener(eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
630
- prependOnceListener(eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
631
- prependOnceListener(eventName: 'drain', callback: (origin: URL) => void): this;
632
- listeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[];
633
- listeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
634
- listeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
635
- listeners(eventName: 'drain'): ((origin: URL) => void)[];
636
- rawListeners(eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[];
637
- rawListeners(eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
638
- rawListeners(eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
639
- rawListeners(eventName: 'drain'): ((origin: URL) => void)[];
640
- emit(eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean;
641
- emit(eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
642
- emit(eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
643
- emit(eventName: 'drain', origin: URL): boolean;
604
+ on(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
605
+ on(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
606
+ on(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
607
+ on(eventName: 'drain', callback: (origin: URL$1) => void): this;
608
+ once(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
609
+ once(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
610
+ once(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
611
+ once(eventName: 'drain', callback: (origin: URL$1) => void): this;
612
+ off(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
613
+ off(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
614
+ off(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
615
+ off(eventName: 'drain', callback: (origin: URL$1) => void): this;
616
+ addListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
617
+ addListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
618
+ addListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
619
+ addListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
620
+ removeListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
621
+ removeListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
622
+ removeListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
623
+ removeListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
624
+ prependListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
625
+ prependListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
626
+ prependListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
627
+ prependListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
628
+ prependOnceListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
629
+ prependOnceListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
630
+ prependOnceListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
631
+ prependOnceListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
632
+ listeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
633
+ listeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
634
+ listeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
635
+ listeners(eventName: 'drain'): ((origin: URL$1) => void)[];
636
+ rawListeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
637
+ rawListeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
638
+ rawListeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
639
+ rawListeners(eventName: 'drain'): ((origin: URL$1) => void)[];
640
+ emit(eventName: 'connect', origin: URL$1, targets: readonly Dispatcher[]): boolean;
641
+ emit(eventName: 'disconnect', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
642
+ emit(eventName: 'connectionError', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
643
+ emit(eventName: 'drain', origin: URL$1): boolean;
644
644
  }
645
645
  declare namespace Dispatcher {
646
646
  export interface ComposedDispatcher extends Dispatcher {}
647
647
  export type Dispatch = Dispatcher['dispatch'];
648
648
  export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch;
649
649
  export interface DispatchOptions {
650
- origin?: string | URL;
650
+ origin?: string | URL$1;
651
651
  path: string;
652
652
  method: HttpMethod;
653
653
  /** Default: `null` */
@@ -674,7 +674,7 @@ declare namespace Dispatcher {
674
674
  expectContinue?: boolean;
675
675
  }
676
676
  export interface ConnectOptions<TOpaque = null> {
677
- origin: string | URL;
677
+ origin: string | URL$1;
678
678
  path: string;
679
679
  /** Default: `null` */
680
680
  headers?: UndiciHeaders;
@@ -895,6 +895,19 @@ interface PageResult {
895
895
  max: number;
896
896
  deductionPercent: number;
897
897
  }>;
898
+ /**
899
+ * Where the page fetch ended up after redirects, when that differs from
900
+ * `url`. Absent when the page did not redirect or could not be fetched.
901
+ */
902
+ finalUrl?: string;
903
+ /**
904
+ * Present when the CLI audited a Vercel deployment URL and reported a
905
+ * finding at a lower severity because Vercel, not the site, caused it (for
906
+ * example the `X-Robots-Tag: noindex` Vercel sends on deployment URLs).
907
+ */
908
+ vercelDeployment?: {
909
+ downgraded: string[];
910
+ };
898
911
  /**
899
912
  * Present when the audit ran against a loopback origin. `notRun` are rules
900
913
  * that could not reach it; `downgraded` ran but were reported at a lower
@@ -911,8 +924,18 @@ interface PageResult {
911
924
  type Format = 'text' | 'json' | 'github';
912
925
  declare function formatText(result: PageResult, quiet: boolean): string;
913
926
  declare function formatJson(result: PageResult): string;
914
- declare function formatGithub(result: PageResult): string;
915
- declare function format(result: PageResult, fmt: Format, quiet: boolean): string;
927
+ /**
928
+ * GitHub workflow commands: the verdict notice, the localhost notice (on a
929
+ * loopback audit) and the Vercel notice (when Vercel's noindex was reported as
930
+ * info) first, then one annotation per finding. Notices go first so a
931
+ * per-step annotation limit drops findings rather than the verdict.
932
+ *
933
+ * `quiet` keeps only the findings that decide the exit code: CRITICAL ones,
934
+ * plus warnings when `failOnWarning` is set, so a run that fails always shows
935
+ * why. All three notices are always kept.
936
+ */
937
+ declare function formatGithub(result: PageResult, quiet?: boolean, failOnWarning?: boolean): string;
938
+ declare function format(result: PageResult, fmt: Format, quiet: boolean, failOnWarning?: boolean): string;
916
939
  //#endregion
917
940
  export { type Format, format, formatGithub, formatJson, formatText };
918
941
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e,n as t,r as n,t as r}from"./formatter-Bg4mtE_M.mjs";export{r as format,t as formatGithub,n as formatJson,e as formatText};
1
+ import{n as e,o as t,s as n,t as r}from"./formatter-yk86KB59.mjs";export{r as format,e as formatGithub,t as formatJson,n as formatText};
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "lintpage",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "CLI for LintPage — audit website SEO, accessibility, and performance",
5
5
  "license": "MIT",
6
6
  "bin": {
7
- "lintpage": "./bin/lintpage.js"
7
+ "lintpage": "bin/lintpage.js"
8
8
  },
9
9
  "main": "./dist/index.cjs",
10
10
  "exports": {
@@ -21,27 +21,28 @@
21
21
  },
22
22
  "files": [
23
23
  "dist",
24
- "bin"
24
+ "bin",
25
+ "!dist/**/*.map"
25
26
  ],
26
- "scripts": {
27
- "build": "tsdown",
28
- "test": "vitest run",
29
- "test:watch": "vitest",
30
- "typecheck": "tsc --noEmit",
31
- "clean": "rm -rf dist"
32
- },
33
27
  "dependencies": {
34
28
  "cac": "^6.7.14",
35
29
  "chalk": "^5.4.1",
36
30
  "jsdom": "^26.1.0"
37
31
  },
38
32
  "devDependencies": {
39
- "@lintpage/core": "workspace:*",
40
- "@lintpage/pro": "workspace:*",
41
- "@lintpage/shared": "workspace:*",
42
- "@lintpage/tsconfig": "workspace:*",
43
33
  "tsdown": "^0.21.4",
44
34
  "typescript": "^5",
45
- "vitest": "^4.0.18"
35
+ "vitest": "^4.0.18",
36
+ "@lintpage/core": "0.1.0",
37
+ "@lintpage/pro": "0.1.0",
38
+ "@lintpage/tsconfig": "0.0.0",
39
+ "@lintpage/shared": "0.1.0"
40
+ },
41
+ "scripts": {
42
+ "build": "tsdown",
43
+ "test": "vitest run",
44
+ "test:watch": "vitest",
45
+ "typecheck": "tsc --noEmit",
46
+ "clean": "rm -rf dist"
46
47
  }
47
- }
48
+ }