@radhya/mach 2.6.10 → 2.6.12
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/README.md +28 -1
- package/dist/chunk-QRW3A5OH.js +844 -0
- package/dist/commands/isolated-upload.js +1 -1
- package/dist/credentials-LFUCTBJU.js +1 -0
- package/dist/index.js +138 -133
- package/package.json +1 -1
- package/dist/chunk-532EHM4E.js +0 -770
- package/dist/credentials-YIUZ3DLH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p,j as
|
|
1
|
+
import{h as p,j as A}from"../chunk-QFXPWC5D.js";import b from"fs";import D from"path";var M=n=>new Promise(e=>setTimeout(e,n));function _({type:n,bundleId:e,distributionType:t,teamId:r}){if(n!=="ios_cert"&&n!=="ios_profile")return`${n} - ${t}`;let i={development:"Development",adhoc:"Ad Hoc",enterprise:"Enterprise",store:"App Store"}[t]||t,d=n==="ios_cert"?"Certificate":"Provisioning Profile",o=e&&e!=="*"?e:void 0;return["MACH",`iOS ${i} ${d}`,o,r?`Team ${r}`:void 0].filter(a=>!!a).join(" \xB7 ")}function x(n){let e=n?.response?.status,t=n?.code||"",r=n?.message||"";return!e||e===408||e===409||e===425||e===429||e>=500||/ECONNRESET|ETIMEDOUT|EAI_AGAIN|ENOTFOUND|ECONNABORTED|socket hang up|network|timeout/i.test(`${t} ${r}`)}async function l(n,e,t=5){let r;for(let i=1;i<=t;i++)try{return await e()}catch(d){if(r=d,!x(d)||i>=t)break;let o=Math.min(3e4,1500*Math.pow(2,i-1));console.warn(`[UPLOAD_RETRY] ${n} failed transiently. Retrying in ${Math.round(o/1e3)}s... (${i}/${t})`),await M(o)}throw r}async function U(){let[n,e,t,r,i,d,o,a,m,y,g,w,u,T,I,R,h,E,f]=process.argv.slice(2);try{let s=D.basename(e),O=b.readFileSync(e),N;if(f&&f!=="undefined")try{let c=JSON.parse(f);c&&typeof c=="object"&&!Array.isArray(c)&&(N=c)}catch{throw new Error("Invalid iOS signing metadata supplied for credential upload.")}let $=await l("create upload URL",()=>p.post("/credentials/upload-url",{projectId:n,fileName:s,fileType:"application/octet-stream",type:t,distributionType:i})),{uploadUrl:S,key:k,fileId:v}=$.data,C=(await import("axios")).default;await l("upload file to storage",()=>C.put(S,O,{headers:{"Content-Type":"application/octet-stream"},maxContentLength:1/0,maxBodyLength:1/0,timeout:18e4}));let P=await l("register credential",()=>p.post("/credentials",{projectId:n,id:v,name:_({type:t,bundleId:r,distributionType:i,teamId:u==="undefined"?void 0:u}),type:t,bundleId:r,distributionType:i,s3Key:k,alias:d==="undefined"?void 0:d,expiresAt:o==="undefined"?void 0:o,issuerId:a==="undefined"?void 0:a,keyId:m==="undefined"?void 0:m,password:y==="undefined"?void 0:y,keystorePassword:g==="undefined"?void 0:g,keyPassword:w==="undefined"?void 0:w,teamId:u==="undefined"?void 0:u,teamName:T==="undefined"?void 0:T,developerTeamId:I==="undefined"?void 0:I,appStoreConnectTeamId:R==="undefined"?void 0:R,providerId:h==="undefined"?void 0:h,providerName:E==="undefined"?void 0:E,signingMetadata:N}));A({credentialType:t,requestedDistributionType:i,storedDistributionType:P.data?.credential?.distributionType}),console.log("SUCCESS"),process.exit(0)}catch(s){s.response?console.error(`API_ERROR: ${s.response.status} - ${JSON.stringify(s.response.data)}`):console.error(`NETWORK_ERROR: ${s.message}`),process.exit(1)}}U();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fa as a,ga as b,ha as c,ia as d,ja as e,ka as f,la as g,ma as h,na as i,oa as j}from"./chunk-QRW3A5OH.js";import"./chunk-QFXPWC5D.js";export{e as buildMatchCommand,h as credentialsMainCommand,i as credentialsSetupCommand,j as downloadCredentialsCommand,a as isApplePortalAuthenticationError,b as isApplePortalServiceKeyError,g as normalizeCredentialsPlatform,f as resolveAndroidCredentialDistributionType,d as retryApplePortalOperationAfterAuthentication,c as unavailableApplePortalCertificateIds};
|