@cloudsnorkel/cdk-github-runners 0.5.1 → 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.
Files changed (32) hide show
  1. package/.gitattributes +0 -1
  2. package/.jsii +113 -79
  3. package/API.md +31 -14
  4. package/README.md +48 -12
  5. package/lib/lambdas/aws-image-builder-versioner/index.js +81 -41
  6. package/lib/lambdas/delete-runner/index.js +45 -52
  7. package/lib/lambdas/setup/index.html +13 -13
  8. package/lib/lambdas/setup/index.js +7 -2
  9. package/lib/lambdas/status/index.js +45 -52
  10. package/lib/lambdas/token-retriever/index.js +45 -52
  11. package/lib/lambdas/update-lambda/index.js +25379 -27
  12. package/lib/providers/codebuild.js +7 -5
  13. package/lib/providers/common.js +3 -3
  14. package/lib/providers/docker-images/codebuild/linux-arm64/Dockerfile +2 -0
  15. package/lib/providers/docker-images/codebuild/linux-x64/Dockerfile +2 -0
  16. package/lib/providers/docker-images/fargate/linux-arm64/Dockerfile +1 -0
  17. package/lib/providers/docker-images/fargate/linux-x64/Dockerfile +1 -0
  18. package/lib/providers/docker-images/lambda/linux-arm64/Dockerfile +1 -0
  19. package/lib/providers/docker-images/lambda/linux-arm64/runner.js +1 -0
  20. package/lib/providers/docker-images/lambda/linux-arm64/runner.sh +2 -2
  21. package/lib/providers/docker-images/lambda/linux-x64/Dockerfile +1 -0
  22. package/lib/providers/docker-images/lambda/linux-x64/runner.js +1 -0
  23. package/lib/providers/docker-images/lambda/linux-x64/runner.sh +2 -2
  24. package/lib/providers/fargate.d.ts +12 -12
  25. package/lib/providers/fargate.js +6 -4
  26. package/lib/providers/image-builders/codebuild.js +4 -2
  27. package/lib/providers/image-builders/container.js +7 -4
  28. package/lib/providers/image-builders/static.js +1 -1
  29. package/lib/providers/lambda.js +3 -15
  30. package/lib/runner.js +1 -1
  31. package/lib/secrets.js +1 -1
  32. package/package.json +14 -14
package/API.md CHANGED
@@ -963,7 +963,7 @@ Any object.
963
963
  | **Name** | **Type** | **Description** |
964
964
  | --- | --- | --- |
965
965
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
966
- | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.assignPublicIp">assignPublicIp</a></code> | <code>boolean</code> | Whether task will have a public IP. |
966
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.assignPublicIp">assignPublicIp</a></code> | <code>boolean</code> | Whether runner task will have a public IP. |
967
967
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.cluster">cluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | Cluster hosting the task hosting the runner. |
968
968
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | The network connections associated with this resource. |
969
969
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.container">container</a></code> | <code>aws-cdk-lib.aws_ecs.ContainerDefinition</code> | Container definition hosting the runner. |
@@ -973,7 +973,8 @@ Any object.
973
973
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.spot">spot</a></code> | <code>boolean</code> | Use spot pricing for Fargate tasks. |
974
974
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.task">task</a></code> | <code>aws-cdk-lib.aws_ecs.FargateTaskDefinition</code> | Fargate task hosting the runner. |
975
975
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security group attached to the task. |
976
- | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for hosting the task. |
976
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Subnets used for hosting the runner task. |
977
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunner.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC used for hosting the runner task. |
977
978
 
978
979
  ---
979
980
 
@@ -997,7 +998,7 @@ public readonly assignPublicIp: boolean;
997
998
 
998
999
  - *Type:* boolean
999
1000
 
1000
- Whether task will have a public IP.
1001
+ Whether runner task will have a public IP.
1001
1002
 
1002
1003
  ---
1003
1004
 
@@ -1109,6 +1110,18 @@ Security group attached to the task.
1109
1110
 
1110
1111
  ---
1111
1112
 
1113
+ ##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.subnetSelection"></a>
1114
+
1115
+ ```typescript
1116
+ public readonly subnetSelection: SubnetSelection;
1117
+ ```
1118
+
1119
+ - *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
1120
+
1121
+ Subnets used for hosting the runner task.
1122
+
1123
+ ---
1124
+
1112
1125
  ##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.FargateRunner.property.vpc"></a>
1113
1126
 
