@cloudsnorkel/cdk-github-runners 0.5.2 → 0.5.3
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/.jsii +61 -27
- package/API.md +31 -4
- package/lib/lambdas/delete-runner/index.js +38 -50
- package/lib/lambdas/setup/index.html +12 -12
- package/lib/lambdas/status/index.js +38 -50
- package/lib/lambdas/token-retriever/index.js +38 -50
- package/lib/lambdas/update-lambda/index.js +1267 -1124
- package/lib/providers/codebuild.js +1 -1
- package/lib/providers/common.js +3 -3
- package/lib/providers/fargate.d.ts +12 -2
- package/lib/providers/fargate.js +4 -2
- package/lib/providers/image-builders/codebuild.js +1 -1
- package/lib/providers/image-builders/container.js +2 -2
- package/lib/providers/image-builders/static.js +1 -1
- package/lib/providers/lambda.js +1 -1
- package/lib/runner.js +1 -1
- package/lib/secrets.js +1 -1
- package/package.json +8 -8
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Setup GitHub Runners</title>
|
|
7
7
|
<script type="module" crossorigin>
|
|
8
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const c of n)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function o(n){const c={};return n.integrity&&(c.integrity=n.integrity),n.referrerpolicy&&(c.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?c.credentials="include":n.crossorigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(n){if(n.ep)return;n.ep=!0;const c=o(n);fetch(n.href,c)}})();function
|
|
9
|
-
and without any path. It should look something like <code>github.mycompany.com</code>.`,c=
|
|
8
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const c of n)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&i(p)}).observe(document,{childList:!0,subtree:!0});function o(n){const c={};return n.integrity&&(c.integrity=n.integrity),n.referrerpolicy&&(c.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?c.credentials="include":n.crossorigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(n){if(n.ep)return;n.ep=!0;const c=o(n);fetch(n.href,c)}})();function Y(){}function Le(e){return e()}function Ce(){return Object.create(null)}function j(e){e.forEach(Le)}function Ue(e){return typeof e=="function"}function Be(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function De(e){return Object.keys(e).length===0}function l(e,t){e.appendChild(t)}function H(e,t,o){e.insertBefore(t,o||null)}function T(e){e.parentNode.removeChild(e)}function r(e){return document.createElement(e)}function I(e){return document.createTextNode(e)}function b(){return I(" ")}function Me(){return I("")}function $(e,t,o,i){return e.addEventListener(t,o,i),()=>e.removeEventListener(t,o,i)}function s(e,t,o){o==null?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function $e(e){return e===""?null:+e}function je(e){return Array.from(e.childNodes)}function pe(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function z(e,t){e.value=t==null?"":t}let ke;function ee(e){ke=e}const x=[],Se=[],ae=[],Te=[],qe=Promise.resolve();let be=!1;function Je(){be||(be=!0,qe.then(ze))}function ve(e){ae.push(e)}const he=new Set;let ue=0;function ze(){const e=ke;do{for(;ue<x.length;){const t=x[ue];ue++,ee(t),Ke(t.$$)}for(ee(null),x.length=0,ue=0;Se.length;)Se.pop()();for(let t=0;t<ae.length;t+=1){const o=ae[t];he.has(o)||(he.add(o),o())}ae.length=0}while(x.length);for(;Te.length;)Te.pop()();be=!1,he.clear(),ee(e)}function Ke(e){if(e.fragment!==null){e.update(),j(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ve)}}const We=new Set;function Fe(e,t){e&&e.i&&(We.delete(e),e.i(t))}function Ye(e,t,o,i){const{fragment:n,after_update:c}=e.$$;n&&n.m(t,o),i||ve(()=>{const p=e.$$.on_mount.map(Le).filter(Ue);e.$$.on_destroy?e.$$.on_destroy.push(...p):j(p),e.$$.on_mount=[]}),c.forEach(ve)}function Ze(e,t){const o=e.$$;o.fragment!==null&&(j(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function Qe(e,t){e.$$.dirty[0]===-1&&(x.push(e),Je(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ve(e,t,o,i,n,c,p,u=[-1]){const v=ke;ee(e);const a=e.$$={fragment:null,ctx:[],props:c,update:Y,not_equal:n,bound:Ce(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(v?v.$$.context:[])),callbacks:Ce(),dirty:u,skip_bound:!1,root:t.target||v.$$.root};p&&p(a.root);let h=!1;if(a.ctx=o?o(e,t.props||{},(g,f,...O)=>{const k=O.length?O[0]:f;return a.ctx&&n(a.ctx[g],a.ctx[g]=k)&&(!a.skip_bound&&a.bound[g]&&a.bound[g](k),h&&Qe(e,g)),f}):[],a.update(),h=!0,j(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const g=je(t.target);a.fragment&&a.fragment.l(g),g.forEach(T)}else a.fragment&&a.fragment.c();t.intro&&Fe(e.$$.fragment),Ye(e,t.target,t.anchor,t.customElement),ze()}ee(v)}class Xe{$destroy(){Ze(this,1),this.$destroy=Y}$on(t,o){if(!Ue(o))return Y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(o),()=>{const n=i.indexOf(o);n!==-1&&i.splice(n,1)}}$set(t){this.$$set&&!De(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Oe(e){let t,o,i,n,c,p,u,v;return{c(){t=r("h3"),t.textContent="GitHub Enterprise Server Domain",o=b(),i=r("div"),n=r("p"),n.innerHTML=`Where is GitHub Enterprise Server hosted? Type in the domain without <code>https://</code>
|
|
9
|
+
and without any path. It should look something like <code>github.mycompany.com</code>.`,c=b(),p=r("input"),s(p,"class","form-control"),s(i,"class","px-3 py-3")},m(a,h){H(a,t,h),H(a,o,h),H(a,i,h),l(i,n),l(i,c),l(i,p),z(p,e[1]),u||(v=$(p,"input",e[15]),u=!0)},p(a,h){h&2&&p.value!==a[1]&&z(p,a[1])},d(a){a&&T(t),a&&T(o),a&&T(i),u=!1,v()}}}function He(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C,d,_,A,E,N;return{c(){t=r("h3"),t.textContent="Authentication Type",o=b(),i=r("div"),n=r("p"),n.textContent=`You can choose between creating a new app that will provide authentication for specific
|
|
10
10
|
repositories, or a personal access token that will provide access to all repositories
|
|
11
11
|
available to you. Apps are easier to set up and provide more fine-grained access control. If
|
|
12
|
-
you have previously created an app, you can choose to use an existing app.`,c=
|
|
13
|
-
scope enabled. Don't forget to also create a webhook as described in `),f=r("a"),f.textContent="SETUP_GITHUB.md",O=I("."),k=
|
|
14
|
-
permissions. Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.`,c=
|
|
12
|
+
you have previously created an app, you can choose to use an existing app.`,c=b(),p=r("div"),u=r("input"),v=b(),a=r("label"),a.innerHTML="New GitHub App <b>(recommended)</b>",h=b(),g=r("div"),f=r("input"),O=b(),k=r("label"),k.textContent="Existing GitHub App",S=b(),C=r("div"),d=r("input"),_=b(),A=r("label"),A.textContent="Personal Authentication Token",s(u,"class","form-check-input"),s(u,"type","radio"),u.__value="newApp",u.value=u.__value,s(u,"id","newApp"),e[13][1].push(u),s(a,"class","form-check-label"),s(a,"for","newApp"),s(p,"class","form-check"),s(f,"class","form-check-input"),s(f,"type","radio"),f.__value="existingApp",f.value=f.__value,s(f,"id","existingApp"),e[13][1].push(f),s(k,"class","form-check-label"),s(k,"for","existingApp"),s(g,"class","form-check"),s(d,"class","form-check-input"),s(d,"type","radio"),d.__value="pat",d.value=d.__value,s(d,"id","pat"),e[13][1].push(d),s(A,"class","form-check-label"),s(A,"for","pat"),s(C,"class","form-check"),s(i,"class","px-3 py-3")},m(m,w){H(m,t,w),H(m,o,w),H(m,i,w),l(i,n),l(i,c),l(i,p),l(p,u),u.checked=u.__value===e[2],l(p,v),l(p,a),l(i,h),l(i,g),l(g,f),f.checked=f.__value===e[2],l(g,O),l(g,k),l(i,S),l(i,C),l(C,d),d.checked=d.__value===e[2],l(C,_),l(C,A),E||(N=[$(u,"change",e[16]),$(f,"change",e[17]),$(d,"change",e[18])],E=!0)},p(m,w){w&4&&(u.checked=u.__value===m[2]),w&4&&(f.checked=f.__value===m[2]),w&4&&(d.checked=d.__value===m[2])},d(m){m&&T(t),m&&T(o),m&&T(i),e[13][1].splice(e[13][1].indexOf(u),1),e[13][1].splice(e[13][1].indexOf(f),1),e[13][1].splice(e[13][1].indexOf(d),1),E=!1,j(N)}}}function xe(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C,d;return{c(){t=r("h2"),t.textContent="Personal Access Token",o=b(),i=r("div"),n=r("p"),c=I("The "),p=r("a"),u=I("personal access token"),a=I(" must have the "),h=r("code"),h.textContent="repo",g=I(`
|
|
13
|
+
scope enabled. Don't forget to also create a webhook as described in `),f=r("a"),f.textContent="SETUP_GITHUB.md",O=I("."),k=b(),S=r("input"),s(p,"href",v="https://"+e[1]+"/settings/tokens"),s(f,"href","https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md"),s(S,"class","form-control"),s(S,"placeholder","Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"),s(i,"class","px-3 py-3")},m(_,A){H(_,t,A),H(_,o,A),H(_,i,A),l(i,n),l(n,c),l(n,p),l(p,u),l(n,a),l(n,h),l(n,g),l(n,f),l(n,O),l(i,k),l(i,S),z(S,e[7]),C||(d=$(S,"input",e[25]),C=!0)},p(_,A){A&2&&v!==(v="https://"+_[1]+"/settings/tokens")&&s(p,"href",v),A&128&&S.value!==_[7]&&z(S,_[7])},d(_){_&&T(t),_&&T(o),_&&T(i),C=!1,d()}}}function et(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C,d,_;return{c(){t=r("h3"),t.textContent="Existing App Details",o=b(),i=r("div"),n=r("p"),n.innerHTML=`Existing apps must have <code>actions</code> and <code>administration</code> write
|
|
14
|
+
permissions. Don't forget to set up the webhook and its secret as described in <a href="https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md">SETUP_GITHUB.md</a>.`,c=b(),p=r("div"),u=r("label"),u.textContent="App Id",v=b(),a=r("div"),h=r("input"),g=b(),f=r("div"),O=r("label"),O.textContent="Private Key",k=b(),S=r("div"),C=r("textarea"),s(u,"for","appid"),s(u,"class","col-sm-2 col-form-label"),s(h,"type","number"),s(h,"class","form-control"),s(h,"id","appid"),s(a,"class","col-sm-10"),s(p,"class","form-group row px-3 py-2"),s(O,"for","pk"),s(O,"class","col-sm-2 col-form-label"),s(C,"class","form-control"),s(C,"id","pk"),s(C,"rows","10"),s(S,"class","col-sm-10"),s(f,"class","form-group row px-3 py-2"),s(i,"class","px-3 py-3")},m(A,E){H(A,t,E),H(A,o,E),H(A,i,E),l(i,n),l(i,c),l(i,p),l(p,u),l(p,v),l(p,a),l(a,h),z(h,e[5]),l(i,g),l(i,f),l(f,O),l(f,k),l(f,S),l(S,C),z(C,e[6]),d||(_=[$(h,"input",e[23]),$(C,"input",e[24])],d=!0)},p(A,E){E&32&&$e(h.value)!==A[5]&&z(h,A[5]),E&64&&z(C,A[6])},d(A){A&&T(t),A&&T(o),A&&T(i),d=!1,j(_)}}}function tt(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C,d,_,A,E=e[0]==="ghes"&&Ne(e),N=e[3]==="org"&&Ie(e);return{c(){t=r("h3"),t.textContent="New App Settings",o=b(),i=r("div"),n=r("p"),n.textContent=`Choose whether to create a new personal app or organization app. A private personal app can
|
|
15
15
|
only be used for repositories under your user. A private origination app can only be used
|
|
16
|
-
for repositories under that organization.`,c=
|
|
17
|
-
you can make the app public.`,o=
|
|
18
|
-
`),p=r("code"),u=I("https://"),
|
|
19
|
-
then your organization slug is `),g=r("code"),g.textContent="MyOrg",f=I("."),O=
|
|
16
|
+
for repositories under that organization.`,c=b(),p=r("div"),u=r("input"),v=b(),a=r("label"),a.textContent="User app",h=b(),g=r("div"),f=r("input"),O=b(),k=r("label"),k.textContent="Organization app",S=b(),E&&E.c(),C=b(),N&&N.c(),d=Me(),s(u,"class","form-check-input"),s(u,"type","radio"),u.__value="user",u.value=u.__value,s(u,"id","userScope"),e[13][2].push(u),s(a,"class","form-check-label"),s(a,"for","userScope"),s(p,"class","form-check"),s(f,"class","form-check-input"),s(f,"type","radio"),f.__value="org",f.value=f.__value,s(f,"id","orgScope"),e[13][2].push(f),s(k,"class","form-check-label"),s(k,"for","orgScope"),s(g,"class","form-check"),s(i,"class","px-3 py-3")},m(m,w){H(m,t,w),H(m,o,w),H(m,i,w),l(i,n),l(i,c),l(i,p),l(p,u),u.checked=u.__value===e[3],l(p,v),l(p,a),l(i,h),l(i,g),l(g,f),f.checked=f.__value===e[3],l(g,O),l(g,k),l(i,S),E&&E.m(i,null),H(m,C,w),N&&N.m(m,w),H(m,d,w),_||(A=[$(u,"change",e[19]),$(f,"change",e[20])],_=!0)},p(m,w){w&8&&(u.checked=u.__value===m[3]),w&8&&(f.checked=f.__value===m[3]),m[0]==="ghes"?E?E.p(m,w):(E=Ne(m),E.c(),E.m(i,null)):E&&(E.d(1),E=null),m[3]==="org"?N?N.p(m,w):(N=Ie(m),N.c(),N.m(d.parentNode,d)):N&&(N.d(1),N=null)},d(m){m&&T(t),m&&T(o),m&&T(i),e[13][2].splice(e[13][2].indexOf(u),1),e[13][2].splice(e[13][2].indexOf(f),1),E&&E.d(),m&&T(C),N&&N.d(m),m&&T(d),_=!1,j(A)}}}function Ne(e){let t,o,i,n,c,p,u,v;return{c(){t=r("p"),t.textContent=`If multiple organizations under the same GitHub Enterprise Server need to use the runners,
|
|
17
|
+
you can make the app public.`,o=b(),i=r("div"),n=r("input"),c=b(),p=r("label"),p.textContent="Public app",s(t,"class","pt-2"),s(n,"class","form-check-input"),s(n,"type","checkbox"),s(n,"id","public"),s(p,"class","form-check-label"),s(p,"for","public"),s(i,"class","form-check")},m(a,h){H(a,t,h),H(a,o,h),H(a,i,h),l(i,n),z(n,e[10].public),l(i,c),l(i,p),u||(v=$(n,"change",e[21]),u=!0)},p(a,h){h&1024&&z(n,a[10].public)},d(a){a&&T(t),a&&T(o),a&&T(i),u=!1,v()}}}function Ie(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C;return{c(){t=r("h3"),t.textContent="Organization name",o=b(),i=r("div"),n=r("p"),c=I(`What is the slug for your organization? If your repositories have a URL like
|
|
18
|
+
`),p=r("code"),u=I("https://"),v=I(e[1]),a=I("/MyOrg/my-repo"),h=I(`
|
|
19
|
+
then your organization slug is `),g=r("code"),g.textContent="MyOrg",f=I("."),O=b(),k=r("input"),s(k,"class","form-control"),s(i,"class","px-3 py-3")},m(d,_){H(d,t,_),H(d,o,_),H(d,i,_),l(i,n),l(n,c),l(n,p),l(p,u),l(p,v),l(p,a),l(n,h),l(n,g),l(n,f),l(i,O),l(i,k),z(k,e[4]),S||(C=$(k,"input",e[22]),S=!0)},p(d,_){_&2&&pe(v,d[1]),_&16&&k.value!==d[4]&&z(k,d[4])},d(d){d&&T(t),d&&T(o),d&&T(i),S=!1,C()}}}function nt(e){let t,o,i;return{c(){t=r("div"),o=I(e[9]),s(t,"class",i="alert alert-"+(e[8]?"success":"danger")),s(t,"role","alert")},m(n,c){H(n,t,c),l(t,o)},p(n,c){c&512&&pe(o,n[9]),c&256&&i!==(i="alert alert-"+(n[8]?"success":"danger"))&&s(t,"class",i)},d(n){n&&T(t)}}}function lt(e){let t;return{c(){t=r("p"),t.textContent="This button will be enabled once all the questions above are answered."},m(o,i){H(o,t,i)},p:Y,d(o){o&&T(t)}}}function Ge(e){let t,o,i,n,c,p;return{c(){t=r("p"),o=r("b"),o.textContent="WARNING:",i=I(" using a public app means anyone with access to "),n=r("code"),c=I(e[1]),p=I(`
|
|
20
20
|
can use the runners you're setting up now. Anyone can create a workflow that will run on those runners,
|
|
21
21
|
have access to their instance profile, and be part of their security group. Consider the security
|
|
22
|
-
implications before continuing.`),s(o,"class","text-danger")},m(u,
|
|
22
|
+
implications before continuing.`),s(o,"class","text-danger")},m(u,v){H(u,t,v),l(t,o),l(t,i),l(t,n),l(n,c),l(t,p)},p(u,v){v&2&&pe(c,u[1])},d(u){u&&T(t)}}}function it(e){let t,o,i,n,c,p,u,v,a,h,g,f,O,k,S,C,d,_,A,E,N,m,w,te,q,ne,Z,Q,V,X,D,B,ce,fe,J,le=Pe(e[2])+"",de,ie,ye,K,W,oe,se,_e,we,R=e[0]==="ghes"&&Oe(e),P=e[0]&&He(e);function Ee(y,G){if(y[2]==="newApp")return tt;if(y[2]==="existingApp")return et;if(y[2]==="pat")return xe}let F=Ee(e),L=F&&F(e);function Ae(y,G){return y[9]===void 0?lt:nt}let re=Ae(e),M=re(e),U=e[10].public&&e[2]==="newApp"&&Ge(e);return{c(){t=r("main"),o=r("div"),i=r("div"),n=r("form"),c=r("h1"),c.textContent="Setup GitHub Runners",p=b(),u=r("p"),v=I(`Answer all the questions on this page to automatically configure GitHub integration and get the
|
|
23
23
|
runners working. This page will not be accessible once you complete this operation. If you ever want
|
|
24
|
-
to access it again, edit `),a=r("code"),a.textContent=`${ot}`,h=I(" and run the status function again."),g=
|
|
25
|
-
Enterprise Server?`,C=
|
|
24
|
+
to access it again, edit `),a=r("code"),a.textContent=`${ot}`,h=I(" and run the status function again."),g=b(),f=r("h3"),f.textContent="Choose GitHub Instance",O=b(),k=r("div"),S=r("p"),S.textContent=`Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub
|
|
25
|
+
Enterprise Server?`,C=b(),d=r("div"),_=r("input"),A=b(),E=r("label"),E.textContent="GitHub.com",N=b(),m=r("div"),w=r("input"),te=b(),q=r("label"),q.textContent="GitHub Enterprise Server",ne=b(),R&&R.c(),Z=b(),P&&P.c(),Q=b(),L&&L.c(),V=b(),X=r("h2"),X.textContent="Finish Setup",D=b(),B=r("div"),M.c(),ce=b(),U&&U.c(),fe=b(),J=r("button"),de=I(le),ye=b(),K=r("form"),W=r("input"),s(_,"class","form-check-input"),s(_,"type","radio"),_.__value="github.com",_.value=_.__value,s(_,"id","github.com"),e[13][0].push(_),s(E,"class","form-check-label"),s(E,"for","github.com"),s(d,"class","form-check"),s(w,"class","form-check-input"),s(w,"type","radio"),w.__value="ghes",w.value=w.__value,s(w,"id","ghes"),e[13][0].push(w),s(q,"class","form-check-label"),s(q,"for","ghes"),s(m,"class","form-check"),s(k,"class","px-3 py-3"),s(J,"type","submit"),s(J,"class","btn btn-success"),J.disabled=ie=Re(e[0],e[2],e[5],e[6],e[7],e[8]),s(B,"class","px-3 py-3"),s(n,"class","col"),s(i,"class","row"),s(o,"class","container py-3 px-2"),s(W,"type","hidden"),s(W,"name","manifest"),W.value=oe=JSON.stringify(e[10]),s(K,"action",se="https://"+e[1]+"/"+(e[3]==="org"?`organizations/${e[4]}/`:"")+"settings/apps/new?state="+ge),s(K,"method","post"),s(K,"id","appform")},m(y,G){H(y,t,G),l(t,o),l(o,i),l(i,n),l(n,c),l(n,p),l(n,u),l(u,v),l(u,a),l(u,h),l(n,g),l(n,f),l(n,O),l(n,k),l(k,S),l(k,C),l(k,d),l(d,_),_.checked=_.__value===e[0],l(d,A),l(d,E),l(k,N),l(k,m),l(m,w),w.checked=w.__value===e[0],l(m,te),l(m,q),l(n,ne),R&&R.m(n,null),l(n,Z),P&&P.m(n,null),l(n,Q),L&&L.m(n,null),l(n,V),l(n,X),l(n,D),l(n,B),M.m(B,null),l(B,ce),U&&U.m(B,null),l(B,fe),l(B,J),l(J,de),l(t,ye),l(t,K),l(K,W),_e||(we=[$(_,"change",e[12]),$(w,"change",e[14]),$(n,"submit",e[11])],_e=!0)},p(y,[G]){G&1&&(_.checked=_.__value===y[0]),G&1&&(w.checked=w.__value===y[0]),y[0]==="ghes"?R?R.p(y,G):(R=Oe(y),R.c(),R.m(n,Z)):R&&(R.d(1),R=null),y[0]?P?P.p(y,G):(P=He(y),P.c(),P.m(n,Q)):P&&(P.d(1),P=null),F===(F=Ee(y))&&L?L.p(y,G):(L&&L.d(1),L=F&&F(y),L&&(L.c(),L.m(n,V))),re===(re=Ae(y))&&M?M.p(y,G):(M.d(1),M=re(y),M&&(M.c(),M.m(B,ce))),y[10].public&&y[2]==="newApp"?U?U.p(y,G):(U=Ge(y),U.c(),U.m(B,fe)):U&&(U.d(1),U=null),G&4&&le!==(le=Pe(y[2])+"")&&pe(de,le),G&485&&ie!==(ie=Re(y[0],y[2],y[5],y[6],y[7],y[8]))&&(J.disabled=ie),G&1024&&oe!==(oe=JSON.stringify(y[10]))&&(W.value=oe),G&26&&se!==(se="https://"+y[1]+"/"+(y[3]==="org"?`organizations/${y[4]}/`:"")+"settings/apps/new?state="+ge)&&s(K,"action",se)},i:Y,o:Y,d(y){y&&T(t),e[13][0].splice(e[13][0].indexOf(_),1),e[13][0].splice(e[13][0].indexOf(w),1),R&&R.d(),P&&P.d(),L&&L.d(),M.d(),U&&U.d(),_e=!1,j(we)}}}const ot="INSERT_SECRET_ARN_HERE",ge="INSERT_TOKEN_HERE";function Re(e,t,o,i,n,c){return c||e===void 0||t===void 0?!0:t==="newApp"?!1:t==="existingApp"?o===""||i==="":t==="pat"?n==="":(console.error("Something is broken",e,t,o),!0)}function Pe(e){return e==="newApp"?"Create GitHub App":"Setup"}function me(e,t){return new Promise((o,i)=>{fetch(`${e}?token=${ge}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),redirect:"error"}).then(n=>{n.ok?n.text().then(o).catch(i):n.text().then(c=>{i(new Error(`${c} [${n.status}]`))}).catch(i)}).catch(i)})}function st(e,t,o){let i,n="INSERT_DOMAIN_HERE",c,p="user",u="ORGANIZATION",v="",a="",h="",g,f;const O={url:"https://github.com/CloudSnorkel/cdk-github-runners",hook_attributes:{url:"INSERT_WEBHOOK_URL_HERE"},redirect_url:"INSERT_BASE_URL_HERE/complete-new-app",public:!1,default_permissions:{actions:"write",administration:"write"},default_events:["workflow_job"]};function k(V){V.preventDefault();function X(){const D=i==="ghes"?n:"github.com";switch(c){case"newApp":return me("domain",{domain:D}).then(B=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return me("app",{appid:v,pk:a,domain:D});case"pat":return me("pat",{pat:h,domain:D})}}X().then(D=>{o(9,f=D),o(8,g=!0)}).catch(D=>{o(9,f=`${D}`),o(8,g=!1)})}const S=[[],[],[]];function C(){i=this.__value,o(0,i)}function d(){i=this.__value,o(0,i)}function _(){n=this.value,o(1,n)}function A(){c=this.__value,o(2,c)}function E(){c=this.__value,o(2,c)}function N(){c=this.__value,o(2,c)}function m(){p=this.__value,o(3,p)}function w(){p=this.__value,o(3,p)}function te(){O.public=this.value,o(10,O)}function q(){u=this.value,o(4,u)}function ne(){v=$e(this.value),o(5,v)}function Z(){a=this.value,o(6,a)}function Q(){h=this.value,o(7,h)}return[i,n,c,p,u,v,a,h,g,f,O,k,C,S,d,_,A,E,N,m,w,te,q,ne,Z,Q]}class rt extends Xe{constructor(t){super(),Ve(this,t,st,it,Be,{})}}new rt({target:document.getElementById("app")});
|
|
26
26
|
|
|
27
27
|
</script>
|
|
28
28
|
<style type="text/css">
|
|
@@ -7432,7 +7432,7 @@ var require_dist_node6 = __commonJS({
|
|
|
7432
7432
|
parse
|
|
7433
7433
|
});
|
|
7434
7434
|
}
|
|
7435
|
-
var VERSION = "7.0.
|
|
7435
|
+
var VERSION = "7.0.3";
|
|
7436
7436
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7437
7437
|
var DEFAULTS = {
|
|
7438
7438
|
method: "GET",
|
|
@@ -7518,7 +7518,7 @@ var require_dist_node8 = __commonJS({
|
|
|
7518
7518
|
var isPlainObject = require_is_plain_object();
|
|
7519
7519
|
var nodeFetch = _interopDefault(require_lib3());
|
|
7520
7520
|
var requestError = require_dist_node7();
|
|
7521
|
-
var VERSION = "6.2.
|
|
7521
|
+
var VERSION = "6.2.2";
|
|
7522
7522
|
function getBufferResponse(response) {
|
|
7523
7523
|
return response.arrayBuffer();
|
|
7524
7524
|
}
|
|
@@ -7988,7 +7988,7 @@ var require_dist_node10 = __commonJS({
|
|
|
7988
7988
|
parse
|
|
7989
7989
|
});
|
|
7990
7990
|
}
|
|
7991
|
-
var VERSION = "7.0.
|
|
7991
|
+
var VERSION = "7.0.3";
|
|
7992
7992
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7993
7993
|
var DEFAULTS = {
|
|
7994
7994
|
method: "GET",
|
|
@@ -8074,7 +8074,7 @@ var require_dist_node12 = __commonJS({
|
|
|
8074
8074
|
var isPlainObject = require_is_plain_object();
|
|
8075
8075
|
var nodeFetch = _interopDefault(require_lib3());
|
|
8076
8076
|
var requestError = require_dist_node11();
|
|
8077
|
-
var VERSION = "6.2.
|
|
8077
|
+
var VERSION = "6.2.2";
|
|
8078
8078
|
function getBufferResponse(response) {
|
|
8079
8079
|
return response.arrayBuffer();
|
|
8080
8080
|
}
|
|
@@ -8228,7 +8228,7 @@ var require_dist_node13 = __commonJS({
|
|
|
8228
8228
|
var request = require_dist_node12();
|
|
8229
8229
|
var requestError = require_dist_node11();
|
|
8230
8230
|
var btoa = _interopDefault(require_btoa_node());
|
|
8231
|
-
var VERSION = "2.0.
|
|
8231
|
+
var VERSION = "2.0.4";
|
|
8232
8232
|
function requestToOAuthBaseUrl(request2) {
|
|
8233
8233
|
const endpointDefaults = request2.endpoint.DEFAULTS;
|
|
8234
8234
|
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
|
|
@@ -8395,17 +8395,14 @@ var require_dist_node13 = __commonJS({
|
|
|
8395
8395
|
...requestOptions
|
|
8396
8396
|
} = options;
|
|
8397
8397
|
const request$1 = optionsRequest || request.request;
|
|
8398
|
-
const response = await request$1(
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
...requestOptions
|
|
8407
|
-
}
|
|
8408
|
-
);
|
|
8398
|
+
const response = await request$1("POST /applications/{client_id}/token/scoped", {
|
|
8399
|
+
headers: {
|
|
8400
|
+
authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`
|
|
8401
|
+
},
|
|
8402
|
+
client_id: clientId,
|
|
8403
|
+
access_token: token,
|
|
8404
|
+
...requestOptions
|
|
8405
|
+
});
|
|
8409
8406
|
const authentication = Object.assign({
|
|
8410
8407
|
clientType,
|
|
8411
8408
|
clientId,
|
|
@@ -8422,16 +8419,13 @@ var require_dist_node13 = __commonJS({
|
|
|
8422
8419
|
async function resetToken(options) {
|
|
8423
8420
|
const request$1 = options.request || request.request;
|
|
8424
8421
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8425
|
-
const response = await request$1(
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
access_token: options.token
|
|
8433
|
-
}
|
|
8434
|
-
);
|
|
8422
|
+
const response = await request$1("PATCH /applications/{client_id}/token", {
|
|
8423
|
+
headers: {
|
|
8424
|
+
authorization: `basic ${auth}`
|
|
8425
|
+
},
|
|
8426
|
+
client_id: options.clientId,
|
|
8427
|
+
access_token: options.token
|
|
8428
|
+
});
|
|
8435
8429
|
const authentication = {
|
|
8436
8430
|
clientType: options.clientType,
|
|
8437
8431
|
clientId: options.clientId,
|
|
@@ -8452,30 +8446,24 @@ var require_dist_node13 = __commonJS({
|
|
|
8452
8446
|
async function deleteToken(options) {
|
|
8453
8447
|
const request$1 = options.request || request.request;
|
|
8454
8448
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8455
|
-
return request$1(
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
access_token: options.token
|
|
8463
|
-
}
|
|
8464
|
-
);
|
|
8449
|
+
return request$1("DELETE /applications/{client_id}/token", {
|
|
8450
|
+
headers: {
|
|
8451
|
+
authorization: `basic ${auth}`
|
|
8452
|
+
},
|
|
8453
|
+
client_id: options.clientId,
|
|
8454
|
+
access_token: options.token
|
|
8455
|
+
});
|
|
8465
8456
|
}
|
|
8466
8457
|
async function deleteAuthorization(options) {
|
|
8467
8458
|
const request$1 = options.request || request.request;
|
|
8468
8459
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8469
|
-
return request$1(
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
access_token: options.token
|
|
8477
|
-
}
|
|
8478
|
-
);
|
|
8460
|
+
return request$1("DELETE /applications/{client_id}/grant", {
|
|
8461
|
+
headers: {
|
|
8462
|
+
authorization: `basic ${auth}`
|
|
8463
|
+
},
|
|
8464
|
+
client_id: options.clientId,
|
|
8465
|
+
access_token: options.token
|
|
8466
|
+
});
|
|
8479
8467
|
}
|
|
8480
8468
|
exports2.VERSION = VERSION;
|
|
8481
8469
|
exports2.checkToken = checkToken;
|
|
@@ -8589,7 +8577,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8589
8577
|
endpoint.headers.authorization = `token ${token}`;
|
|
8590
8578
|
return request2(endpoint);
|
|
8591
8579
|
}
|
|
8592
|
-
var VERSION = "4.0.
|
|
8580
|
+
var VERSION = "4.0.3";
|
|
8593
8581
|
function createOAuthDeviceAuth(options) {
|
|
8594
8582
|
const requestWithDefaults = options.request || request.request.defaults({
|
|
8595
8583
|
headers: {
|
|
@@ -8637,7 +8625,7 @@ var require_dist_node15 = __commonJS({
|
|
|
8637
8625
|
var authOauthDevice = require_dist_node14();
|
|
8638
8626
|
var oauthMethods = require_dist_node13();
|
|
8639
8627
|
var btoa = _interopDefault(require_btoa_node());
|
|
8640
|
-
var VERSION = "2.0.
|
|
8628
|
+
var VERSION = "2.0.4";
|
|
8641
8629
|
async function getAuthentication(state) {
|
|
8642
8630
|
if ("code" in state.strategyOptions) {
|
|
8643
8631
|
const {
|
|
@@ -12765,7 +12753,7 @@ var require_dist_node18 = __commonJS({
|
|
|
12765
12753
|
parse
|
|
12766
12754
|
});
|
|
12767
12755
|
}
|
|
12768
|
-
var VERSION = "7.0.
|
|
12756
|
+
var VERSION = "7.0.3";
|
|
12769
12757
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
12770
12758
|
var DEFAULTS = {
|
|
12771
12759
|
method: "GET",
|
|
@@ -12851,7 +12839,7 @@ var require_dist_node20 = __commonJS({
|
|
|
12851
12839
|
var isPlainObject = require_is_plain_object();
|
|
12852
12840
|
var nodeFetch = _interopDefault(require_lib3());
|
|
12853
12841
|
var requestError = require_dist_node19();
|
|
12854
|
-
var VERSION = "6.2.
|
|
12842
|
+
var VERSION = "6.2.2";
|
|
12855
12843
|
function getBufferResponse(response) {
|
|
12856
12844
|
return response.arrayBuffer();
|
|
12857
12845
|
}
|
|
@@ -7432,7 +7432,7 @@ var require_dist_node6 = __commonJS({
|
|
|
7432
7432
|
parse
|
|
7433
7433
|
});
|
|
7434
7434
|
}
|
|
7435
|
-
var VERSION = "7.0.
|
|
7435
|
+
var VERSION = "7.0.3";
|
|
7436
7436
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7437
7437
|
var DEFAULTS = {
|
|
7438
7438
|
method: "GET",
|
|
@@ -7518,7 +7518,7 @@ var require_dist_node8 = __commonJS({
|
|
|
7518
7518
|
var isPlainObject = require_is_plain_object();
|
|
7519
7519
|
var nodeFetch = _interopDefault(require_lib3());
|
|
7520
7520
|
var requestError = require_dist_node7();
|
|
7521
|
-
var VERSION = "6.2.
|
|
7521
|
+
var VERSION = "6.2.2";
|
|
7522
7522
|
function getBufferResponse(response) {
|
|
7523
7523
|
return response.arrayBuffer();
|
|
7524
7524
|
}
|
|
@@ -7988,7 +7988,7 @@ var require_dist_node10 = __commonJS({
|
|
|
7988
7988
|
parse
|
|
7989
7989
|
});
|
|
7990
7990
|
}
|
|
7991
|
-
var VERSION = "7.0.
|
|
7991
|
+
var VERSION = "7.0.3";
|
|
7992
7992
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7993
7993
|
var DEFAULTS = {
|
|
7994
7994
|
method: "GET",
|
|
@@ -8074,7 +8074,7 @@ var require_dist_node12 = __commonJS({
|
|
|
8074
8074
|
var isPlainObject = require_is_plain_object();
|
|
8075
8075
|
var nodeFetch = _interopDefault(require_lib3());
|
|
8076
8076
|
var requestError = require_dist_node11();
|
|
8077
|
-
var VERSION = "6.2.
|
|
8077
|
+
var VERSION = "6.2.2";
|
|
8078
8078
|
function getBufferResponse(response) {
|
|
8079
8079
|
return response.arrayBuffer();
|
|
8080
8080
|
}
|
|
@@ -8228,7 +8228,7 @@ var require_dist_node13 = __commonJS({
|
|
|
8228
8228
|
var request = require_dist_node12();
|
|
8229
8229
|
var requestError = require_dist_node11();
|
|
8230
8230
|
var btoa = _interopDefault(require_btoa_node());
|
|
8231
|
-
var VERSION = "2.0.
|
|
8231
|
+
var VERSION = "2.0.4";
|
|
8232
8232
|
function requestToOAuthBaseUrl(request2) {
|
|
8233
8233
|
const endpointDefaults = request2.endpoint.DEFAULTS;
|
|
8234
8234
|
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
|
|
@@ -8395,17 +8395,14 @@ var require_dist_node13 = __commonJS({
|
|
|
8395
8395
|
...requestOptions
|
|
8396
8396
|
} = options;
|
|
8397
8397
|
const request$1 = optionsRequest || request.request;
|
|
8398
|
-
const response = await request$1(
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
...requestOptions
|
|
8407
|
-
}
|
|
8408
|
-
);
|
|
8398
|
+
const response = await request$1("POST /applications/{client_id}/token/scoped", {
|
|
8399
|
+
headers: {
|
|
8400
|
+
authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`
|
|
8401
|
+
},
|
|
8402
|
+
client_id: clientId,
|
|
8403
|
+
access_token: token,
|
|
8404
|
+
...requestOptions
|
|
8405
|
+
});
|
|
8409
8406
|
const authentication = Object.assign({
|
|
8410
8407
|
clientType,
|
|
8411
8408
|
clientId,
|
|
@@ -8422,16 +8419,13 @@ var require_dist_node13 = __commonJS({
|
|
|
8422
8419
|
async function resetToken(options) {
|
|
8423
8420
|
const request$1 = options.request || request.request;
|
|
8424
8421
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8425
|
-
const response = await request$1(
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
access_token: options.token
|
|
8433
|
-
}
|
|
8434
|
-
);
|
|
8422
|
+
const response = await request$1("PATCH /applications/{client_id}/token", {
|
|
8423
|
+
headers: {
|
|
8424
|
+
authorization: `basic ${auth}`
|
|
8425
|
+
},
|
|
8426
|
+
client_id: options.clientId,
|
|
8427
|
+
access_token: options.token
|
|
8428
|
+
});
|
|
8435
8429
|
const authentication = {
|
|
8436
8430
|
clientType: options.clientType,
|
|
8437
8431
|
clientId: options.clientId,
|
|
@@ -8452,30 +8446,24 @@ var require_dist_node13 = __commonJS({
|
|
|
8452
8446
|
async function deleteToken(options) {
|
|
8453
8447
|
const request$1 = options.request || request.request;
|
|
8454
8448
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8455
|
-
return request$1(
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
access_token: options.token
|
|
8463
|
-
}
|
|
8464
|
-
);
|
|
8449
|
+
return request$1("DELETE /applications/{client_id}/token", {
|
|
8450
|
+
headers: {
|
|
8451
|
+
authorization: `basic ${auth}`
|
|
8452
|
+
},
|
|
8453
|
+
client_id: options.clientId,
|
|
8454
|
+
access_token: options.token
|
|
8455
|
+
});
|
|
8465
8456
|
}
|
|
8466
8457
|
async function deleteAuthorization(options) {
|
|
8467
8458
|
const request$1 = options.request || request.request;
|
|
8468
8459
|
const auth = btoa(`${options.clientId}:${options.clientSecret}`);
|
|
8469
|
-
return request$1(
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
access_token: options.token
|
|
8477
|
-
}
|
|
8478
|
-
);
|
|
8460
|
+
return request$1("DELETE /applications/{client_id}/grant", {
|
|
8461
|
+
headers: {
|
|
8462
|
+
authorization: `basic ${auth}`
|
|
8463
|
+
},
|
|
8464
|
+
client_id: options.clientId,
|
|
8465
|
+
access_token: options.token
|
|
8466
|
+
});
|
|
8479
8467
|
}
|
|
8480
8468
|
exports2.VERSION = VERSION;
|
|
8481
8469
|
exports2.checkToken = checkToken;
|
|
@@ -8589,7 +8577,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8589
8577
|
endpoint.headers.authorization = `token ${token}`;
|
|
8590
8578
|
return request2(endpoint);
|
|
8591
8579
|
}
|
|
8592
|
-
var VERSION = "4.0.
|
|
8580
|
+
var VERSION = "4.0.3";
|
|
8593
8581
|
function createOAuthDeviceAuth(options) {
|
|
8594
8582
|
const requestWithDefaults = options.request || request.request.defaults({
|
|
8595
8583
|
headers: {
|
|
@@ -8637,7 +8625,7 @@ var require_dist_node15 = __commonJS({
|
|
|
8637
8625
|
var authOauthDevice = require_dist_node14();
|
|
8638
8626
|
var oauthMethods = require_dist_node13();
|
|
8639
8627
|
var btoa = _interopDefault(require_btoa_node());
|
|
8640
|
-
var VERSION = "2.0.
|
|
8628
|
+
var VERSION = "2.0.4";
|
|
8641
8629
|
async function getAuthentication(state) {
|
|
8642
8630
|
if ("code" in state.strategyOptions) {
|
|
8643
8631
|
const {
|
|
@@ -12765,7 +12753,7 @@ var require_dist_node18 = __commonJS({
|
|
|
12765
12753
|
parse
|
|
12766
12754
|
});
|
|
12767
12755
|
}
|
|
12768
|
-
var VERSION = "7.0.
|
|
12756
|
+
var VERSION = "7.0.3";
|
|
12769
12757
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
12770
12758
|
var DEFAULTS = {
|
|
12771
12759
|
method: "GET",
|
|
@@ -12851,7 +12839,7 @@ var require_dist_node20 = __commonJS({
|
|
|
12851
12839
|
var isPlainObject = require_is_plain_object();
|
|
12852
12840
|
var nodeFetch = _interopDefault(require_lib3());
|
|
12853
12841
|
var requestError = require_dist_node19();
|
|
12854
|
-
var VERSION = "6.2.
|
|
12842
|
+
var VERSION = "6.2.2";
|
|
12855
12843
|
function getBufferResponse(response) {
|
|
12856
12844
|
return response.arrayBuffer();
|
|
12857
12845
|
}
|