@cloudsnorkel/cdk-github-runners 0.8.0 → 0.8.1
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 +35 -16
- package/API.md +18 -0
- package/lib/lambdas/delete-runner/index.js +17 -15
- package/lib/lambdas/setup/index.js +3 -1
- package/lib/lambdas/status/index.js +17 -15
- package/lib/lambdas/token-retriever/index.js +17 -15
- package/lib/lambdas/update-lambda/index.js +1 -29093
- package/lib/providers/codebuild.js +1 -1
- package/lib/providers/common.js +3 -3
- package/lib/providers/ec2.js +1 -1
- package/lib/providers/fargate.js +1 -1
- package/lib/providers/image-builders/ami.js +1 -1
- package/lib/providers/image-builders/codebuild.d.ts +8 -0
- package/lib/providers/image-builders/codebuild.js +6 -5
- package/lib/providers/image-builders/common.js +1 -1
- package/lib/providers/image-builders/container.js +1 -1
- package/lib/providers/image-builders/linux-components.js +1 -1
- package/lib/providers/image-builders/static.js +1 -1
- package/lib/providers/image-builders/windows-components.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 +12 -14
package/.jsii
CHANGED
|
@@ -3114,7 +3114,7 @@
|
|
|
3114
3114
|
"stability": "experimental"
|
|
3115
3115
|
},
|
|
3116
3116
|
"homepage": "https://github.com/CloudSnorkel/cdk-github-runners.git",
|
|
3117
|
-
"jsiiVersion": "1.
|
|
3117
|
+
"jsiiVersion": "1.74.0 (build 6d08790)",
|
|
3118
3118
|
"keywords": [
|
|
3119
3119
|
"aws",
|
|
3120
3120
|
"aws-cdk",
|
|
@@ -3979,7 +3979,7 @@
|
|
|
3979
3979
|
},
|
|
3980
3980
|
"locationInModule": {
|
|
3981
3981
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
3982
|
-
"line":
|
|
3982
|
+
"line": 177
|
|
3983
3983
|
},
|
|
3984
3984
|
"parameters": [
|
|
3985
3985
|
{
|
|
@@ -4008,7 +4008,7 @@
|
|
|
4008
4008
|
"kind": "class",
|
|
4009
4009
|
"locationInModule": {
|
|
4010
4010
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4011
|
-
"line":
|
|
4011
|
+
"line": 158
|
|
4012
4012
|
},
|
|
4013
4013
|
"methods": [
|
|
4014
4014
|
{
|
|
@@ -4019,7 +4019,7 @@
|
|
|
4019
4019
|
},
|
|
4020
4020
|
"locationInModule": {
|
|
4021
4021
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4022
|
-
"line":
|
|
4022
|
+
"line": 284
|
|
4023
4023
|
},
|
|
4024
4024
|
"name": "addExtraCertificates",
|
|
4025
4025
|
"parameters": [
|
|
@@ -4041,7 +4041,7 @@
|
|
|
4041
4041
|
},
|
|
4042
4042
|
"locationInModule": {
|
|
4043
4043
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4044
|
-
"line":
|
|
4044
|
+
"line": 218
|
|
4045
4045
|
},
|
|
4046
4046
|
"name": "addFiles",
|
|
4047
4047
|
"parameters": [
|
|
@@ -4072,7 +4072,7 @@
|
|
|
4072
4072
|
},
|
|
4073
4073
|
"locationInModule": {
|
|
4074
4074
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4075
|
-
"line":
|
|
4075
|
+
"line": 270
|
|
4076
4076
|
},
|
|
4077
4077
|
"name": "addPolicyStatement",
|
|
4078
4078
|
"parameters": [
|
|
@@ -4094,7 +4094,7 @@
|
|
|
4094
4094
|
},
|
|
4095
4095
|
"locationInModule": {
|
|
4096
4096
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4097
|
-
"line":
|
|
4097
|
+
"line": 245
|
|
4098
4098
|
},
|
|
4099
4099
|
"name": "addPostBuildCommand",
|
|
4100
4100
|
"parameters": [
|
|
@@ -4116,7 +4116,7 @@
|
|
|
4116
4116
|
},
|
|
4117
4117
|
"locationInModule": {
|
|
4118
4118
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4119
|
-
"line":
|
|
4119
|
+
"line": 233
|
|
4120
4120
|
},
|
|
4121
4121
|
"name": "addPreBuildCommand",
|
|
4122
4122
|
"parameters": [
|
|
@@ -4138,7 +4138,7 @@
|
|
|
4138
4138
|
},
|
|
4139
4139
|
"locationInModule": {
|
|
4140
4140
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4141
|
-
"line":
|
|
4141
|
+
"line": 294
|
|
4142
4142
|
},
|
|
4143
4143
|
"name": "bind",
|
|
4144
4144
|
"overrides": "@cloudsnorkel/cdk-github-runners.IImageBuilder",
|
|
@@ -4156,7 +4156,7 @@
|
|
|
4156
4156
|
},
|
|
4157
4157
|
"locationInModule": {
|
|
4158
4158
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4159
|
-
"line":
|
|
4159
|
+
"line": 258
|
|
4160
4160
|
},
|
|
4161
4161
|
"name": "setBuildArg",
|
|
4162
4162
|
"parameters": [
|
|
@@ -4190,7 +4190,7 @@
|
|
|
4190
4190
|
"immutable": true,
|
|
4191
4191
|
"locationInModule": {
|
|
4192
4192
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4193
|
-
"line":
|
|
4193
|
+
"line": 177
|
|
4194
4194
|
},
|
|
4195
4195
|
"name": "props",
|
|
4196
4196
|
"type": {
|
|
@@ -4250,6 +4250,25 @@
|
|
|
4250
4250
|
"fqn": "@cloudsnorkel/cdk-github-runners.Architecture"
|
|
4251
4251
|
}
|
|
4252
4252
|
},
|
|
4253
|
+
{
|
|
4254
|
+
"abstract": true,
|
|
4255
|
+
"docs": {
|
|
4256
|
+
"default": "Ubuntu 20.04 for x64 and Amazon Linux 2 for ARM64",
|
|
4257
|
+
"remarks": "This is the image that's going to run the code that builds the runner image.\n\nThe only action taken in CodeBuild is running `docker build`. You would therefore not need to change this setting often.",
|
|
4258
|
+
"stability": "experimental",
|
|
4259
|
+
"summary": "Build image to use in CodeBuild."
|
|
4260
|
+
},
|
|
4261
|
+
"immutable": true,
|
|
4262
|
+
"locationInModule": {
|
|
4263
|
+
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4264
|
+
"line": 106
|
|
4265
|
+
},
|
|
4266
|
+
"name": "buildImage",
|
|
4267
|
+
"optional": true,
|
|
4268
|
+
"type": {
|
|
4269
|
+
"fqn": "aws-cdk-lib.aws_codebuild.IBuildImage"
|
|
4270
|
+
}
|
|
4271
|
+
},
|
|
4253
4272
|
{
|
|
4254
4273
|
"abstract": true,
|
|
4255
4274
|
"docs": {
|
|
@@ -4280,7 +4299,7 @@
|
|
|
4280
4299
|
"immutable": true,
|
|
4281
4300
|
"locationInModule": {
|
|
4282
4301
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4283
|
-
"line":
|
|
4302
|
+
"line": 133
|
|
4284
4303
|
},
|
|
4285
4304
|
"name": "logRemovalPolicy",
|
|
4286
4305
|
"optional": true,
|
|
@@ -4299,7 +4318,7 @@
|
|
|
4299
4318
|
"immutable": true,
|
|
4300
4319
|
"locationInModule": {
|
|
4301
4320
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4302
|
-
"line":
|
|
4321
|
+
"line": 124
|
|
4303
4322
|
},
|
|
4304
4323
|
"name": "logRetention",
|
|
4305
4324
|
"optional": true,
|
|
@@ -4409,7 +4428,7 @@
|
|
|
4409
4428
|
"immutable": true,
|
|
4410
4429
|
"locationInModule": {
|
|
4411
4430
|
"filename": "src/providers/image-builders/codebuild.ts",
|
|
4412
|
-
"line":
|
|
4431
|
+
"line": 115
|
|
4413
4432
|
},
|
|
4414
4433
|
"name": "timeout",
|
|
4415
4434
|
"optional": true,
|
|
@@ -10258,6 +10277,6 @@
|
|
|
10258
10277
|
"symbolId": "src/providers/image-builders/windows-components:WindowsComponents"
|
|
10259
10278
|
}
|
|
10260
10279
|
},
|
|
10261
|
-
"version": "0.8.
|
|
10262
|
-
"fingerprint": "
|
|
10280
|
+
"version": "0.8.1",
|
|
10281
|
+
"fingerprint": "ynEXSWyCd8lcrUwSjKuri9ZGDYfYVq0WuBJhjtMhnzI="
|
|
10263
10282
|
}
|
package/API.md
CHANGED
|
@@ -2717,6 +2717,7 @@ const codeBuildImageBuilderProps: CodeBuildImageBuilderProps = { ... }
|
|
|
2717
2717
|
| --- | --- | --- |
|
|
2718
2718
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.dockerfilePath">dockerfilePath</a></code> | <code>string</code> | Path to Dockerfile to be built. |
|
|
2719
2719
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.architecture">architecture</a></code> | <code><a href="#@cloudsnorkel/cdk-github-runners.Architecture">Architecture</a></code> | Image architecture. |
|
|
2720
|
+
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.buildImage">buildImage</a></code> | <code>aws-cdk-lib.aws_codebuild.IBuildImage</code> | Build image to use in CodeBuild. |
|
|
2720
2721
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.computeType">computeType</a></code> | <code>aws-cdk-lib.aws_codebuild.ComputeType</code> | The type of compute to use for this build. |
|
|
2721
2722
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRemovalPolicy">logRemovalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | Removal policy for logs of image builds. |
|
|
2722
2723
|
| <code><a href="#@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.logRetention">logRetention</a></code> | <code>aws-cdk-lib.aws_logs.RetentionDays</code> | The number of days log events are kept in CloudWatch Logs. |
|
|
@@ -2757,6 +2758,23 @@ Image architecture.
|
|
|
2757
2758
|
|
|
2758
2759
|
---
|
|
2759
2760
|
|
|
2761
|
+
##### `buildImage`<sup>Optional</sup> <a name="buildImage" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.buildImage"></a>
|
|
2762
|
+
|
|
2763
|
+
```typescript
|
|
2764
|
+
public readonly buildImage: IBuildImage;
|
|
2765
|
+
```
|
|
2766
|
+
|
|
2767
|
+
- *Type:* aws-cdk-lib.aws_codebuild.IBuildImage
|
|
2768
|
+
- *Default:* Ubuntu 20.04 for x64 and Amazon Linux 2 for ARM64
|
|
2769
|
+
|
|
2770
|
+
Build image to use in CodeBuild.
|
|
2771
|
+
|
|
2772
|
+
This is the image that's going to run the code that builds the runner image.
|
|
2773
|
+
|
|
2774
|
+
The only action taken in CodeBuild is running `docker build`. You would therefore not need to change this setting often.
|
|
2775
|
+
|
|
2776
|
+
---
|
|
2777
|
+
|
|
2760
2778
|
##### `computeType`<sup>Optional</sup> <a name="computeType" id="@cloudsnorkel/cdk-github-runners.CodeBuildImageBuilderProps.property.computeType"></a>
|
|
2761
2779
|
|
|
2762
2780
|
```typescript
|
|
@@ -6913,7 +6913,9 @@ var require_lib3 = __commonJS({
|
|
|
6913
6913
|
if (signal && signal.aborted) {
|
|
6914
6914
|
return;
|
|
6915
6915
|
}
|
|
6916
|
-
|
|
6916
|
+
if (response && response.body) {
|
|
6917
|
+
destroyStream(response.body, err);
|
|
6918
|
+
}
|
|
6917
6919
|
});
|
|
6918
6920
|
if (parseInt(process.version.substring(1)) < 14) {
|
|
6919
6921
|
req.on("socket", function(s) {
|
|
@@ -7689,7 +7691,7 @@ var require_dist_node6 = __commonJS({
|
|
|
7689
7691
|
parse
|
|
7690
7692
|
});
|
|
7691
7693
|
}
|
|
7692
|
-
var VERSION = "7.0.
|
|
7694
|
+
var VERSION = "7.0.5";
|
|
7693
7695
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7694
7696
|
var DEFAULTS = {
|
|
7695
7697
|
method: "GET",
|
|
@@ -7775,7 +7777,7 @@ var require_dist_node8 = __commonJS({
|
|
|
7775
7777
|
var isPlainObject = require_is_plain_object();
|
|
7776
7778
|
var nodeFetch = _interopDefault(require_lib3());
|
|
7777
7779
|
var requestError = require_dist_node7();
|
|
7778
|
-
var VERSION = "6.2.
|
|
7780
|
+
var VERSION = "6.2.3";
|
|
7779
7781
|
function getBufferResponse(response) {
|
|
7780
7782
|
return response.arrayBuffer();
|
|
7781
7783
|
}
|
|
@@ -8248,7 +8250,7 @@ var require_dist_node10 = __commonJS({
|
|
|
8248
8250
|
parse
|
|
8249
8251
|
});
|
|
8250
8252
|
}
|
|
8251
|
-
var VERSION = "7.0.
|
|
8253
|
+
var VERSION = "7.0.5";
|
|
8252
8254
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
8253
8255
|
var DEFAULTS = {
|
|
8254
8256
|
method: "GET",
|
|
@@ -8280,7 +8282,7 @@ var require_dist_node11 = __commonJS({
|
|
|
8280
8282
|
var isPlainObject = require_is_plain_object();
|
|
8281
8283
|
var nodeFetch = _interopDefault(require_lib3());
|
|
8282
8284
|
var requestError = require_dist_node7();
|
|
8283
|
-
var VERSION = "6.2.
|
|
8285
|
+
var VERSION = "6.2.3";
|
|
8284
8286
|
function getBufferResponse(response) {
|
|
8285
8287
|
return response.arrayBuffer();
|
|
8286
8288
|
}
|
|
@@ -8437,7 +8439,7 @@ var require_dist_node12 = __commonJS({
|
|
|
8437
8439
|
var request = require_dist_node11();
|
|
8438
8440
|
var requestError = require_dist_node7();
|
|
8439
8441
|
var btoa = _interopDefault(require_btoa_node());
|
|
8440
|
-
var VERSION = "2.0.
|
|
8442
|
+
var VERSION = "2.0.5";
|
|
8441
8443
|
function requestToOAuthBaseUrl(request2) {
|
|
8442
8444
|
const endpointDefaults = request2.endpoint.DEFAULTS;
|
|
8443
8445
|
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
|
|
@@ -8796,7 +8798,7 @@ var require_dist_node13 = __commonJS({
|
|
|
8796
8798
|
endpoint.headers.authorization = `token ${token}`;
|
|
8797
8799
|
return request2(endpoint);
|
|
8798
8800
|
}
|
|
8799
|
-
var VERSION = "4.0.
|
|
8801
|
+
var VERSION = "4.0.4";
|
|
8800
8802
|
function createOAuthDeviceAuth(options) {
|
|
8801
8803
|
const requestWithDefaults = options.request || request.request.defaults({
|
|
8802
8804
|
headers: {
|
|
@@ -8844,7 +8846,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8844
8846
|
var authOauthDevice = require_dist_node13();
|
|
8845
8847
|
var oauthMethods = require_dist_node12();
|
|
8846
8848
|
var btoa = _interopDefault(require_btoa_node());
|
|
8847
|
-
var VERSION = "2.1.
|
|
8849
|
+
var VERSION = "2.1.1";
|
|
8848
8850
|
async function getAuthentication(state) {
|
|
8849
8851
|
if ("code" in state.strategyOptions) {
|
|
8850
8852
|
const {
|
|
@@ -8901,7 +8903,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8901
8903
|
}
|
|
8902
8904
|
const currentAuthentication = state.authentication;
|
|
8903
8905
|
if ("expiresAt" in currentAuthentication) {
|
|
8904
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
8906
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
8905
8907
|
const {
|
|
8906
8908
|
authentication
|
|
8907
8909
|
} = await oauthMethods.refreshToken({
|
|
@@ -19126,7 +19128,7 @@ var require_dist_node17 = __commonJS({
|
|
|
19126
19128
|
parse
|
|
19127
19129
|
});
|
|
19128
19130
|
}
|
|
19129
|
-
var VERSION = "7.0.
|
|
19131
|
+
var VERSION = "7.0.5";
|
|
19130
19132
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
19131
19133
|
var DEFAULTS = {
|
|
19132
19134
|
method: "GET",
|
|
@@ -19158,7 +19160,7 @@ var require_dist_node18 = __commonJS({
|
|
|
19158
19160
|
var isPlainObject = require_is_plain_object();
|
|
19159
19161
|
var nodeFetch = _interopDefault(require_lib3());
|
|
19160
19162
|
var requestError = require_dist_node7();
|
|
19161
|
-
var VERSION = "6.2.
|
|
19163
|
+
var VERSION = "6.2.3";
|
|
19162
19164
|
function getBufferResponse(response) {
|
|
19163
19165
|
return response.arrayBuffer();
|
|
19164
19166
|
}
|
|
@@ -20088,7 +20090,7 @@ var require_dist_node23 = __commonJS({
|
|
|
20088
20090
|
}
|
|
20089
20091
|
const currentAuthentication = state.authentication;
|
|
20090
20092
|
if ("expiresAt" in currentAuthentication) {
|
|
20091
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
20093
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
20092
20094
|
const {
|
|
20093
20095
|
authentication
|
|
20094
20096
|
} = await oauthMethods.refreshToken({
|
|
@@ -20476,7 +20478,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20476
20478
|
const repositorySelection = repositorySelectionOptional || "all";
|
|
20477
20479
|
const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;
|
|
20478
20480
|
const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;
|
|
20479
|
-
const createdAt = new Date().toISOString();
|
|
20481
|
+
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
20480
20482
|
await set(state.cache, optionsWithInstallationTokenFromState, {
|
|
20481
20483
|
token,
|
|
20482
20484
|
createdAt,
|
|
@@ -20557,7 +20559,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20557
20559
|
if (typeof error.response.headers.date === "undefined") {
|
|
20558
20560
|
throw error;
|
|
20559
20561
|
}
|
|
20560
|
-
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse(new Date().toString())) / 1e3);
|
|
20562
|
+
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3);
|
|
20561
20563
|
state.log.warn(error.message);
|
|
20562
20564
|
state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
|
|
20563
20565
|
const {
|
|
@@ -20590,7 +20592,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20590
20592
|
return sendRequestWithRetries(state, request2, endpoint, createdAt);
|
|
20591
20593
|
}
|
|
20592
20594
|
async function sendRequestWithRetries(state, request2, options, createdAt, retries = 0) {
|
|
20593
|
-
const timeSinceTokenCreationInMs =
|
|
20595
|
+
const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);
|
|
20594
20596
|
try {
|
|
20595
20597
|
return await request2(options);
|
|
20596
20598
|
} catch (error) {
|
|
@@ -7056,7 +7056,9 @@ var require_lib3 = __commonJS({
|
|
|
7056
7056
|
if (signal && signal.aborted) {
|
|
7057
7057
|
return;
|
|
7058
7058
|
}
|
|
7059
|
-
|
|
7059
|
+
if (response2 && response2.body) {
|
|
7060
|
+
destroyStream(response2.body, err);
|
|
7061
|
+
}
|
|
7060
7062
|
});
|
|
7061
7063
|
if (parseInt(process.version.substring(1)) < 14) {
|
|
7062
7064
|
req.on("socket", function(s) {
|
|
@@ -6913,7 +6913,9 @@ var require_lib3 = __commonJS({
|
|
|
6913
6913
|
if (signal && signal.aborted) {
|
|
6914
6914
|
return;
|
|
6915
6915
|
}
|
|
6916
|
-
|
|
6916
|
+
if (response && response.body) {
|
|
6917
|
+
destroyStream(response.body, err);
|
|
6918
|
+
}
|
|
6917
6919
|
});
|
|
6918
6920
|
if (parseInt(process.version.substring(1)) < 14) {
|
|
6919
6921
|
req.on("socket", function(s) {
|
|
@@ -7689,7 +7691,7 @@ var require_dist_node6 = __commonJS({
|
|
|
7689
7691
|
parse
|
|
7690
7692
|
});
|
|
7691
7693
|
}
|
|
7692
|
-
var VERSION = "7.0.
|
|
7694
|
+
var VERSION = "7.0.5";
|
|
7693
7695
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7694
7696
|
var DEFAULTS = {
|
|
7695
7697
|
method: "GET",
|
|
@@ -7775,7 +7777,7 @@ var require_dist_node8 = __commonJS({
|
|
|
7775
7777
|
var isPlainObject = require_is_plain_object();
|
|
7776
7778
|
var nodeFetch = _interopDefault(require_lib3());
|
|
7777
7779
|
var requestError = require_dist_node7();
|
|
7778
|
-
var VERSION = "6.2.
|
|
7780
|
+
var VERSION = "6.2.3";
|
|
7779
7781
|
function getBufferResponse(response) {
|
|
7780
7782
|
return response.arrayBuffer();
|
|
7781
7783
|
}
|
|
@@ -8248,7 +8250,7 @@ var require_dist_node10 = __commonJS({
|
|
|
8248
8250
|
parse
|
|
8249
8251
|
});
|
|
8250
8252
|
}
|
|
8251
|
-
var VERSION = "7.0.
|
|
8253
|
+
var VERSION = "7.0.5";
|
|
8252
8254
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
8253
8255
|
var DEFAULTS = {
|
|
8254
8256
|
method: "GET",
|
|
@@ -8280,7 +8282,7 @@ var require_dist_node11 = __commonJS({
|
|
|
8280
8282
|
var isPlainObject = require_is_plain_object();
|
|
8281
8283
|
var nodeFetch = _interopDefault(require_lib3());
|
|
8282
8284
|
var requestError = require_dist_node7();
|
|
8283
|
-
var VERSION = "6.2.
|
|
8285
|
+
var VERSION = "6.2.3";
|
|
8284
8286
|
function getBufferResponse(response) {
|
|
8285
8287
|
return response.arrayBuffer();
|
|
8286
8288
|
}
|
|
@@ -8437,7 +8439,7 @@ var require_dist_node12 = __commonJS({
|
|
|
8437
8439
|
var request = require_dist_node11();
|
|
8438
8440
|
var requestError = require_dist_node7();
|
|
8439
8441
|
var btoa = _interopDefault(require_btoa_node());
|
|
8440
|
-
var VERSION = "2.0.
|
|
8442
|
+
var VERSION = "2.0.5";
|
|
8441
8443
|
function requestToOAuthBaseUrl(request2) {
|
|
8442
8444
|
const endpointDefaults = request2.endpoint.DEFAULTS;
|
|
8443
8445
|
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
|
|
@@ -8796,7 +8798,7 @@ var require_dist_node13 = __commonJS({
|
|
|
8796
8798
|
endpoint.headers.authorization = `token ${token}`;
|
|
8797
8799
|
return request2(endpoint);
|
|
8798
8800
|
}
|
|
8799
|
-
var VERSION = "4.0.
|
|
8801
|
+
var VERSION = "4.0.4";
|
|
8800
8802
|
function createOAuthDeviceAuth(options) {
|
|
8801
8803
|
const requestWithDefaults = options.request || request.request.defaults({
|
|
8802
8804
|
headers: {
|
|
@@ -8844,7 +8846,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8844
8846
|
var authOauthDevice = require_dist_node13();
|
|
8845
8847
|
var oauthMethods = require_dist_node12();
|
|
8846
8848
|
var btoa = _interopDefault(require_btoa_node());
|
|
8847
|
-
var VERSION = "2.1.
|
|
8849
|
+
var VERSION = "2.1.1";
|
|
8848
8850
|
async function getAuthentication(state) {
|
|
8849
8851
|
if ("code" in state.strategyOptions) {
|
|
8850
8852
|
const {
|
|
@@ -8901,7 +8903,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8901
8903
|
}
|
|
8902
8904
|
const currentAuthentication = state.authentication;
|
|
8903
8905
|
if ("expiresAt" in currentAuthentication) {
|
|
8904
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
8906
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
8905
8907
|
const {
|
|
8906
8908
|
authentication
|
|
8907
8909
|
} = await oauthMethods.refreshToken({
|
|
@@ -19126,7 +19128,7 @@ var require_dist_node17 = __commonJS({
|
|
|
19126
19128
|
parse
|
|
19127
19129
|
});
|
|
19128
19130
|
}
|
|
19129
|
-
var VERSION = "7.0.
|
|
19131
|
+
var VERSION = "7.0.5";
|
|
19130
19132
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
19131
19133
|
var DEFAULTS = {
|
|
19132
19134
|
method: "GET",
|
|
@@ -19158,7 +19160,7 @@ var require_dist_node18 = __commonJS({
|
|
|
19158
19160
|
var isPlainObject = require_is_plain_object();
|
|
19159
19161
|
var nodeFetch = _interopDefault(require_lib3());
|
|
19160
19162
|
var requestError = require_dist_node7();
|
|
19161
|
-
var VERSION = "6.2.
|
|
19163
|
+
var VERSION = "6.2.3";
|
|
19162
19164
|
function getBufferResponse(response) {
|
|
19163
19165
|
return response.arrayBuffer();
|
|
19164
19166
|
}
|
|
@@ -20088,7 +20090,7 @@ var require_dist_node23 = __commonJS({
|
|
|
20088
20090
|
}
|
|
20089
20091
|
const currentAuthentication = state.authentication;
|
|
20090
20092
|
if ("expiresAt" in currentAuthentication) {
|
|
20091
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
20093
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
20092
20094
|
const {
|
|
20093
20095
|
authentication
|
|
20094
20096
|
} = await oauthMethods.refreshToken({
|
|
@@ -20476,7 +20478,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20476
20478
|
const repositorySelection = repositorySelectionOptional || "all";
|
|
20477
20479
|
const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;
|
|
20478
20480
|
const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;
|
|
20479
|
-
const createdAt = new Date().toISOString();
|
|
20481
|
+
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
20480
20482
|
await set(state.cache, optionsWithInstallationTokenFromState, {
|
|
20481
20483
|
token,
|
|
20482
20484
|
createdAt,
|
|
@@ -20557,7 +20559,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20557
20559
|
if (typeof error.response.headers.date === "undefined") {
|
|
20558
20560
|
throw error;
|
|
20559
20561
|
}
|
|
20560
|
-
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse(new Date().toString())) / 1e3);
|
|
20562
|
+
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3);
|
|
20561
20563
|
state.log.warn(error.message);
|
|
20562
20564
|
state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
|
|
20563
20565
|
const {
|
|
@@ -20590,7 +20592,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20590
20592
|
return sendRequestWithRetries(state, request2, endpoint, createdAt);
|
|
20591
20593
|
}
|
|
20592
20594
|
async function sendRequestWithRetries(state, request2, options, createdAt, retries = 0) {
|
|
20593
|
-
const timeSinceTokenCreationInMs =
|
|
20595
|
+
const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);
|
|
20594
20596
|
try {
|
|
20595
20597
|
return await request2(options);
|
|
20596
20598
|
} catch (error) {
|
|
@@ -6913,7 +6913,9 @@ var require_lib3 = __commonJS({
|
|
|
6913
6913
|
if (signal && signal.aborted) {
|
|
6914
6914
|
return;
|
|
6915
6915
|
}
|
|
6916
|
-
|
|
6916
|
+
if (response && response.body) {
|
|
6917
|
+
destroyStream(response.body, err);
|
|
6918
|
+
}
|
|
6917
6919
|
});
|
|
6918
6920
|
if (parseInt(process.version.substring(1)) < 14) {
|
|
6919
6921
|
req.on("socket", function(s) {
|
|
@@ -7689,7 +7691,7 @@ var require_dist_node6 = __commonJS({
|
|
|
7689
7691
|
parse
|
|
7690
7692
|
});
|
|
7691
7693
|
}
|
|
7692
|
-
var VERSION = "7.0.
|
|
7694
|
+
var VERSION = "7.0.5";
|
|
7693
7695
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
7694
7696
|
var DEFAULTS = {
|
|
7695
7697
|
method: "GET",
|
|
@@ -7775,7 +7777,7 @@ var require_dist_node8 = __commonJS({
|
|
|
7775
7777
|
var isPlainObject = require_is_plain_object();
|
|
7776
7778
|
var nodeFetch = _interopDefault(require_lib3());
|
|
7777
7779
|
var requestError = require_dist_node7();
|
|
7778
|
-
var VERSION = "6.2.
|
|
7780
|
+
var VERSION = "6.2.3";
|
|
7779
7781
|
function getBufferResponse(response) {
|
|
7780
7782
|
return response.arrayBuffer();
|
|
7781
7783
|
}
|
|
@@ -8248,7 +8250,7 @@ var require_dist_node10 = __commonJS({
|
|
|
8248
8250
|
parse
|
|
8249
8251
|
});
|
|
8250
8252
|
}
|
|
8251
|
-
var VERSION = "7.0.
|
|
8253
|
+
var VERSION = "7.0.5";
|
|
8252
8254
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
8253
8255
|
var DEFAULTS = {
|
|
8254
8256
|
method: "GET",
|
|
@@ -8280,7 +8282,7 @@ var require_dist_node11 = __commonJS({
|
|
|
8280
8282
|
var isPlainObject = require_is_plain_object();
|
|
8281
8283
|
var nodeFetch = _interopDefault(require_lib3());
|
|
8282
8284
|
var requestError = require_dist_node7();
|
|
8283
|
-
var VERSION = "6.2.
|
|
8285
|
+
var VERSION = "6.2.3";
|
|
8284
8286
|
function getBufferResponse(response) {
|
|
8285
8287
|
return response.arrayBuffer();
|
|
8286
8288
|
}
|
|
@@ -8437,7 +8439,7 @@ var require_dist_node12 = __commonJS({
|
|
|
8437
8439
|
var request = require_dist_node11();
|
|
8438
8440
|
var requestError = require_dist_node7();
|
|
8439
8441
|
var btoa = _interopDefault(require_btoa_node());
|
|
8440
|
-
var VERSION = "2.0.
|
|
8442
|
+
var VERSION = "2.0.5";
|
|
8441
8443
|
function requestToOAuthBaseUrl(request2) {
|
|
8442
8444
|
const endpointDefaults = request2.endpoint.DEFAULTS;
|
|
8443
8445
|
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
|
|
@@ -8796,7 +8798,7 @@ var require_dist_node13 = __commonJS({
|
|
|
8796
8798
|
endpoint.headers.authorization = `token ${token}`;
|
|
8797
8799
|
return request2(endpoint);
|
|
8798
8800
|
}
|
|
8799
|
-
var VERSION = "4.0.
|
|
8801
|
+
var VERSION = "4.0.4";
|
|
8800
8802
|
function createOAuthDeviceAuth(options) {
|
|
8801
8803
|
const requestWithDefaults = options.request || request.request.defaults({
|
|
8802
8804
|
headers: {
|
|
@@ -8844,7 +8846,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8844
8846
|
var authOauthDevice = require_dist_node13();
|
|
8845
8847
|
var oauthMethods = require_dist_node12();
|
|
8846
8848
|
var btoa = _interopDefault(require_btoa_node());
|
|
8847
|
-
var VERSION = "2.1.
|
|
8849
|
+
var VERSION = "2.1.1";
|
|
8848
8850
|
async function getAuthentication(state) {
|
|
8849
8851
|
if ("code" in state.strategyOptions) {
|
|
8850
8852
|
const {
|
|
@@ -8901,7 +8903,7 @@ var require_dist_node14 = __commonJS({
|
|
|
8901
8903
|
}
|
|
8902
8904
|
const currentAuthentication = state.authentication;
|
|
8903
8905
|
if ("expiresAt" in currentAuthentication) {
|
|
8904
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
8906
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
8905
8907
|
const {
|
|
8906
8908
|
authentication
|
|
8907
8909
|
} = await oauthMethods.refreshToken({
|
|
@@ -19126,7 +19128,7 @@ var require_dist_node17 = __commonJS({
|
|
|
19126
19128
|
parse
|
|
19127
19129
|
});
|
|
19128
19130
|
}
|
|
19129
|
-
var VERSION = "7.0.
|
|
19131
|
+
var VERSION = "7.0.5";
|
|
19130
19132
|
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
|
|
19131
19133
|
var DEFAULTS = {
|
|
19132
19134
|
method: "GET",
|
|
@@ -19158,7 +19160,7 @@ var require_dist_node18 = __commonJS({
|
|
|
19158
19160
|
var isPlainObject = require_is_plain_object();
|
|
19159
19161
|
var nodeFetch = _interopDefault(require_lib3());
|
|
19160
19162
|
var requestError = require_dist_node7();
|
|
19161
|
-
var VERSION = "6.2.
|
|
19163
|
+
var VERSION = "6.2.3";
|
|
19162
19164
|
function getBufferResponse(response) {
|
|
19163
19165
|
return response.arrayBuffer();
|
|
19164
19166
|
}
|
|
@@ -20088,7 +20090,7 @@ var require_dist_node23 = __commonJS({
|
|
|
20088
20090
|
}
|
|
20089
20091
|
const currentAuthentication = state.authentication;
|
|
20090
20092
|
if ("expiresAt" in currentAuthentication) {
|
|
20091
|
-
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < new Date()) {
|
|
20093
|
+
if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
20092
20094
|
const {
|
|
20093
20095
|
authentication
|
|
20094
20096
|
} = await oauthMethods.refreshToken({
|
|
@@ -20476,7 +20478,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20476
20478
|
const repositorySelection = repositorySelectionOptional || "all";
|
|
20477
20479
|
const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0;
|
|
20478
20480
|
const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0;
|
|
20479
|
-
const createdAt = new Date().toISOString();
|
|
20481
|
+
const createdAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
20480
20482
|
await set(state.cache, optionsWithInstallationTokenFromState, {
|
|
20481
20483
|
token,
|
|
20482
20484
|
createdAt,
|
|
@@ -20557,7 +20559,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20557
20559
|
if (typeof error.response.headers.date === "undefined") {
|
|
20558
20560
|
throw error;
|
|
20559
20561
|
}
|
|
20560
|
-
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse(new Date().toString())) / 1e3);
|
|
20562
|
+
const diff = Math.floor((Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3);
|
|
20561
20563
|
state.log.warn(error.message);
|
|
20562
20564
|
state.log.warn(`[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.`);
|
|
20563
20565
|
const {
|
|
@@ -20590,7 +20592,7 @@ var require_dist_node24 = __commonJS({
|
|
|
20590
20592
|
return sendRequestWithRetries(state, request2, endpoint, createdAt);
|
|
20591
20593
|
}
|
|
20592
20594
|
async function sendRequestWithRetries(state, request2, options, createdAt, retries = 0) {
|
|
20593
|
-
const timeSinceTokenCreationInMs =
|
|
20595
|
+
const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt);
|
|
20594
20596
|
try {
|
|
20595
20597
|
return await request2(options);
|
|
20596
20598
|
} catch (error) {
|