@octokit/action
Advanced tools
Comparing version 6.0.4 to 6.0.5
@@ -23,3 +23,5 @@ "use strict"; | ||
__export(dist_src_exports, { | ||
Octokit: () => Octokit | ||
Octokit: () => Octokit, | ||
customFetch: () => customFetch, | ||
getProxyAgent: () => getProxyAgent | ||
}); | ||
@@ -33,6 +35,6 @@ module.exports = __toCommonJS(dist_src_exports); | ||
// pkg/dist-src/version.js | ||
var VERSION = "6.0.4"; | ||
var VERSION = "6.0.5"; | ||
// pkg/dist-src/index.js | ||
var import_https_proxy_agent = require("https-proxy-agent"); | ||
var import_undici = require("undici"); | ||
var DEFAULTS = { | ||
@@ -46,10 +48,16 @@ authStrategy: import_auth_action.createActionAuth, | ||
if (httpProxy) { | ||
return new import_https_proxy_agent.HttpsProxyAgent(httpProxy); | ||
return new import_undici.ProxyAgent(httpProxy); | ||
} | ||
const httpsProxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"]; | ||
if (httpsProxy) { | ||
return new import_https_proxy_agent.HttpsProxyAgent(httpsProxy); | ||
return new import_undici.ProxyAgent(httpsProxy); | ||
} | ||
return void 0; | ||
} | ||
var customFetch = async function(url, opts) { | ||
return await (0, import_undici.fetch)(url, { | ||
dispatcher: getProxyAgent(), | ||
...opts | ||
}); | ||
}; | ||
var Octokit = import_core.Octokit.plugin( | ||
@@ -63,3 +71,3 @@ import_plugin_paginate_rest.paginateRest, | ||
request: { | ||
agent: getProxyAgent(), | ||
fetch: customFetch, | ||
...options.request | ||
@@ -74,3 +82,5 @@ } | ||
0 && (module.exports = { | ||
Octokit | ||
Octokit, | ||
customFetch, | ||
getProxyAgent | ||
}); |
@@ -6,3 +6,3 @@ import { Octokit as Core } from "@octokit/core"; | ||
import { VERSION } from "./version"; | ||
import { HttpsProxyAgent } from "https-proxy-agent"; | ||
import { fetch as undiciFetch, ProxyAgent } from "undici"; | ||
const DEFAULTS = { | ||
@@ -16,10 +16,16 @@ authStrategy: createActionAuth, | ||
if (httpProxy) { | ||
return new HttpsProxyAgent(httpProxy); | ||
return new ProxyAgent(httpProxy); | ||
} | ||
const httpsProxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"]; | ||
if (httpsProxy) { | ||
return new HttpsProxyAgent(httpsProxy); | ||
return new ProxyAgent(httpsProxy); | ||
} | ||
return void 0; | ||
} | ||
const customFetch = async function(url, opts) { | ||
return await undiciFetch(url, { | ||
dispatcher: getProxyAgent(), | ||
...opts | ||
}); | ||
}; | ||
const Octokit = Core.plugin( | ||
@@ -33,3 +39,3 @@ paginateRest, | ||
request: { | ||
agent: getProxyAgent(), | ||
fetch: customFetch, | ||
...options.request | ||
@@ -43,3 +49,5 @@ } | ||
export { | ||
Octokit | ||
Octokit, | ||
customFetch, | ||
getProxyAgent | ||
}; |
@@ -1,4 +0,4 @@ | ||
const VERSION = "6.0.4"; | ||
const VERSION = "6.0.5"; | ||
export { | ||
VERSION | ||
}; |
import { Octokit as Core } from "@octokit/core"; | ||
export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; | ||
import { ProxyAgent } from "undici"; | ||
export declare function getProxyAgent(): ProxyAgent | undefined; | ||
export declare const customFetch: (url: string, opts: any) => Promise<import("undici").Response>; | ||
export declare const Octokit: typeof Core & import("@octokit/core/dist-types/types").Constructor<{ | ||
@@ -4,0 +7,0 @@ paginate: import("@octokit/plugin-paginate-rest").PaginateInterface; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "6.0.4"; | ||
export declare const VERSION = "6.0.5"; |
@@ -8,6 +8,6 @@ // pkg/dist-src/index.js | ||
// pkg/dist-src/version.js | ||
var VERSION = "6.0.4"; | ||
var VERSION = "6.0.5"; | ||
// pkg/dist-src/index.js | ||
import { HttpsProxyAgent } from "https-proxy-agent"; | ||
import { fetch as undiciFetch, ProxyAgent } from "undici"; | ||
var DEFAULTS = { | ||
@@ -21,10 +21,16 @@ authStrategy: createActionAuth, | ||
if (httpProxy) { | ||
return new HttpsProxyAgent(httpProxy); | ||
return new ProxyAgent(httpProxy); | ||
} | ||
const httpsProxy = process.env["HTTPS_PROXY"] || process.env["https_proxy"]; | ||
if (httpsProxy) { | ||
return new HttpsProxyAgent(httpsProxy); | ||
return new ProxyAgent(httpsProxy); | ||
} | ||
return void 0; | ||
} | ||
var customFetch = async function(url, opts) { | ||
return await undiciFetch(url, { | ||
dispatcher: getProxyAgent(), | ||
...opts | ||
}); | ||
}; | ||
var Octokit = Core.plugin( | ||
@@ -38,3 +44,3 @@ paginateRest, | ||
request: { | ||
agent: getProxyAgent(), | ||
fetch: customFetch, | ||
...options.request | ||
@@ -48,3 +54,5 @@ } | ||
export { | ||
Octokit | ||
Octokit, | ||
customFetch, | ||
getProxyAgent | ||
}; |
{ | ||
"name": "@octokit/action", | ||
"version": "6.0.4", | ||
"version": "6.0.5", | ||
"publishConfig": { | ||
@@ -19,8 +19,8 @@ "access": "public" | ||
"dependencies": { | ||
"@octokit/auth-action": "^3.0.0", | ||
"@octokit/core": "^4.0.0", | ||
"@octokit/plugin-paginate-rest": "^7.0.0", | ||
"@octokit/plugin-rest-endpoint-methods": "^8.0.0", | ||
"@octokit/types": "^10.0.0", | ||
"https-proxy-agent": "^7.0.0" | ||
"@octokit/auth-action": "^4.0.0", | ||
"@octokit/core": "^5.0.0", | ||
"@octokit/plugin-paginate-rest": "^8.0.0", | ||
"@octokit/plugin-rest-endpoint-methods": "^9.0.0", | ||
"@octokit/types": "^11.0.0", | ||
"undici": "^5.0.0" | ||
}, | ||
@@ -32,6 +32,6 @@ "devDependencies": { | ||
"esbuild": "^0.18.0", | ||
"fetch-mock": "^9.0.0", | ||
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1", | ||
"glob": "^10.2.6", | ||
"jest": "^29.0.0", | ||
"prettier": "2.8.8", | ||
"prettier": "3.0.0", | ||
"semantic-release-plugin-update-version-in-files": "^1.0.0", | ||
@@ -38,0 +38,0 @@ "ts-jest": "^29.0.0", |
@@ -110,3 +110,3 @@ # action.js | ||
title: "My test issue", | ||
} | ||
}, | ||
); | ||
@@ -113,0 +113,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
18038
193
0
+ Addedundici@^5.0.0
+ Added@fastify/busboy@2.1.1(transitive)
+ Added@octokit/auth-action@4.1.0(transitive)
+ Added@octokit/core@5.2.0(transitive)
+ Added@octokit/endpoint@9.0.5(transitive)
+ Added@octokit/graphql@7.1.0(transitive)
+ Added@octokit/openapi-types@22.2.0(transitive)
+ Added@octokit/plugin-paginate-rest@8.0.0(transitive)
+ Added@octokit/plugin-rest-endpoint-methods@9.0.0(transitive)
+ Added@octokit/request@8.4.0(transitive)
+ Added@octokit/request-error@5.1.0(transitive)
+ Added@octokit/types@11.1.013.5.0(transitive)
+ Addedundici@5.28.4(transitive)
- Removedhttps-proxy-agent@^7.0.0
- Removed@octokit/auth-action@3.0.2(transitive)
- Removed@octokit/auth-token@3.0.4(transitive)
- Removed@octokit/core@4.2.4(transitive)
- Removed@octokit/endpoint@7.0.6(transitive)
- Removed@octokit/graphql@5.0.6(transitive)
- Removed@octokit/plugin-paginate-rest@7.1.2(transitive)
- Removed@octokit/plugin-rest-endpoint-methods@8.0.0(transitive)
- Removed@octokit/request@6.2.8(transitive)
- Removed@octokit/request-error@3.0.3(transitive)
- Removed@octokit/tsconfig@2.0.0(transitive)
- Removed@octokit/types@10.0.09.3.2(transitive)
- Removedagent-base@7.1.1(transitive)
- Removeddebug@4.3.4(transitive)
- Removedhttps-proxy-agent@7.0.4(transitive)
- Removedis-plain-object@5.0.0(transitive)
- Removedms@2.1.2(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updated@octokit/auth-action@^4.0.0
Updated@octokit/core@^5.0.0
Updated@octokit/types@^11.0.0