1114
1127
  ```typescript
@@ -1117,7 +1130,7 @@ public readonly vpc: IVpc;
1117
1130
 
1118
1131
  - *Type:* aws-cdk-lib.aws_ec2.IVpc
1119
1132
 
1120
- VPC used for hosting the task.
1133
+ VPC used for hosting the runner task.
1121
1134
 
1122
1135
  ---
1123
1136
 
@@ -2523,6 +2536,7 @@ const fargateRunnerProps: FargateRunnerProps = { ... }
2523
2536
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.memoryLimitMiB">memoryLimitMiB</a></code> | <code>number</code> | The amount (in MiB) of memory used by the task. |
2524
2537
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.securityGroup">securityGroup</a></code> | <code>aws-cdk-lib.aws_ec2.ISecurityGroup</code> | Security Group to assign to the task. |
2525
2538
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.spot">spot</a></code> | <code>boolean</code> | Use Fargate spot capacity provider to save money. |
2539
+ | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.subnetSelection">subnetSelection</a></code> | <code>aws-cdk-lib.aws_ec2.SubnetSelection</code> | Subnets to run the runners in. |
2526
2540
  | <code><a href="#@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | VPC to launch the runners in. |
2527
2541
 
2528
2542
  ---
@@ -2629,16 +2643,6 @@ Provider running an image to run inside CodeBuild with GitHub runner pre-configu
2629
2643
 
2630
2644
  A user named `runner` is expected to exist.
2631
2645
 
2632
- The entry point should start GitHub runner. For example:
2633
-
2634
- ```
2635
- #!/bin/bash
2636
- set -e -u -o pipefail
2637
-
2638
- /home/runner/config.sh --unattended --url "https://${GITHUB_DOMAIN}/${OWNER}/${REPO}" --token "${RUNNER_TOKEN}" --ephemeral --work _work --labels "${RUNNER_LABEL}" --disableupdate --name "${RUNNER_NAME}"
2639
- /home/runner/run.sh
2640
- ```
2641
-
2642
2646
  ---
2643
2647
 
2644
2648
  ##### `label`<sup>Optional</sup> <a name="label" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.label"></a>
@@ -2709,6 +2713,19 @@ Use Fargate spot capacity provider to save money.
2709
2713
 
2710
2714
  ---
2711
2715
 
2716
+ ##### `subnetSelection`<sup>Optional</sup> <a name="subnetSelection" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.subnetSelection"></a>
2717
+
2718
+ ```typescript
2719
+ public readonly subnetSelection: SubnetSelection;
2720
+ ```
2721
+
2722
+ - *Type:* aws-cdk-lib.aws_ec2.SubnetSelection
2723
+ - *Default:* Fargate default
2724
+
2725
+ Subnets to run the runners in.
2726
+
2727
+ ---
2728
+
2712
2729
  ##### `vpc`<sup>Optional</sup> <a name="vpc" id="@cloudsnorkel/cdk-github-runners.FargateRunnerProps.property.vpc"></a>
2713
2730
 
2714
2731
  ```typescript
package/README.md CHANGED
@@ -100,9 +100,9 @@ let bucket: s3.Bucket;
100
100
 
101
101
  // create a custom CodeBuild provider
102
102
  const myProvider = new CodeBuildRunner(this, 'codebuild runner', {
103
- label: 'my-codebuild',
104
- vpc: vpc,
105
- securityGroup: runnerSg,
103
+ label: 'my-codebuild',
104
+ vpc: vpc,
105
+ securityGroup: runnerSg,
106
106
  });
107
107
  // grant some permissions to the provider
108
108
  bucket.grantReadWrite(myProvider);
