@urun-sh/openai 0.5.5 → 0.5.6
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/{ResponsesClient-BYx3YLGo.d.ts → ResponsesClient-BE3-hx3m.d.ts} +2 -0
- package/dist/{ResponsesClient-Dft3bg3b.d.cts → ResponsesClient-DjZWjlFH.d.cts} +2 -0
- package/dist/chunk-2T2YYBVX.js +1 -0
- package/dist/chunk-3WAJD62J.js +4 -0
- package/dist/{chunk-K23AZPI4.js → chunk-5HKWNK3O.js} +1 -1
- package/dist/chunk-7M6LY6DR.js +2 -0
- package/dist/chunk-BSHT6RZZ.js +1 -0
- package/dist/{chunk-GBBY3PCZ.js → chunk-FP4RSAIE.js} +1 -1
- package/dist/chunk-HR5H6S7L.js +1 -0
- package/dist/chunk-NY23USZF.js +57 -0
- package/dist/chunk-VLRMJRLS.js +6 -0
- package/dist/gemini-live.cjs +2 -2
- package/dist/gemini-live.d.cts +17 -2
- package/dist/gemini-live.d.ts +7 -2
- package/dist/gemini-live.js +1 -1
- package/dist/hosted/bin.cjs +40 -26
- package/dist/hosted/bin.js +4 -4
- package/dist/hosted/index.cjs +39 -26
- package/dist/hosted/index.d.cts +643 -16
- package/dist/hosted/index.d.ts +153 -5
- package/dist/hosted/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{models-NYMZrklp.d.cts → models-DUdx_Y6X.d.cts} +1 -1
- package/dist/pi-extension/index.cjs +7 -7
- package/dist/pi-extension/index.d.cts +1 -1
- package/dist/pi-extension/index.d.ts +1 -1
- package/dist/pi-extension/index.js +1 -1
- package/dist/pi-extension/standalone.cjs +48 -48
- package/dist/proxy/cli.cjs +53 -43
- package/dist/proxy/cli.js +14 -14
- package/dist/proxy/index.cjs +32 -30
- package/dist/proxy/index.d.cts +84 -8
- package/dist/proxy/index.d.ts +16 -6
- package/dist/proxy/index.js +1 -6
- package/dist/responses-turn-Dr37N3kH.d.ts +486 -0
- package/dist/responses-turn-tNUHq5b0.d.cts +1807 -0
- package/dist/{translator-C9uPKypK.d.ts → translator-BCoRFaTs.d.ts} +1 -1
- package/dist/{translator-CcDBEfvm.d.cts → translator-Bh0Bp_Ie.d.cts} +3 -3
- package/dist/{video-out-D20UuJ8G.d.cts → video-out-CCksIcj8.d.cts} +5 -5
- package/package.json +12 -11
- package/dist/chunk-5BZCM3RS.js +0 -4
- package/dist/chunk-5NXM4IO3.js +0 -2
- package/dist/chunk-CWJRDBDC.js +0 -1
- package/dist/chunk-DMD5UENK.js +0 -1
- package/dist/chunk-I2Q3B3OG.js +0 -6
- package/dist/chunk-OI2OY32M.js +0 -1
- package/dist/chunk-QVF7NF7G.js +0 -44
- package/dist/responses-turn-KOAoIqZ-.d.ts +0 -200
- package/dist/responses-turn-OrO4euEN.d.cts +0 -513
- /package/dist/{chunk-YSFSRI3D.js → chunk-5CCJUNH7.js} +0 -0
- /package/dist/{models-NYMZrklp.d.ts → models-DUdx_Y6X.d.ts} +0 -0
- /package/dist/{video-out-CWesbk12.d.ts → video-out-IGQ4YQ-c.d.ts} +0 -0
package/dist/hosted/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as z,j as se,t as ce,u as de}from"../chunk-5BZCM3RS.js";import"../chunk-I2Q3B3OG.js";import"../chunk-K23AZPI4.js";import"../chunk-QVF7NF7G.js";import"../chunk-GBBY3PCZ.js";import"../chunk-DMD5UENK.js";import"../chunk-5NXM4IO3.js";import"../chunk-CWJRDBDC.js";import"../chunk-OI2OY32M.js";import{a as We,b as $e,c as H}from"../chunk-YSFSRI3D.js";var he=We(()=>{"use strict";H();var le;(function(M){(function(_){var p=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:A(),O=k(M);typeof p.Reflect<"u"&&(O=k(p.Reflect,O)),_(O,p),typeof p.Reflect>"u"&&(p.Reflect=M);function k(S,x){return function(E,C){Object.defineProperty(S,E,{configurable:!0,writable:!0,value:C}),x&&x(E,C)}}function m(){try{return Function("return this;")()}catch{}}function T(){try{return(0,eval)("(function() { return this; })()")}catch{}}function A(){return m()||T()}})(function(_,p){var O=Object.prototype.hasOwnProperty,k=typeof Symbol=="function",m=k&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",T=k&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",A=typeof Object.create=="function",S={__proto__:[]}instanceof Array,x=!A&&!S,E={create:A?function(){return B(Object.create(null))}:S?function(){return B({__proto__:null})}:function(){return B({})},has:x?function(e,t){return O.call(e,t)}:function(e,t){return t in e},get:x?function(e,t){return O.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},C=Object.getPrototypeOf(Function),G=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:De(),U=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Ae(),W=typeof WeakMap=="function"?WeakMap:Fe(),I=k?Symbol.for("@reflect-metadata:registry"):void 0,F=xe(),L=Ce(F);function ve(e,t,r,n){if(s(r)){if(!te(e))throw new TypeError;if(!re(t))throw new TypeError;return ke(e,t)}else{if(!te(e))throw new TypeError;if(!h(t))throw new TypeError;if(!h(n)&&!s(n)&&!R(n))throw new TypeError;return R(n)&&(n=void 0),r=b(r),Te(e,t,r,n)}}_("decorate",ve);function ye(e,t){function r(n,u){if(!h(n))throw new TypeError;if(!s(u)&&!Re(u))throw new TypeError;Q(e,t,n,u)}return r}_("metadata",ye);function we(e,t,r,n){if(!h(r))throw new TypeError;return s(n)||(n=b(n)),Q(e,t,r,n)}_("defineMetadata",we);function pe(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=b(r)),Z(e,t,r)}_("hasMetadata",pe);function _e(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=b(r)),$(e,t,r)}_("hasOwnMetadata",_e);function Me(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=b(r)),q(e,t,r)}_("getMetadata",Me);function ge(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=b(r)),J(e,t,r)}_("getOwnMetadata",ge);function me(e,t){if(!h(e))throw new TypeError;return s(t)||(t=b(t)),X(e,t)}_("getMetadataKeys",me);function be(e,t){if(!h(e))throw new TypeError;return s(t)||(t=b(t)),Y(e,t)}_("getOwnMetadataKeys",be);function Oe(e,t,r){if(!h(t))throw new TypeError;if(s(r)||(r=b(r)),!h(t))throw new TypeError;s(r)||(r=b(r));var n=D(t,r,!1);return s(n)?!1:n.OrdinaryDeleteMetadata(e,t,r)}_("deleteMetadata",Oe);function ke(e,t){for(var r=e.length-1;r>=0;--r){var n=e[r],u=n(t);if(!s(u)&&!R(u)){if(!re(u))throw new TypeError;t=u}}return t}function Te(e,t,r,n){for(var u=e.length-1;u>=0;--u){var v=e[u],w=v(t,r,n);if(!s(w)&&!R(w)){if(!h(w))throw new TypeError;n=w}}return n}function Z(e,t,r){var n=$(e,t,r);if(n)return!0;var u=V(t);return R(u)?!1:Z(e,u,r)}function $(e,t,r){var n=D(t,r,!1);return s(n)?!1:ee(n.OrdinaryHasOwnMetadata(e,t,r))}function q(e,t,r){var n=$(e,t,r);if(n)return J(e,t,r);var u=V(t);if(!R(u))return q(e,u,r)}function J(e,t,r){var n=D(t,r,!1);if(!s(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function Q(e,t,r,n){var u=D(r,n,!0);u.OrdinaryDefineOwnMetadata(e,t,r,n)}function X(e,t){var r=Y(e,t),n=V(e);if(n===null)return r;var u=X(n,t);if(u.length<=0)return r;if(r.length<=0)return u;for(var v=new U,w=[],c=0,a=r;c<a.length;c++){var i=a[c],o=v.has(i);o||(v.add(i),w.push(i))}for(var f=0,d=u;f<d.length;f++){var i=d[f],o=v.has(i);o||(v.add(i),w.push(i))}return w}function Y(e,t){var r=D(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function K(e){if(e===null)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return e===null?1:6;default:return 6}}function s(e){return e===void 0}function R(e){return e===null}function Ee(e){return typeof e=="symbol"}function h(e){return typeof e=="object"?e!==null:typeof e=="function"}function Pe(e,t){switch(K(e)){case 0:return e;case 1:return e;case 2:return e;case 3:return e;case 4:return e;case 5:return e}var r=t===3?"string":t===5?"number":"default",n=ne(e,m);if(n!==void 0){var u=n.call(e,r);if(h(u))throw new TypeError;return u}return Se(e,r==="default"?"number":r)}function Se(e,t){if(t==="string"){var r=e.toString;if(j(r)){var n=r.call(e);if(!h(n))return n}var u=e.valueOf;if(j(u)){var n=u.call(e);if(!h(n))return n}}else{var u=e.valueOf;if(j(u)){var n=u.call(e);if(!h(n))return n}var v=e.toString;if(j(v)){var n=v.call(e);if(!h(n))return n}}throw new TypeError}function ee(e){return!!e}function Ie(e){return""+e}function b(e){var t=Pe(e,3);return Ee(t)?t:Ie(t)}function te(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:Object.prototype.toString.call(e)==="[object Array]"}function j(e){return typeof e=="function"}function re(e){return typeof e=="function"}function Re(e){switch(K(e)){case 3:return!0;case 4:return!0;default:return!1}}function N(e,t){return e===t||e!==e&&t!==t}function ne(e,t){var r=e[t];if(r!=null){if(!j(r))throw new TypeError;return r}}function ae(e){var t=ne(e,T);if(!j(t))throw new TypeError;var r=t.call(e);if(!h(r))throw new TypeError;return r}function ie(e){return e.value}function oe(e){var t=e.next();return t.done?!1:t}function fe(e){var t=e.return;t&&t.call(e)}function V(e){var t=Object.getPrototypeOf(e);if(typeof e!="function"||e===C||t!==C)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(n==null||n===Object.prototype)return t;var u=n.constructor;return typeof u!="function"||u===e?t:u}function je(){var e;!s(I)&&typeof p.Reflect<"u"&&!(I in p.Reflect)&&typeof p.Reflect.defineMetadata=="function"&&(e=Ge(p.Reflect));var t,r,n,u=new W,v={registerProvider:w,getProvider:a,setProvider:o};return v;function w(f){if(!Object.isExtensible(v))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===f:break;case s(t):t=f;break;case t===f:break;case s(r):r=f;break;case r===f:break;default:n===void 0&&(n=new U),n.add(f);break}}function c(f,d){if(!s(t)){if(t.isProviderFor(f,d))return t;if(!s(r)){if(r.isProviderFor(f,d))return t;if(!s(n))for(var l=ae(n);;){var y=oe(l);if(!y)return;var g=ie(y);if(g.isProviderFor(f,d))return fe(l),g}}}if(!s(e)&&e.isProviderFor(f,d))return e}function a(f,d){var l=u.get(f),y;return s(l)||(y=l.get(d)),s(y)&&(y=c(f,d),s(y)||(s(l)&&(l=new G,u.set(f,l)),l.set(d,y))),y}function i(f){if(s(f))throw new TypeError;return t===f||r===f||!s(n)&&n.has(f)}function o(f,d,l){if(!i(l))throw new Error("Metadata provider not registered.");var y=a(f,d);if(y!==l){if(!s(y))return!1;var g=u.get(f);s(g)&&(g=new G,u.set(f,g)),g.set(d,l)}return!0}}function xe(){var e;return!s(I)&&h(p.Reflect)&&Object.isExtensible(p.Reflect)&&(e=p.Reflect[I]),s(e)&&(e=je()),!s(I)&&h(p.Reflect)&&Object.isExtensible(p.Reflect)&&Object.defineProperty(p.Reflect,I,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function Ce(e){var t=new W,r={isProviderFor:function(i,o){var f=t.get(i);return s(f)?!1:f.has(o)},OrdinaryDefineOwnMetadata:w,OrdinaryHasOwnMetadata:u,OrdinaryGetOwnMetadata:v,OrdinaryOwnMetadataKeys:c,OrdinaryDeleteMetadata:a};return F.registerProvider(r),r;function n(i,o,f){var d=t.get(i),l=!1;if(s(d)){if(!f)return;d=new G,t.set(i,d),l=!0}var y=d.get(o);if(s(y)){if(!f)return;if(y=new G,d.set(o,y),!e.setProvider(i,o,r))throw d.delete(o),l&&t.delete(i),new Error("Wrong provider for target.")}return y}function u(i,o,f){var d=n(o,f,!1);return s(d)?!1:ee(d.has(i))}function v(i,o,f){var d=n(o,f,!1);if(!s(d))return d.get(i)}function w(i,o,f,d){var l=n(f,d,!0);l.set(i,o)}function c(i,o){var f=[],d=n(i,o,!1);if(s(d))return f;for(var l=d.keys(),y=ae(l),g=0;;){var ue=oe(y);if(!ue)return f.length=g,f;var He=ie(ue);try{f[g]=He}catch(Ue){try{fe(y)}finally{throw Ue}}g++}}function a(i,o,f){var d=n(o,f,!1);if(s(d)||!d.delete(i))return!1;if(d.size===0){var l=t.get(o);s(l)||(l.delete(f),l.size===0&&t.delete(l))}return!0}}function Ge(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,u=e.getOwnMetadataKeys,v=e.deleteMetadata,w=new W,c={isProviderFor:function(a,i){var o=w.get(a);return!s(o)&&o.has(i)?!0:u(a,i).length?(s(o)&&(o=new U,w.set(a,o)),o.add(i),!0):!1},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:u,OrdinaryDeleteMetadata:v};return c}function D(e,t,r){var n=F.getProvider(e,t);if(!s(n))return n;if(r){if(F.setProvider(e,t,L))return L;throw new Error("Illegal state.")}}function De(){var e={},t=[],r=(function(){function c(a,i,o){this._index=0,this._keys=a,this._values=i,this._selector=o}return c.prototype["@@iterator"]=function(){return this},c.prototype[T]=function(){return this},c.prototype.next=function(){var a=this._index;if(a>=0&&a<this._keys.length){var i=this._selector(this._keys[a],this._values[a]);return a+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},c.prototype.throw=function(a){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),a},c.prototype.return=function(a){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:a,done:!0}},c})(),n=(function(){function c(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(c.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),c.prototype.has=function(a){return this._find(a,!1)>=0},c.prototype.get=function(a){var i=this._find(a,!1);return i>=0?this._values[i]:void 0},c.prototype.set=function(a,i){var o=this._find(a,!0);return this._values[o]=i,this},c.prototype.delete=function(a){var i=this._find(a,!1);if(i>=0){for(var o=this._keys.length,f=i+1;f<o;f++)this._keys[f-1]=this._keys[f],this._values[f-1]=this._values[f];return this._keys.length--,this._values.length--,N(a,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},c.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},c.prototype.keys=function(){return new r(this._keys,this._values,u)},c.prototype.values=function(){return new r(this._keys,this._values,v)},c.prototype.entries=function(){return new r(this._keys,this._values,w)},c.prototype["@@iterator"]=function(){return this.entries()},c.prototype[T]=function(){return this.entries()},c.prototype._find=function(a,i){if(!N(this._cacheKey,a)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(N(this._keys[o],a)){this._cacheIndex=o;break}}return this._cacheIndex<0&&i&&(this._cacheIndex=this._keys.length,this._keys.push(a),this._values.push(void 0)),this._cacheIndex},c})();return n;function u(c,a){return c}function v(c,a){return a}function w(c,a){return[c,a]}}function Ae(){var e=(function(){function t(){this._map=new G}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(r){return this._map.has(r)},t.prototype.add=function(r){return this._map.set(r,r),this},t.prototype.delete=function(r){return this._map.delete(r)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[T]=function(){return this.keys()},t})();return e}function Fe(){var e=16,t=E.create(),r=n();return(function(){function a(){this._key=n()}return a.prototype.has=function(i){var o=u(i,!1);return o!==void 0?E.has(o,this._key):!1},a.prototype.get=function(i){var o=u(i,!1);return o!==void 0?E.get(o,this._key):void 0},a.prototype.set=function(i,o){var f=u(i,!0);return f[this._key]=o,this},a.prototype.delete=function(i){var o=u(i,!1);return o!==void 0?delete o[this._key]:!1},a.prototype.clear=function(){this._key=n()},a})();function n(){var a;do a="@@WeakMap@@"+c();while(E.has(t,a));return t[a]=!0,a}function u(a,i){if(!O.call(a,r)){if(!i)return;Object.defineProperty(a,r,{value:E.create()})}return a[r]}function v(a,i){for(var o=0;o<i;++o)a[o]=Math.random()*255|0;return a}function w(a){if(typeof Uint8Array=="function"){var i=new Uint8Array(a);return typeof crypto<"u"?crypto.getRandomValues(i):typeof msCrypto<"u"?msCrypto.getRandomValues(i):v(i,a),i}return v(new Array(a),a)}function c(){var a=w(e);a[6]=a[6]&79|64,a[8]=a[8]&191|128;for(var i="",o=0;o<e;++o){var f=a[o];(o===4||o===6||o===8)&&(i+="-"),f<16&&(i+="0"),i+=f.toString(16).toLowerCase()}return i}}function B(e){return e.__=void 0,delete e.__,e}})})(le||(le={}))});H();var qe=$e(he(),1);import P from"process";async function Be(){let M=se(P.env),{server:_,closeAll:p,closeWebSockets:O}=ce(M);await new Promise((m,T)=>{_.once("error",T),_.listen(M.port,z,m)}),P.stdout.write(`inference-proxy listening on http://${z}:${M.port}/v1 (control plane ${M.baseUrl}, org API ${M.apiUrl}, catalog oracle ${M.catalog?"on":"off"})
|
|
3
|
-
`);let
|
|
4
|
-
`),await
|
|
5
|
-
`),
|
|
2
|
+
import{D as S,E as ve,U as ye,V as we,a as L,b as he,l as Z}from"../chunk-VLRMJRLS.js";import"../chunk-HR5H6S7L.js";import"../chunk-5HKWNK3O.js";import{D as de,E as le}from"../chunk-NY23USZF.js";import"../chunk-FP4RSAIE.js";import"../chunk-3WAJD62J.js";import"../chunk-7M6LY6DR.js";import"../chunk-BSHT6RZZ.js";import"../chunk-2T2YYBVX.js";import{a as ze,b as Le,c as F}from"../chunk-5CCJUNH7.js";var _e=ze(()=>{"use strict";F();var pe;(function(_){(function(M){var w=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:m(),O=P(_);typeof w.Reflect<"u"&&(O=P(w.Reflect,O)),M(O,w),typeof w.Reflect>"u"&&(w.Reflect=_);function P(g,C){return function(I,D){Object.defineProperty(g,I,{configurable:!0,writable:!0,value:D}),C&&C(I,D)}}function x(){try{return Function("return this;")()}catch{}}function E(){try{return(0,eval)("(function() { return this; })()")}catch{}}function m(){return x()||E()}})(function(M,w){var O=Object.prototype.hasOwnProperty,P=typeof Symbol=="function",x=P&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",E=P&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",m=typeof Object.create=="function",g={__proto__:[]}instanceof Array,C=!m&&!g,I={create:m?function(){return z(Object.create(null))}:g?function(){return z({__proto__:null})}:function(){return z({})},has:C?function(e,t){return O.call(e,t)}:function(e,t){return t in e},get:C?function(e,t){return O.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},D=Object.getPrototypeOf(Function),A=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Ue(),U=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:We(),W=typeof WeakMap=="function"?WeakMap:Ne(),R=P?Symbol.for("@reflect-metadata:registry"):void 0,H=$e(),q=He(H);function Me(e,t,r,n){if(s(r)){if(!ne(e))throw new TypeError;if(!ae(t))throw new TypeError;return Se(e,t)}else{if(!ne(e))throw new TypeError;if(!h(t))throw new TypeError;if(!h(n)&&!s(n)&&!G(n))throw new TypeError;return G(n)&&(n=void 0),r=k(r),Re(e,t,r,n)}}M("decorate",Me);function ge(e,t){function r(n,f){if(!h(n))throw new TypeError;if(!s(f)&&!De(f))throw new TypeError;X(e,t,n,f)}return r}M("metadata",ge);function me(e,t,r,n){if(!h(r))throw new TypeError;return s(n)||(n=k(n)),X(e,t,r,n)}M("defineMetadata",me);function Oe(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=k(r)),Y(e,t,r)}M("hasMetadata",Oe);function be(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=k(r)),N(e,t,r)}M("hasOwnMetadata",be);function ke(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=k(r)),J(e,t,r)}M("getMetadata",ke);function Te(e,t,r){if(!h(t))throw new TypeError;return s(r)||(r=k(r)),Q(e,t,r)}M("getOwnMetadata",Te);function Ee(e,t){if(!h(e))throw new TypeError;return s(t)||(t=k(t)),K(e,t)}M("getMetadataKeys",Ee);function Pe(e,t){if(!h(e))throw new TypeError;return s(t)||(t=k(t)),ee(e,t)}M("getOwnMetadataKeys",Pe);function Ie(e,t,r){if(!h(t))throw new TypeError;if(s(r)||(r=k(r)),!h(t))throw new TypeError;s(r)||(r=k(r));var n=$(t,r,!1);return s(n)?!1:n.OrdinaryDeleteMetadata(e,t,r)}M("deleteMetadata",Ie);function Se(e,t){for(var r=e.length-1;r>=0;--r){var n=e[r],f=n(t);if(!s(f)&&!G(f)){if(!ae(f))throw new TypeError;t=f}}return t}function Re(e,t,r,n){for(var f=e.length-1;f>=0;--f){var v=e[f],p=v(t,r,n);if(!s(p)&&!G(p)){if(!h(p))throw new TypeError;n=p}}return n}function Y(e,t,r){var n=N(e,t,r);if(n)return!0;var f=B(t);return G(f)?!1:Y(e,f,r)}function N(e,t,r){var n=$(t,r,!1);return s(n)?!1:re(n.OrdinaryHasOwnMetadata(e,t,r))}function J(e,t,r){var n=N(e,t,r);if(n)return Q(e,t,r);var f=B(t);if(!G(f))return J(e,f,r)}function Q(e,t,r){var n=$(t,r,!1);if(!s(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function X(e,t,r,n){var f=$(r,n,!0);f.OrdinaryDefineOwnMetadata(e,t,r,n)}function K(e,t){var r=ee(e,t),n=B(e);if(n===null)return r;var f=K(n,t);if(f.length<=0)return r;if(r.length<=0)return f;for(var v=new U,p=[],c=0,a=r;c<a.length;c++){var i=a[c],o=v.has(i);o||(v.add(i),p.push(i))}for(var u=0,d=f;u<d.length;u++){var i=d[u],o=v.has(i);o||(v.add(i),p.push(i))}return p}function ee(e,t){var r=$(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function te(e){if(e===null)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return e===null?1:6;default:return 6}}function s(e){return e===void 0}function G(e){return e===null}function Ge(e){return typeof e=="symbol"}function h(e){return typeof e=="object"?e!==null:typeof e=="function"}function je(e,t){switch(te(e)){case 0:return e;case 1:return e;case 2:return e;case 3:return e;case 4:return e;case 5:return e}var r=t===3?"string":t===5?"number":"default",n=ie(e,x);if(n!==void 0){var f=n.call(e,r);if(h(f))throw new TypeError;return f}return xe(e,r==="default"?"number":r)}function xe(e,t){if(t==="string"){var r=e.toString;if(j(r)){var n=r.call(e);if(!h(n))return n}var f=e.valueOf;if(j(f)){var n=f.call(e);if(!h(n))return n}}else{var f=e.valueOf;if(j(f)){var n=f.call(e);if(!h(n))return n}var v=e.toString;if(j(v)){var n=v.call(e);if(!h(n))return n}}throw new TypeError}function re(e){return!!e}function Ce(e){return""+e}function k(e){var t=je(e,3);return Ge(t)?t:Ce(t)}function ne(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:Object.prototype.toString.call(e)==="[object Array]"}function j(e){return typeof e=="function"}function ae(e){return typeof e=="function"}function De(e){switch(te(e)){case 3:return!0;case 4:return!0;default:return!1}}function V(e,t){return e===t||e!==e&&t!==t}function ie(e,t){var r=e[t];if(r!=null){if(!j(r))throw new TypeError;return r}}function oe(e){var t=ie(e,E);if(!j(t))throw new TypeError;var r=t.call(e);if(!h(r))throw new TypeError;return r}function ue(e){return e.value}function fe(e){var t=e.next();return t.done?!1:t}function se(e){var t=e.return;t&&t.call(e)}function B(e){var t=Object.getPrototypeOf(e);if(typeof e!="function"||e===D||t!==D)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(n==null||n===Object.prototype)return t;var f=n.constructor;return typeof f!="function"||f===e?t:f}function Ae(){var e;!s(R)&&typeof w.Reflect<"u"&&!(R in w.Reflect)&&typeof w.Reflect.defineMetadata=="function"&&(e=Fe(w.Reflect));var t,r,n,f=new W,v={registerProvider:p,getProvider:a,setProvider:o};return v;function p(u){if(!Object.isExtensible(v))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===u:break;case s(t):t=u;break;case t===u:break;case s(r):r=u;break;case r===u:break;default:n===void 0&&(n=new U),n.add(u);break}}function c(u,d){if(!s(t)){if(t.isProviderFor(u,d))return t;if(!s(r)){if(r.isProviderFor(u,d))return t;if(!s(n))for(var l=oe(n);;){var y=fe(l);if(!y)return;var b=ue(y);if(b.isProviderFor(u,d))return se(l),b}}}if(!s(e)&&e.isProviderFor(u,d))return e}function a(u,d){var l=f.get(u),y;return s(l)||(y=l.get(d)),s(y)&&(y=c(u,d),s(y)||(s(l)&&(l=new A,f.set(u,l)),l.set(d,y))),y}function i(u){if(s(u))throw new TypeError;return t===u||r===u||!s(n)&&n.has(u)}function o(u,d,l){if(!i(l))throw new Error("Metadata provider not registered.");var y=a(u,d);if(y!==l){if(!s(y))return!1;var b=f.get(u);s(b)&&(b=new A,f.set(u,b)),b.set(d,l)}return!0}}function $e(){var e;return!s(R)&&h(w.Reflect)&&Object.isExtensible(w.Reflect)&&(e=w.Reflect[R]),s(e)&&(e=Ae()),!s(R)&&h(w.Reflect)&&Object.isExtensible(w.Reflect)&&Object.defineProperty(w.Reflect,R,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function He(e){var t=new W,r={isProviderFor:function(i,o){var u=t.get(i);return s(u)?!1:u.has(o)},OrdinaryDefineOwnMetadata:p,OrdinaryHasOwnMetadata:f,OrdinaryGetOwnMetadata:v,OrdinaryOwnMetadataKeys:c,OrdinaryDeleteMetadata:a};return H.registerProvider(r),r;function n(i,o,u){var d=t.get(i),l=!1;if(s(d)){if(!u)return;d=new A,t.set(i,d),l=!0}var y=d.get(o);if(s(y)){if(!u)return;if(y=new A,d.set(o,y),!e.setProvider(i,o,r))throw d.delete(o),l&&t.delete(i),new Error("Wrong provider for target.")}return y}function f(i,o,u){var d=n(o,u,!1);return s(d)?!1:re(d.has(i))}function v(i,o,u){var d=n(o,u,!1);if(!s(d))return d.get(i)}function p(i,o,u,d){var l=n(u,d,!0);l.set(i,o)}function c(i,o){var u=[],d=n(i,o,!1);if(s(d))return u;for(var l=d.keys(),y=oe(l),b=0;;){var ce=fe(y);if(!ce)return u.length=b,u;var Ve=ue(ce);try{u[b]=Ve}catch(Be){try{se(y)}finally{throw Be}}b++}}function a(i,o,u){var d=n(o,u,!1);if(s(d)||!d.delete(i))return!1;if(d.size===0){var l=t.get(o);s(l)||(l.delete(u),l.size===0&&t.delete(l))}return!0}}function Fe(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,f=e.getOwnMetadataKeys,v=e.deleteMetadata,p=new W,c={isProviderFor:function(a,i){var o=p.get(a);return!s(o)&&o.has(i)?!0:f(a,i).length?(s(o)&&(o=new U,p.set(a,o)),o.add(i),!0):!1},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:f,OrdinaryDeleteMetadata:v};return c}function $(e,t,r){var n=H.getProvider(e,t);if(!s(n))return n;if(r){if(H.setProvider(e,t,q))return q;throw new Error("Illegal state.")}}function Ue(){var e={},t=[],r=(function(){function c(a,i,o){this._index=0,this._keys=a,this._values=i,this._selector=o}return c.prototype["@@iterator"]=function(){return this},c.prototype[E]=function(){return this},c.prototype.next=function(){var a=this._index;if(a>=0&&a<this._keys.length){var i=this._selector(this._keys[a],this._values[a]);return a+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},c.prototype.throw=function(a){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),a},c.prototype.return=function(a){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:a,done:!0}},c})(),n=(function(){function c(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(c.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),c.prototype.has=function(a){return this._find(a,!1)>=0},c.prototype.get=function(a){var i=this._find(a,!1);return i>=0?this._values[i]:void 0},c.prototype.set=function(a,i){var o=this._find(a,!0);return this._values[o]=i,this},c.prototype.delete=function(a){var i=this._find(a,!1);if(i>=0){for(var o=this._keys.length,u=i+1;u<o;u++)this._keys[u-1]=this._keys[u],this._values[u-1]=this._values[u];return this._keys.length--,this._values.length--,V(a,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},c.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},c.prototype.keys=function(){return new r(this._keys,this._values,f)},c.prototype.values=function(){return new r(this._keys,this._values,v)},c.prototype.entries=function(){return new r(this._keys,this._values,p)},c.prototype["@@iterator"]=function(){return this.entries()},c.prototype[E]=function(){return this.entries()},c.prototype._find=function(a,i){if(!V(this._cacheKey,a)){this._cacheIndex=-1;for(var o=0;o<this._keys.length;o++)if(V(this._keys[o],a)){this._cacheIndex=o;break}}return this._cacheIndex<0&&i&&(this._cacheIndex=this._keys.length,this._keys.push(a),this._values.push(void 0)),this._cacheIndex},c})();return n;function f(c,a){return c}function v(c,a){return a}function p(c,a){return[c,a]}}function We(){var e=(function(){function t(){this._map=new A}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(r){return this._map.has(r)},t.prototype.add=function(r){return this._map.set(r,r),this},t.prototype.delete=function(r){return this._map.delete(r)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[E]=function(){return this.keys()},t})();return e}function Ne(){var e=16,t=I.create(),r=n();return(function(){function a(){this._key=n()}return a.prototype.has=function(i){var o=f(i,!1);return o!==void 0?I.has(o,this._key):!1},a.prototype.get=function(i){var o=f(i,!1);return o!==void 0?I.get(o,this._key):void 0},a.prototype.set=function(i,o){var u=f(i,!0);return u[this._key]=o,this},a.prototype.delete=function(i){var o=f(i,!1);return o!==void 0?delete o[this._key]:!1},a.prototype.clear=function(){this._key=n()},a})();function n(){var a;do a="@@WeakMap@@"+c();while(I.has(t,a));return t[a]=!0,a}function f(a,i){if(!O.call(a,r)){if(!i)return;Object.defineProperty(a,r,{value:I.create()})}return a[r]}function v(a,i){for(var o=0;o<i;++o)a[o]=Math.random()*255|0;return a}function p(a){if(typeof Uint8Array=="function"){var i=new Uint8Array(a);return typeof crypto<"u"?crypto.getRandomValues(i):typeof msCrypto<"u"?msCrypto.getRandomValues(i):v(i,a),i}return v(new Array(a),a)}function c(){var a=p(e);a[6]=a[6]&79|64,a[8]=a[8]&191|128;for(var i="",o=0;o<e;++o){var u=a[o];(o===4||o===6||o===8)&&(i+="-"),u<16&&(i+="0"),i+=u.toString(16).toLowerCase()}return i}}function z(e){return e.__=void 0,delete e.__,e}})})(pe||(pe={}))});F();var et=Le(_e(),1);import T from"process";function Ye(){let _=null;return _=le({streams:T,note:M=>{_?.isDead("stderr")!==!0&&de(T.stderr,M)}}),_}async function Je(){Ye();let _=ve(T.env),{server:M,metricsServer:w,edgeIdentityServer:O,closeAll:P,closeWebSockets:x}=ye(_);await new Promise((m,g)=>{M.once("error",g),M.listen(_.port,S,m)}),await new Promise((m,g)=>{w.once("error",g),w.listen(L,S,m)}),await new Promise((m,g)=>{O.once("error",g),O.listen(Z,S,m)}),T.stdout.write(`inference-proxy listening on http://${S}:${_.port}/v1 (metrics http://${S}:${L}${he}, edge identity http://${S}:${Z}, control plane ${_.baseUrl}, org API ${_.apiUrl}, catalog oracle ${_.catalog?"on":"off"})
|
|
3
|
+
`);let E=async m=>{T.stdout.write(`inference-proxy: ${m} \u2014 draining
|
|
4
|
+
`),await we(M,P,x),await new Promise(g=>w.close(()=>g())),await new Promise(g=>O.close(()=>g()))};await new Promise(m=>{T.once("SIGINT",()=>{E("SIGINT").finally(m)}),T.once("SIGTERM",()=>{E("SIGTERM").finally(m)})})}Je().then(()=>T.exit(0),_=>{T.stderr.write(`inference-proxy: ${String(_ instanceof Error?_.stack??_.message:_)}
|
|
5
|
+
`),T.exit(1)});
|
|
6
6
|
/*! Bundled license information:
|
|
7
7
|
|
|
8
8
|
reflect-metadata/Reflect.js:
|