From 8be3434d32d7ed9046000377f7f9e59ef2a971b3 Mon Sep 17 00:00:00 2001 From: Pauline Date: Wed, 10 Jan 2024 19:58:58 -0500 Subject: super unfinished stuff but i was getting yelled at by wybest --- .github/actions/publish-artifacts/.gitignore | 2 - .github/actions/publish-artifacts/action.yaml | 14 --- .github/actions/publish-artifacts/dist/index.js | 90 ----------------- .github/actions/publish-artifacts/index.ts | 101 ------------------- .github/actions/publish-artifacts/package.json | 18 ---- .github/actions/publish-artifacts/tsconfig.json | 11 --- .vscode/extensions.json | 3 +- .vscode/settings.json | 23 ----- apps/docs/package.json | 3 + apps/website/config.ts | 4 +- apps/website/package.json | 7 +- apps/website/public/.well-known/webfinger | 23 +++++ apps/website/public/favicon.svg | 4 + apps/website/public/robots.txt | 6 +- apps/website/src/components/base/Footer.astro | 2 +- apps/website/src/components/shared/BaseHead.astro | 15 +++ apps/website/src/components/shared/SEO.astro | 89 +++++++++++++++++ apps/website/src/pages/legal/ip.astro | 22 +++++ apps/website/src/pages/legal/privacy.astro | 22 +++++ apps/website/src/pages/legal/security.astro | 22 +++++ apps/website/src/pages/legal/terms.astro | 22 +++++ apps/website/src/pages/privacy.astro | 22 ----- apps/website/src/pages/tos.astro | 22 ----- apps/website/src/types/smartypants.d.ts | 4 + apps/website/vercel.json | 3 + packages/ui/package.json | 6 +- pnpm-lock.yaml | 115 +++++++++++++++++----- 27 files changed, 339 insertions(+), 336 deletions(-) delete mode 100644 .github/actions/publish-artifacts/.gitignore delete mode 100644 .github/actions/publish-artifacts/action.yaml delete mode 100644 .github/actions/publish-artifacts/dist/index.js delete mode 100644 .github/actions/publish-artifacts/index.ts delete mode 100644 .github/actions/publish-artifacts/package.json delete mode 100644 .github/actions/publish-artifacts/tsconfig.json create mode 100644 apps/docs/package.json create mode 100644 apps/website/public/.well-known/webfinger create mode 100644 apps/website/public/favicon.svg create mode 100644 apps/website/src/components/shared/BaseHead.astro create mode 100644 apps/website/src/components/shared/SEO.astro create mode 100644 apps/website/src/pages/legal/ip.astro create mode 100644 apps/website/src/pages/legal/privacy.astro create mode 100644 apps/website/src/pages/legal/security.astro create mode 100644 apps/website/src/pages/legal/terms.astro delete mode 100644 apps/website/src/pages/privacy.astro delete mode 100644 apps/website/src/pages/tos.astro create mode 100644 apps/website/src/types/smartypants.d.ts create mode 100644 apps/website/vercel.json diff --git a/.github/actions/publish-artifacts/.gitignore b/.github/actions/publish-artifacts/.gitignore deleted file mode 100644 index 5c4b4fd..0000000 --- a/.github/actions/publish-artifacts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# pls tell me there is a better way -!dist diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml deleted file mode 100644 index 1bc878a..0000000 --- a/.github/actions/publish-artifacts/action.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Publish artifacts -description: Publishes artifacts after CI process -inputs: - target: - description: target triples for built artifact - profile: - description: '''debug'' or ''release''' - os: - description: '''darwin'', ''windows'', or ''linux''' - arch: - description: '''x86_64'' or ''aarch64''' -runs: - using: node20 - main: dist/index.js diff --git a/.github/actions/publish-artifacts/dist/index.js b/.github/actions/publish-artifacts/dist/index.js deleted file mode 100644 index 131ee41..0000000 --- a/.github/actions/publish-artifacts/dist/index.js +++ /dev/null @@ -1,90 +0,0 @@ -(()=>{var __webpack_modules__={4674:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var l=Object.getOwnPropertyDescriptor(i,a);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,l)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var l=this&&this.__exportStar||function(r,i){for(var a in r)if(a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a))s(i,r,a)};Object.defineProperty(i,"__esModule",{value:true});const c=a(2767);l(a(3512),i);l(a(3243),i);l(a(2767),i);const p=new c.DefaultArtifactClient;i["default"]=p},7935:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.Timestamp=void 0;const s=a(2480);const l=a(2480);const c=a(2480);const p=a(2480);const d=a(2480);const u=a(2480);const A=a(2480);class Timestamp$Type extends A.MessageType{constructor(){super("google.protobuf.Timestamp",[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}])}now(){const r=this.create();const i=Date.now();r.seconds=u.PbLong.from(Math.floor(i/1e3)).toString();r.nanos=i%1e3*1e6;return r}toDate(r){return new Date(u.PbLong.from(r.seconds).toNumber()*1e3+Math.ceil(r.nanos/1e6))}fromDate(r){const i=this.create();const a=r.getTime();i.seconds=u.PbLong.from(Math.floor(a/1e3)).toString();i.nanos=a%1e3*1e6;return i}internalJsonWrite(r,i){let a=u.PbLong.from(r.seconds).toNumber()*1e3;if(aDate.parse("9999-12-31T23:59:59Z"))throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(r.nanos<0)throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");let s="Z";if(r.nanos>0){let i=(r.nanos+1e9).toString().substring(1);if(i.substring(3)==="000000")s="."+i.substring(0,3)+"Z";else if(i.substring(6)==="000")s="."+i.substring(0,6)+"Z";else s="."+i+"Z"}return new Date(a).toISOString().replace(".000Z",s)}internalJsonRead(r,i,a){if(typeof r!=="string")throw new Error("Unable to parse Timestamp from JSON "+(0,d.typeofJsonValue)(r)+".");let s=r.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!s)throw new Error("Unable to parse Timestamp from JSON. Invalid format.");let l=Date.parse(s[1]+"-"+s[2]+"-"+s[3]+"T"+s[4]+":"+s[5]+":"+s[6]+(s[8]?s[8]:"Z"));if(Number.isNaN(l))throw new Error("Unable to parse Timestamp from JSON. Invalid value.");if(lDate.parse("9999-12-31T23:59:59Z"))throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");if(!a)a=this.create();a.seconds=u.PbLong.from(l/1e3).toString();a.nanos=0;if(s[7])a.nanos=parseInt("1"+s[7]+"0".repeat(9-s[7].length))-1e9;return a}create(r){const i={seconds:"0",nanos:0};globalThis.Object.defineProperty(i,p.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,c.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let c=s!==null&&s!==void 0?s:this.create(),p=r.pos+i;while(r.pos{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.BytesValue=i.StringValue=i.BoolValue=i.UInt32Value=i.Int32Value=i.UInt64Value=i.Int64Value=i.FloatValue=i.DoubleValue=void 0;const s=a(2480);const l=a(2480);const c=a(2480);const p=a(2480);const d=a(2480);const u=a(2480);const A=a(2480);class DoubleValue$Type extends A.MessageType{constructor(){super("google.protobuf.DoubleValue",[{no:1,name:"value",kind:"scalar",T:1}])}internalJsonWrite(r,i){return this.refJsonWriter.scalar(2,r.value,"value",false,true)}internalJsonRead(r,i,a){if(!a)a=this.create();a.value=this.refJsonReader.scalar(r,1,undefined,"value");return a}create(r){const i={value:0};globalThis.Object.defineProperty(i,u.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,d.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let l=s!==null&&s!==void 0?s:this.create(),c=r.pos+i;while(r.pos{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.ArtifactService=i.GetSignedArtifactURLResponse=i.GetSignedArtifactURLRequest=i.ListArtifactsResponse_MonolithArtifact=i.ListArtifactsResponse=i.ListArtifactsRequest=i.FinalizeArtifactResponse=i.FinalizeArtifactRequest=i.CreateArtifactResponse=i.CreateArtifactRequest=void 0;const s=a(6018);const l=a(2480);const c=a(2480);const p=a(2480);const d=a(2480);const u=a(2480);const A=a(985);const h=a(985);const g=a(7935);class CreateArtifactRequest$Type extends u.MessageType{constructor(){super("github.actions.results.api.v1.CreateArtifactRequest",[{no:1,name:"workflow_run_backend_id",kind:"scalar",T:9},{no:2,name:"workflow_job_run_backend_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"expires_at",kind:"message",T:()=>g.Timestamp},{no:5,name:"version",kind:"scalar",T:5}])}create(r){const i={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",version:0};globalThis.Object.defineProperty(i,d.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,p.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let l=s!==null&&s!==void 0?s:this.create(),p=r.pos+i;while(r.posh.StringValue}])}create(r){const i={workflowRunBackendId:"",workflowJobRunBackendId:"",name:"",size:"0"};globalThis.Object.defineProperty(i,d.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,p.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let l=s!==null&&s!==void 0?s:this.create(),p=r.pos+i;while(r.posh.StringValue},{no:4,name:"id_filter",kind:"message",T:()=>A.Int64Value}])}create(r){const i={workflowRunBackendId:"",workflowJobRunBackendId:""};globalThis.Object.defineProperty(i,d.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,p.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let l=s!==null&&s!==void 0?s:this.create(),p=r.pos+i;while(r.posi.ListArtifactsResponse_MonolithArtifact}])}create(r){const i={artifacts:[]};globalThis.Object.defineProperty(i,d.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,p.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,a,s,l){let p=l!==null&&l!==void 0?l:this.create(),d=r.pos+a;while(r.posg.Timestamp}])}create(r){const i={workflowRunBackendId:"",workflowJobRunBackendId:"",databaseId:"0",name:"",size:"0"};globalThis.Object.defineProperty(i,d.MESSAGE_TYPE,{enumerable:false,value:this});if(r!==undefined)(0,p.reflectionMergePartial)(this,i,r);return i}internalBinaryRead(r,i,a,s){let l=s!==null&&s!==void 0?s:this.create(),p=r.pos+i;while(r.posc.CreateArtifactResponse.fromJson(r,{ignoreUnknownFields:true})))}FinalizeArtifact(r){const i=c.FinalizeArtifactRequest.toJson(r,{useProtoFieldName:true,emitDefaultValues:false});const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/json",i);return a.then((r=>c.FinalizeArtifactResponse.fromJson(r,{ignoreUnknownFields:true})))}ListArtifacts(r){const i=c.ListArtifactsRequest.toJson(r,{useProtoFieldName:true,emitDefaultValues:false});const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/json",i);return a.then((r=>c.ListArtifactsResponse.fromJson(r,{ignoreUnknownFields:true})))}GetSignedArtifactURL(r){const i=c.GetSignedArtifactURLRequest.toJson(r,{useProtoFieldName:true,emitDefaultValues:false});const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/json",i);return a.then((r=>c.GetSignedArtifactURLResponse.fromJson(r,{ignoreUnknownFields:true})))}}i.ArtifactServiceClientJSON=ArtifactServiceClientJSON;class ArtifactServiceClientProtobuf{constructor(r){this.rpc=r;this.CreateArtifact.bind(this);this.FinalizeArtifact.bind(this);this.ListArtifacts.bind(this);this.GetSignedArtifactURL.bind(this)}CreateArtifact(r){const i=c.CreateArtifactRequest.toBinary(r);const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","CreateArtifact","application/protobuf",i);return a.then((r=>c.CreateArtifactResponse.fromBinary(r)))}FinalizeArtifact(r){const i=c.FinalizeArtifactRequest.toBinary(r);const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","FinalizeArtifact","application/protobuf",i);return a.then((r=>c.FinalizeArtifactResponse.fromBinary(r)))}ListArtifacts(r){const i=c.ListArtifactsRequest.toBinary(r);const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","ListArtifacts","application/protobuf",i);return a.then((r=>c.ListArtifactsResponse.fromBinary(r)))}GetSignedArtifactURL(r){const i=c.GetSignedArtifactURLRequest.toBinary(r);const a=this.rpc.request("github.actions.results.api.v1.ArtifactService","GetSignedArtifactURL","application/protobuf",i);return a.then((r=>c.GetSignedArtifactURLResponse.fromBinary(r)))}}i.ArtifactServiceClientProtobuf=ArtifactServiceClientProtobuf;var p;(function(r){r["CreateArtifact"]="CreateArtifact";r["FinalizeArtifact"]="FinalizeArtifact";r["ListArtifacts"]="ListArtifacts";r["GetSignedArtifactURL"]="GetSignedArtifactURL"})(p||(i.ArtifactServiceMethod=p={}));i.ArtifactServiceMethodList=[p.CreateArtifact,p.FinalizeArtifact,p.ListArtifacts,p.GetSignedArtifactURL];function createArtifactServiceServer(r){return new l.TwirpServer({service:r,packageName:"github.actions.results.api.v1",serviceName:"ArtifactService",methodList:i.ArtifactServiceMethodList,matchRoute:matchArtifactServiceRoute})}i.createArtifactServiceServer=createArtifactServiceServer;function matchArtifactServiceRoute(r,i){switch(r){case"CreateArtifact":return(r,a,l,c)=>s(this,void 0,void 0,(function*(){r=Object.assign(Object.assign({},r),{methodName:"CreateArtifact"});yield i.onMatch(r);return handleArtifactServiceCreateArtifactRequest(r,a,l,c)}));case"FinalizeArtifact":return(r,a,l,c)=>s(this,void 0,void 0,(function*(){r=Object.assign(Object.assign({},r),{methodName:"FinalizeArtifact"});yield i.onMatch(r);return handleArtifactServiceFinalizeArtifactRequest(r,a,l,c)}));case"ListArtifacts":return(r,a,l,c)=>s(this,void 0,void 0,(function*(){r=Object.assign(Object.assign({},r),{methodName:"ListArtifacts"});yield i.onMatch(r);return handleArtifactServiceListArtifactsRequest(r,a,l,c)}));case"GetSignedArtifactURL":return(r,a,l,c)=>s(this,void 0,void 0,(function*(){r=Object.assign(Object.assign({},r),{methodName:"GetSignedArtifactURL"});yield i.onMatch(r);return handleArtifactServiceGetSignedArtifactURLRequest(r,a,l,c)}));default:i.onNotFound();const r=`no handler found`;throw new l.TwirpError(l.TwirpErrorCode.BadRoute,r)}}function handleArtifactServiceCreateArtifactRequest(r,i,a,s){switch(r.contentType){case l.TwirpContentType.JSON:return handleArtifactServiceCreateArtifactJSON(r,i,a,s);case l.TwirpContentType.Protobuf:return handleArtifactServiceCreateArtifactProtobuf(r,i,a,s);default:const c="unexpected Content-Type";throw new l.TwirpError(l.TwirpErrorCode.BadRoute,c)}}function handleArtifactServiceFinalizeArtifactRequest(r,i,a,s){switch(r.contentType){case l.TwirpContentType.JSON:return handleArtifactServiceFinalizeArtifactJSON(r,i,a,s);case l.TwirpContentType.Protobuf:return handleArtifactServiceFinalizeArtifactProtobuf(r,i,a,s);default:const c="unexpected Content-Type";throw new l.TwirpError(l.TwirpErrorCode.BadRoute,c)}}function handleArtifactServiceListArtifactsRequest(r,i,a,s){switch(r.contentType){case l.TwirpContentType.JSON:return handleArtifactServiceListArtifactsJSON(r,i,a,s);case l.TwirpContentType.Protobuf:return handleArtifactServiceListArtifactsProtobuf(r,i,a,s);default:const c="unexpected Content-Type";throw new l.TwirpError(l.TwirpErrorCode.BadRoute,c)}}function handleArtifactServiceGetSignedArtifactURLRequest(r,i,a,s){switch(r.contentType){case l.TwirpContentType.JSON:return handleArtifactServiceGetSignedArtifactURLJSON(r,i,a,s);case l.TwirpContentType.Protobuf:return handleArtifactServiceGetSignedArtifactURLProtobuf(r,i,a,s);default:const c="unexpected Content-Type";throw new l.TwirpError(l.TwirpErrorCode.BadRoute,c)}}function handleArtifactServiceCreateArtifactJSON(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{const r=JSON.parse(a.toString()||"{}");s=c.CreateArtifactRequest.fromJson(r,{ignoreUnknownFields:true})}catch(r){if(r instanceof Error){const i="the json request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.CreateArtifact(r,a)))}else{d=yield i.CreateArtifact(r,s)}return JSON.stringify(c.CreateArtifactResponse.toJson(d,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleArtifactServiceFinalizeArtifactJSON(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{const r=JSON.parse(a.toString()||"{}");s=c.FinalizeArtifactRequest.fromJson(r,{ignoreUnknownFields:true})}catch(r){if(r instanceof Error){const i="the json request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.FinalizeArtifact(r,a)))}else{d=yield i.FinalizeArtifact(r,s)}return JSON.stringify(c.FinalizeArtifactResponse.toJson(d,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleArtifactServiceListArtifactsJSON(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{const r=JSON.parse(a.toString()||"{}");s=c.ListArtifactsRequest.fromJson(r,{ignoreUnknownFields:true})}catch(r){if(r instanceof Error){const i="the json request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.ListArtifacts(r,a)))}else{d=yield i.ListArtifacts(r,s)}return JSON.stringify(c.ListArtifactsResponse.toJson(d,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleArtifactServiceGetSignedArtifactURLJSON(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{const r=JSON.parse(a.toString()||"{}");s=c.GetSignedArtifactURLRequest.fromJson(r,{ignoreUnknownFields:true})}catch(r){if(r instanceof Error){const i="the json request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.GetSignedArtifactURL(r,a)))}else{d=yield i.GetSignedArtifactURL(r,s)}return JSON.stringify(c.GetSignedArtifactURLResponse.toJson(d,{useProtoFieldName:true,emitDefaultValues:false}))}))}function handleArtifactServiceCreateArtifactProtobuf(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{s=c.CreateArtifactRequest.fromBinary(a)}catch(r){if(r instanceof Error){const i="the protobuf request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.CreateArtifact(r,a)))}else{d=yield i.CreateArtifact(r,s)}return Buffer.from(c.CreateArtifactResponse.toBinary(d))}))}function handleArtifactServiceFinalizeArtifactProtobuf(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{s=c.FinalizeArtifactRequest.fromBinary(a)}catch(r){if(r instanceof Error){const i="the protobuf request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.FinalizeArtifact(r,a)))}else{d=yield i.FinalizeArtifact(r,s)}return Buffer.from(c.FinalizeArtifactResponse.toBinary(d))}))}function handleArtifactServiceListArtifactsProtobuf(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{s=c.ListArtifactsRequest.fromBinary(a)}catch(r){if(r instanceof Error){const i="the protobuf request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.ListArtifacts(r,a)))}else{d=yield i.ListArtifacts(r,s)}return Buffer.from(c.ListArtifactsResponse.toBinary(d))}))}function handleArtifactServiceGetSignedArtifactURLProtobuf(r,i,a,p){return s(this,void 0,void 0,(function*(){let s;let d;try{s=c.GetSignedArtifactURLRequest.fromBinary(a)}catch(r){if(r instanceof Error){const i="the protobuf request could not be decoded";throw new l.TwirpError(l.TwirpErrorCode.Malformed,i).withCause(r,true)}}if(p&&p.length>0){const a=(0,l.chainInterceptors)(...p);d=yield a(r,s,((r,a)=>i.GetSignedArtifactURL(r,a)))}else{d=yield i.GetSignedArtifactURL(r,s)}return Buffer.from(c.GetSignedArtifactURLResponse.toBinary(d))}))}},2767:function(r,i,a){"use strict";var s=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,l){function fulfilled(r){try{step(s.next(r))}catch(r){l(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){l(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};var l=this&&this.__rest||function(r,i){var a={};for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&i.indexOf(s)<0)a[s]=r[s];if(r!=null&&typeof Object.getOwnPropertySymbols==="function")for(var l=0,s=Object.getOwnPropertySymbols(r);l{const i=new URL(r);i.search="";return i.toString()};function exists(r){return p(this,void 0,void 0,(function*(){try{yield u.default.access(r);return true}catch(r){if(r.code==="ENOENT"){return false}else{throw r}}}))}function streamExtract(r,i){return p(this,void 0,void 0,(function*(){const a=new g.HttpClient((0,E.getUserAgentString)());const s=yield a.get(r);if(s.message.statusCode!==200){throw new Error(`Unexpected HTTP response from blob storage: ${s.message.statusCode} ${s.message.statusMessage}`)}return new Promise(((r,a)=>{s.message.pipe(y.default.Extract({path:i})).on("close",r).on("error",a)}))}))}function downloadArtifactPublic(r,i,a,s,l){return p(this,void 0,void 0,(function*(){const c=yield resolveOrCreateDirectory(l===null||l===void 0?void 0:l.path);const p=A.getOctokit(s);h.info(`Downloading artifact '${r}' from '${i}/${a}'`);const{headers:d,status:u}=yield p.rest.actions.downloadArtifact({owner:i,repo:a,artifact_id:r,archive_format:"zip",request:{redirect:"manual"}});if(u!==302){throw new Error(`Unable to download artifact. Unexpected status: ${u}`)}const{location:g}=d;if(!g){throw new Error(`Unable to redirect to artifact download url`)}h.info(`Redirecting to blob download url: ${scrubQueryParameters(g)}`);try{h.info(`Starting download of artifact to: ${c}`);yield streamExtract(g,c);h.info(`Artifact download completed successfully.`)}catch(r){throw new Error(`Unable to download and extract artifact: ${r.message}`)}return{downloadPath:c}}))}i.downloadArtifactPublic=downloadArtifactPublic;function downloadArtifactInternal(r,i){return p(this,void 0,void 0,(function*(){const a=yield resolveOrCreateDirectory(i===null||i===void 0?void 0:i.path);const s=(0,C.internalArtifactTwirpClient)();const{workflowRunBackendId:l,workflowJobRunBackendId:c}=(0,B.getBackendIdsFromToken)();const p={workflowRunBackendId:l,workflowJobRunBackendId:c,idFilter:v.Int64Value.create({value:r.toString()})};const{artifacts:d}=yield s.ListArtifacts(p);if(d.length===0){throw new I.ArtifactNotFoundError(`No artifacts found for ID: ${r}\nAre you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`)}if(d.length>1){h.warning("Multiple artifacts found, defaulting to first.")}const u={workflowRunBackendId:d[0].workflowRunBackendId,workflowJobRunBackendId:d[0].workflowJobRunBackendId,name:d[0].name};const{signedUrl:A}=yield s.GetSignedArtifactURL(u);h.info(`Redirecting to blob download url: ${scrubQueryParameters(A)}`);try{h.info(`Starting download of artifact to: ${a}`);yield streamExtract(A,a);h.info(`Artifact download completed successfully.`)}catch(r){throw new Error(`Unable to download and extract artifact: ${r.message}`)}return{downloadPath:a}}))}i.downloadArtifactInternal=downloadArtifactInternal;function resolveOrCreateDirectory(r=(0,b.getGitHubWorkspaceDir)()){return p(this,void 0,void 0,(function*(){if(!(yield exists(r))){h.debug(`Artifact destination folder does not exist, creating: ${r}`);yield u.default.mkdir(r,{recursive:true})}else{h.debug(`Artifact destination folder already exists: ${r}`)}return r}))}},7854:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var l=Object.getOwnPropertyDescriptor(i,a);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,l)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var c=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);l(i,r);return i};var p=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,l){function fulfilled(r){try{step(s.next(r))}catch(r){l(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){l(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.getArtifactInternal=i.getArtifactPublic=void 0;const d=a(1690);const u=a(5857);const A=c(a(3949));const h=a(6893);const g=a(7946);const y=a(2622);const E=a(2699);const b=a(6666);const C=a(6480);const v=a(6414);const B=a(3243);function getArtifactPublic(r,i,a,s,l){var c;return p(this,void 0,void 0,(function*(){const[p,E]=(0,g.getRetryOptions)(h.defaults);const C={log:undefined,userAgent:(0,b.getUserAgentString)(),previews:undefined,retry:p,request:E};const v=(0,d.getOctokit)(l,C,u.retry,y.requestLog);const I=yield v.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}",{owner:a,repo:s,run_id:i,name:r});if(I.status!==200){throw new B.InvalidResponseError(`Invalid response from GitHub API: ${I.status} (${(c=I===null||I===void 0?void 0:I.headers)===null||c===void 0?void 0:c["x-github-request-id"]})`)}if(I.data.artifacts.length===0){throw new B.ArtifactNotFoundError(`Artifact not found for name: ${r}`)}let w=I.data.artifacts[0];if(I.data.artifacts.length>1){w=I.data.artifacts.sort(((r,i)=>i.id-r.id))[0];A.debug(`More than one artifact found for a single name, returning newest (id: ${w.id})`)}return{artifact:{name:w.name,id:w.id,size:w.size_in_bytes,createdAt:w.created_at?new Date(w.created_at):undefined}}}))}i.getArtifactPublic=getArtifactPublic;function getArtifactInternal(r){return p(this,void 0,void 0,(function*(){const i=(0,C.internalArtifactTwirpClient)();const{workflowRunBackendId:a,workflowJobRunBackendId:s}=(0,E.getBackendIdsFromToken)();const l={workflowRunBackendId:a,workflowJobRunBackendId:s,nameFilter:v.StringValue.create({value:r})};const c=yield i.ListArtifacts(l);if(c.artifacts.length===0){throw new B.ArtifactNotFoundError(`Artifact not found for name: ${r}`)}let p=c.artifacts[0];if(c.artifacts.length>1){p=c.artifacts.sort(((r,i)=>Number(i.databaseId)-Number(r.databaseId)))[0];A.debug(`More than one artifact found for a single name, returning newest (id: ${p.databaseId})`)}return{artifact:{name:p.name,id:Number(p.databaseId),size:Number(p.size),createdAt:p.createdAt?v.Timestamp.toDate(p.createdAt):undefined}}}))}i.getArtifactInternal=getArtifactInternal},524:function(r,i,a){"use strict";var s=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,l){function fulfilled(r){try{step(s.next(r))}catch(r){l(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){l(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.listArtifactsInternal=i.listArtifactsPublic=void 0;const l=a(3949);const c=a(1690);const p=a(6666);const d=a(7946);const u=a(6893);const A=a(2622);const h=a(5857);const g=a(6480);const y=a(2699);const E=a(6414);const b=1e3;const C=100;const v=b/C;function listArtifactsPublic(r,i,a,g,y=false){return s(this,void 0,void 0,(function*(){(0,l.info)(`Fetching artifact list for workflow run ${r} in repository ${i}/${a}`);let s=[];const[E,B]=(0,d.getRetryOptions)(u.defaults);const I={log:undefined,userAgent:(0,p.getUserAgentString)(),previews:undefined,retry:E,request:B};const w=(0,c.getOctokit)(g,I,h.retry,A.requestLog);let Q=1;const{data:S}=yield w.rest.actions.listWorkflowRunArtifacts({owner:i,repo:a,run_id:r,per_page:C,page:Q});let x=Math.ceil(S.total_count/C);const N=S.total_count;if(N>b){(0,l.warning)(`Workflow run ${r} has more than 1000 artifacts. Results will be incomplete as only the first ${b} artifacts will be returned`);x=v}for(const r of S.artifacts){s.push({name:r.name,id:r.id,size:r.size_in_bytes,createdAt:r.created_at?new Date(r.created_at):undefined})}for(Q;Q({name:r.name,id:Number(r.databaseId),size:Number(r.size),createdAt:r.createdAt?E.Timestamp.toDate(r.createdAt):undefined})));if(r){d=filterLatest(d)}(0,l.info)(`Found ${d.length} artifact(s)`);return{artifacts:d}}))}i.listArtifactsInternal=listArtifactsInternal;function filterLatest(r){r.sort(((r,i)=>i.id-r.id));const i=[];const a=new Set;for(const s of r){if(!a.has(s.name)){i.push(s);a.add(s.name)}}return i}},7946:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var l=Object.getOwnPropertyDescriptor(i,a);if(!l||("get"in l?!i.__esModule:l.writable||l.configurable)){l={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,l)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var l=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var c=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);l(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.getRetryOptions=void 0;const p=c(a(3949));const d=5;const u=[400,401,403,404,422];function getRetryOptions(r,i=d,a=u){var s;if(i<=0){return[{enabled:false},r.request]}const l={enabled:true};if(a.length>0){l.doNotRetry=a}const c=Object.assign(Object.assign({},r.request),{retries:i});p.debug(`GitHub client configured with: (retries: ${c.retries}, retry-exempt-status-code: ${(s=l.doNotRetry)!==null&&s!==void 0?s:"octokit default: [400, 401, 403, 404, 422]"})`);return[l,c]}i.getRetryOptions=getRetryOptions},6480:function(r,i,a){"use strict";var s=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,l){function fulfilled(r){try{step(s.next(r))}catch(r){l(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){l(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.internalArtifactTwirpClient=void 0;const l=a(5753);const c=a(7910);const p=a(3949);const d=a(6414);const u=a(195);const A=a(6666);const h=a(3243);class ArtifactHttpClient{constructor(r,i,a,s){this.maxAttempts=5;this.baseRetryIntervalMilliseconds=3e3;this.retryMultiplier=1.5;const p=(0,u.getRuntimeToken)();this.baseUrl=(0,u.getResultsServiceUrl)();if(i){this.maxAttempts=i}if(a){this.baseRetryIntervalMilliseconds=a}if(s){this.retryMultiplier=s}this.httpClient=new l.HttpClient(r,[new c.BearerCredentialHandler(p)])}request(r,i,a,l){return s(this,void 0,void 0,(function*(){const c=new URL(`/twirp/${r}/${i}`,this.baseUrl).href;(0,p.debug)(`[Request] ${i} ${c}`);const d={"Content-Type":a};try{const{body:r}=yield this.retryableRequest((()=>s(this,void 0,void 0,(function*(){return this.httpClient.post(c,JSON.stringify(l),d)}))));return r}catch(r){throw new Error(`Failed to ${i}: ${r.message}`)}}))}retryableRequest(r){return s(this,void 0,void 0,(function*(){let i=0;let a="";let s="";while(i=200&&r<300}isRetryableHttpStatusCode(r){if(!r)return false;const i=[l.HttpCodes.BadGateway,l.HttpCodes.GatewayTimeout,l.HttpCodes.InternalServerError,l.HttpCodes.ServiceUnavailable,l.HttpCodes.TooManyRequests];return i.includes(r)}sleep(r){return s(this,void 0,void 0,(function*(){return new Promise((i=>setTimeout(i,r)))}))}getExponentialRetryTimeMilliseconds(r){if(r<0){throw new Error("attempt should be a positive integer")}if(r===0){return this.baseRetryIntervalMilliseconds}const i=this.baseRetryIntervalMilliseconds*Math.pow(this.retryMultiplier,r);const a=i*this.retryMultiplier;return Math.trunc(Math.random()*(a-i)+i)}}function internalArtifactTwirpClient(r){const i=new ArtifactHttpClient((0,A.getUserAgentString)(),r===null||r===void 0?void 0:r.maxAttempts,r===null||r===void 0?void 0:r.retryIntervalMs,r===null||r===void 0?void 0:r.retryMultiplier);return new d.ArtifactServiceClientJSON(i)}i.internalArtifactTwirpClient=internalArtifactTwirpClient},195:function(r,i,a){"use strict";var s=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:true});i.getConcurrency=i.getGitHubWorkspaceDir=i.isGhes=i.getResultsServiceUrl=i.getRuntimeToken=i.getUploadChunkSize=void 0;const l=s(a(2037));function getUploadChunkSize(){return 8*1024*1024}i.getUploadChunkSize=getUploadChunkSize;function getRuntimeToken(){const r=process.env["ACTIONS_RUNTIME_TOKEN"];if(!r){throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable")}return r}i.getRuntimeToken=getRuntimeToken;function getResultsServiceUrl(){const r=process.env["ACTIONS_RESULTS_URL"];if(!r){throw new Error("Unable to get the ACTIONS_RESULTS_URL env variable")}return new URL(r).origin}i.getResultsServiceUrl=getResultsServiceUrl;function isGhes(){const r=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return r.hostname.toUpperCase()!=="GITHUB.COM"}i.isGhes=isGhes;function getGitHubWorks