@preventive/triage 1.0.0-alpha.43 → 1.0.0-alpha.45
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/common/bundle-compare-diff.js +2 -167
- package/common/bundle-compare-versions.js +172 -0
- package/common/bundle-comparison.d.ts +8 -0
- package/common/bundle-comparison.js +62 -0
- package/common/bundle-sources.js +20 -1
- package/common/default-scan-models.ts +1 -1
- package/common/dependency-reviews.d.ts +0 -5
- package/common/dependency-reviews.js +0 -17
- package/common/managed/agent-tasks.ts +292 -0
- package/common/managed/github-agents.ts +92 -0
- package/common/managed/github-logins.ts +49 -0
- package/common/managed/roles.ts +7 -0
- package/common/managed/routes.js +91 -10
- package/common/managed/team-app.d.ts +5 -2
- package/common/managed/team-app.js +2 -2
- package/common/server-info.ts +11 -0
- package/common/workspace-app.js +19 -3
- package/out/brotli-fallback.js +3 -3
- package/out/chunk-2XUEZHIP.js +18 -18
- package/out/chunk-2ZDZWLFY.js +1 -0
- package/out/chunk-3PS4KWD2.js +10 -0
- package/out/chunk-5DHL5NG3.js +2 -0
- package/out/chunk-6HNXNIQY.js +52 -0
- package/out/chunk-7C7DWL7I.js +1 -0
- package/out/chunk-AFLZH7WG.js +1 -0
- package/out/chunk-BC2UCLFJ.js +1 -0
- package/out/chunk-C4Z6ZBXV.js +6 -6
- package/out/chunk-GDPCLSOS.js +2 -0
- package/out/chunk-GO7FT4OD.js +1 -0
- package/out/chunk-HMAJDVXN.js +1 -0
- package/out/chunk-I2MDGSQX.js +3 -0
- package/out/chunk-IYPY47MC.js +1 -0
- package/out/chunk-IZ7POWI3.js +18 -0
- package/out/chunk-JCIIBLKR.js +1 -0
- package/out/chunk-NPW52BM2.js +17 -0
- package/out/chunk-NRPC74AM.js +1 -1
- package/out/chunk-NV7ES4EW.js +1 -0
- package/out/chunk-OKRLLE5I.js +17 -0
- package/out/chunk-OOJM4CTU.js +1 -1
- package/out/chunk-PNHBZGDD.js +1 -1
- package/out/chunk-PTGDYLNS.js +36 -0
- package/out/chunk-PXK7EU4V.js +1 -0
- package/out/chunk-Q6MVYGYV.js +3 -0
- package/out/chunk-QB4CBOX2.js +1 -0
- package/out/chunk-QRD6GIG5.js +229 -0
- package/out/chunk-R3NZFXVR.js +1 -0
- package/out/chunk-R5O6FAW4.js +1 -1
- package/out/chunk-SXV2T5C4.js +80 -0
- package/out/chunk-TUII34K2.js +1 -1
- package/out/chunk-VFWMQ3LG.js +2 -0
- package/out/chunk-VH4XMZIW.js +2 -0
- package/out/chunk-WFYLMF6Z.js +10 -0
- package/out/chunk-WI7Z5A2T.js +6 -0
- package/out/chunk-WQ74ZBZF.js +7 -0
- package/out/chunk-XVBEOGOS.js +3 -0
- package/out/client-managed-import.js +3 -3
- package/out/client-managed.js +31 -35
- package/out/client-sync.js +11 -11
- package/out/compare.js +35 -0
- package/out/dialogs.js +51 -0
- package/out/github-issue-authorized.html +1 -1
- package/out/github-issue-authorized.js +1 -1
- package/out/graph.js +17 -17
- package/out/index.html +31 -31
- package/out/prism.js +14 -14
- package/out/scan.js +2 -0
- package/out/terminal.js +294 -293
- package/out/view.css +1 -1
- package/out/view.js +16 -107
- package/package.json +55 -6
- package/risk/actions/findings.js +156 -0
- package/risk/actions/resolve.js +219 -0
- package/risk/actions/scripts/commands.js +182 -0
- package/risk/actions/scripts/grade.js +113 -0
- package/risk/actions/scripts/packages.js +123 -0
- package/risk/actions/scripts/shell.js +165 -0
- package/risk/actions/uses.js +76 -0
- package/risk/actions/workflow.js +110 -0
- package/risk/files/hosts.js +6 -6
- package/risk/files/readability.js +23 -17
- package/risk/files/runs-code.js +18 -6
- package/risk/files/script.js +7 -3
- package/risk/files/stamps.js +8 -7
- package/risk/index.d.ts +68 -1
- package/risk/index.js +6 -2
- package/risk/npm/assess.js +13 -8
- package/risk/npm/compare.js +34 -10
- package/risk/npm/dependencies.js +11 -0
- package/risk/npm/files.js +413 -2
- package/risk/npm/tarball.js +56 -73
- package/server-managed/agent-merges.ts +198 -0
- package/server-managed/app-agents.ts +30 -0
- package/server-managed/avatar-store.ts +1 -0
- package/server-managed/commit-coauthors.ts +83 -0
- package/server-managed/commit-lockfiles.ts +62 -0
- package/server-managed/comparison.ts +41 -0
- package/server-managed/db-methods.ts +29 -10
- package/server-managed/db-neon.ts +30 -2
- package/server-managed/db-schema.ts +9 -2
- package/server-managed/db.ts +7 -0
- package/server-managed/dependabot-access.ts +60 -0
- package/server-managed/dependabot-alerts.ts +185 -0
- package/server-managed/dependency-review-comments.ts +97 -0
- package/server-managed/dependency-reviews.ts +65 -15
- package/server-managed/github-accounts.ts +33 -0
- package/server-managed/github-actions.ts +71 -0
- package/server-managed/github-app.ts +23 -9
- package/server-managed/github-errors.ts +2 -0
- package/server-managed/github-link-oauth.ts +69 -0
- package/server-managed/github-links.ts +204 -0
- package/server-managed/github-oauth.ts +5 -2
- package/server-managed/github-users.ts +30 -0
- package/server-managed/http.ts +1219 -81
- package/server-managed/index.ts +6 -2
- package/server-managed/locked-packages.ts +48 -16
- package/server-managed/lockfile-scope.ts +49 -0
- package/server-managed/npm-delta-worker.js +23 -0
- package/server-managed/npm-delta.ts +173 -0
- package/server-managed/npm-insights.ts +20 -11
- package/server-managed/npm-kept.ts +51 -4
- package/server-managed/npm-loads.ts +20 -13
- package/server-managed/npm-packages.ts +24 -64
- package/server-managed/pretty-print.ts +14 -9
- package/server-managed/public-workspace.ts +26 -8
- package/server-managed/pull-comment-reviews.ts +161 -0
- package/server-managed/pull-dependencies.ts +280 -0
- package/server-managed/pull-dependency-reviews.ts +318 -0
- package/server-managed/pull-reviews.ts +205 -0
- package/server-managed/release-commits.ts +84 -0
- package/server-managed/repository-actions.ts +209 -0
- package/server-managed/repository-agents.ts +220 -0
- package/server-managed/repository-browser.ts +54 -13
- package/server-managed/repository-changes.ts +284 -0
- package/server-managed/repository-code.ts +52 -0
- package/server-managed/repository-dependency-reviews.ts +135 -0
- package/server-managed/repository-history.ts +445 -0
- package/server-managed/repository-issues.ts +181 -0
- package/server-managed/repository-pulse.ts +432 -0
- package/server-managed/repository-risk-read.ts +165 -0
- package/server-managed/repository-risk.ts +116 -106
- package/server-managed/reviewed-dependencies.ts +149 -0
- package/server-managed/session.ts +9 -5
- package/server-managed/sql.ts +1 -1
- package/server-managed/storage-stores.ts +5 -0
- package/server-managed/team-app.ts +54 -14
- package/server-managed/workspace-shares.ts +4 -1
- package/server.ts +11 -0
- package/out/chunk-2KBF5TZ7.js +0 -2
- package/out/chunk-35VE6CDH.js +0 -2
- package/out/chunk-3BZ7JERB.js +0 -1
- package/out/chunk-4F6JSF57.js +0 -3
- package/out/chunk-4XCDFGDP.js +0 -10
- package/out/chunk-7RU5EDRO.js +0 -226
- package/out/chunk-A7M4GV7M.js +0 -1
- package/out/chunk-CLPKNNC7.js +0 -51
- package/out/chunk-CMQA4DM6.js +0 -1
- package/out/chunk-CVVJAXVY.js +0 -2
- package/out/chunk-DIJJNTRH.js +0 -10
- package/out/chunk-GJ4IUCNS.js +0 -1
- package/out/chunk-GNXOKIGP.js +0 -80
- package/out/chunk-GZ4MS3TE.js +0 -13
- package/out/chunk-IU3CCINR.js +0 -3
- package/out/chunk-K3X5EJBQ.js +0 -2
- package/out/chunk-KEX2ATEW.js +0 -2
- package/out/chunk-KYCNJVB7.js +0 -1
- package/out/chunk-LAAB5SZT.js +0 -2
- package/out/chunk-NWZ4PVPN.js +0 -1
- package/out/chunk-OSIMGFUF.js +0 -1
- package/out/chunk-RFZQQXSG.js +0 -17
- package/out/chunk-RSHMVYNS.js +0 -1
- package/out/chunk-TZ5KB2Y5.js +0 -10
- package/out/chunk-UNTRGE26.js +0 -2
- package/out/chunk-UXNUAIIC.js +0 -33
- package/out/chunk-UYAXVRVL.js +0 -1
- package/out/chunk-V3ME6FI5.js +0 -2
- package/out/chunk-V5O7M2YT.js +0 -1
- package/out/chunk-VIHGO77Y.js +0 -1
- package/out/chunk-VQJCXGIY.js +0 -7
- package/out/chunk-W4J3MGLB.js +0 -1
- package/out/chunk-WGG7KQUH.js +0 -1
- package/out/chunk-WZDTZE64.js +0 -1
- package/out/chunk-XOCAPDCM.js +0 -1
- package/out/chunk-XYFXXB2G.js +0 -10
- package/out/chunk-YVZH5SHP.js +0 -1
- package/out/chunk-ZBBOBQ43.js +0 -1
- package/out/chunk-ZMQQCGF6.js +0 -2
package/out/chunk-A7M4GV7M.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Cd as G,Fa as N,Ja as H,Jd as P,_c as R,ad as v,bd as U,db as I,eb as p,fb as B,h as o,i as f,pa as q,pd as D,q as A,r as C,s as _,x as $}from"./chunk-7RU5EDRO.js";import{b as M}from"./chunk-CVVJAXVY.js";import{u as x}from"./chunk-RSHMVYNS.js";import{c as b}from"./chunk-4F6JSF57.js";async function V(e,{openManagedReport:n,readTeam:t=G,isCurrent:i=()=>!0}){let c=o.managedSession,r=()=>i()&&f()&&o.managedSession?.id===c?.id&&o.managedSession?.role===c?.role,u=o.managedTeams;if(!r())return null;async function m(a,s){return!r()||(o.currentManagedTeam!==a.id||o.currentManagedReport!==s)&&!await n(a,s)||!r()||o.currentManagedTeam!==a.id||o.currentManagedReport!==s?null:p(e.id)}if(e.teamId){let a=u.find(s=>s.id===e.teamId);return!a||e.reportId&&!a.reports.some(s=>s.id===e.reportId)?null:m(a,e.reportId??null)}let w=u.flatMap(a=>a.reports.map(s=>({team:a,report:s}))),h=new Set,d=new Map;async function k(a){for(let{team:s,report:l}of a){if(!r())return null;if(h.has(`${s.id}:${l.id}`))continue;h.add(`${s.id}:${l.id}`),d.has(s.id)||d.set(s.id,await t(s.id));let y=d.get(s.id)?.find(S=>S.id===l.id);if(!r())return null;if(y==null)continue;let j=await x(JSON.stringify(y.data),l.filename);if(!r())return null;if(j?.findings.some(S=>S.id===e.id))return m(s,l.id)}return null}if(e.report){let a=await Promise.all(w.map(({report:l})=>b("report",l.filename))),s=await k(w.filter((l,y)=>a[y]===e.report));if(s||!r())return s}if(e.workspace){let a=await Promise.all(u.map(l=>b("workspace",`managed-team:${l.id}`))),s=u[a.indexOf(e.workspace)];if(s){let l=await m(s,null);if(l||!r())return l}}if(!r())return null;let O=u.find(a=>a.id===o.currentManagedTeam);if(O&&(o.currentManagedReport==null||O.reports.some(a=>a.id===o.currentManagedReport))){let a=p(e.id);if(a)return a}return k(w)}async function J(e,n,t,{openReport:i,openManagedReport:c}){if(f()){let r=o.managedTeams.find(u=>u.id===o.currentManagedTeam);if(!t||!r?.reports.some(u=>u.id===t)||(o.currentManagedReport!==t||o.currentWorkspace)&&!await c(r,t)||!f()||o.currentManagedTeam!==r.id||o.currentManagedReport!==t||o.currentWorkspace)return null}else if(t||((o.currentFile!==n||o.currentWorkspace)&&await i(n),f()||o.currentFile!==n||o.currentWorkspace))return null;return p(e)}async function K(e,n){if(f())return V(e,n);let{openReport:t,openWorkspace:i}=n,[c,r]=await Promise.all([C(e.report),A(e.workspace)]);async function u(d){let k=I(d,r?.id);return(o.currentFile!==d||o.currentWorkspace||o.currentReportWorkspace!==k)&&await t(d,void 0,{workspaceId:k}),p(e.id)}if(c){let d=await u(c);if(d)return d}if(r){o.currentWorkspace!==r.id&&await i(r.id);let d=p(e.id);if(d)return d}let m=p(e.id);if(m)return m;let w=o.reports.map(d=>d.fileName).filter(Boolean),h=await _(e.id,{skip:w});return h?await u(h):null}var z="100% 0px",Q=new WeakMap,g=new WeakMap,L=[],E=!1,X=new WeakMap;function Z(e){let n=X.get(e);if(n===void 0){let t=getComputedStyle(e).overflowY;n=t==="auto"||t==="scroll"||t==="overlay",X.set(e,n)}return n}function W(e){let n=e.parentNode;for(;n;){if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){n=n.host??null;continue}if(n.nodeType!==Node.ELEMENT_NODE||n===document.documentElement)return null;if(Z(n))return n;n=n.parentNode}return null}function ee(e){for(let n of e)g.get(n.target)?.cb(n.isIntersecting)}function ne(e){let n=e??document,t=Q.get(n);return t||(t=new IntersectionObserver(ee,{root:e,rootMargin:z,threshold:0}),Q.set(n,t)),t}function Se(e,n){let t=g.get(e);t?.io&&t.io.unobserve(e),g.set(e,{cb:n,io:null}),L.push(e),E||(E=!0,queueMicrotask(te))}function te(){E=!1;let e=L;L=[];for(let n of e){let t=g.get(n);!t||t.io||(t.io=ne(W(n)),t.io.observe(n))}}function be(e){let n=g.get(e);n&&(n.io?.unobserve(e),g.delete(e))}var oe=1600,F="link-target",ie="Couldn't find that finding in any of your reports. Import the report it came from, then open the link again.",T=null,re=3,ae=150,se=5;function ce(e){T!==null&&clearTimeout(T);for(let n of document.querySelectorAll(`.${F}`))n.classList.remove(F);e.classList.add(F),T=setTimeout(()=>{e.classList.remove(F),T=null},oe)}function ue(e){return new Promise(n=>{let t=null,i=0,c=0,r=()=>{let u=Math.round(e.getBoundingClientRect().top);i=u===t?i+1:0,t=u,i>=re||++c>=ae?n():requestAnimationFrame(r)};requestAnimationFrame(r)})}function de(e){let n=0,t=window.innerHeight,i=W(e);if(i){let c=i.getBoundingClientRect();n=Math.max(n,c.top),t=Math.min(t,c.bottom)}return{top:n,bottom:t}}function le(e){let n=e.getBoundingClientRect();if(n.height===0)return!1;let{top:t,bottom:i}=de(e);if(i<=t)return!1;let c=(t+i)/2;return n.top>=t&&n.bottom<=i||n.top<=c&&n.bottom>=c}async function fe(e){e.scrollIntoView({block:"center",behavior:"smooth"});for(let n=0;n<se;n++){if(await ue(e),!e.isConnected||le(e))return;e.scrollIntoView({block:"center",behavior:"instant"})}}async function pe(e){let n=CSS.escape(e);if(o.viewMode==="table"){let t=M.querySelector("finding-table");if(t){try{await t.updateComplete}catch{}for(let i of t.shadowRoot?.querySelectorAll("finding-row")??[])if(i.group&&q(i.group)===e)return i}}if(o.viewMode==="kanban"){let t=M.querySelector(`.kanban-card[data-gid="${n}"]`);if(t)return t}return M.querySelector(`finding-card[data-gid="${n}"]`)??M.querySelector(`[data-gid="${n}"]`)}async function Y(e,n,t=()=>!0){let i=B(e.group,n),c=H(i);if(c&&N(c)&&queueMicrotask($),D(),await P({revealSelection:!0}),!t())return{ok:!1};let r=await pe(i);return t()?r?(typeof r.ensureRendered=="function"&&await r.ensureRendered(),await fe(r),t()?(ce(r),{ok:!0}):{ok:!1}):{ok:!0}:{ok:!1}}async function $e(e,{openManagedReport:n=v,isCurrent:t=()=>!0}={}){if(!e?.id)return{ok:!1,reason:"This link is missing a finding id."};let i=await K(e,{openReport:R,openWorkspace:U,openManagedReport:n,isCurrent:t});return t()?i?await Y(i,e.id,t):{ok:!1,reason:f()?"Couldn't find that finding in the team reports you can access.":ie}:{ok:!1}}async function qe(e,n,t=null){if(!e||!n)return{ok:!1,reason:"Missing finding id or report name."};let i=await J(e,n,t,{openReport:R,openManagedReport:v});return i?await Y(i,e):{ok:!1,reason:t?`Could not open that finding in "${n}". Open the team and try again.`:`Couldn't find that finding in "${n}". It may have been re-imported since this links file was written.`}}export{Se as a,be as b,$e as c,qe as d};
|