@cloudsnorkel/cdk-github-runners 0.8.3 → 0.9.0

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.
Files changed (87) hide show
  1. package/.jsii +2257 -744
  2. package/API.md +2005 -558
  3. package/README.md +32 -34
  4. package/assets/docker-images/codebuild/linux-arm64/Dockerfile +2 -0
  5. package/assets/docker-images/codebuild/linux-x64/Dockerfile +2 -0
  6. package/assets/docker-images/fargate/linux-arm64/Dockerfile +2 -0
  7. package/assets/docker-images/fargate/linux-x64/Dockerfile +2 -0
  8. package/assets/docker-images/lambda/linux-arm64/Dockerfile +3 -1
  9. package/assets/docker-images/lambda/linux-arm64/runner.sh +1 -1
  10. package/assets/docker-images/lambda/linux-x64/Dockerfile +3 -1
  11. package/assets/docker-images/lambda/linux-x64/runner.sh +1 -1
  12. package/assets/lambdas/aws-image-builder-versioner.lambda/index.js +42 -27
  13. package/assets/lambdas/setup.lambda/index.html +12 -12
  14. package/lib/index.js +7 -3
  15. package/lib/lambdas/aws-image-builder-versioner-function.js +2 -2
  16. package/lib/lambdas/aws-image-builder-versioner.lambda.js +43 -27
  17. package/lib/lambdas/build-image-function.js +2 -2
  18. package/lib/lambdas/build-image.lambda.js +4 -4
  19. package/lib/lambdas/delete-ami-function.js +2 -2
  20. package/lib/lambdas/delete-ami.lambda.js +4 -4
  21. package/lib/lambdas/delete-runner-function.js +2 -2
  22. package/lib/lambdas/delete-runner.lambda.js +2 -2
  23. package/lib/lambdas/github.js +3 -3
  24. package/lib/lambdas/setup-function.js +2 -2
  25. package/lib/lambdas/setup.lambda.js +16 -16
  26. package/lib/lambdas/status-function.js +2 -2
  27. package/lib/lambdas/status.lambda.js +5 -5
  28. package/lib/lambdas/token-retriever-function.js +2 -2
  29. package/lib/lambdas/token-retriever.lambda.js +2 -2
  30. package/lib/lambdas/update-lambda-function.js +2 -2
  31. package/lib/lambdas/webhook-handler-function.js +2 -2
  32. package/lib/lambdas/webhook-handler.lambda.js +2 -2
  33. package/lib/providers/codebuild.d.ts +24 -4
  34. package/lib/providers/codebuild.js +43 -13
  35. package/lib/providers/common.d.ts +17 -39
  36. package/lib/providers/common.js +26 -16
  37. package/lib/providers/ec2.d.ts +23 -5
  38. package/lib/providers/ec2.js +43 -12
  39. package/lib/providers/fargate.d.ts +21 -4
  40. package/lib/providers/fargate.js +50 -20
  41. package/lib/providers/image-builders/api.d.ts +15 -0
  42. package/lib/providers/image-builders/api.js +47 -0
  43. package/lib/providers/image-builders/aws-image-builder/ami.d.ts +43 -0
  44. package/lib/providers/image-builders/aws-image-builder/ami.js +81 -0
  45. package/lib/providers/image-builders/aws-image-builder/builder.d.ts +133 -0
  46. package/lib/providers/image-builders/aws-image-builder/builder.js +488 -0
  47. package/lib/providers/image-builders/aws-image-builder/common.d.ts +10 -0
  48. package/lib/providers/image-builders/aws-image-builder/common.js +46 -0
  49. package/lib/providers/image-builders/aws-image-builder/container.d.ts +58 -0
  50. package/lib/providers/image-builders/aws-image-builder/container.js +63 -0
  51. package/lib/providers/image-builders/{ami.d.ts → aws-image-builder/deprecated/ami.d.ts} +8 -4
  52. package/lib/providers/image-builders/aws-image-builder/deprecated/ami.js +239 -0
  53. package/lib/providers/image-builders/aws-image-builder/deprecated/common.d.ts +34 -0
  54. package/lib/providers/image-builders/aws-image-builder/deprecated/common.js +139 -0
  55. package/lib/providers/image-builders/{container.d.ts → aws-image-builder/deprecated/container.d.ts} +8 -4
  56. package/lib/providers/image-builders/aws-image-builder/deprecated/container.js +222 -0
  57. package/lib/providers/image-builders/aws-image-builder/deprecated/index.d.ts +5 -0
  58. package/lib/providers/image-builders/aws-image-builder/deprecated/index.js +22 -0
  59. package/lib/providers/image-builders/{linux-components.d.ts → aws-image-builder/deprecated/linux-components.d.ts} +4 -2
  60. package/lib/providers/image-builders/aws-image-builder/deprecated/linux-components.js +180 -0
  61. package/lib/providers/image-builders/{windows-components.d.ts → aws-image-builder/deprecated/windows-components.d.ts} +4 -2
  62. package/lib/providers/image-builders/aws-image-builder/deprecated/windows-components.js +142 -0
  63. package/lib/providers/image-builders/aws-image-builder/index.d.ts +5 -0
  64. package/lib/providers/image-builders/aws-image-builder/index.js +22 -0
  65. package/lib/providers/image-builders/codebuild-deprecated.d.ts +195 -0
  66. package/lib/providers/image-builders/codebuild-deprecated.js +373 -0
  67. package/lib/providers/image-builders/codebuild.d.ts +26 -157
  68. package/lib/providers/image-builders/codebuild.js +119 -211
  69. package/lib/providers/image-builders/common.d.ts +164 -107
  70. package/lib/providers/image-builders/common.js +30 -272
  71. package/lib/providers/image-builders/components.d.ts +114 -0
  72. package/lib/providers/image-builders/components.js +534 -0
  73. package/lib/providers/image-builders/index.d.ts +6 -4
  74. package/lib/providers/image-builders/index.js +13 -7
  75. package/lib/providers/image-builders/static.d.ts +4 -3
  76. package/lib/providers/image-builders/static.js +10 -10
  77. package/lib/providers/index.js +7 -3
  78. package/lib/providers/lambda.d.ts +25 -6
  79. package/lib/providers/lambda.js +50 -13
  80. package/lib/runner.d.ts +3 -5
  81. package/lib/runner.js +3 -3
  82. package/lib/secrets.js +3 -3
  83. package/package.json +12 -16
  84. package/lib/providers/image-builders/ami.js +0 -280
  85. package/lib/providers/image-builders/container.js +0 -247
  86. package/lib/providers/image-builders/linux-components.js +0 -177
  87. package/lib/providers/image-builders/windows-components.js +0 -139
