@agentlang/lstudio 0.1.7 → 0.1.8
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/assets/{AwsJson1_1Protocol-D5imyDS5.js → AwsJson1_1Protocol-Bs-KOF3u.js} +1 -1
- package/assets/{index-D3JY9UxM.js → index-BOSgoMcw.js} +1 -1
- package/assets/{index-l2SiVppQ.js → index-CMyUHiQc.js} +1 -1
- package/assets/{index-D0wSo38b.js → index-DVmya6p1.js} +1 -1
- package/assets/index-D_-sPexk.css +1 -0
- package/assets/{index-ChZaKyS0.js → index-yIpMibae.js} +207 -206
- package/assets/{index.browser-dM8WwrJj.js → index.browser-BYRWACjF.js} +3 -3
- package/assets/{loadCognitoIdentity-DyM-BCEF.js → loadCognitoIdentity-BtOy6bnr.js} +1 -1
- package/assets/{loadSts-D2HsS8iB.js → loadSts-C2Q5qCT1.js} +1 -1
- package/assets/{replService-CEBAk8sW.js → replService-BOpSWnUZ.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/index-C6bfAjj7.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as h,c as T,S as y,b as u,d as N,L as w,e as b,f as _,v as R,R as z,P as E,h as J,T as M}from"./index-
|
|
1
|
+
import{N as h,c as T,S as y,b as u,d as N,L as w,e as b,f as _,v as R,R as z,P as E,h as J,T as M}from"./index-CMyUHiQc.js";import{t as D,a as I,p as j,b as O,c as A,d as S,e as k}from"./normalizeProvider-EC8cbfMc.js";function B(f,t,e){if(e?.source){const i=e.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||i!==String(t)))return i.includes(".")?new h(i,"bigDecimal"):BigInt(i)}return t}const V=(f,t)=>T(f,t).then(e=>(t?.utf8Encoder??D)(e)),Q=(f,t)=>V(f,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(i){throw i?.name==="SyntaxError"&&Object.defineProperty(i,"$responseBodyText",{value:e}),i}return{}}),$=(f,t)=>{const e=(n,r)=>Object.keys(n).find(o=>o.toLowerCase()===r.toLowerCase()),i=n=>{let r=n;return typeof r=="number"&&(r=r.toString()),r.indexOf(",")>=0&&(r=r.split(",")[0]),r.indexOf(":")>=0&&(r=r.split(":")[0]),r.indexOf("#")>=0&&(r=r.split("#")[1]),r},s=e(f.headers,"x-amzn-errortype");if(s!==void 0)return i(f.headers[s]);if(t&&typeof t=="object"){const n=e(t,"code");if(n&&t[n]!==void 0)return i(t[n]);if(t.__type!==void 0)return i(t.__type)}};class L extends y{settings;constructor(t){super(),this.settings=t}async read(t,e){return this._read(t,typeof e=="string"?JSON.parse(e,B):await Q(e,this.serdeContext))}readObject(t,e){return this._read(t,e)}_read(t,e){const i=e!==null&&typeof e=="object",s=u.of(t);if(i){if(s.isStructSchema()){const r={};for(const[o,c]of N(s,e,this.settings.jsonName?"jsonName":!1)){const a=this.settings.jsonName?c.getMergedTraits().jsonName??o:o,m=this._read(c,e[a]);m!=null&&(r[o]=m)}return r}if(Array.isArray(e)&&s.isListSchema()){const r=s.getValueSchema(),o=[],c=!!s.getMergedTraits().sparse;for(const a of e)(c||a!=null)&&o.push(this._read(r,a));return o}if(s.isMapSchema()){const r=s.getValueSchema(),o={},c=!!s.getMergedTraits().sparse;for(const[a,m]of Object.entries(e))(c||m!=null)&&(o[a]=this._read(r,m));return o}}if(s.isBlobSchema()&&typeof e=="string")return I(e);const n=s.getMergedTraits().mediaType;if(s.isStringSchema()&&typeof e=="string"&&n)return n==="application/json"||n.endsWith("+json")?w.from(e):e;if(s.isTimestampSchema()&&e!=null)switch(b(s,this.settings)){case 5:return A(e);case 6:return O(e);case 7:return j(e);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",e),new Date(e)}if(s.isBigIntegerSchema()&&(typeof e=="number"||typeof e=="string"))return BigInt(e);if(s.isBigDecimalSchema()&&e!=null){if(e instanceof h)return e;const r=e;return r.type==="bigDecimal"&&"string"in r?new h(r.string,r.type):new h(String(e),"bigDecimal")}if(s.isNumericSchema()&&typeof e=="string"){switch(e){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return e}if(s.isDocumentSchema())if(i){const r=Array.isArray(e)?[]:{};for(const[o,c]of Object.entries(e))c instanceof h?r[o]=c:r[o]=this._read(s,c);return r}else return structuredClone(e);return e}}const l="Ν";class P{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,e)=>{if(e instanceof h){const i=`${l+"nv"+this.counter++}_`+e.string;return this.values.set(`"${i}"`,e.string),i}if(typeof e=="bigint"){const i=e.toString(),s=`${l+"b"+this.counter++}_`+i;return this.values.set(`"${s}"`,i),s}return e}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[e,i]of this.values)t=t.replace(e,i);return t}}class F extends y{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,e){this.rootSchema=u.of(t),this.buffer=this._write(this.rootSchema,e)}writeDiscriminatedDocument(t,e){this.write(t,e),typeof this.buffer=="object"&&(this.buffer.__type=u.of(t).getName(!0))}flush(){const{rootSchema:t,useReplacer:e}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!e)return JSON.stringify(this.buffer);const i=new P;return i.replaceInJson(JSON.stringify(this.buffer,i.createReplacer(),0))}return this.buffer}_write(t,e,i){const s=e!==null&&typeof e=="object",n=u.of(t);if(s){if(n.isStructSchema()){const r={};for(const[o,c]of _(n,e)){const a=this._write(c,e[o],n);if(a!==void 0){const m=c.getMergedTraits().jsonName,p=this.settings.jsonName?m??o:o;r[p]=a}}return r}if(Array.isArray(e)&&n.isListSchema()){const r=n.getValueSchema(),o=[],c=!!n.getMergedTraits().sparse;for(const a of e)(c||a!=null)&&o.push(this._write(r,a));return o}if(n.isMapSchema()){const r=n.getValueSchema(),o={},c=!!n.getMergedTraits().sparse;for(const[a,m]of Object.entries(e))(c||m!=null)&&(o[a]=this._write(r,m));return o}if(e instanceof Uint8Array&&(n.isBlobSchema()||n.isDocumentSchema()))return n===this.rootSchema?e:(this.serdeContext?.base64Encoder??S)(e);if(e instanceof Date&&(n.isTimestampSchema()||n.isDocumentSchema()))switch(b(n,this.settings)){case 5:return e.toISOString().replace(".000Z","Z");case 6:return k(e);case 7:return e.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",e),e.getTime()/1e3}e instanceof h&&(this.useReplacer=!0)}if(!(e===null&&i?.isStructSchema())){if(n.isStringSchema()){if(typeof e>"u"&&n.isIdempotencyToken())return R();const r=n.getMergedTraits().mediaType;return e!=null&&r&&(r==="application/json"||r.endsWith("+json"))?w.from(e):e}if(typeof e=="number"&&n.isNumericSchema())return Math.abs(e)===1/0||isNaN(e)?String(e):e;if(typeof e=="string"&&n.isBlobSchema())return n===this.rootSchema?e:(this.serdeContext?.base64Encoder??S)(e);if(typeof e=="bigint"&&(this.useReplacer=!0),n.isDocumentSchema())if(s){const r=Array.isArray(e)?[]:{};for(const[o,c]of Object.entries(e))c instanceof h?(this.useReplacer=!0,r[o]=c):r[o]=this._write(n,c);return r}else return structuredClone(e);return e}}}class U extends y{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new F(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new L(this.settings);return t.setSerdeContext(this.serdeContext),t}}class q extends z{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:i,jsonCodec:s}){super({defaultNamespace:t}),this.serviceTarget=e,this.codec=s??new U({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new E(this.awsQueryCompatible)}async serializeRequest(t,e,i){const s=await super.serializeRequest(t,e,i);return s.path.endsWith("/")||(s.path+="/"),Object.assign(s.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${t.name}`}),this.awsQueryCompatible&&(s.headers["x-amzn-query-mode"]="true"),(J(t.input)==="unit"||!s.body)&&(s.body="{}"),s}getPayloadCodec(){return this.codec}async handleError(t,e,i,s,n){this.awsQueryCompatible&&this.mixin.setQueryCompatError(s,i);const r=$(i,s)??"Unknown",{errorSchema:o,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(r,this.options.defaultNamespace,i,s,n,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),a=u.of(o),m=s.message??s.Message??"Unknown",p=M.for(o[1]).getErrorCtor(o)??Error,x=new p(m),d={};for(const[g,C]of a.structIterator())s[g]!=null&&(d[g]=this.codec.createDeserializer().readObject(C,s[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(s,d),this.mixin.decorateServiceException(Object.assign(x,c,{$fault:a.getMergedTraits().error,message:m},d),s)}}class G extends q{constructor({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:i,jsonCodec:s}){super({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:i,jsonCodec:s})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}export{G as A};
|