coze-coding-dev-sdk 0.7.19-beta.3 → 0.7.19-beta.4

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.
@@ -1 +1 @@
1
- import{__webpack_require__ as e}from"./rslib-runtime.mjs";import"./687.mjs";import{exec as r,getProfileName as o,setCredentialFeature as i,CredentialsProviderError as t}from"./131.mjs";import{externalDataInterceptor as c}from"./1~666.mjs";import{parseKnownFiles as s}from"./1~23.mjs";let n=e("util"),a=async(e,o,s)=>{let a=o[e];if(o[e]){let l=a.credential_process;if(void 0!==l){let a=(0,n.promisify)(c?.getTokenRecord?.().exec??r);try{let r,{stdout:t}=await a(l);try{r=JSON.parse(t.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}var d=r;if(1!==d.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===d.AccessKeyId||void 0===d.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(d.Expiration){let r=new Date;if(new Date(d.Expiration)<r)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let c=d.AccountId;!c&&o?.[e]?.aws_account_id&&(c=o[e].aws_account_id);let s={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,...d.SessionToken&&{sessionToken:d.SessionToken},...d.Expiration&&{expiration:new Date(d.Expiration)},...d.CredentialScope&&{credentialScope:d.CredentialScope},...c&&{accountId:c}};return i(s,"CREDENTIALS_PROCESS","w"),s}catch(e){throw new t(e.message,{logger:s})}}throw new t(`Profile ${e} did not contain credential_process.`,{logger:s})}throw new t(`Profile ${e} could not be found in shared credentials file.`,{logger:s})},d=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let i=await s(e);return a(o({profile:e.profile??r?.profile}),i,e.logger)};export{d as fromProcess};
1
+ import{__webpack_require__ as e}from"./rslib-runtime.mjs";import{setCredentialFeature as r,CredentialsProviderError as o,getProfileName as i}from"./131.mjs";import"./687.mjs";import{externalDataInterceptor as t}from"./1~666.mjs";import{parseKnownFiles as c}from"./1~23.mjs";let s=e("child_process"),n=e("util"),a=async(e,i,c)=>{let a=i[e];if(i[e]){let l=a.credential_process;if(void 0!==l){let a=(0,n.promisify)(t?.getTokenRecord?.().exec??s.exec);try{let o,{stdout:t}=await a(l);try{o=JSON.parse(t.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}var d=o;if(1!==d.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===d.AccessKeyId||void 0===d.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(d.Expiration){let r=new Date;if(new Date(d.Expiration)<r)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let c=d.AccountId;!c&&i?.[e]?.aws_account_id&&(c=i[e].aws_account_id);let s={accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,...d.SessionToken&&{sessionToken:d.SessionToken},...d.Expiration&&{expiration:new Date(d.Expiration)},...d.CredentialScope&&{credentialScope:d.CredentialScope},...c&&{accountId:c}};return r(s,"CREDENTIALS_PROCESS","w"),s}catch(e){throw new o(e.message,{logger:c})}}throw new o(`Profile ${e} did not contain credential_process.`,{logger:c})}throw new o(`Profile ${e} could not be found in shared credentials file.`,{logger:c})},d=(e={})=>async({callerClientConfig:r}={})=>{e.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let o=await c(e);return a(i({profile:e.profile??r?.profile}),o,e.logger)};export{d as fromProcess};