@urun-sh/openai 0.6.40 → 0.6.42
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/{chunk-G5VRFFBE.js → chunk-IFYB6QUQ.js} +18 -18
- package/dist/{chunk-L6CT7ZVO.js → chunk-OZ7HE3VG.js} +1 -1
- package/dist/{chunk-PT5N7AY7.js → chunk-QNJKRB7Q.js} +1 -1
- package/dist/{chunk-BWYY4IPR.js → chunk-XKCWX72M.js} +1 -1
- package/dist/hosted/bin.cjs +27 -27
- package/dist/hosted/bin.js +1 -1
- package/dist/hosted/index.cjs +26 -26
- package/dist/hosted/index.js +1 -1
- package/dist/pi-extension/standalone.cjs +2 -2
- package/dist/pooler/bin.cjs +10 -10
- package/dist/pooler/bin.js +10 -10
- package/dist/proxy/cli.cjs +26 -26
- package/dist/proxy/cli.js +1 -1
- package/dist/proxy/index.cjs +22 -22
- package/dist/proxy/index.js +1 -1
- package/package.json +2 -2
package/dist/proxy/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as J,b as q,c as H,d as Y,e as V}from"../chunk-
|
|
2
|
+
import{a as J,b as q,c as H,d as Y,e as V}from"../chunk-QNJKRB7Q.js";import"../chunk-CAR4AEQJ.js";import{F as K}from"../chunk-IFYB6QUQ.js";import"../chunk-QTHFMDZY.js";import{g as R}from"../chunk-Z3QCHKJB.js";import"../chunk-L4QBHSVY.js";import{a as v,b as $,c as C,d as U,e as I,f as L,g as N,h as O,i as x,j as _,k as g,m as G,n as P,o as D,p as M,q as A,r as W,s as b,t as B,u as j,v as F}from"../chunk-XKCWX72M.js";import"../chunk-4NMMWAKD.js";import"../chunk-GX243AIV.js";import"../chunk-7KRHHEKZ.js";import"../chunk-HPUX2H65.js";import{c as h}from"../chunk-YSFSRI3D.js";h();import{spawn as ee}from"child_process";import{appendFileSync as T,createWriteStream as de,existsSync as pe,mkdirSync as ne}from"fs";import re from"path";import n from"process";h();import{ensureNodeWebRTC as ae,nodeWebRTCUnavailableReason as le}from"@urun-sh/core/internal";var ue={ensureWebRTC:ae,webrtcUnavailableReason:le,audioBackend:R};async function z(e=ue){try{await e.ensureWebRTC()}catch(t){return{ok:!1,reason:`the WebRTC bootstrap threw: ${String(t)}`}}let i=e.webrtcUnavailableReason();if(i)return{ok:!1,reason:`${i} \u2014 this artifact would join every session doc/KV-only and every token stream would error. Either "werift" is missing from the deployment directory (npm lane), or it was marked --external in a single-file build, where nothing can ever resolve it (bunfs: "Cannot find package 'werift' from '/$bunfs/root/\u2026'").`};try{(await e.audioBackend()).createSource()}catch(t){return{ok:!1,reason:`the werift/opus audio backend could not be constructed: ${String(t)}`}}return{ok:!0,reason:null}}function fe(e,i){let t=(e.URUN_CATALOG_URL??"").trim(),l=t?G(t,"URUN_CATALOG_URL"):"",s=(e.URUN_CATALOG_ANON_KEY??"").trim();return!l||!s?(i(`urun compat: catalog oracle off (URUN_CATALOG_URL/URUN_CATALOG_ANON_KEY unset) \u2014 an undeployed uRun CATALOG model name falls through to the default app instead of a loud 404; deployed apps still resolve exactly, and /stats.models records every mapping
|
|
3
3
|
`),null):{catalogUrl:l,anonKey:s}}function me(e){let i={baseUrl:e.baseUrl,orgId:e.orgId,defaultApp:e.appId,fnName:e.fnName,apiUrl:e.apiUrl,auth:e.auth,catalog:fe(n.env,l=>n.stderr.write(l)),decisionPool:J(n.env,n.env.HOSTNAME)??void 0},t=H(i);return{router:t,decision:i.decisionPool?Y(i,t):null}}async function Q(e,i,t){let l=ee(e,i,{stdio:"inherit",env:t});return new Promise(s=>{l.once("exit",r=>s(r??1)),l.once("error",r=>{n.stderr.write(`failed to launch ${e}: ${String(r)}
|
|
4
4
|
`),s(127)})})}function X(){return N(n.env,import.meta.url,pe)}function te(e){for(let[i,t]of Object.entries($(e)))n.stdout.write(`export ${i}=${t}
|
|
5
5
|
`)}async function Z(e,i){let t=g(n.env),l=i?P(t):void 0,{router:s,decision:r}=me(t);r&&(r.boot().then(()=>r.reap()).catch(u=>n.stderr.write(`[decision-pool] boot FAILED: ${String(u instanceof Error?u.message:u)}
|