package/README.md CHANGED
@@ -99,7 +99,7 @@ let dbSg: ec2.SecurityGroup;
99
99
  let bucket: s3.Bucket;
100
100
 
101
101
  // create a custom CodeBuild provider
102
- const myProvider = new CodeBuildRunner(this, 'codebuild runner', {
102
+ const myProvider = new CodeBuildRunnerProvider(this, 'codebuild runner', {
103
103
  label: 'my-codebuild',
104
104
  vpc: vpc,
105
105
  securityGroup: runnerSg,
@@ -117,23 +117,25 @@ new GitHubRunners(this, 'runners', {
117
117
  Another way to customize runners is by modifying the image used to spin them up. The image contains the [runner][5], any required dependencies, and integration code with the provider. You may choose to customize this image by adding more packages, for example.
118
118
 
119
119
  ```typescript
120
- const myBuilder = new CodeBuildImageBuilder(this, 'image builder', {
121
- dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
122
- runnerVersion: RunnerVersion.specific('2.291.0'),
123
- rebuildInterval: Duration.days(14),
120
+ const myBuilder = CodeBuildRunnerProvider.imageBuilder(this, 'image builder', {
121
+ dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
122
+ runnerVersion: RunnerVersion.specific('2.291.0'),
123
+ rebuildInterval: Duration.days(14),
124
124
  });
125
- myBuilder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');
125
+ myBuilder.addComponent(
126
+ RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] })
127
+ );
126
128
 
127
129
  const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
128
- label: 'customized-fargate',
129
- vpc: vpc,
130
- securityGroup: runnerSg,
131
- imageBuilder: myBuilder,
130
+ label: 'customized-fargate',
131
+ vpc: vpc,
132
+ securityGroup: runnerSg,
133
+ imageBuilder: myBuilder,
132
134
  });
133
135
 
134
136
  // create the runner infrastructure
135
- new GitHubRunners(stack, 'runners', {
136
- providers: [myProvider],
137
+ new GitHubRunners(this, 'runners', {
138
+ providers: [myProvider],
137
139
  });
138
140
  ```
139
141
 
@@ -149,27 +151,25 @@ jobs:
149
151
  - run: echo hello world
150
152
  ```
151
153
 
152
- Windows images must be built with AWS Image Builder.
154
+ Windows images can also be customized the same way.
153
155
 
154
156
  ```typescript
155
- const myWindowsBuilder = new ContainerImageBuilder(this, 'Windows image builder', {
157
+ const myWindowsBuilder = FargateRunnerProvider.imageBuilder(this, 'Windows image builder', {
156
158
  architecture: Architecture.X86_64,
157
159
  os: Os.WINDOWS,
158
160
  runnerVersion: RunnerVersion.specific('2.291.0'),
159
161
  rebuildInterval: Duration.days(14),
160
162
  });
161
- myWindowsBuilder.addComponent(new ImageBuilderComponent(this, 'Ninja Component',
162
- {
163
- displayName: 'Ninja',
164
- description: 'Download and install Ninja build system',
165
- platform: 'Windows',
163
+ myWindowsBuilder.addComponent(
164
+ RunnerImageComponent.custom({
165
+ name: 'Ninja',
166
166
  commands: [
167
167
  'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
168
168
  'Expand-Archive ninja.zip -DestinationPath C:\\actions',
169
169
  'del ninja.zip',
170
170
  ],
171
- }
172
- ));
171
+ })
172
+ );
173
173
 
174
174
  const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
175
175
  label: 'customized-windows-fargate',
@@ -178,26 +178,24 @@ const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
178
178
  imageBuidler: myWindowsBuilder,
179
179
  });
180
180
 
181
- // create the runner infrastructure
182
- new GitHubRunners(stack, 'runners', {
181
+ new GitHubRunners(this, 'runners', {
183
182
  providers: [myProvider],
184
183
  });
185
184
  ```
186
185
 
187
- The runner OS and architecture is determined by the image it is set to use. For example, to create a CodeBuild runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` and use the `LINUX_ARM64_DOCKERFILE_PATH` constant.
186
+ The runner OS and architecture is determined by the image it is set to use. For example, to create a Fargate runner provider for ARM64 set the `architecture` property for the image builder to `Architecture.ARM64` in the image builder properties.
188
187
 
189
188
  ```typescript
190
- new GitHubRunners(stack, 'runners', {
191
- providers: [
192
- new FargateRunnerProvider(this, 'fargate runner', {
193
- labels: ['arm64', 'fargate'],
194
- imageBuidler: new CodeBuildImageBuilder(this, 'image builder', {
195
- architecture: Architecture.ARM64,
196
- os: Os.LINUX,
197
- dockerfilePath: FargateRunner.LINUX_ARM64_DOCKERFILE_PATH,
198
- }),
189
+ new GitHubRunners(this, 'runners', {
190
+ providers: [
191
+ new FargateRunnerProvider(this, 'fargate runner', {
192
+ labels: ['arm64', 'fargate'],
193
+ imageBuidler: FargateRunnerProvider.imageBuilder(this, 'image builder', {
194
+ architecture: Architecture.ARM64,
195
+ os: Os.LINUX,
199
196
  }),
200
- ],
197
+ }),
198
+ ],
201
199
  });
202
200
  ```
203
201
 
@@ -1,3 +1,5 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  ARG BASE_IMAGE="public.ecr.aws/lts/ubuntu:20.04"
2
4
  FROM $BASE_IMAGE
3
5
 
@@ -1,3 +1,5 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  ARG BASE_IMAGE="public.ecr.aws/lts/ubuntu:20.04"
2
4
  FROM $BASE_IMAGE
3
5
 
@@ -1,3 +1,5 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  ARG BASE_IMAGE="public.ecr.aws/lts/ubuntu:20.04"
2
4
  FROM $BASE_IMAGE
3
5
 
@@ -1,3 +1,5 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  ARG BASE_IMAGE="public.ecr.aws/lts/ubuntu:20.04"
2
4
  FROM $BASE_IMAGE
3
5
 
@@ -1,9 +1,11 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  # https://docs.aws.amazon.com/lambda/latest/dg/images-create.html
2
4
 
3
5
  ARG BASE_IMAGE="public.ecr.aws/lambda/nodejs:14-arm64"
4
6
  FROM $BASE_IMAGE
5
7
 
6
- WORKDIR /runner
8
+ WORKDIR /home/runner
7
9
 
8
10
  # install extra certificates
9
11
  COPY extra_certs/. /tmp/certs/
@@ -5,7 +5,7 @@ set -e -u -o pipefail
5
5
  # cleanup
6
6
  find /tmp -mindepth 1 -maxdepth 1 -exec rm -rf '{}' \;
7
7
  # copy runner code (it needs a writable directory)
8
- cp -r /runner /tmp/
8
+ cp -r /home/runner /tmp/
9
9
  cd /tmp/runner
10
10
  # setup home directory
11
11
  mkdir /tmp/home
@@ -1,9 +1,11 @@
1
+ # DEPRECATED - use RunnerImageBuilder instead
2
+
1
3
  # https://docs.aws.amazon.com/lambda/latest/dg/images-create.html
2
4
 
3
5
  ARG BASE_IMAGE="public.ecr.aws/lambda/nodejs:14-x86_64"
4
6
  FROM $BASE_IMAGE
5
7
 
6
- WORKDIR /runner
8
+ WORKDIR /home/runner
7
9
 
8
10
  # install extra certificates
9
11
  COPY extra_certs/. /tmp/certs/
@@ -5,7 +5,7 @@ set -e -u -o pipefail
5
5
  # cleanup
6
6
  find /tmp -mindepth 1 -maxdepth 1 -exec rm -rf '{}' \;
7
7
  # copy runner code (it needs a writable directory)
8
- cp -r /runner /tmp/
8
+ cp -r /home/runner /tmp/
9
9
  cd /tmp/runner
10
10
  # setup home directory
11
11
  mkdir /tmp/home
@@ -2453,51 +2453,66 @@ async function handler(event, context) {
2453
2453
  try {
2454
2454
  switch (objectType) {
2455
2455
  case "Component": {
2456
- const result = await ib.listComponents({
2457
- filters: [{
2458
- name: "name",
2459
- values: [objectName]
2460
- }]
2461
- }).promise();
2462
- allVersions = result.componentVersionList.map((i) => i.version || "1.0.0");
2456
+ let result = {};
2457
+ do {
2458
+ result = await ib.listComponents({
2459
+ filters: [{
2460
+ name: "name",
2461
+ values: [objectName]
2462
+ }],
2463
+ nextToken: result.nextToken
2464
+ }).promise();
2465
+ allVersions = allVersions.concat(result.componentVersionList.map((i) => i.version || "1.0.0"));
2466
+ } while (result.nextToken);
2463
2467
  break;
2464
2468
  }
2465
2469
  case "ImageRecipe": {
2466
- const result = await ib.listImageRecipes({
2467
- filters: [{
2468
- name: "name",
2469
- values: [objectName]
2470
- }]
2471
- }).promise();
2472
- allVersions = result.imageRecipeSummaryList.map((i) => {
2473
- var _a;
2474
- return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
2475
- });
2470
+ let result = {};
2471
+ do {
2472
+ result = await ib.listImageRecipes({
2473
+ filters: [{
2474
+ name: "name",
2475
+ values: [objectName]
2476
+ }],
2477
+ nextToken: result.nextToken
2478
+ }).promise();
2479
+ allVersions = allVersions.concat(result.imageRecipeSummaryList.map((i) => {
2480
+ var _a;
2481
+ return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
2482
+ }));
2483
+ } while (result.nextToken);
2476
2484
  break;
2477
2485
  }
2478
2486
  case "ContainerRecipe": {
2479
- const result = await ib.listContainerRecipes({
2480
- filters: [{
2481
- name: "name",
2482
- values: [objectName]
2483
- }]
2484
- }).promise();
2485
- allVersions = result.containerRecipeSummaryList.map((i) => {
2486
- var _a;
2487
- return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
2488
- });
2487
+ let result = {};
2488
+ do {
2489
+ result = await ib.listContainerRecipes({
2490
+ filters: [{
2491
+ name: "name",
2492
+ values: [objectName]
2493
+ }],
2494
+ nextToken: result.nextToken
2495
+ }).promise();
2496
+ allVersions = allVersions.concat(result.containerRecipeSummaryList.map((i) => {
2497
+ var _a;
2498
+ return ((_a = i.arn) == null ? void 0 : _a.split("/").pop()) || "1.0.0";
2499
+ }));
2500
+ } while (result.nextToken);
2489
2501
  break;
2490
2502
  }
2491
2503
  }
2492
2504
  } catch (e) {
2493
2505
  if (e.code !== "ResourceNotFoundException") {
2494
2506
  throw e;
2507
+ } else {
2508
+ console.log("Resource not found, assuming first version");
2495
2509
  }
2496
2510
  }
2497
2511
  version = (0, import_semver.maxSatisfying)(allVersions, ">=0.0.0");
2498
2512
  if (version === null) {
2499
2513
  version = "1.0.0";
2500
2514
  }
2515
+ console.log(`Found versions ${allVersions} -- latest is ${version}`);
2501
2516
  version = (0, import_semver.inc)(version, "patch");
2502
2517
  if (version === null) {
2503
2518
  throw new Error("Unable to bump version");
@@ -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 p of n)if(p.type==="childList")for(const c of p.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function o(n){const p={};return n.integrity&&(p.integrity=n.integrity),n.referrerpolicy&&(p.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?p.credentials="include":n.crossorigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function i(n){if(n.ep)return;n.ep=!0;const p=o(n);fetch(n.href,p)}})();function Q(){}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&&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 ce(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function M(e,t){e.value=t==null?"":t}let ke;function te(e){ke=e}const Z=[],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 Y=0;function ze(){if(Y!==0)return;const e=ke;do{try{for(;Y<Z.length;){const t=Z[Y];Y++,te(t),Ke(t.$$)}}catch(t){throw Z.length=0,Y=0,t}for(te(null),Z.length=0,Y=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(Z.length);for(;Te.length;)Te.pop()();be=!1,he.clear(),te(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:p}=e.$$;n&&n.m(t,o),i||ve(()=>{const c=e.$$.on_mount.map(Le).filter(Ue);e.$$.on_destroy?e.$$.on_destroy.push(...c):j(c),e.$$.on_mount=[]}),p.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&&(Z.push(e),Je(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ve(e,t,o,i,n,p,c,u=[-1]){const v=ke;te(e);const a=e.$$={fragment:null,ctx:[],props:p,update:Q,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};c&&c(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()}te(v)}class Xe{$destroy(){Ze(this,1),this.$destroy=Q}$on(t,o){if(!Ue(o))return Q;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,p,c,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>.`,p=b(),c=r("input"),s(c,"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,p),l(i,c),M(c,e[1]),u||(v=$(c,"input",e[15]),u=!0)},p(a,h){h&2&&c.value!==a[1]&&M(c,a[1])},d(a){a&&T(t),a&&T(o),a&&T(i),u=!1,v()}}}function He(e){let t,o,i,n,p,c,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
8
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const f of l)if(f.type==="childList")for(const a of f.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function o(l){const f={};return l.integrity&&(f.integrity=l.integrity),l.referrerpolicy&&(f.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?f.credentials="include":l.crossorigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function n(l){if(l.ep)return;l.ep=!0;const f=o(l);fetch(l.href,f)}})();function X(){}function $e(e){return e()}function Te(){return Object.create(null)}function q(e){e.forEach($e)}function ze(e){return typeof e=="function"}function Me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function je(e){return Object.keys(e).length===0}function i(e,t){e.appendChild(t)}function T(e,t,o){e.insertBefore(t,o||null)}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function s(e){return document.createElement(e)}function G(e){return document.createTextNode(e)}function b(){return G(" ")}function qe(){return G("")}function z(e,t,o,n){return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)}function r(e,t,o){o==null?e.removeAttribute(t):e.getAttribute(t)!==o&&e.setAttribute(t,o)}function ye(e){let t;return{p(...o){t=o,t.forEach(n=>e.push(n))},r(){t.forEach(o=>e.splice(e.indexOf(o),1))}}}function Be(e){return e===""?null:+e}function Je(e){return Array.from(e.childNodes)}function ce(e,t){t=""+t,e.data!==t&&(e.data=t)}function j(e,t){e.value=t==null?"":t}let we;function le(e){we=e}const Q=[],He=[];let V=[];const Ne=[],Ke=Promise.resolve();let ge=!1;function We(){ge||(ge=!0,Ke.then(De))}function ve(e){V.push(e)}const me=new Set;let Z=0;function De(){if(Z!==0)return;const e=we;do{try{for(;Z<Q.length;){const t=Q[Z];Z++,le(t),Fe(t.$$)}}catch(t){throw Q.length=0,Z=0,t}for(le(null),Q.length=0,Z=0;He.length;)He.pop()();for(let t=0;t<V.length;t+=1){const o=V[t];me.has(o)||(me.add(o),o())}V.length=0}while(Q.length);for(;Ne.length;)Ne.pop()();ge=!1,me.clear(),le(e)}function Fe(e){if(e.fragment!==null){e.update(),q(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ve)}}function Ye(e){const t=[],o=[];V.forEach(n=>e.indexOf(n)===-1?t.push(n):o.push(n)),o.forEach(n=>n()),V=t}const Ze=new Set;function Qe(e,t){e&&e.i&&(Ze.delete(e),e.i(t))}function Ve(e,t,o,n){const{fragment:l,after_update:f}=e.$$;l&&l.m(t,o),n||ve(()=>{const a=e.$$.on_mount.map($e).filter(ze);e.$$.on_destroy?e.$$.on_destroy.push(...a):q(a),e.$$.on_mount=[]}),f.forEach(ve)}function Xe(e,t){const o=e.$$;o.fragment!==null&&(Ye(o.after_update),q(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function xe(e,t){e.$$.dirty[0]===-1&&(Q.push(e),We(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function et(e,t,o,n,l,f,a,c=[-1]){const g=we;le(e);const u=e.$$={fragment:null,ctx:[],props:f,update:X,not_equal:l,bound:Te(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(g?g.$$.context:[])),callbacks:Te(),dirty:c,skip_bound:!1,root:t.target||g.$$.root};a&&a(u.root);let h=!1;if(u.ctx=o?o(e,t.props||{},(v,p,...S)=>{const k=S.length?S[0]:p;return u.ctx&&l(u.ctx[v],u.ctx[v]=k)&&(!u.skip_bound&&u.bound[v]&&u.bound[v](k),h&&xe(e,v)),p}):[],u.update(),h=!0,q(u.before_update),u.fragment=n?n(u.ctx):!1,t.target){if(t.hydrate){const v=Je(t.target);u.fragment&&u.fragment.l(v),v.forEach(C)}else u.fragment&&u.fragment.c();t.intro&&Qe(e.$$.fragment),Ve(e,t.target,t.anchor,t.customElement),De()}le(g)}class tt{$destroy(){Xe(this,1),this.$destroy=X}$on(t,o){if(!ze(o))return X;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(o),()=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)}}$set(t){this.$$set&&!je(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Ie(e){let t,o,n,l,f,a,c,g;return{c(){t=s("h3"),t.textContent="GitHub Enterprise Server Domain",o=b(),n=s("div"),l=s("p"),l.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>.`,f=b(),a=s("input"),r(a,"class","form-control"),r(n,"class","px-3 py-3")},m(u,h){T(u,t,h),T(u,o,h),T(u,n,h),i(n,l),i(n,f),i(n,a),j(a,e[1]),c||(g=z(a,"input",e[15]),c=!0)},p(u,h){h&2&&a.value!==u[1]&&j(a,u[1])},d(u){u&&C(t),u&&C(o),u&&C(n),c=!1,g()}}}function Oe(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I,H;return O=ye(e[13][1]),{c(){t=s("h3"),t.textContent="Authentication Type",o=b(),n=s("div"),l=s("p"),l.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.`,p=b(),c=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(c,"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,p),l(i,c),l(c,u),u.checked=u.__value===e[2],l(c,v),l(c,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,p,c,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"),p=I("The "),c=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(c,"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,p),l(n,c),l(c,u),l(n,a),l(n,h),l(n,g),l(n,f),l(n,O),l(i,k),l(i,S),M(S,e[7]),C||(d=$(S,"input",e[25]),C=!0)},p(_,A){A&2&&v!==(v="https://"+_[1]+"/settings/tokens")&&s(c,"href",v),A&128&&S.value!==_[7]&&M(S,_[7])},d(_){_&&T(t),_&&T(o),_&&T(i),C=!1,d()}}}function et(e){let t,o,i,n,p,c,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&#39;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>.`,p=b(),c=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(c,"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,p),l(i,c),l(c,u),l(c,v),l(c,a),l(a,h),M(h,e[5]),l(i,g),l(i,f),l(f,O),l(f,k),l(f,S),l(S,C),M(C,e[6]),d||(_=[$(h,"input",e[23]),$(C,"input",e[24])],d=!0)},p(A,E){E&32&&$e(h.value)!==A[5]&&M(h,A[5]),E&64&&M(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,p,c,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
12
+ you have previously created an app, you can choose to use an existing app.`,f=b(),a=s("div"),c=s("input"),g=b(),u=s("label"),u.innerHTML="New GitHub App <b>(recommended)</b>",h=b(),v=s("div"),p=s("input"),S=b(),k=s("label"),k.textContent="Existing GitHub App",A=b(),E=s("div"),_=s("input"),m=b(),w=s("label"),w.textContent="Personal Authentication Token",r(c,"class","form-check-input"),r(c,"type","radio"),c.__value="newApp",c.value=c.__value,r(c,"id","newApp"),r(u,"class","form-check-label"),r(u,"for","newApp"),r(a,"class","form-check"),r(p,"class","form-check-input"),r(p,"type","radio"),p.__value="existingApp",p.value=p.__value,r(p,"id","existingApp"),r(k,"class","form-check-label"),r(k,"for","existingApp"),r(v,"class","form-check"),r(_,"class","form-check-input"),r(_,"type","radio"),_.__value="pat",_.value=_.__value,r(_,"id","pat"),r(w,"class","form-check-label"),r(w,"for","pat"),r(E,"class","form-check"),r(n,"class","px-3 py-3"),O.p(c,p,_)},m(d,N){T(d,t,N),T(d,o,N),T(d,n,N),i(n,l),i(n,f),i(n,a),i(a,c),c.checked=c.__value===e[2],i(a,g),i(a,u),i(n,h),i(n,v),i(v,p),p.checked=p.__value===e[2],i(v,S),i(v,k),i(n,A),i(n,E),i(E,_),_.checked=_.__value===e[2],i(E,m),i(E,w),I||(H=[z(c,"change",e[16]),z(p,"change",e[17]),z(_,"change",e[18])],I=!0)},p(d,N){N&4&&(c.checked=c.__value===d[2]),N&4&&(p.checked=p.__value===d[2]),N&4&&(_.checked=_.__value===d[2])},d(d){d&&C(t),d&&C(o),d&&C(n),O.r(),I=!1,q(H)}}}function nt(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_;return{c(){t=s("h2"),t.textContent="Personal Access Token",o=b(),n=s("div"),l=s("p"),f=G("The "),a=s("a"),c=G("personal access token"),u=G(" must have the "),h=s("code"),h.textContent="repo",v=G(`
13
+ scope enabled. Don't forget to also create a webhook as described in `),p=s("a"),p.textContent="SETUP_GITHUB.md",S=G("."),k=b(),A=s("input"),r(a,"href",g="https://"+e[1]+"/settings/tokens"),r(p,"href","https://github.com/CloudSnorkel/cdk-github-runners/blob/main/SETUP_GITHUB.md"),r(A,"class","form-control"),r(A,"placeholder","Token e.g. ghp_abcdefghijklmnopqrstuvwxyz1234567890"),r(n,"class","px-3 py-3")},m(m,w){T(m,t,w),T(m,o,w),T(m,n,w),i(n,l),i(l,f),i(l,a),i(a,c),i(l,u),i(l,h),i(l,v),i(l,p),i(l,S),i(n,k),i(n,A),j(A,e[7]),E||(_=z(A,"input",e[25]),E=!0)},p(m,w){w&2&&g!==(g="https://"+m[1]+"/settings/tokens")&&r(a,"href",g),w&128&&A.value!==m[7]&&j(A,m[7])},d(m){m&&C(t),m&&C(o),m&&C(n),E=!1,_()}}}function lt(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m;return{c(){t=s("h3"),t.textContent="Existing App Details",o=b(),n=s("div"),l=s("p"),l.innerHTML=`Existing apps must have <code>actions</code> and <code>administration</code> write
14
+ permissions. Don&#39;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>.`,f=b(),a=s("div"),c=s("label"),c.textContent="App Id",g=b(),u=s("div"),h=s("input"),v=b(),p=s("div"),S=s("label"),S.textContent="Private Key",k=b(),A=s("div"),E=s("textarea"),r(c,"for","appid"),r(c,"class","col-sm-2 col-form-label"),r(h,"type","number"),r(h,"class","form-control"),r(h,"id","appid"),r(u,"class","col-sm-10"),r(a,"class","form-group row px-3 py-2"),r(S,"for","pk"),r(S,"class","col-sm-2 col-form-label"),r(E,"class","form-control"),r(E,"id","pk"),r(E,"rows","10"),r(A,"class","col-sm-10"),r(p,"class","form-group row px-3 py-2"),r(n,"class","px-3 py-3")},m(w,O){T(w,t,O),T(w,o,O),T(w,n,O),i(n,l),i(n,f),i(n,a),i(a,c),i(a,g),i(a,u),i(u,h),j(h,e[5]),i(n,v),i(n,p),i(p,S),i(p,k),i(p,A),i(A,E),j(E,e[6]),_||(m=[z(h,"input",e[23]),z(E,"input",e[24])],_=!0)},p(w,O){O&32&&Be(h.value)!==w[5]&&j(h,w[5]),O&64&&j(E,w[6])},d(w){w&&C(t),w&&C(o),w&&C(n),_=!1,q(m)}}}function it(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I=e[0]==="ghes"&&Ge(e),H=e[3]==="org"&&Re(e);return m=ye(e[13][0]),{c(){t=s("h3"),t.textContent="New App Settings",o=b(),n=s("div"),l=s("p"),l.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.`,p=b(),c=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(c,"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,p),l(i,c),l(c,u),u.checked=u.__value===e[3],l(c,v),l(c,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,p,c,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"),p=b(),c=r("label"),c.textContent="Public app",s(t,"class","pt-2"),s(n,"class","form-check-input"),s(n,"type","checkbox"),s(n,"id","public"),s(c,"class","form-check-label"),s(c,"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),n.checked=e[10].public,l(i,p),l(i,c),u||(v=$(n,"change",e[21]),u=!0)},p(a,h){h&1024&&(n.checked=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,p,c,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"),p=I(`What is the slug for your organization? If your repositories have a URL like
18
- `),c=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,p),l(n,c),l(c,u),l(c,v),l(c,a),l(n,h),l(n,g),l(n,f),l(i,O),l(i,k),M(k,e[4]),S||(C=$(k,"input",e[22]),S=!0)},p(d,_){_&2&&ce(v,d[1]),_&16&&k.value!==d[4]&&M(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,p){H(n,t,p),l(t,o)},p(n,p){p&512&&ce(o,n[9]),p&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:Q,d(o){o&&T(t)}}}function Ge(e){let t,o,i,n,p,c;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"),p=I(e[1]),c=I(`
16
+ for repositories under that organization.`,f=b(),a=s("div"),c=s("input"),g=b(),u=s("label"),u.textContent="User app",h=b(),v=s("div"),p=s("input"),S=b(),k=s("label"),k.textContent="Organization app",A=b(),I&&I.c(),E=b(),H&&H.c(),_=qe(),r(c,"class","form-check-input"),r(c,"type","radio"),c.__value="user",c.value=c.__value,r(c,"id","userScope"),r(u,"class","form-check-label"),r(u,"for","userScope"),r(a,"class","form-check"),r(p,"class","form-check-input"),r(p,"type","radio"),p.__value="org",p.value=p.__value,r(p,"id","orgScope"),r(k,"class","form-check-label"),r(k,"for","orgScope"),r(v,"class","form-check"),r(n,"class","px-3 py-3"),m.p(c,p)},m(d,N){T(d,t,N),T(d,o,N),T(d,n,N),i(n,l),i(n,f),i(n,a),i(a,c),c.checked=c.__value===e[3],i(a,g),i(a,u),i(n,h),i(n,v),i(v,p),p.checked=p.__value===e[3],i(v,S),i(v,k),i(n,A),I&&I.m(n,null),T(d,E,N),H&&H.m(d,N),T(d,_,N),w||(O=[z(c,"change",e[19]),z(p,"change",e[20])],w=!0)},p(d,N){N&8&&(c.checked=c.__value===d[3]),N&8&&(p.checked=p.__value===d[3]),d[0]==="ghes"?I?I.p(d,N):(I=Ge(d),I.c(),I.m(n,null)):I&&(I.d(1),I=null),d[3]==="org"?H?H.p(d,N):(H=Re(d),H.c(),H.m(_.parentNode,_)):H&&(H.d(1),H=null)},d(d){d&&C(t),d&&C(o),d&&C(n),I&&I.d(),d&&C(E),H&&H.d(d),d&&C(_),m.r(),w=!1,q(O)}}}function Ge(e){let t,o,n,l,f,a,c,g;return{c(){t=s("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(),n=s("div"),l=s("input"),f=b(),a=s("label"),a.textContent="Public app",r(t,"class","pt-2"),r(l,"class","form-check-input"),r(l,"type","checkbox"),r(l,"id","public"),r(a,"class","form-check-label"),r(a,"for","public"),r(n,"class","form-check")},m(u,h){T(u,t,h),T(u,o,h),T(u,n,h),i(n,l),l.checked=e[10].public,i(n,f),i(n,a),c||(g=z(l,"change",e[21]),c=!0)},p(u,h){h&1024&&(l.checked=u[10].public)},d(u){u&&C(t),u&&C(o),u&&C(n),c=!1,g()}}}function Re(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E;return{c(){t=s("h3"),t.textContent="Organization name",o=b(),n=s("div"),l=s("p"),f=G(`What is the slug for your organization? If your repositories have a URL like
18
+ `),a=s("code"),c=G("https://"),g=G(e[1]),u=G("/MyOrg/my-repo"),h=G(`
19
+ then your organization slug is `),v=s("code"),v.textContent="MyOrg",p=G("."),S=b(),k=s("input"),r(k,"class","form-control"),r(n,"class","px-3 py-3")},m(_,m){T(_,t,m),T(_,o,m),T(_,n,m),i(n,l),i(l,f),i(l,a),i(a,c),i(a,g),i(a,u),i(l,h),i(l,v),i(l,p),i(n,S),i(n,k),j(k,e[4]),A||(E=z(k,"input",e[22]),A=!0)},p(_,m){m&2&&ce(g,_[1]),m&16&&k.value!==_[4]&&j(k,_[4])},d(_){_&&C(t),_&&C(o),_&&C(n),A=!1,E()}}}function ot(e){let t,o,n;return{c(){t=s("div"),o=G(e[9]),r(t,"class",n="alert alert-"+(e[8]?"success":"danger")),r(t,"role","alert")},m(l,f){T(l,t,f),i(t,o)},p(l,f){f&512&&ce(o,l[9]),f&256&&n!==(n="alert alert-"+(l[8]?"success":"danger"))&&r(t,"class",n)},d(l){l&&C(t)}}}function rt(e){let t;return{c(){t=s("p"),t.textContent="This button will be enabled once all the questions above are answered."},m(o,n){T(o,t,n)},p:X,d(o){o&&C(t)}}}function Pe(e){let t,o,n,l,f,a;return{c(){t=s("p"),o=s("b"),o.textContent="WARNING:",n=G(" using a public app means anyone with access to "),l=s("code"),f=G(e[1]),a=G(`
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,v){H(u,t,v),l(t,o),l(t,i),l(t,n),l(n,p),l(t,c)},p(u,v){v&2&&ce(p,u[1])},d(u){u&&T(t)}}}function it(e){let t,o,i,n,p,c,u,v,a,h,g,f,O,k,S,C,d,_,A,E,N,m,w,ne,q,le,V,X,x,ee,B,z,pe,fe,J,ie=Pe(e[2])+"",de,oe,ye,K,W,se,re,_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 ue=Ae(e),D=ue(e),U=e[10].public&&e[2]==="newApp"&&Ge(e);return{c(){t=r("main"),o=r("div"),i=r("div"),n=r("form"),p=r("h1"),p.textContent="Setup GitHub Runners",c=b(),u=r("p"),v=I(`Answer all the questions on this page to automatically configure GitHub integration and get the
22
+ implications before continuing.`),r(o,"class","text-danger")},m(c,g){T(c,t,g),i(t,o),i(t,n),i(t,l),i(l,f),i(t,a)},p(c,g){g&2&&ce(f,c[1])},d(c){c&&C(t)}}}function st(e){let t,o,n,l,f,a,c,g,u,h,v,p,S,k,A,E,_,m,w,O,I,H,d,N,J,ie,x,ee,te,ne,D,B,fe,pe,K,oe=Ue(e[2])+"",de,re,Ee,W,F,se,ue,_e,he,Ae,P=e[0]==="ghes"&&Ie(e),L=e[0]&&Oe(e);function Ce(y,R){if(y[2]==="newApp")return it;if(y[2]==="existingApp")return lt;if(y[2]==="pat")return nt}let Y=Ce(e),U=Y&&Y(e);function Se(y,R){return y[9]===void 0?rt:ot}let ae=Se(e),M=ae(e),$=e[10].public&&e[2]==="newApp"&&Pe(e);return _e=ye(e[13][2]),{c(){t=s("main"),o=s("div"),n=s("div"),l=s("form"),f=s("h1"),f.textContent="Setup GitHub Runners",a=b(),c=s("p"),g=G(`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=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"),ne=b(),q=r("label"),q.textContent="GitHub Enterprise Server",le=b(),R&&R.c(),V=b(),P&&P.c(),X=b(),L&&L.c(),x=b(),ee=r("h2"),ee.textContent="Finish Setup",B=b(),z=r("div"),D.c(),pe=b(),U&&U.c(),fe=b(),J=r("button"),de=I(ie),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=oe=Re(e[0],e[2],e[5],e[6],e[7],e[8]),s(z,"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=se=JSON.stringify(e[10]),s(K,"action",re="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,p),l(n,c),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,ne),l(m,q),l(n,le),R&&R.m(n,null),l(n,V),P&&P.m(n,null),l(n,X),L&&L.m(n,null),l(n,x),l(n,ee),l(n,B),l(n,z),D.m(z,null),l(z,pe),U&&U.m(z,null),l(z,fe),l(z,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,V)):R&&(R.d(1),R=null),y[0]?P?P.p(y,G):(P=He(y),P.c(),P.m(n,X)):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,x))),ue===(ue=Ae(y))&&D?D.p(y,G):(D.d(1),D=ue(y),D&&(D.c(),D.m(z,pe))),y[10].public&&y[2]==="newApp"?U?U.p(y,G):(U=Ge(y),U.c(),U.m(z,fe)):U&&(U.d(1),U=null),G&4&&ie!==(ie=Pe(y[2])+"")&&ce(de,ie),G&485&&oe!==(oe=Re(y[0],y[2],y[5],y[6],y[7],y[8]))&&(J.disabled=oe),G&1024&&se!==(se=JSON.stringify(y[10]))&&(W.value=se),G&26&&re!==(re="https://"+y[1]+"/"+(y[3]==="org"?`organizations/${y[4]}/`:"")+"settings/apps/new?state="+ge)&&s(K,"action",re)},i:Q,o:Q,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(),D.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,p){return p||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(p=>{i(new Error(`${p} [${n.status}]`))}).catch(i)}).catch(i)})}function st(e,t,o){let i,n="INSERT_DOMAIN_HERE",p,c="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(x){x.preventDefault();function ee(){const B=i==="ghes"?n:"github.com";switch(p){case"newApp":return me("domain",{domain:B}).then(z=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return me("app",{appid:v,pk:a,domain:B});case"pat":return me("pat",{pat:h,domain:B})}}ee().then(B=>{o(9,f=B),o(8,g=!0)}).catch(B=>{o(9,f=`${B}`),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(){p=this.__value,o(2,p)}function E(){p=this.__value,o(2,p)}function N(){p=this.__value,o(2,p)}function m(){c=this.__value,o(3,c)}function w(){c=this.__value,o(3,c)}function ne(){O.public=this.checked,o(10,O)}function q(){u=this.value,o(4,u)}function le(){v=$e(this.value),o(5,v)}function V(){a=this.value,o(6,a)}function X(){h=this.value,o(7,h)}return[i,n,p,c,u,v,a,h,g,f,O,k,C,S,d,_,A,E,N,m,w,ne,q,le,V,X]}class rt extends Xe{constructor(t){super(),Ve(this,t,st,it,Be,{})}}new rt({target:document.getElementById("app")});
24
+ to access it again, edit `),u=s("code"),u.textContent=`${ut}`,h=G(" and run the status function again."),v=b(),p=s("h3"),p.textContent="Choose GitHub Instance",S=b(),k=s("div"),A=s("p"),A.textContent=`Are your repositories hosted on GitHub.com or are you using an on-premise installation of GitHub
25
+ Enterprise Server?`,E=b(),_=s("div"),m=s("input"),w=b(),O=s("label"),O.textContent="GitHub.com",I=b(),H=s("div"),d=s("input"),N=b(),J=s("label"),J.textContent="GitHub Enterprise Server",ie=b(),P&&P.c(),x=b(),L&&L.c(),ee=b(),U&&U.c(),te=b(),ne=s("h2"),ne.textContent="Finish Setup",D=b(),B=s("div"),M.c(),fe=b(),$&&$.c(),pe=b(),K=s("button"),de=G(oe),Ee=b(),W=s("form"),F=s("input"),r(m,"class","form-check-input"),r(m,"type","radio"),m.__value="github.com",m.value=m.__value,r(m,"id","github.com"),r(O,"class","form-check-label"),r(O,"for","github.com"),r(_,"class","form-check"),r(d,"class","form-check-input"),r(d,"type","radio"),d.__value="ghes",d.value=d.__value,r(d,"id","ghes"),r(J,"class","form-check-label"),r(J,"for","ghes"),r(H,"class","form-check"),r(k,"class","px-3 py-3"),r(K,"type","submit"),r(K,"class","btn btn-success"),K.disabled=re=Le(e[0],e[2],e[5],e[6],e[7],e[8]),r(B,"class","px-3 py-3"),r(l,"class","col"),r(n,"class","row"),r(o,"class","container py-3 px-2"),r(F,"type","hidden"),r(F,"name","manifest"),F.value=se=JSON.stringify(e[10]),r(W,"action",ue="https://"+e[1]+"/"+(e[3]==="org"?`organizations/${e[4]}/`:"")+"settings/apps/new?state="+ke),r(W,"method","post"),r(W,"id","appform"),_e.p(m,d)},m(y,R){T(y,t,R),i(t,o),i(o,n),i(n,l),i(l,f),i(l,a),i(l,c),i(c,g),i(c,u),i(c,h),i(l,v),i(l,p),i(l,S),i(l,k),i(k,A),i(k,E),i(k,_),i(_,m),m.checked=m.__value===e[0],i(_,w),i(_,O),i(k,I),i(k,H),i(H,d),d.checked=d.__value===e[0],i(H,N),i(H,J),i(l,ie),P&&P.m(l,null),i(l,x),L&&L.m(l,null),i(l,ee),U&&U.m(l,null),i(l,te),i(l,ne),i(l,D),i(l,B),M.m(B,null),i(B,fe),$&&$.m(B,null),i(B,pe),i(B,K),i(K,de),i(t,Ee),i(t,W),i(W,F),he||(Ae=[z(m,"change",e[12]),z(d,"change",e[14]),z(l,"submit",e[11])],he=!0)},p(y,[R]){R&1&&(m.checked=m.__value===y[0]),R&1&&(d.checked=d.__value===y[0]),y[0]==="ghes"?P?P.p(y,R):(P=Ie(y),P.c(),P.m(l,x)):P&&(P.d(1),P=null),y[0]?L?L.p(y,R):(L=Oe(y),L.c(),L.m(l,ee)):L&&(L.d(1),L=null),Y===(Y=Ce(y))&&U?U.p(y,R):(U&&U.d(1),U=Y&&Y(y),U&&(U.c(),U.m(l,te))),ae===(ae=Se(y))&&M?M.p(y,R):(M.d(1),M=ae(y),M&&(M.c(),M.m(B,fe))),y[10].public&&y[2]==="newApp"?$?$.p(y,R):($=Pe(y),$.c(),$.m(B,pe)):$&&($.d(1),$=null),R&4&&oe!==(oe=Ue(y[2])+"")&&ce(de,oe),R&485&&re!==(re=Le(y[0],y[2],y[5],y[6],y[7],y[8]))&&(K.disabled=re),R&1024&&se!==(se=JSON.stringify(y[10]))&&(F.value=se),R&26&&ue!==(ue="https://"+y[1]+"/"+(y[3]==="org"?`organizations/${y[4]}/`:"")+"settings/apps/new?state="+ke)&&r(W,"action",ue)},i:X,o:X,d(y){y&&C(t),P&&P.d(),L&&L.d(),U&&U.d(),M.d(),$&&$.d(),_e.r(),he=!1,q(Ae)}}}const ut="INSERT_SECRET_ARN_HERE",ke="INSERT_TOKEN_HERE";function Le(e,t,o,n,l,f){return f||e===void 0||t===void 0?!0:t==="newApp"?!1:t==="existingApp"?o===""||n==="":t==="pat"?l==="":(console.error("Something is broken",e,t,o),!0)}function Ue(e){return e==="newApp"?"Create GitHub App":"Setup"}function be(e,t){return new Promise((o,n)=>{fetch(`${e}?token=${ke}`,{method:"POST",mode:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),redirect:"error"}).then(l=>{l.ok?l.text().then(o).catch(n):l.text().then(f=>{n(new Error(`${f} [${l.status}]`))}).catch(n)}).catch(n)})}function at(e,t,o){let n,l="INSERT_DOMAIN_HERE",f,a="user",c="ORGANIZATION",g="",u="",h="",v,p;const S={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(te){te.preventDefault();function ne(){const D=n==="ghes"?l:"github.com";switch(f){case"newApp":return be("domain",{domain:D}).then(B=>(document.getElementById("appform").submit(),Promise.resolve("Redirecting to GitHub...")));case"existingApp":return be("app",{appid:g,pk:u,domain:D});case"pat":return be("pat",{pat:h,domain:D})}}ne().then(D=>{o(9,p=D),o(8,v=!0)}).catch(D=>{o(9,p=`${D}`),o(8,v=!1)})}const A=[[],[],[]];function E(){n=this.__value,o(0,n)}function _(){n=this.__value,o(0,n)}function m(){l=this.value,o(1,l)}function w(){f=this.__value,o(2,f)}function O(){f=this.__value,o(2,f)}function I(){f=this.__value,o(2,f)}function H(){a=this.__value,o(3,a)}function d(){a=this.__value,o(3,a)}function N(){S.public=this.checked,o(10,S)}function J(){c=this.value,o(4,c)}function ie(){g=Be(this.value),o(5,g)}function x(){u=this.value,o(6,u)}function ee(){h=this.value,o(7,h)}return[n,l,f,a,c,g,u,h,v,p,S,k,E,A,_,m,w,O,I,H,d,N,J,ie,x,ee]}class ct extends tt{constructor(t){super(),et(this,t,at,st,Me,{})}}new ct({target:document.getElementById("app")});
26
26
 
27
27
  </script>
28
28
  <style type="text/css">
package/lib/index.js CHANGED
@@ -1,16 +1,20 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./secrets"), exports);
14
18
  __exportStar(require("./runner"), exports);
15
19
  __exportStar(require("./providers"), exports);
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsNENBQTBCO0FBQzFCLDJDQUF5QjtBQUN6Qiw4Q0FBNEIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NlY3JldHMnO1xuZXhwb3J0ICogZnJvbSAnLi9ydW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9wcm92aWRlcnMnO1xuIl19
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDRDQUEwQjtBQUMxQiwyQ0FBeUI7QUFDekIsOENBQTRCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zZWNyZXRzJztcbmV4cG9ydCAqIGZyb20gJy4vcnVubmVyJztcbmV4cG9ydCAqIGZyb20gJy4vcHJvdmlkZXJzJztcbiJdfQ==
@@ -12,7 +12,7 @@ class AwsImageBuilderVersionerFunction extends lambda.Function {
12
12
  super(scope, id, {
13
13
  description: 'src/lambdas/aws-image-builder-versioner.lambda.ts',
14
14
  ...props,
15
- runtime: new lambda.Runtime('nodejs14.x', lambda.RuntimeFamily.NODEJS),
15
+ runtime: new lambda.Runtime('nodejs16.x', lambda.RuntimeFamily.NODEJS),
16
16
  handler: 'index.handler',
17
17
  code: lambda.Code.fromAsset(path.join(__dirname, '../../assets/lambdas/aws-image-builder-versioner.lambda')),
18
18
  });
@@ -20,4 +20,4 @@ class AwsImageBuilderVersionerFunction extends lambda.Function {
20
20
  }
21
21
  }
22
22
  exports.AwsImageBuilderVersionerFunction = AwsImageBuilderVersionerFunction;
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzLWltYWdlLWJ1aWxkZXItdmVyc2lvbmVyLWZ1bmN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2xhbWJkYXMvYXdzLWltYWdlLWJ1aWxkZXItdmVyc2lvbmVyLWZ1bmN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZFQUE2RTtBQUM3RSw2QkFBNkI7QUFDN0IsaURBQWlEO0FBU2pEOztHQUVHO0FBQ0gsTUFBYSxnQ0FBaUMsU0FBUSxNQUFNLENBQUMsUUFBUTtJQUNuRSxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLEtBQTZDO1FBQ3JGLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFO1lBQ2YsV0FBVyxFQUFFLG1EQUFtRDtZQUNoRSxHQUFHLEtBQUs7WUFDUixPQUFPLEVBQUUsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLFlBQVksRUFBRSxNQUFNLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQztZQUN0RSxPQUFPLEVBQUUsZUFBZTtZQUN4QixJQUFJLEVBQUUsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUseURBQXlELENBQUMsQ0FBQztTQUM3RyxDQUFDLENBQUM7UUFDSCxJQUFJLENBQUMsY0FBYyxDQUFDLHFDQUFxQyxFQUFFLEdBQUcsRUFBRSxFQUFFLFlBQVksRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO0lBQzF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