Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31c86eb3b3 | |||
| cc82279e84 | |||
| 74cd7f68cb | |||
| ad38cffc07 | |||
| 66a7045686 | |||
| d2eeb384df | |||
| 0fd38177ed | |||
| b3be847492 |
@@ -12,6 +12,9 @@ In order to use this action, you need to:
|
||||
2. [Store the App's ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`)
|
||||
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`)
|
||||
|
||||
> [!IMPORTANT]
|
||||
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
|
||||
|
||||
### Create a token for the current repository
|
||||
|
||||
```yaml
|
||||
@@ -61,6 +64,64 @@ jobs:
|
||||
github_token: ${{ steps.app-token.outputs.token }}
|
||||
```
|
||||
|
||||
### Create a git committer string for an app installation
|
||||
|
||||
```yaml
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
auto-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
# required
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
private-key: ${{ secrets.PRIVATE_KEY }}
|
||||
- name: Retrieve GitHub App User ID
|
||||
id: get-user-id
|
||||
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
- id: committer
|
||||
run: echo "string=${{steps.app-token.outputs.app-slug}}[bot] <${{steps.get-user-id.outputs.user-id}}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>" >> "$GITHUB_OUTPUT"
|
||||
- run: echo "committer string is ${{steps.committer.outputs.string}}"
|
||||
```
|
||||
|
||||
### Configure git CLI for an app's bot user
|
||||
|
||||
```yaml
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
auto-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
# required
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
private-key: ${{ secrets.PRIVATE_KEY }}
|
||||
- name: Retrieve GitHub App User ID
|
||||
id: get-user-id
|
||||
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
- run: |
|
||||
git config --global user.name '${{steps.app-token.outputs.app-slug}}[bot]'
|
||||
git config --global user.email '${{steps.get-user-id.outputs.user-id}}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
|
||||
# git commands like commit work using the bot user
|
||||
- run: |
|
||||
git add .
|
||||
git commit -m "Auto-generated changes"
|
||||
git push
|
||||
```
|
||||
|
||||
The `<BOT USER ID>` is the numeric user ID of the app's bot user, which can be found under `https://api.github.com/users/<app-slug>%5Bbot%5D`.
|
||||
For example, we can check at `https://api.github.com/users/dependabot%5Bbot%5D` to see the user ID of dependabot is 49699333.
|
||||
|
||||
### Create a token for all repositories in the current owner's installation
|
||||
|
||||
```yaml
|
||||
|
||||
Vendored
+109
-124
@@ -20172,6 +20172,27 @@ var require_util8 = __commonJS({
|
||||
}
|
||||
var kEnumerableProperty = /* @__PURE__ */ Object.create(null);
|
||||
kEnumerableProperty.enumerable = true;
|
||||
var normalizedMethodRecordsBase = {
|
||||
delete: "DELETE",
|
||||
DELETE: "DELETE",
|
||||
get: "GET",
|
||||
GET: "GET",
|
||||
head: "HEAD",
|
||||
HEAD: "HEAD",
|
||||
options: "OPTIONS",
|
||||
OPTIONS: "OPTIONS",
|
||||
post: "POST",
|
||||
POST: "POST",
|
||||
put: "PUT",
|
||||
PUT: "PUT"
|
||||
};
|
||||
var normalizedMethodRecords = {
|
||||
...normalizedMethodRecordsBase,
|
||||
patch: "patch",
|
||||
PATCH: "PATCH"
|
||||
};
|
||||
Object.setPrototypeOf(normalizedMethodRecordsBase, null);
|
||||
Object.setPrototypeOf(normalizedMethodRecords, null);
|
||||
module2.exports = {
|
||||
kEnumerableProperty,
|
||||
nop,
|
||||
@@ -20210,6 +20231,8 @@ var require_util8 = __commonJS({
|
||||
isValidHeaderValue,
|
||||
isTokenCharCode,
|
||||
parseRangeHeader,
|
||||
normalizedMethodRecordsBase,
|
||||
normalizedMethodRecords,
|
||||
isValidPort,
|
||||
isHttpOrHttpsPrefixed,
|
||||
nodeMajor,
|
||||
@@ -20425,7 +20448,8 @@ var require_request3 = __commonJS({
|
||||
isBlobLike,
|
||||
buildURL,
|
||||
validateHandler,
|
||||
getServerName
|
||||
getServerName,
|
||||
normalizedMethodRecords
|
||||
} = require_util8();
|
||||
var { channels } = require_diagnostics();
|
||||
var { headerNameLowerCasedRecord } = require_constants6();
|
||||
@@ -20452,12 +20476,12 @@ var require_request3 = __commonJS({
|
||||
throw new InvalidArgumentError("path must be a string");
|
||||
} else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
|
||||
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
||||
} else if (invalidPathRegex.exec(path) !== null) {
|
||||
} else if (invalidPathRegex.test(path)) {
|
||||
throw new InvalidArgumentError("invalid request path");
|
||||
}
|
||||
if (typeof method !== "string") {
|
||||
throw new InvalidArgumentError("method must be a string");
|
||||
} else if (!isValidHTTPToken(method)) {
|
||||
} else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) {
|
||||
throw new InvalidArgumentError("invalid request method");
|
||||
}
|
||||
if (upgrade && typeof upgrade !== "string") {
|
||||
@@ -21002,7 +21026,7 @@ var require_connect2 = __commonJS({
|
||||
}
|
||||
};
|
||||
}
|
||||
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {
|
||||
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
|
||||
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
|
||||
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
|
||||
}
|
||||
@@ -21018,7 +21042,7 @@ var require_connect2 = __commonJS({
|
||||
}
|
||||
servername = servername || options.servername || util.getServerName(host) || null;
|
||||
const sessionKey = servername || hostname;
|
||||
const session = sessionCache.get(sessionKey) || null;
|
||||
const session = customSession || sessionCache.get(sessionKey) || null;
|
||||
assert(sessionKey);
|
||||
socket = tls.connect({
|
||||
highWaterMark: 16384,
|
||||
@@ -22536,7 +22560,7 @@ var require_util9 = __commonJS({
|
||||
var { getGlobalOrigin } = require_global3();
|
||||
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
|
||||
var { performance: performance2 } = require("node:perf_hooks");
|
||||
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8();
|
||||
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
|
||||
var assert = require("node:assert");
|
||||
var { isUint8Array } = require("node:util/types");
|
||||
var { webidl } = require_webidl2();
|
||||
@@ -22643,7 +22667,7 @@ var require_util9 = __commonJS({
|
||||
}
|
||||
function appendRequestOriginHeader(request2) {
|
||||
let serializedOrigin = request2.origin;
|
||||
if (serializedOrigin === "client") {
|
||||
if (serializedOrigin === "client" || serializedOrigin === void 0) {
|
||||
return;
|
||||
}
|
||||
if (request2.responseTainting === "cors" || request2.mode === "websocket") {
|
||||
@@ -22924,29 +22948,8 @@ var require_util9 = __commonJS({
|
||||
function isCancelled(fetchParams) {
|
||||
return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
|
||||
}
|
||||
var normalizeMethodRecordBase = {
|
||||
delete: "DELETE",
|
||||
DELETE: "DELETE",
|
||||
get: "GET",
|
||||
GET: "GET",
|
||||
head: "HEAD",
|
||||
HEAD: "HEAD",
|
||||
options: "OPTIONS",
|
||||
OPTIONS: "OPTIONS",
|
||||
post: "POST",
|
||||
POST: "POST",
|
||||
put: "PUT",
|
||||
PUT: "PUT"
|
||||
};
|
||||
var normalizeMethodRecord = {
|
||||
...normalizeMethodRecordBase,
|
||||
patch: "patch",
|
||||
PATCH: "PATCH"
|
||||
};
|
||||
Object.setPrototypeOf(normalizeMethodRecordBase, null);
|
||||
Object.setPrototypeOf(normalizeMethodRecord, null);
|
||||
function normalizeMethod(method) {
|
||||
return normalizeMethodRecordBase[method.toLowerCase()] ?? method;
|
||||
return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
|
||||
}
|
||||
function serializeJavascriptValueToJSONString(value) {
|
||||
const result = JSON.stringify(value);
|
||||
@@ -23083,7 +23086,7 @@ var require_util9 = __commonJS({
|
||||
}
|
||||
});
|
||||
}
|
||||
async function fullyReadBody(body, processBody, processBodyError, shouldClone) {
|
||||
async function fullyReadBody(body, processBody, processBodyError) {
|
||||
const successSteps = processBody;
|
||||
const errorSteps = processBodyError;
|
||||
let reader;
|
||||
@@ -23094,7 +23097,7 @@ var require_util9 = __commonJS({
|
||||
return;
|
||||
}
|
||||
try {
|
||||
successSteps(await readAllBytes(reader, shouldClone));
|
||||
successSteps(await readAllBytes(reader));
|
||||
} catch (e) {
|
||||
errorSteps(e);
|
||||
}
|
||||
@@ -23117,19 +23120,12 @@ var require_util9 = __commonJS({
|
||||
assert(!invalidIsomorphicEncodeValueRegex.test(input));
|
||||
return input;
|
||||
}
|
||||
async function readAllBytes(reader, shouldClone) {
|
||||
async function readAllBytes(reader) {
|
||||
const bytes = [];
|
||||
let byteLength = 0;
|
||||
while (true) {
|
||||
const { done, value: chunk } = await reader.read();
|
||||
if (done) {
|
||||
if (bytes.length === 1) {
|
||||
const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0];
|
||||
if (shouldClone === false) {
|
||||
return Buffer.from(buffer, byteOffset, byteLength2);
|
||||
}
|
||||
return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2);
|
||||
}
|
||||
return Buffer.concat(bytes, byteLength);
|
||||
}
|
||||
if (!isUint8Array(chunk)) {
|
||||
@@ -23392,7 +23388,6 @@ var require_util9 = __commonJS({
|
||||
urlHasHttpsScheme,
|
||||
urlIsHttpHttpsScheme,
|
||||
readAllBytes,
|
||||
normalizeMethodRecord,
|
||||
simpleRangeHeaderValue,
|
||||
buildContentRange,
|
||||
parseMetadata,
|
||||
@@ -24064,18 +24059,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
mimeType = serializeAMimeType(mimeType);
|
||||
}
|
||||
return new Blob2([bytes], { type: mimeType });
|
||||
}, instance, false);
|
||||
}, instance);
|
||||
},
|
||||
arrayBuffer() {
|
||||
return consumeBody(this, (bytes) => {
|
||||
return bytes.buffer;
|
||||
}, instance, true);
|
||||
return new Uint8Array(bytes).buffer;
|
||||
}, instance);
|
||||
},
|
||||
text() {
|
||||
return consumeBody(this, utf8DecodeBytes, instance, false);
|
||||
return consumeBody(this, utf8DecodeBytes, instance);
|
||||
},
|
||||
json() {
|
||||
return consumeBody(this, parseJSONFromBytes, instance, false);
|
||||
return consumeBody(this, parseJSONFromBytes, instance);
|
||||
},
|
||||
formData() {
|
||||
return consumeBody(this, (value) => {
|
||||
@@ -24104,12 +24099,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
throw new TypeError(
|
||||
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
|
||||
);
|
||||
}, instance, false);
|
||||
}, instance);
|
||||
},
|
||||
bytes() {
|
||||
return consumeBody(this, (bytes) => {
|
||||
return new Uint8Array(bytes.buffer, 0, bytes.byteLength);
|
||||
}, instance, true);
|
||||
return new Uint8Array(bytes);
|
||||
}, instance);
|
||||
}
|
||||
};
|
||||
return methods;
|
||||
@@ -24117,7 +24112,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
function mixinBody(prototype) {
|
||||
Object.assign(prototype.prototype, bodyMixinMethods(prototype));
|
||||
}
|
||||
async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) {
|
||||
async function consumeBody(object, convertBytesToJSValue, instance) {
|
||||
webidl.brandCheck(object, instance);
|
||||
if (bodyUnusable(object[kState].body)) {
|
||||
throw new TypeError("Body is unusable: Body has already been read");
|
||||
@@ -24136,7 +24131,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
successSteps(Buffer.allocUnsafe(0));
|
||||
return promise.promise;
|
||||
}
|
||||
await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone);
|
||||
await fullyReadBody(object[kState].body, successSteps, errorSteps);
|
||||
return promise.promise;
|
||||
}
|
||||
function bodyUnusable(body) {
|
||||
@@ -24889,25 +24884,25 @@ upgrade: ${upgrade}\r
|
||||
channels.sendHeaders.publish({ request: request2, headers: header, socket });
|
||||
}
|
||||
if (!body || bodyLength === 0) {
|
||||
writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isBuffer(body)) {
|
||||
writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isBlobLike(body)) {
|
||||
if (typeof body.stream === "function") {
|
||||
writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else {
|
||||
writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
}
|
||||
} else if (util.isStream(body)) {
|
||||
writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isIterable(body)) {
|
||||
writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
||||
let finished = false;
|
||||
const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
|
||||
@@ -24976,7 +24971,7 @@ upgrade: ${upgrade}\r
|
||||
setImmediate(onClose);
|
||||
}
|
||||
}
|
||||
function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
try {
|
||||
if (!body) {
|
||||
if (contentLength === 0) {
|
||||
@@ -25007,7 +25002,7 @@ upgrade: ${upgrade}\r
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength === body.size, "blob body must have content length");
|
||||
try {
|
||||
if (contentLength != null && contentLength !== body.size) {
|
||||
@@ -25030,7 +25025,7 @@ upgrade: ${upgrade}\r
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
||||
let callback = null;
|
||||
function onDrain() {
|
||||
@@ -25493,81 +25488,79 @@ var require_client_h2 = __commonJS({
|
||||
return true;
|
||||
function writeBodyH2() {
|
||||
if (!body || contentLength === 0) {
|
||||
writeBuffer({
|
||||
writeBuffer(
|
||||
abort,
|
||||
stream,
|
||||
null,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
body: null,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else if (util.isBuffer(body)) {
|
||||
writeBuffer({
|
||||
writeBuffer(
|
||||
abort,
|
||||
client,
|
||||
request: request2,
|
||||
contentLength,
|
||||
stream,
|
||||
body,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
client,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload
|
||||
);
|
||||
} else if (util.isBlobLike(body)) {
|
||||
if (typeof body.stream === "function") {
|
||||
writeIterable({
|
||||
writeIterable(
|
||||
abort,
|
||||
stream,
|
||||
body.stream(),
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
body: body.stream(),
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else {
|
||||
writeBlob({
|
||||
writeBlob(
|
||||
abort,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
}
|
||||
} else if (util.isStream(body)) {
|
||||
writeStream({
|
||||
writeStream(
|
||||
abort,
|
||||
client[kSocket],
|
||||
expectsPayload,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
socket: client[kSocket],
|
||||
h2stream: stream,
|
||||
header: ""
|
||||
});
|
||||
request2,
|
||||
contentLength
|
||||
);
|
||||
} else if (util.isIterable(body)) {
|
||||
writeIterable({
|
||||
writeIterable(
|
||||
abort,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
header: "",
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
try {
|
||||
if (body != null && util.isBuffer(body)) {
|
||||
assert(contentLength === body.byteLength, "buffer body must have content length");
|
||||
@@ -25586,7 +25579,7 @@ var require_client_h2 = __commonJS({
|
||||
abort(error);
|
||||
}
|
||||
}
|
||||
function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) {
|
||||
function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
||||
const pipe = pipeline(
|
||||
body,
|
||||
@@ -25610,7 +25603,7 @@ var require_client_h2 = __commonJS({
|
||||
request2.onBodySent(chunk);
|
||||
}
|
||||
}
|
||||
async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
assert(contentLength === body.size, "blob body must have content length");
|
||||
try {
|
||||
if (contentLength != null && contentLength !== body.size) {
|
||||
@@ -25631,7 +25624,7 @@ var require_client_h2 = __commonJS({
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
||||
let callback = null;
|
||||
function onDrain() {
|
||||
@@ -27376,7 +27369,7 @@ var require_retry_handler = __commonJS({
|
||||
this.abort(
|
||||
new RequestRetryError("Content-Range mismatch", statusCode, {
|
||||
headers,
|
||||
count: this.retryCount
|
||||
data: { count: this.retryCount }
|
||||
})
|
||||
);
|
||||
return false;
|
||||
@@ -27385,7 +27378,7 @@ var require_retry_handler = __commonJS({
|
||||
this.abort(
|
||||
new RequestRetryError("ETag mismatch", statusCode, {
|
||||
headers,
|
||||
count: this.retryCount
|
||||
data: { count: this.retryCount }
|
||||
})
|
||||
);
|
||||
return false;
|
||||
@@ -30609,9 +30602,7 @@ var require_request4 = __commonJS({
|
||||
var {
|
||||
isValidHTTPToken,
|
||||
sameOrigin,
|
||||
normalizeMethod,
|
||||
environmentSettingsObject,
|
||||
normalizeMethodRecord
|
||||
environmentSettingsObject
|
||||
} = require_util9();
|
||||
var {
|
||||
forbiddenMethodsSet,
|
||||
@@ -30623,7 +30614,7 @@ var require_request4 = __commonJS({
|
||||
requestCache,
|
||||
requestDuplex
|
||||
} = require_constants8();
|
||||
var { kEnumerableProperty } = util;
|
||||
var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
|
||||
var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7();
|
||||
var { webidl } = require_webidl2();
|
||||
var { URLSerializer } = require_data_url();
|
||||
@@ -30820,17 +30811,18 @@ var require_request4 = __commonJS({
|
||||
}
|
||||
if (init.method !== void 0) {
|
||||
let method = init.method;
|
||||
const mayBeNormalized = normalizeMethodRecord[method];
|
||||
const mayBeNormalized = normalizedMethodRecords[method];
|
||||
if (mayBeNormalized !== void 0) {
|
||||
request2.method = mayBeNormalized;
|
||||
} else {
|
||||
if (!isValidHTTPToken(method)) {
|
||||
throw new TypeError(`'${method}' is not a valid HTTP method.`);
|
||||
}
|
||||
if (forbiddenMethodsSet.has(method.toUpperCase())) {
|
||||
const upperCase = method.toUpperCase();
|
||||
if (forbiddenMethodsSet.has(upperCase)) {
|
||||
throw new TypeError(`'${method}' HTTP method is unsupported.`);
|
||||
}
|
||||
method = normalizeMethod(method);
|
||||
method = normalizedMethodRecordsBase[upperCase] ?? method;
|
||||
request2.method = method;
|
||||
}
|
||||
if (!patchMethodWarning && request2.method === "patch") {
|
||||
@@ -35546,7 +35538,6 @@ var require_websocket2 = __commonJS({
|
||||
var { types } = require("node:util");
|
||||
var { ErrorEvent, CloseEvent } = require_events2();
|
||||
var { SendQueue } = require_sender();
|
||||
var experimentalWarned = false;
|
||||
var WebSocket = class _WebSocket extends EventTarget {
|
||||
#events = {
|
||||
open: null,
|
||||
@@ -35567,12 +35558,6 @@ var require_websocket2 = __commonJS({
|
||||
super();
|
||||
const prefix = "WebSocket constructor";
|
||||
webidl.argumentLengthCheck(arguments, 1, prefix);
|
||||
if (!experimentalWarned) {
|
||||
experimentalWarned = true;
|
||||
process.emitWarning("WebSockets are experimental, expect them to change at any time.", {
|
||||
code: "UNDICI-WS"
|
||||
});
|
||||
}
|
||||
const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
|
||||
url = webidl.converters.USVString(url, prefix, "url");
|
||||
protocols = options.protocols;
|
||||
@@ -39753,7 +39738,7 @@ async function main(appId2, privateKey2, owner2, repositories2, core3, createApp
|
||||
core3.setOutput("app-slug", appSlug);
|
||||
if (!skipTokenRevoke2) {
|
||||
core3.saveState("token", authentication.token);
|
||||
core3.setOutput("expiresAt", authentication.expiresAt);
|
||||
core3.saveState("expiresAt", authentication.expiresAt);
|
||||
}
|
||||
}
|
||||
async function getTokenFromOwner(request2, auth5, parsedOwner) {
|
||||
|
||||
Vendored
+108
-123
@@ -19943,6 +19943,27 @@ var require_util8 = __commonJS({
|
||||
}
|
||||
var kEnumerableProperty = /* @__PURE__ */ Object.create(null);
|
||||
kEnumerableProperty.enumerable = true;
|
||||
var normalizedMethodRecordsBase = {
|
||||
delete: "DELETE",
|
||||
DELETE: "DELETE",
|
||||
get: "GET",
|
||||
GET: "GET",
|
||||
head: "HEAD",
|
||||
HEAD: "HEAD",
|
||||
options: "OPTIONS",
|
||||
OPTIONS: "OPTIONS",
|
||||
post: "POST",
|
||||
POST: "POST",
|
||||
put: "PUT",
|
||||
PUT: "PUT"
|
||||
};
|
||||
var normalizedMethodRecords = {
|
||||
...normalizedMethodRecordsBase,
|
||||
patch: "patch",
|
||||
PATCH: "PATCH"
|
||||
};
|
||||
Object.setPrototypeOf(normalizedMethodRecordsBase, null);
|
||||
Object.setPrototypeOf(normalizedMethodRecords, null);
|
||||
module2.exports = {
|
||||
kEnumerableProperty,
|
||||
nop,
|
||||
@@ -19981,6 +20002,8 @@ var require_util8 = __commonJS({
|
||||
isValidHeaderValue,
|
||||
isTokenCharCode,
|
||||
parseRangeHeader,
|
||||
normalizedMethodRecordsBase,
|
||||
normalizedMethodRecords,
|
||||
isValidPort,
|
||||
isHttpOrHttpsPrefixed,
|
||||
nodeMajor,
|
||||
@@ -20196,7 +20219,8 @@ var require_request3 = __commonJS({
|
||||
isBlobLike,
|
||||
buildURL,
|
||||
validateHandler,
|
||||
getServerName
|
||||
getServerName,
|
||||
normalizedMethodRecords
|
||||
} = require_util8();
|
||||
var { channels } = require_diagnostics();
|
||||
var { headerNameLowerCasedRecord } = require_constants6();
|
||||
@@ -20223,12 +20247,12 @@ var require_request3 = __commonJS({
|
||||
throw new InvalidArgumentError("path must be a string");
|
||||
} else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
|
||||
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
||||
} else if (invalidPathRegex.exec(path) !== null) {
|
||||
} else if (invalidPathRegex.test(path)) {
|
||||
throw new InvalidArgumentError("invalid request path");
|
||||
}
|
||||
if (typeof method !== "string") {
|
||||
throw new InvalidArgumentError("method must be a string");
|
||||
} else if (!isValidHTTPToken(method)) {
|
||||
} else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) {
|
||||
throw new InvalidArgumentError("invalid request method");
|
||||
}
|
||||
if (upgrade && typeof upgrade !== "string") {
|
||||
@@ -20773,7 +20797,7 @@ var require_connect2 = __commonJS({
|
||||
}
|
||||
};
|
||||
}
|
||||
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {
|
||||
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
|
||||
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
|
||||
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
|
||||
}
|
||||
@@ -20789,7 +20813,7 @@ var require_connect2 = __commonJS({
|
||||
}
|
||||
servername = servername || options.servername || util.getServerName(host) || null;
|
||||
const sessionKey = servername || hostname;
|
||||
const session = sessionCache.get(sessionKey) || null;
|
||||
const session = customSession || sessionCache.get(sessionKey) || null;
|
||||
assert(sessionKey);
|
||||
socket = tls.connect({
|
||||
highWaterMark: 16384,
|
||||
@@ -22307,7 +22331,7 @@ var require_util9 = __commonJS({
|
||||
var { getGlobalOrigin } = require_global3();
|
||||
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
|
||||
var { performance: performance2 } = require("node:perf_hooks");
|
||||
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8();
|
||||
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
|
||||
var assert = require("node:assert");
|
||||
var { isUint8Array } = require("node:util/types");
|
||||
var { webidl } = require_webidl2();
|
||||
@@ -22414,7 +22438,7 @@ var require_util9 = __commonJS({
|
||||
}
|
||||
function appendRequestOriginHeader(request2) {
|
||||
let serializedOrigin = request2.origin;
|
||||
if (serializedOrigin === "client") {
|
||||
if (serializedOrigin === "client" || serializedOrigin === void 0) {
|
||||
return;
|
||||
}
|
||||
if (request2.responseTainting === "cors" || request2.mode === "websocket") {
|
||||
@@ -22695,29 +22719,8 @@ var require_util9 = __commonJS({
|
||||
function isCancelled(fetchParams) {
|
||||
return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
|
||||
}
|
||||
var normalizeMethodRecordBase = {
|
||||
delete: "DELETE",
|
||||
DELETE: "DELETE",
|
||||
get: "GET",
|
||||
GET: "GET",
|
||||
head: "HEAD",
|
||||
HEAD: "HEAD",
|
||||
options: "OPTIONS",
|
||||
OPTIONS: "OPTIONS",
|
||||
post: "POST",
|
||||
POST: "POST",
|
||||
put: "PUT",
|
||||
PUT: "PUT"
|
||||
};
|
||||
var normalizeMethodRecord = {
|
||||
...normalizeMethodRecordBase,
|
||||
patch: "patch",
|
||||
PATCH: "PATCH"
|
||||
};
|
||||
Object.setPrototypeOf(normalizeMethodRecordBase, null);
|
||||
Object.setPrototypeOf(normalizeMethodRecord, null);
|
||||
function normalizeMethod(method) {
|
||||
return normalizeMethodRecordBase[method.toLowerCase()] ?? method;
|
||||
return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
|
||||
}
|
||||
function serializeJavascriptValueToJSONString(value) {
|
||||
const result = JSON.stringify(value);
|
||||
@@ -22854,7 +22857,7 @@ var require_util9 = __commonJS({
|
||||
}
|
||||
});
|
||||
}
|
||||
async function fullyReadBody(body, processBody, processBodyError, shouldClone) {
|
||||
async function fullyReadBody(body, processBody, processBodyError) {
|
||||
const successSteps = processBody;
|
||||
const errorSteps = processBodyError;
|
||||
let reader;
|
||||
@@ -22865,7 +22868,7 @@ var require_util9 = __commonJS({
|
||||
return;
|
||||
}
|
||||
try {
|
||||
successSteps(await readAllBytes(reader, shouldClone));
|
||||
successSteps(await readAllBytes(reader));
|
||||
} catch (e) {
|
||||
errorSteps(e);
|
||||
}
|
||||
@@ -22888,19 +22891,12 @@ var require_util9 = __commonJS({
|
||||
assert(!invalidIsomorphicEncodeValueRegex.test(input));
|
||||
return input;
|
||||
}
|
||||
async function readAllBytes(reader, shouldClone) {
|
||||
async function readAllBytes(reader) {
|
||||
const bytes = [];
|
||||
let byteLength = 0;
|
||||
while (true) {
|
||||
const { done, value: chunk } = await reader.read();
|
||||
if (done) {
|
||||
if (bytes.length === 1) {
|
||||
const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0];
|
||||
if (shouldClone === false) {
|
||||
return Buffer.from(buffer, byteOffset, byteLength2);
|
||||
}
|
||||
return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2);
|
||||
}
|
||||
return Buffer.concat(bytes, byteLength);
|
||||
}
|
||||
if (!isUint8Array(chunk)) {
|
||||
@@ -23163,7 +23159,6 @@ var require_util9 = __commonJS({
|
||||
urlHasHttpsScheme,
|
||||
urlIsHttpHttpsScheme,
|
||||
readAllBytes,
|
||||
normalizeMethodRecord,
|
||||
simpleRangeHeaderValue,
|
||||
buildContentRange,
|
||||
parseMetadata,
|
||||
@@ -23835,18 +23830,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
mimeType = serializeAMimeType(mimeType);
|
||||
}
|
||||
return new Blob2([bytes], { type: mimeType });
|
||||
}, instance, false);
|
||||
}, instance);
|
||||
},
|
||||
arrayBuffer() {
|
||||
return consumeBody(this, (bytes) => {
|
||||
return bytes.buffer;
|
||||
}, instance, true);
|
||||
return new Uint8Array(bytes).buffer;
|
||||
}, instance);
|
||||
},
|
||||
text() {
|
||||
return consumeBody(this, utf8DecodeBytes, instance, false);
|
||||
return consumeBody(this, utf8DecodeBytes, instance);
|
||||
},
|
||||
json() {
|
||||
return consumeBody(this, parseJSONFromBytes, instance, false);
|
||||
return consumeBody(this, parseJSONFromBytes, instance);
|
||||
},
|
||||
formData() {
|
||||
return consumeBody(this, (value) => {
|
||||
@@ -23875,12 +23870,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
throw new TypeError(
|
||||
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
|
||||
);
|
||||
}, instance, false);
|
||||
}, instance);
|
||||
},
|
||||
bytes() {
|
||||
return consumeBody(this, (bytes) => {
|
||||
return new Uint8Array(bytes.buffer, 0, bytes.byteLength);
|
||||
}, instance, true);
|
||||
return new Uint8Array(bytes);
|
||||
}, instance);
|
||||
}
|
||||
};
|
||||
return methods;
|
||||
@@ -23888,7 +23883,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
function mixinBody(prototype) {
|
||||
Object.assign(prototype.prototype, bodyMixinMethods(prototype));
|
||||
}
|
||||
async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) {
|
||||
async function consumeBody(object, convertBytesToJSValue, instance) {
|
||||
webidl.brandCheck(object, instance);
|
||||
if (bodyUnusable(object[kState].body)) {
|
||||
throw new TypeError("Body is unusable: Body has already been read");
|
||||
@@ -23907,7 +23902,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
|
||||
successSteps(Buffer.allocUnsafe(0));
|
||||
return promise.promise;
|
||||
}
|
||||
await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone);
|
||||
await fullyReadBody(object[kState].body, successSteps, errorSteps);
|
||||
return promise.promise;
|
||||
}
|
||||
function bodyUnusable(body) {
|
||||
@@ -24660,25 +24655,25 @@ upgrade: ${upgrade}\r
|
||||
channels.sendHeaders.publish({ request: request2, headers: header, socket });
|
||||
}
|
||||
if (!body || bodyLength === 0) {
|
||||
writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isBuffer(body)) {
|
||||
writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isBlobLike(body)) {
|
||||
if (typeof body.stream === "function") {
|
||||
writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else {
|
||||
writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
}
|
||||
} else if (util.isStream(body)) {
|
||||
writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else if (util.isIterable(body)) {
|
||||
writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
|
||||
writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
||||
let finished = false;
|
||||
const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
|
||||
@@ -24747,7 +24742,7 @@ upgrade: ${upgrade}\r
|
||||
setImmediate(onClose);
|
||||
}
|
||||
}
|
||||
function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
try {
|
||||
if (!body) {
|
||||
if (contentLength === 0) {
|
||||
@@ -24778,7 +24773,7 @@ upgrade: ${upgrade}\r
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength === body.size, "blob body must have content length");
|
||||
try {
|
||||
if (contentLength != null && contentLength !== body.size) {
|
||||
@@ -24801,7 +24796,7 @@ upgrade: ${upgrade}\r
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
|
||||
async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
||||
let callback = null;
|
||||
function onDrain() {
|
||||
@@ -25264,81 +25259,79 @@ var require_client_h2 = __commonJS({
|
||||
return true;
|
||||
function writeBodyH2() {
|
||||
if (!body || contentLength === 0) {
|
||||
writeBuffer({
|
||||
writeBuffer(
|
||||
abort,
|
||||
stream,
|
||||
null,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
body: null,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else if (util.isBuffer(body)) {
|
||||
writeBuffer({
|
||||
writeBuffer(
|
||||
abort,
|
||||
client,
|
||||
request: request2,
|
||||
contentLength,
|
||||
stream,
|
||||
body,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
client,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload
|
||||
);
|
||||
} else if (util.isBlobLike(body)) {
|
||||
if (typeof body.stream === "function") {
|
||||
writeIterable({
|
||||
writeIterable(
|
||||
abort,
|
||||
stream,
|
||||
body.stream(),
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
body: body.stream(),
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else {
|
||||
writeBlob({
|
||||
writeBlob(
|
||||
abort,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
}
|
||||
} else if (util.isStream(body)) {
|
||||
writeStream({
|
||||
writeStream(
|
||||
abort,
|
||||
client[kSocket],
|
||||
expectsPayload,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
socket: client[kSocket],
|
||||
h2stream: stream,
|
||||
header: ""
|
||||
});
|
||||
request2,
|
||||
contentLength
|
||||
);
|
||||
} else if (util.isIterable(body)) {
|
||||
writeIterable({
|
||||
writeIterable(
|
||||
abort,
|
||||
stream,
|
||||
body,
|
||||
client,
|
||||
request: request2,
|
||||
request2,
|
||||
client[kSocket],
|
||||
contentLength,
|
||||
expectsPayload,
|
||||
header: "",
|
||||
h2stream: stream,
|
||||
socket: client[kSocket]
|
||||
});
|
||||
expectsPayload
|
||||
);
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
try {
|
||||
if (body != null && util.isBuffer(body)) {
|
||||
assert(contentLength === body.byteLength, "buffer body must have content length");
|
||||
@@ -25357,7 +25350,7 @@ var require_client_h2 = __commonJS({
|
||||
abort(error);
|
||||
}
|
||||
}
|
||||
function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) {
|
||||
function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
|
||||
const pipe = pipeline(
|
||||
body,
|
||||
@@ -25381,7 +25374,7 @@ var require_client_h2 = __commonJS({
|
||||
request2.onBodySent(chunk);
|
||||
}
|
||||
}
|
||||
async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
assert(contentLength === body.size, "blob body must have content length");
|
||||
try {
|
||||
if (contentLength != null && contentLength !== body.size) {
|
||||
@@ -25402,7 +25395,7 @@ var require_client_h2 = __commonJS({
|
||||
abort(err);
|
||||
}
|
||||
}
|
||||
async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
|
||||
async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
|
||||
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
|
||||
let callback = null;
|
||||
function onDrain() {
|
||||
@@ -27147,7 +27140,7 @@ var require_retry_handler = __commonJS({
|
||||
this.abort(
|
||||
new RequestRetryError("Content-Range mismatch", statusCode, {
|
||||
headers,
|
||||
count: this.retryCount
|
||||
data: { count: this.retryCount }
|
||||
})
|
||||
);
|
||||
return false;
|
||||
@@ -27156,7 +27149,7 @@ var require_retry_handler = __commonJS({
|
||||
this.abort(
|
||||
new RequestRetryError("ETag mismatch", statusCode, {
|
||||
headers,
|
||||
count: this.retryCount
|
||||
data: { count: this.retryCount }
|
||||
})
|
||||
);
|
||||
return false;
|
||||
@@ -30380,9 +30373,7 @@ var require_request4 = __commonJS({
|
||||
var {
|
||||
isValidHTTPToken,
|
||||
sameOrigin,
|
||||
normalizeMethod,
|
||||
environmentSettingsObject,
|
||||
normalizeMethodRecord
|
||||
environmentSettingsObject
|
||||
} = require_util9();
|
||||
var {
|
||||
forbiddenMethodsSet,
|
||||
@@ -30394,7 +30385,7 @@ var require_request4 = __commonJS({
|
||||
requestCache,
|
||||
requestDuplex
|
||||
} = require_constants8();
|
||||
var { kEnumerableProperty } = util;
|
||||
var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
|
||||
var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7();
|
||||
var { webidl } = require_webidl2();
|
||||
var { URLSerializer } = require_data_url();
|
||||
@@ -30591,17 +30582,18 @@ var require_request4 = __commonJS({
|
||||
}
|
||||
if (init.method !== void 0) {
|
||||
let method = init.method;
|
||||
const mayBeNormalized = normalizeMethodRecord[method];
|
||||
const mayBeNormalized = normalizedMethodRecords[method];
|
||||
if (mayBeNormalized !== void 0) {
|
||||
request2.method = mayBeNormalized;
|
||||
} else {
|
||||
if (!isValidHTTPToken(method)) {
|
||||
throw new TypeError(`'${method}' is not a valid HTTP method.`);
|
||||
}
|
||||
if (forbiddenMethodsSet.has(method.toUpperCase())) {
|
||||
const upperCase = method.toUpperCase();
|
||||
if (forbiddenMethodsSet.has(upperCase)) {
|
||||
throw new TypeError(`'${method}' HTTP method is unsupported.`);
|
||||
}
|
||||
method = normalizeMethod(method);
|
||||
method = normalizedMethodRecordsBase[upperCase] ?? method;
|
||||
request2.method = method;
|
||||
}
|
||||
if (!patchMethodWarning && request2.method === "patch") {
|
||||
@@ -35317,7 +35309,6 @@ var require_websocket2 = __commonJS({
|
||||
var { types } = require("node:util");
|
||||
var { ErrorEvent, CloseEvent } = require_events2();
|
||||
var { SendQueue } = require_sender();
|
||||
var experimentalWarned = false;
|
||||
var WebSocket = class _WebSocket extends EventTarget {
|
||||
#events = {
|
||||
open: null,
|
||||
@@ -35338,12 +35329,6 @@ var require_websocket2 = __commonJS({
|
||||
super();
|
||||
const prefix = "WebSocket constructor";
|
||||
webidl.argumentLengthCheck(arguments, 1, prefix);
|
||||
if (!experimentalWarned) {
|
||||
experimentalWarned = true;
|
||||
process.emitWarning("WebSockets are experimental, expect them to change at any time.", {
|
||||
code: "UNDICI-WS"
|
||||
});
|
||||
}
|
||||
const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
|
||||
url = webidl.converters.USVString(url, prefix, "url");
|
||||
protocols = options.protocols;
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ export async function main(
|
||||
// Make token accessible to post function (so we can invalidate it)
|
||||
if (!skipTokenRevoke) {
|
||||
core.saveState("token", authentication.token);
|
||||
core.setOutput("expiresAt", authentication.expiresAt);
|
||||
core.saveState("expiresAt", authentication.expiresAt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Generated
+13
-13
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "create-github-app-token",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "create-github-app-token",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@octokit/auth-app": "^7.1.0",
|
||||
"@octokit/request": "^9.0.1",
|
||||
"p-retry": "^6.2.0",
|
||||
"undici": "^6.18.2"
|
||||
"undici": "^6.19.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sinonjs/fake-timers": "^11.2.2",
|
||||
@@ -994,12 +994,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -1668,9 +1668,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
@@ -3412,9 +3412,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "6.18.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.18.2.tgz",
|
||||
"integrity": "sha512-o/MQLTwRm9IVhOqhZ0NQ9oXax1ygPjw6Vs+Vq/4QRjbOAC3B1GCHy7TYxxbExKlb7bzDRzt9vBWU6BDz0RFfYg==",
|
||||
"version": "6.19.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.2.tgz",
|
||||
"integrity": "sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA==",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
"name": "create-github-app-token",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "1.10.1",
|
||||
"version": "1.10.3",
|
||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||
"scripts": {
|
||||
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",
|
||||
@@ -16,7 +16,7 @@
|
||||
"@octokit/auth-app": "^7.1.0",
|
||||
"@octokit/request": "^9.0.1",
|
||||
"p-retry": "^6.2.0",
|
||||
"undici": "^6.18.2"
|
||||
"undici": "^6.19.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sinonjs/fake-timers": "^11.2.2",
|
||||
|
||||
@@ -33,8 +33,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-missing-app-id.test.js
|
||||
|
||||
@@ -94,8 +93,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-set-repo-set-to-many.test.js
|
||||
|
||||
@@ -114,8 +112,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-set-repo-set-to-one.test.js
|
||||
|
||||
@@ -134,8 +131,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-set-to-org-repo-unset.test.js
|
||||
|
||||
@@ -154,8 +150,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-set-to-user-fail-response.test.js
|
||||
|
||||
@@ -175,8 +170,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-set-to-user-repo-unset.test.js
|
||||
|
||||
@@ -195,8 +189,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-unset-repo-set.test.js
|
||||
|
||||
@@ -215,8 +208,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## main-token-get-owner-unset-repo-unset.test.js
|
||||
|
||||
@@ -235,8 +227,7 @@ Generated by [AVA](https://avajs.dev).
|
||||
␊
|
||||
::set-output name=app-slug::github-actions␊
|
||||
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
|
||||
␊
|
||||
::set-output name=expiresAt::2016-07-11T22:14:10Z`
|
||||
::save-state name=expiresAt::2016-07-11T22:14:10Z`
|
||||
|
||||
## post-revoke-token-fail-response.test.js
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user