sliccy 6.49.2 → 6.50.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/dist/ui/assets/{account-store-Bpt5Tu_u.js → account-store-Czgj4q96.js} +1 -1
- package/dist/ui/assets/{account-store-dz2IL17G.js → account-store-DgAxXZ_T.js} +1 -1
- package/dist/ui/assets/{adobe-CVDvLkI6.js → adobe-4vynWzE7.js} +1 -1
- package/dist/ui/assets/{adobe-DAs_Gb08.js → adobe-tugecVTj.js} +1 -1
- package/dist/ui/assets/{apply-layout-BMi6oPmN.js → apply-layout-CCTnmuWC.js} +1 -1
- package/dist/ui/assets/{apps-DZHFe3TO.js → apps-SOe08PFL.js} +1 -1
- package/dist/ui/assets/{azure-openai-BEo5yb4v.js → azure-openai-CCQEbsz-.js} +1 -1
- package/dist/ui/assets/{azure-openai-CPyVxzSR.js → azure-openai-CEy7SRpV.js} +1 -1
- package/dist/ui/assets/{cerebras-CIaiSbJZ.js → cerebras-DIBIX0Oy.js} +1 -1
- package/dist/ui/assets/{cerebras-B8boQLPF.js → cerebras-DWcS2MJF.js} +1 -1
- package/dist/ui/assets/{connect-surface-Cptqy9Nz.js → connect-surface-DDenMwkS.js} +1 -1
- package/dist/ui/assets/{fs-LAa7EYHh.js → fs-BIhkVC0R.js} +1 -1
- package/dist/ui/assets/{fs-DT4gSDtA.js → fs-CWScX2Xq.js} +2 -2
- package/dist/ui/assets/{github-CHyEoQ3E.js → github-Dib6XDx8.js} +2 -2
- package/dist/ui/assets/{github-copilot-Bj-1OJn2.js → github-copilot-CzYLbprJ.js} +1 -1
- package/dist/ui/assets/{github-copilot-Evc5s0Ol.js → github-copilot-dFuHM0CI.js} +1 -1
- package/dist/ui/assets/{github-install-C_FQL-R9.js → github-install-CB-L3Cbj.js} +1 -1
- package/dist/ui/assets/{github-BBPO1Jdv.js → github-wvEgy5Fm.js} +1 -1
- package/dist/ui/assets/{github-zip-jlWKiTed.js → github-zip-DrBlcymW.js} +1 -1
- package/dist/ui/assets/{kernel-worker-DQBAD556.js → kernel-worker-Co3zD5Yg.js} +25 -25
- package/dist/ui/assets/{local-llm-C4h_Bive.js → local-llm-2GUiqo1S.js} +1 -1
- package/dist/ui/assets/{local-llm-QWmpzGtH.js → local-llm-CX7yfaDk.js} +1 -1
- package/dist/ui/assets/{main-Dl3BiawA.js → main-hlkSn4As.js} +3 -3
- package/dist/ui/assets/{mount-1SzH70lY.js → mount-BgDewxWb.js} +2 -2
- package/dist/ui/assets/{mount-3jqXEQoM.js → mount-DyjlVbuP.js} +1 -1
- package/dist/ui/assets/{mount-recovery-CpqU7MVT.js → mount-recovery-B-n5vYUw.js} +1 -1
- package/dist/ui/assets/{new-session-SZD4DyGF.js → new-session-DY5BGDJ8.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-BEZbwd_v.js → oauth-bootstrap-CVyTAMCP.js} +2 -2
- package/dist/ui/assets/{openai-codex-DRtg41JW.js → openai-codex-BAWwizMw.js} +1 -1
- package/dist/ui/assets/{openai-codex-YQtE0AhD.js → openai-codex-kOFdfYVa.js} +1 -1
- package/dist/ui/assets/{openrouter-DFxkLSCo.js → openrouter-BhuqJXxY.js} +1 -1
- package/dist/ui/assets/{openrouter-YJK0xMn5.js → openrouter-ZzE0x9Fy.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-0Iz0Lf7c.js → openrouter-oauth-B0dGiVEj.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-2eZCQAy3.js → openrouter-oauth-WnTzOF_l.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-D3gNr8Lo.js → panel-rpc-handlers-Dn2K6zqH.js} +2 -2
- package/dist/ui/assets/{panelize-shell-B4ItxZR2.js → panelize-shell-BMdmcGbz.js} +1 -1
- package/dist/ui/assets/{provider-D-l7YDjm.js → provider-BCmMdJaO.js} +2 -2
- package/dist/ui/assets/{provider-D_bcLp0h.js → provider-C0VvyZR9.js} +1 -1
- package/dist/ui/assets/{provider-settings-CJzq3GUk.js → provider-settings-BhDzLWUF.js} +1 -1
- package/dist/ui/assets/{provider-settings-CvZfl2fx.js → provider-settings-C2V5xFsL.js} +1 -1
- package/dist/ui/assets/provider-store-access-DVSS6y6Y.js +1 -0
- package/dist/ui/assets/{provider-store-access-C-7F687a.js → provider-store-access-Do1envyk.js} +2 -2
- package/dist/ui/assets/{providers-PifvpsMq.js → providers-ByH1eH6Q.js} +1 -1
- package/dist/ui/assets/{providers-CnXezukO.js → providers-DRgxbcK2.js} +2 -2
- package/dist/ui/assets/{quick-llm-CxikNsnv.js → quick-llm-DT50DEqR.js} +1 -1
- package/dist/ui/assets/{recovery-screen-NcThcqSQ.js → recovery-screen-m_QPzrXl.js} +1 -1
- package/dist/ui/assets/{redirect-uri-DO-k2Hd6.js → redirect-uri-BtKiAATR.js} +1 -1
- package/dist/ui/assets/{session-freezer-BjSMXFZZ.js → session-freezer-DmRhHJP-.js} +3 -3
- package/dist/ui/assets/{setup-feature-flags-remote-kbOZ2cHU.js → setup-feature-flags-remote-DUl2Gw64.js} +1 -1
- package/dist/ui/assets/{setup-standalone-prelude-wOpdvS2f.js → setup-standalone-prelude-gYc87oD6.js} +1 -1
- package/dist/ui/assets/{setup-sudo-yCw5XbBd.js → setup-sudo-CUIFb5Ig.js} +2 -2
- package/dist/ui/assets/{skills-D5mVPngL.js → skills-BUjVwUS1.js} +1 -1
- package/dist/ui/assets/{src-DByu4fZZ.js → src-CgkZ61-B.js} +15 -14
- package/dist/ui/assets/{store-DsxgMHjZ.js → store-DNtdQjhF.js} +1 -1
- package/dist/ui/assets/{store-eyTbsv6q.js → store-cVWvZHXl.js} +1 -1
- package/dist/ui/assets/{sudo-CI99I5iu.js → sudo-BB2c9d-C.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-B6OKxPaQ.js → upgrade-detection-gA6mZDx3.js} +1 -1
- package/dist/ui/assets/{wc-attach-DVIe5tEK.js → wc-attach-Dvi0x3r3.js} +2 -2
- package/dist/ui/assets/{wc-extension-DlitQQEy.js → wc-extension-BzwFd4xF.js} +2 -2
- package/dist/ui/assets/{wc-follower-Ic--CAOC.js → wc-follower-CTot_3EW.js} +3 -3
- package/dist/ui/assets/wc-live-bXvU25Yn.js +8 -0
- package/dist/ui/assets/{wc-nav-BTJnXaw0.js → wc-nav-B6ea5sZS.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-BEpEUYwZ.js → wc-onboarding-bZ-YjPAJ.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-CWCSNXLN.js → wc-placeholder-wC9zd4Z7.js} +2 -2
- package/dist/ui/assets/{wc-settings-BFWBIhP3.js → wc-settings-NDhqWpAX.js} +2 -2
- package/dist/ui/assets/{wc-shell-HWLdXedi.js → wc-shell-B9rSPEys.js} +3 -3
- package/dist/ui/assets/{wc-sprinkles-oLGs86V_.js → wc-sprinkles-CX4iL64D.js} +2 -2
- package/dist/ui/assets/{wc-tray-DOTt5xos.js → wc-tray-_fwiKnaF.js} +2 -2
- package/dist/ui/assets/{xai-grok-DKUBPUni.js → xai-grok-CqTVZ0zl.js} +1 -1
- package/dist/ui/assets/{xai-grok-D69aluE4.js → xai-grok-bQqseGyW.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/dist/ui/packages/webapp/index.html +6 -6
- package/package.json +2 -2
- package/dist/ui/assets/provider-store-access-DRcvmAdq.js +0 -1
- package/dist/ui/assets/wc-live-Ca-EFS_C.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e,d as t,z as n}from"./account-store-
|
|
1
|
+
import{S as e,d as t,z as n}from"./account-store-Czgj4q96.js";import{i as r}from"./proxied-fetch-BML_ivCH.js";import{r as i,t as a}from"./tray-runtime-config-ObNW_fQX.js";import{t as o}from"./global-db-DJXlpNui.js";import{r as s,t as c}from"./silent-renew-backoff-BrAZcbzt.js";import{getOAuthPageOrigin as l,resolveOAuthDelegation as u}from"./oauth-service-a6YE6xTR.js";import"./provider-settings-C2V5xFsL.js";var d={clientId:``,scopes:`repo,read:user,user:email`};function f(){try{let e=localStorage.getItem(i);if(e)return e.replace(/\/$/,``)}catch{}return a}async function p(e){let t;try{t=await e.json()}catch{throw Error(`Token exchange failed (HTTP ${e.status}): non-JSON response`)}if(!e.ok&&e.status!==200){let n=t.error_description??t.error??`Token exchange failed (HTTP ${e.status})`;throw Error(n)}if(t.error){let e=t.error_description??t.error;throw Error(e)}return t}async function m(e){let t=`${f()}/oauth/token`;return p(await fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e.provider,code:e.code,redirect_uri:e.redirectUri})}))}async function h(e){let t=`${f()}/oauth/token`;return p(await fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e.provider,refresh_token:e.refreshToken})}))}async function g(e){let t=`${f()}/oauth/revoke`,n=await fetch(t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e.provider,access_token:e.accessToken})});if(!(n.status===204||n.ok)){if(n.status===400)try{if((await n.json()).error===`unsupported`)return}catch{}throw Error(`Token revocation failed (HTTP ${n.status})`)}}const _=Object.assign({"/packages/webapp/providers/github-config.json":d})[`/packages/webapp/providers/github-config.json`]??{clientId:``,scopes:`repo,read:user,user:email`};let v=null,y=null;function b(e){let{isExtension:t,isConnectMode:n,workerBaseUrl:r,pageOrigin:i,pageHref:a,bridgeApiBaseUrl:o,extensionId:c,nonce:l}=e;if(t)return{redirectUri:`${r}/auth/callback`,state:{source:`extension`,extensionId:c,path:`/github`,nonce:l}};if(e.delegated)return{redirectUri:`${e.runtimeWorkerBaseUrl??r}/auth/callback`,state:{source:`opener`,path:`/auth/callback`,nonce:l}};if(n){let e=i??``;if(/^https?:\/\/(localhost|127\.0\.0\.1):\d+$/.test(e)){let t=parseInt(new URL(a??e).port||`8790`,10);return{redirectUri:`${r}/auth/callback`,state:{source:`local`,port:t,path:`/auth/callback`,nonce:l}}}return{redirectUri:`${r}/auth/callback`,state:{source:`remote`,origin:e,path:`/auth/callback`,nonce:l}}}if(o&&a&&s(a)){let t=null;try{let e=new URL(o);(e.hostname===`localhost`||e.hostname===`127.0.0.1`)&&(t=parseInt(e.port||`5710`,10))}catch{t=null}if(t!==null&&!Number.isNaN(t))return{redirectUri:`${e.runtimeWorkerBaseUrl??r}/auth/callback`,state:{source:`local`,port:t,path:`/auth/callback`,nonce:l}}}return{redirectUri:`${e.runtimeWorkerBaseUrl??i??``}/auth/callback`,state:{port:parseInt(new URL(a??i??`http://localhost:5710`).port||`5710`,10),path:`/auth/callback`,nonce:l}}}async function x(){if(v)return v;if(S){try{let e=await fetch(`${f()}/api/runtime-config`);if(e.ok){let t=await e.json();if(t.oauth?.github)return v=t.oauth.github,v}}catch{}return _.clientId}try{let e=await fetch(`/api/runtime-config`);if(e.ok){let t=await e.json();if(t.oauth?.github)return v=t.oauth.github,t.trayWorkerBaseUrl&&(y=t.trayWorkerBaseUrl),v;if(t.trayWorkerBaseUrl){y=t.trayWorkerBaseUrl;let e=await fetch(`${t.trayWorkerBaseUrl}/api/runtime-config`);if(e.ok){let t=await e.json();if(t.oauth?.github)return v=t.oauth.github,v}}}}catch{}return _.clientId}const S=typeof globalThis<`u`&&typeof globalThis.chrome?.runtime?.id==`string`;function C(){return t().find(e=>e.providerId===`github`)}function w(e){try{return new URL(e).searchParams.get(`code`)}catch{return null}}async function T(e){try{let t=await fetch(`https://api.github.com/user`,{headers:{Authorization:`Bearer ${e}`,Accept:`application/vnd.github+json`}});if(t.ok){let e=await t.json();return{name:e.name||e.login,avatar:e.avatar_url,login:e.login,id:e.id}}}catch(e){console.warn(`[github] Failed to fetch user profile:`,e instanceof Error?e.message:String(e))}return{}}function E(e,t){return`${e}+${t}@users.noreply.github.com`}async function D(e){try{let{VirtualFS:t}=await import(`./fs-BIhkVC0R.js`).then(e=>e.t);await(await t.create({dbName:o})).writeFile(`/workspace/.git/github-token`,e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`github-token-changed`))}catch(e){console.warn(`[github] Failed to write git token:`,e instanceof Error?e.message:String(e))}}async function O(){try{let{VirtualFS:e}=await import(`./fs-BIhkVC0R.js`).then(e=>e.t);await(await e.create({dbName:o})).rm(`/workspace/.git/github-token`),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`github-token-changed`))}catch{}}async function k(e){if(!(!e.login||e.id===void 0))try{let{VirtualFS:t}=await import(`./fs-BIhkVC0R.js`).then(e=>e.t),{readGlobalGitConfigValue:n,writeGlobalGitConfigValue:r}=await import(`./git-config-DA8M5e8O.js`).then(e=>e.n),i=await t.create({dbName:o}),a=e.name||e.login,s=E(e.id,e.login);!await n(i,`user.name`)&&a&&await r(i,`user.name`,a),await n(i,`user.email`)||await r(i,`user.email`,s)}catch(e){console.warn(`[github] Failed to seed git identity:`,e instanceof Error?e.message:String(e))}}const A=c();async function j(){try{let t=C();if(!t?.refreshToken)return null;let r=await h({provider:`github`,refreshToken:t.refreshToken});await n({providerId:`github`,accessToken:r.access_token,refreshToken:r.refresh_token,tokenExpiresAt:r.expires_in?Date.now()+r.expires_in*1e3:void 0,userName:t.userName,userAvatar:t.userAvatar,scopes:r.scope??t.scopes});let i=e(`github`)?.maskedValue;return i?await D(i):await O(),r.access_token}catch(e){return console.warn(`[github] Silent renewal failed:`,e instanceof Error?e.message:String(e)),null}}async function M(){let e=C();if(!e?.accessToken)throw Error(`Not logged in to GitHub — please log in first`);if((e.tokenExpiresAt??1/0)-Date.now()>6e4)return e.accessToken;let t=await A.run(()=>j());if(t)return t;let n=C();if((n?.tokenExpiresAt??1/0)-Date.now()>0&&n?.accessToken)return n.accessToken;throw Error(`GitHub session expired — please log in again`)}const N={id:`github`,name:`GitHub`,description:"Sign in with GitHub for git authentication (push/pull/clone) and the `oauth-token github` shell command. Does not expose LLM models — use the GitHub Copilot provider for those.",requiresApiKey:!1,requiresBaseUrl:!1,isOAuth:!0,oauthTokenDomains:[`github.com`,`*.github.com`,`api.github.com`,`raw.githubusercontent.com`],getModelIds:()=>[],onOAuthLogin:async(t,i,a)=>{let o=await x();if(!o)throw Error(`GitHub OAuth not configured — no client ID available`);let s=a?.scopes??_.scopes,c=S?null:await l(),d=!S&&await u(),p=crypto.randomUUID(),h=S?chrome.runtime.id:``,{redirectUri:g,state:v}=b({isExtension:S,isConnectMode:!!globalThis.__slicc_connect_mode,workerBaseUrl:f(),runtimeWorkerBaseUrl:y,pageOrigin:c?.origin??null,pageHref:c?.href??null,bridgeApiBaseUrl:r(),delegated:d,extensionId:h,nonce:p}),C=btoa(JSON.stringify(v)),E=p,A=new URLSearchParams({client_id:o,scope:s,redirect_uri:g});C&&A.set(`state`,C);let j=await t(`https://github.com/login/oauth/authorize?${A}`);if(!j)return;if(E)try{if(new URL(j).searchParams.get(`nonce`)!==E){console.error(`[github] OAuth nonce mismatch — possible CSRF`);return}}catch(e){console.warn(`[github] Nonce check skipped (URL parse failed):`,e instanceof Error?e.message:String(e))}let M=w(j);if(!M){console.error(`[github] Could not extract authorization code from redirect URL`);return}let N=await m({provider:`github`,code:M,redirectUri:g}),P=await T(N.access_token);await n({providerId:`github`,accessToken:N.access_token,refreshToken:N.refresh_token,tokenExpiresAt:N.expires_in?Date.now()+N.expires_in*1e3:void 0,userName:P.name,userAvatar:P.avatar,scopes:N.scope});let F=e(`github`)?.maskedValue;F?await D(F):await O(),await k(P),i()},onSilentRenew:j,getValidAccessToken:M,onOAuthLogout:async()=>{let e=C();e?.accessToken&&await g({provider:`github`,accessToken:e.accessToken}).catch(e=>console.warn(`[github] Token revocation failed:`,e instanceof Error?e.message:String(e))),await O(),await n({providerId:`github`,accessToken:``})},getOAuthLogoutUrl:e=>`https://github.com/logout`};export{E as buildNoreplyEmail,N as config,w as extractCodeFromUrl,M as getValidAccessToken,b as resolveGithubOAuthRedirect,k as syncGitIdentityFromGitHub};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{i as t}from"./binary-cache-bSOhqXB1.js";import{n,r,t as i}from"./fetch-body-DDu_AU5I.js";import{n as a}from"./fs-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{i as t}from"./binary-cache-bSOhqXB1.js";import{n,r,t as i}from"./fetch-body-DDu_AU5I.js";import{n as a}from"./fs-BIhkVC0R.js";import{r as o}from"./browser-BAL8RehA.js";import{t as s}from"./global-db-DJXlpNui.js";const c=`https://api.tessl.io`,l=`https://browse.sh/api/skills`,u=`/workspace/skills`,d=s,f=`application/vnd.github.v3+json`,p=`https://www.sliccy.com/skills/`,m=`${p}catalog.json`;function h(e,t){let n=e instanceof Error?e.message:String(e),r;try{r=new URL(t).host}catch{return n}return!r||n.includes(r)?n:`${n} (host: ${r} — network or CORS error)`}let g;function _(){return g||=a.create({dbName:d}),g}async function v(){try{return(await(await _()).readTextFile(`/workspace/.git/github-token`)).trim()||void 0}catch{return}}function y(e,t=f){let n={Accept:t,"User-Agent":`slicc-upskill`};return e&&(n.Authorization=`Bearer ${e}`),n}async function b(e){let t=await v();return{hasToken:!!t,request:async(n,r=f)=>{try{return await e(n,{headers:y(t,r)})}catch(e){throw Error(h(e,n))}}}}function x(e,t){if(!e)return;let n=t.toLowerCase();for(let[t,r]of Object.entries(e))if(t.toLowerCase()===n)return r}function S(e){let t=i(e);if(!t)return;try{let e=JSON.parse(t);if(typeof e.message==`string`&&e.message.trim())return e.message.trim()}catch{}let n=t.trim();if(n)return n.slice(0,200)}function C(e,t,n){let r=S(e.body),i=r?` GitHub said: ${r}`:``,a=x(e.headers,`retry-after`),o=x(e.headers,`x-ratelimit-remaining`),s=r?.toLowerCase()??``;if(e.status===429||o===`0`||s.includes(`rate limit`))return n?`GitHub rate-limited access to ${t} (HTTP ${e.status}). The configured github.token was used, so retry later${a?` after about ${a} seconds`:``}.${i}`:`GitHub rate-limited anonymous access to ${t} (HTTP ${e.status}). This often happens on shared VPNs or corporate egress IPs because unauthenticated GitHub API requests are limited per IP. Configure a token with: git config github.token <PAT>, then retry. You can also retry off VPN or later.${i}`;if(e.status===401)return n?`GitHub rejected the configured github.token while accessing ${t} (HTTP 401). Update it with: git config github.token <PAT>, then retry.${i}`:`GitHub requires authentication to access ${t} (HTTP 401). Configure a token with: git config github.token <PAT>, then retry.${i}`;if(e.status===404)return`GitHub could not find ${t} (HTTP 404). Check the repository, path, and permissions.${i}`;if(e.status===403)return n?`GitHub denied access to ${t} (HTTP 403). Check that your github.token can access this repository or retry later if GitHub is throttling requests.${i}`:`GitHub denied anonymous access to ${t} (HTTP 403). If this repo is public on a shared VPN, you may have hit GitHub's shared IP limit; otherwise the repository or path may require authentication. Configure a token with: git config github.token <PAT>, then retry.${i}`;let c=e.statusText?` ${e.statusText}`:``;return`GitHub request for ${t} failed (HTTP ${e.status}${c}).${i}`}var w=e({downloadGitHubDir:()=>O,fetchRepoZip:()=>T,stripZipPrefix:()=>E,writeZipFilesToDir:()=>D});async function T(e,r,i,a=`main`){let s=`https://codeload.github.com/${e}/${r}/zip/refs/heads/${a}`,c;try{c=await i(s,{headers:{"User-Agent":`slicc-upskill`}})}catch(e){return{status:`error`,message:h(e,s)}}if(c.status===404)return a===`main`?T(e,r,i,`master`):{status:`error`,message:`codeload returned HTTP 404`};if(c.status!==200)return{status:`error`,message:`codeload returned HTTP ${c.status}`};let l=t(s);l||=n(c.body);try{return{status:`ok`,files:o(l)}}catch(e){return{status:`error`,message:`failed to unzip: ${e instanceof Error?e.message:String(e)}`}}}function E(e){let t={};for(let[n,r]of Object.entries(e)){let e=n.indexOf(`/`);if(e<0)continue;let i=n.slice(e+1);i&&(t[i]=r)}return t}async function D(e,t,n,r){let i=0;for(let[a,o]of Object.entries(e)){if(!a.startsWith(t))continue;let e=a.slice(t.length);if(!e||a.endsWith(`/`))continue;let s=`${n}/${e}`,c=s.substring(0,s.lastIndexOf(`/`));c!==n&&await r.mkdir(c,{recursive:!0}),await r.writeFile(s,o),i++}return i}async function O(e,n,i,a,o,s,c){for(let l of e)if(l.type===`file`&&l.download_url){let e=await c.request(l.download_url,`*/*`);if(e.status!==200)throw Error(C(e,`${i}/${a}/${l.path}`,c.hasToken));let r=t(l.download_url);await s.writeFile(`${n}/${l.name}`,r??e.body)}else if(l.type===`dir`){let e=`https://api.github.com/repos/${i}/${a}/contents/${l.path}`,t=o?`${e}?ref=${encodeURIComponent(o)}`:e,u=await c.request(t);if(u.status!==200)throw Error(C(u,`${i}/${a}/${l.path}`,c.hasToken));let d=r(u.body);await s.mkdir(`${n}/${l.name}`,{recursive:!0}),await O(d,`${n}/${l.name}`,i,a,o,s,c)}}export{D as a,h as c,p as d,m as f,E as i,l,T as n,C as o,c as p,w as r,b as s,O as t,u};
|