@@ -110,7 +110,7 @@ dbSg.connections.allowFrom(runnerSg, ec2.Port.tcp(3306), 'allow runners to conne
110
110
 
111
111
  // create the runner infrastructure
112
112
  new GitHubRunners(this, 'runners', {
113
- providers: [myProvider],
113
+ providers: [myProvider],
114
114
  });
115
115
  ```
116
116
 
@@ -118,21 +118,22 @@ Another way to customize runners is by modifying the image used to spin them up.
118
118
 
119
119
  ```typescript
120
120
  const myBuilder = new CodeBuildImageBuilder(this, 'image builder', {
121
- dockerfilePath: FargateProvider.LINUX_X64_DOCKERFILE_PATH,
122
- runnerVersion: RunnerVersion.specific('2.291.0'),
123
- rebuildInterval: Duration.days(14),
121
+ dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
122
+ runnerVersion: RunnerVersion.specific('2.291.0'),
123
+ rebuildInterval: Duration.days(14),
124
124
  });
125
125
  myBuilder.setBuildArg('EXTRA_PACKAGES', 'nginx xz-utils');
126
126
 
127
- const myProvider = new FargateProvider(this, 'fargate runner', {
128
- label: 'customized-fargate',
129
- vpc: vpc,
130
- securityGroup: runnerSg,
127
+ const myProvider = new FargateRunner(this, 'fargate runner', {
128
+ label: 'customized-fargate',
129
+ vpc: vpc,
130
+ securityGroup: runnerSg,
131
+ imageBuilder: myBuilder,
131
132
  });
132
133
 
133
134
  // create the runner infrastructure
134
135
  new GitHubRunners(stack, 'runners', {
135
- providers: [myProvider],
136
+ providers: [myProvider],
136
137
  });
137
138
  ```
138
139
 
@@ -148,6 +149,41 @@ jobs:
148
149
  - run: echo hello world
149
150
  ```
150
151
 
152
+ Windows images must be built with AWS Image Builder.
153
+
154
+ ```typescript
155
+ const myWindowsBuilder = new ContainerImageBuilder(this, 'Windows image builder', {
156
+ architecture: Architecture.X86_64,
157
+ os: Os.WINDOWS,
158
+ runnerVersion: RunnerVersion.specific('2.291.0'),
159
+ rebuildInterval: Duration.days(14),
160
+ });
161
+ myWindowsBuilder.addComponent(new ImageBuilderComponent(this, 'Ninja Component',
162
+ {
163
+ displayName: 'Ninja',
164
+ description: 'Download and install Ninja build system',
165
+ platform: 'Windows',
166
+ commands: [
167
+ 'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
168
+ 'Expand-Archive ninja.zip -DestinationPath C:\\actions',
169
+ 'del ninja.zip',
170
+ ],
171
+ }
172
+ ));
173
+
174
+ const myProvider = new FargateRunner(this, 'fargate runner', {
175
+ label: 'customized-windows-fargate',
176
+ vpc: vpc,
177
+ securityGroup: runnerSg,
178
+ imageBuiler: myWindowsBuilder,
179
+ });
180
+
181
+ // create the runner infrastructure
182
+ new GitHubRunners(stack, 'runners', {
183
+ providers: [myProvider],
184
+ });
185
+ ```
186
+
151
187
  ## Architecture
152
188
 
153
189
  ![Architecture diagram](architecture.svg)
@@ -2293,51 +2293,91 @@ var require_subset = __commonJS({
2293
2293
  var require_semver2 = __commonJS({
2294
2294
  "node_modules/semver/index.js"(exports, module2) {
2295
2295
  var internalRe = require_re();
2296
+ var constants = require_constants();
2297
+ var SemVer = require_semver();
2298
+ var identifiers = require_identifiers();
2299
+ var parse = require_parse();
2300
+ var valid = require_valid();
2301
+ var clean = require_clean();
2302
+ var inc2 = require_inc();
2303
+ var diff = require_diff();
2304
+ var major = require_major();
2305
+ var minor = require_minor();
2306
+ var patch = require_patch();
2307
+ var prerelease = require_prerelease();
2308
+ var compare = require_compare();
2309
+ var rcompare = require_rcompare();
2310
+ var compareLoose = require_compare_loose();
2311
+ var compareBuild = require_compare_build();
2312
+ var sort = require_sort();
2313
+ var rsort = require_rsort();
2314
+ var gt = require_gt();
2315
+ var lt = require_lt();
2316
+ var eq = require_eq();
2317
+ var neq = require_neq();
2318
+ var gte = require_gte();
2319
+ var lte = require_lte();
2320
+ var cmp = require_cmp();
2321
+ var coerce = require_coerce();
2322
+ var Comparator = require_comparator();
2323
+ var Range = require_range();
2324
+ var satisfies = require_satisfies();
2325
+ var toComparators = require_to_comparators();
2326
+ var maxSatisfying2 = require_max_satisfying();
2327
+ var minSatisfying = require_min_satisfying();
2328
+ var minVersion = require_min_version();
2329
+ var validRange = require_valid2();
2330
+ var outside = require_outside();
2331
+ var gtr = require_gtr();
2332
+ var ltr = require_ltr();
2333
+ var intersects = require_intersects();
2334
+ var simplifyRange = require_simplify();
2335
+ var subset = require_subset();
2296
2336
  module2.exports = {
2337
+ parse,
2338
+ valid,
2339
+ clean,
2340
+ inc: inc2,
2341
+ diff,
2342
+ major,
2343
+ minor,
2344
+ patch,
2345
+ prerelease,
2346
+ compare,
2347
+ rcompare,
2348
+ compareLoose,
2349
+ compareBuild,
2350
+ sort,
2351
+ rsort,
2352
+ gt,
2353
+ lt,
2354
+ eq,
2355
+ neq,
2356
+ gte,
2357
+ lte,
2358
+ cmp,
2359
+ coerce,
2360
+ Comparator,
2361
+ Range,
2362
+ satisfies,
2363
+ toComparators,
2364
+ maxSatisfying: maxSatisfying2,
2365
+ minSatisfying,
2366
+ minVersion,
2367
+ validRange,
2368
+ outside,
2369
+ gtr,
2370
+ ltr,
2371
+ intersects,
2372
+ simplifyRange,
2373
+ subset,
2374
+ SemVer,
2297
2375
  re: internalRe.re,
2298
2376
  src: internalRe.src,
2299
2377
  tokens: internalRe.t,
2300
- SEMVER_SPEC_VERSION: require_constants().SEMVER_SPEC_VERSION,
2301
- SemVer: require_semver(),
2302
- compareIdentifiers: require_identifiers().compareIdentifiers,
2303
- rcompareIdentifiers: require_identifiers().rcompareIdentifiers,
2304
- parse: require_parse(),
2305
- valid: require_valid(),
2306
- clean: require_clean(),
2307
- inc: require_inc(),
2308
- diff: require_diff(),
2309
- major: require_major(),
2310
- minor: require_minor(),
2311
- patch: require_patch(),
2312
- prerelease: require_prerelease(),
2313
- compare: require_compare(),
2314
- rcompare: require_rcompare(),
2315
- compareLoose: require_compare_loose(),
2316
- compareBuild: require_compare_build(),
2317
- sort: require_sort(),
2318
- rsort: require_rsort(),
2319
- gt: require_gt(),
2320
- lt: require_lt(),
2321
- eq: require_eq(),
2322
- neq: require_neq(),
2323
- gte: require_gte(),
2324
- lte: require_lte(),
2325
- cmp: require_cmp(),
2326
- coerce: require_coerce(),
2327
- Comparator: require_comparator(),
2328
- Range: require_range(),
2329
- satisfies: require_satisfies(),
2330
- toComparators: require_to_comparators(),
2331
- maxSatisfying: require_max_satisfying(),
2332
- minSatisfying: require_min_satisfying(),
2333
- minVersion: require_min_version(),
2334
- validRange: require_valid2(),
2335
- outside: require_outside(),
2336
- gtr: require_gtr(),
2337
- ltr: require_ltr(),
2338
- intersects: require_intersects(),
2339
- simplifyRange: require_simplify(),
2340
- subset: require_subset()
2378
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
2379
+ compareIdentifiers: identifiers.compareIdentifiers,
2380
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
2341
2381
  };
2342
2382
  }
2343
2383
  });
@@ -7432,7 +7432,7 @@ var require_dist_node6 = __commonJS({
7432
7432
  parse
7433
7433
  });
7434
7434
  }
7435
- var VERSION = "7.0.2";
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.1";
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.2";
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.1";
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.3";
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
- "POST /applications/{client_id}/token/scoped",
8400
- {
8401
- headers: {
8402
- authorization: `basic ${btoa(`${clientId}:${clientSecret}`)}`
8403
- },
8404
- client_id: clientId,
8405
- access_token: token,
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
- "PATCH /applications/{client_id}/token",
8427
- {
8428
- headers: {
8429
- authorization: `basic ${auth}`
8430
- },
8431
- client_id: options.clientId,
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
- "DELETE /applications/{client_id}/token",
8457
- {
8458
- headers: {
8459
- authorization: `basic ${auth}`
8460
- },
8461
- client_id: options.clientId,
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
- "DELETE /applications/{client_id}/grant",
8471
- {
8472
- headers: {
8473
- authorization: `basic ${auth}`
8474
- },
8475
- client_id: options.clientId,
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.2";
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.3";
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.2";
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.1";
12842
+ var VERSION = "6.2.2";
12855
12843
  function getBufferResponse(response) {
12856
12844
  return response.arrayBuffer();
12857
12845
  }
@@ -14372,7 +14360,10 @@ var require_before_after_hook = __commonJS({
14372
14360
  var bind = Function.bind;
14373
14361
  var bindable = bind.bind(bind);
14374
14362
  function bindApi(hook, state, name) {
14375
- var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]);
14363
+ var removeHookRef = bindable(removeHook, null).apply(
14364
+ null,
14365
+ name ? [state, name] : [state]
14366
+ );
14376
14367
  hook.api = { remove: removeHookRef };
14377
14368
  hook.remove = removeHookRef;
14378
14369
  ["before", "error", "after", "wrap"].forEach(function(kind) {
@@ -14400,7 +14391,9 @@ var require_before_after_hook = __commonJS({
14400
14391
  var collectionHookDeprecationMessageDisplayed = false;
14401
14392
  function Hook() {
14402
14393
  if (!collectionHookDeprecationMessageDisplayed) {
14403
- console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');
14394
+ console.warn(
14395
+ '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'
14396
+ );
14404
14397
  collectionHookDeprecationMessageDisplayed = true;
14405
14398
  }
14406
14399
  return HookCollection();