mirror of
https://github.com/actions/create-github-app-token.git
synced 2026-12-05 15:22:56 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62c293567b | ||
|
|
7fa28c5965 | ||
|
|
dfd707cab9 | ||
|
|
5cb53d9b48 | ||
|
|
f418cff399 | ||
|
|
09c1ab7079 | ||
|
|
01b8009bd6 | ||
|
|
e056864841 | ||
|
|
679345a20e | ||
|
|
660c44c8ce | ||
|
|
18e9994c8d |
No files matched your search
@@ -40,10 +40,11 @@ jobs:
|
||||
ref: ${{ fromJSON(steps.release-please.outputs.pr).headBranchName }}
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
if: steps.release-please.outputs.prs_created == 'true'
|
||||
with:
|
||||
node-version-file: package.json
|
||||
package-manager-cache: false
|
||||
|
||||
- run: npm ci
|
||||
if: steps.release-please.outputs.prs_created == 'true'
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
- uses: actions/stale@v11
|
||||
with:
|
||||
operations-per-run: 100
|
||||
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: package.json
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: package.json
|
||||
- run: npm ci
|
||||
@@ -62,10 +62,9 @@ jobs:
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: ./ # Uses the action in the root directory
|
||||
|
||||
@@ -22,16 +22,17 @@ jobs:
|
||||
COMMIT_MESSAGE: 'feat: update permission inputs'
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: package.json
|
||||
package-manager-cache: false
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run permission inputs update script
|
||||
run: node scripts/update-permission-inputs.js
|
||||
- name: Commit changes
|
||||
id: auto-commit
|
||||
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
|
||||
uses: stefanzweifel/git-auto-commit-action@d0b01107b5db882071f96de5dd4b54961ea93f4c # v7.2.1
|
||||
with:
|
||||
commit_message: ${{ env.COMMIT_MESSAGE }}
|
||||
- name: Update PR title
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "3.3.0"
|
||||
".": "3.4.1"
|
||||
}
|
||||
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## [3.4.1](https://github.com/actions/create-github-app-token/compare/v3.4.0...v3.4.1) (2026-12-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** bump p-retry from 8.0.1 to 9.0.0 ([#418](https://github.com/actions/create-github-app-token/issues/418)) ([dfd707c](https://github.com/actions/create-github-app-token/commit/dfd707cab9acab8d10acd802f1cde7a30f17d644))
|
||||
|
||||
## [3.4.0](https://github.com/actions/create-github-app-token/compare/v3.3.0...v3.4.0) (2026-11-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* bump actions/setup-node from 6 to 7 ([#410](https://github.com/actions/create-github-app-token/issues/410)) ([09c1ab7](https://github.com/actions/create-github-app-token/commit/09c1ab7079f14af5f0d64c9325739c49a8541f56))
|
||||
* bump actions/stale from 10 to 11 ([#409](https://github.com/actions/create-github-app-token/issues/409)) ([679345a](https://github.com/actions/create-github-app-token/commit/679345a20e2e07130130e6cf0301b9e897f18cd5))
|
||||
* bump stefanzweifel/git-auto-commit-action from 7.2.0 to 7.2.1 in the github-actions group ([#408](https://github.com/actions/create-github-app-token/issues/408)) ([660c44c](https://github.com/actions/create-github-app-token/commit/660c44c8ce22207448fbba2730cd2913052c9de3))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** bump undici ([#406](https://github.com/actions/create-github-app-token/issues/406)) ([18e9994](https://github.com/actions/create-github-app-token/commit/18e9994c8d13ac7c7e2bbcc3355a1a4f31d30de7))
|
||||
|
||||
## [3.3.0](https://github.com/actions/create-github-app-token/compare/v3.2.0...v3.3.0) (2026-10-12)
|
||||
|
||||
|
||||
|
||||
Vendored
+195
-101
@@ -2103,6 +2103,7 @@ var require_dispatcher = __commonJS({
|
||||
var require_dispatcher_base = __commonJS({
|
||||
"node_modules/@actions/http-client/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var buffer = require("node:buffer");
|
||||
var Dispatcher = require_dispatcher();
|
||||
var {
|
||||
ClientDestroyedError,
|
||||
@@ -2114,6 +2115,7 @@ var require_dispatcher_base = __commonJS({
|
||||
var kOnClosed = /* @__PURE__ */ Symbol("onClosed");
|
||||
var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch");
|
||||
var kWebSocketOptions = /* @__PURE__ */ Symbol("webSocketOptions");
|
||||
var kEventSourceOptions = /* @__PURE__ */ Symbol("eventSourceOptions");
|
||||
var DispatcherBase = class extends Dispatcher {
|
||||
constructor(opts) {
|
||||
super();
|
||||
@@ -2122,6 +2124,7 @@ var require_dispatcher_base = __commonJS({
|
||||
this[kClosed] = false;
|
||||
this[kOnClosed] = [];
|
||||
this[kWebSocketOptions] = opts?.webSocket ?? {};
|
||||
this[kEventSourceOptions] = opts?.eventSource ?? {};
|
||||
}
|
||||
get webSocketOptions() {
|
||||
return {
|
||||
@@ -2129,6 +2132,11 @@ var require_dispatcher_base = __commonJS({
|
||||
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
||||
};
|
||||
}
|
||||
get eventSourceOptions() {
|
||||
return {
|
||||
maxEventSize: this[kEventSourceOptions].maxEventSize ?? buffer.kStringMaxLength
|
||||
};
|
||||
}
|
||||
get destroyed() {
|
||||
return this[kDestroyed];
|
||||
}
|
||||
@@ -6276,7 +6284,6 @@ var require_client_h1 = __commonJS({
|
||||
socket[kSocketUsed] = false;
|
||||
socket[kParser] = new Parser(client, socket, llhttpInstance);
|
||||
addListener(socket, "error", function(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
const parser = this[kParser];
|
||||
if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) {
|
||||
const parserErr = parser.finish();
|
||||
@@ -6960,7 +6967,6 @@ var require_client_h2 = __commonJS({
|
||||
client[kHTTP2Session] = session;
|
||||
socket[kHTTP2Session] = session;
|
||||
util.addListener(socket, "error", function(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
this[kError] = err;
|
||||
this[kClient][kOnError](err);
|
||||
});
|
||||
@@ -7019,7 +7025,6 @@ var require_client_h2 = __commonJS({
|
||||
}
|
||||
}
|
||||
function onHttp2SessionError(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
this[kSocket][kError] = err;
|
||||
this[kClient][kOnError](err);
|
||||
}
|
||||
@@ -7713,9 +7718,10 @@ var require_client = __commonJS({
|
||||
// h2
|
||||
maxConcurrentStreams,
|
||||
allowH2,
|
||||
webSocket
|
||||
webSocket,
|
||||
eventSource
|
||||
} = {}) {
|
||||
super({ webSocket });
|
||||
super({ webSocket, eventSource });
|
||||
if (keepAlive !== void 0) {
|
||||
throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead");
|
||||
}
|
||||
@@ -8612,7 +8618,7 @@ var require_agent = __commonJS({
|
||||
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
||||
}
|
||||
var Agent3 = class extends DispatcherBase {
|
||||
constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
||||
constructor({ factory = defaultFactory, maxRedirections = 0, connect, tls, ...options } = {}) {
|
||||
if (typeof factory !== "function") {
|
||||
throw new InvalidArgumentError("factory must be a function.");
|
||||
}
|
||||
@@ -8626,8 +8632,11 @@ var require_agent = __commonJS({
|
||||
if (connect && typeof connect !== "function") {
|
||||
connect = { ...connect };
|
||||
}
|
||||
if (tls && typeof tls !== "function") {
|
||||
tls = { ...tls };
|
||||
}
|
||||
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })];
|
||||
this[kOptions] = { ...util.deepClone(options), connect };
|
||||
this[kOptions] = { ...util.deepClone(options), connect, tls };
|
||||
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0;
|
||||
this[kMaxRedirections] = maxRedirections;
|
||||
this[kFactory] = factory;
|
||||
@@ -14355,8 +14364,9 @@ var require_fetch = __commonJS({
|
||||
}
|
||||
);
|
||||
response.body = { stream, source: null, length: null };
|
||||
fetchParams.controller.onAborted = onAborted;
|
||||
fetchParams.controller.on("terminated", onAborted);
|
||||
if (!fetchParams.controller.resume) {
|
||||
fetchParams.controller.on("terminated", onAborted);
|
||||
}
|
||||
fetchParams.controller.resume = async () => {
|
||||
while (true) {
|
||||
let bytes;
|
||||
@@ -14456,7 +14466,6 @@ var require_fetch = __commonJS({
|
||||
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true);
|
||||
}
|
||||
location = headersList.get("location", true);
|
||||
this.body = new Readable({ read: resume });
|
||||
const decoders = [];
|
||||
const willFollow = location && request2.redirect === "follow" && redirectStatusSet.has(status);
|
||||
if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
||||
@@ -14464,7 +14473,7 @@ var require_fetch = __commonJS({
|
||||
const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : [];
|
||||
const maxContentEncodings = 5;
|
||||
if (codings.length > maxContentEncodings) {
|
||||
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
||||
this.abort(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
||||
return true;
|
||||
}
|
||||
for (let i = codings.length - 1; i >= 0; --i) {
|
||||
@@ -14494,6 +14503,7 @@ var require_fetch = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
this.body = new Readable({ read: resume });
|
||||
const onError = this.onError.bind(this);
|
||||
resolve2({
|
||||
status,
|
||||
@@ -14519,9 +14529,6 @@ var require_fetch = __commonJS({
|
||||
if (this.abort) {
|
||||
fetchParams.controller.off("terminated", this.abort);
|
||||
}
|
||||
if (fetchParams.controller.onAborted) {
|
||||
fetchParams.controller.off("terminated", fetchParams.controller.onAborted);
|
||||
}
|
||||
fetchParams.controller.ended = true;
|
||||
this.body.push(null);
|
||||
},
|
||||
@@ -17595,6 +17602,16 @@ var require_receiver = __commonJS({
|
||||
if (isControlFrame(this.#info.opcode)) {
|
||||
this.#loop = this.parseControlFrame(body);
|
||||
this.#state = parserStates.INFO;
|
||||
const socket = this.ws[kResponse].socket;
|
||||
if (this.#loop && socket.writableNeedDrain) {
|
||||
this.#loop = false;
|
||||
socket.once("drain", () => {
|
||||
if (this.destroyed) return;
|
||||
this.#loop = true;
|
||||
this.run(callback);
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!this.#info.compressed) {
|
||||
if (!this.writeFragments(body)) {
|
||||
@@ -18288,6 +18305,7 @@ var require_util8 = __commonJS({
|
||||
var require_eventsource_stream = __commonJS({
|
||||
"node_modules/@actions/http-client/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var buffer = require("node:buffer");
|
||||
var { Transform } = require("node:stream");
|
||||
var { isASCIINumber, isValidLastEventId } = require_util8();
|
||||
var BOM = [239, 187, 191];
|
||||
@@ -18295,24 +18313,28 @@ var require_eventsource_stream = __commonJS({
|
||||
var CR = 13;
|
||||
var COLON = 58;
|
||||
var SPACE = 32;
|
||||
var defaultMaxEventSize = buffer.kStringMaxLength;
|
||||
var DATA = Buffer.from("data");
|
||||
var EVENT = Buffer.from("event");
|
||||
var ID = Buffer.from("id");
|
||||
var RETRY = Buffer.from("retry");
|
||||
function isASCIINumberBytes(buffer, start) {
|
||||
if (start >= buffer.length) {
|
||||
var minParserItems = 1024;
|
||||
var maxParserItems = 131072;
|
||||
var bytesPerParserItem = 128;
|
||||
function isASCIINumberBytes(buffer2, start) {
|
||||
if (start >= buffer2.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i = start; i < buffer.length; i++) {
|
||||
if (buffer[i] < 48 || buffer[i] > 57) {
|
||||
for (let i = start; i < buffer2.length; i++) {
|
||||
if (buffer2[i] < 48 || buffer2[i] > 57) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function isValidLastEventIdBytes(buffer, start) {
|
||||
for (let i = start; i < buffer.length; i++) {
|
||||
if (buffer[i] === 0) {
|
||||
function isValidLastEventIdBytes(buffer2, start) {
|
||||
for (let i = start; i < buffer2.length; i++) {
|
||||
if (buffer2[i] === 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -18329,6 +18351,11 @@ var require_eventsource_stream = __commonJS({
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function createMaxEventSizeExceededError() {
|
||||
const error2 = new Error("EventSource message size exceeded");
|
||||
error2.aborted = false;
|
||||
return error2;
|
||||
}
|
||||
var EventSourceStream = class extends Transform {
|
||||
/**
|
||||
* @type {eventSourceSettings}
|
||||
@@ -18355,6 +18382,13 @@ var require_eventsource_stream = __commonJS({
|
||||
pos = 0;
|
||||
lineChunkIndex = 0;
|
||||
linePos = 0;
|
||||
lineLength = 0;
|
||||
eventSize = 0;
|
||||
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 };
|
||||
dataLineCount = 0;
|
||||
maxEventSize;
|
||||
maxDataLines;
|
||||
maxBufferedChunks;
|
||||
event = {
|
||||
data: void 0,
|
||||
event: void 0,
|
||||
@@ -18363,6 +18397,7 @@ var require_eventsource_stream = __commonJS({
|
||||
};
|
||||
/**
|
||||
* @param {object} options
|
||||
* @param {number} [options.maxEventSize]
|
||||
* @param {eventSourceSettings} options.eventSourceSettings
|
||||
* @param {Function} [options.push]
|
||||
*/
|
||||
@@ -18370,6 +18405,10 @@ var require_eventsource_stream = __commonJS({
|
||||
options.readableObjectMode = true;
|
||||
super(options);
|
||||
this.state = options.eventSourceSettings || {};
|
||||
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize;
|
||||
const parserItemLimit = this.maxEventSize > 0 ? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem))) : 0;
|
||||
this.maxDataLines = parserItemLimit;
|
||||
this.maxBufferedChunks = parserItemLimit;
|
||||
if (options.push) {
|
||||
this.push = options.push;
|
||||
}
|
||||
@@ -18385,6 +18424,10 @@ var require_eventsource_stream = __commonJS({
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
if (this.maxEventSize > 0 && this.chunks.length >= this.maxBufferedChunks && chunk[0] !== LF && chunk[0] !== CR) {
|
||||
callback(createMaxEventSizeExceededError());
|
||||
return;
|
||||
}
|
||||
this.chunks.push(chunk);
|
||||
if (this.checkBOM) {
|
||||
if (this.handleBOM()) {
|
||||
@@ -18421,18 +18464,32 @@ var require_eventsource_stream = __commonJS({
|
||||
if (byte === CR) {
|
||||
this.crlfCheck = true;
|
||||
}
|
||||
this.parseLine(this.readLine(), this.event);
|
||||
try {
|
||||
this.parseLine(this.readLine(), this.event);
|
||||
} catch (error2) {
|
||||
callback(error2);
|
||||
return;
|
||||
}
|
||||
this.consumeCurrentByte();
|
||||
this.eventEndCheck = true;
|
||||
continue;
|
||||
}
|
||||
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
||||
callback(createMaxEventSizeExceededError());
|
||||
return;
|
||||
}
|
||||
this.advanceCursor();
|
||||
}
|
||||
callback();
|
||||
}
|
||||
_destroy(error2, callback) {
|
||||
this.chunks.length = 0;
|
||||
this.clearEvent();
|
||||
super._destroy(error2, callback);
|
||||
}
|
||||
/**
|
||||
* @param {Buffer} line
|
||||
* @param {EventStreamEvent} event
|
||||
* @param {EventSourceStreamEvent} event
|
||||
*/
|
||||
parseLine(line, event) {
|
||||
if (line.length === 0) {
|
||||
@@ -18452,6 +18509,12 @@ var require_eventsource_stream = __commonJS({
|
||||
}
|
||||
}
|
||||
if (isFieldName(line, fieldLength, DATA)) {
|
||||
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
||||
throw createMaxEventSizeExceededError();
|
||||
}
|
||||
const valueBytes = line.length - valueStart;
|
||||
const dataSize = this.eventFieldSizes.data + (event.data === void 0 ? 0 : 1) + valueBytes;
|
||||
this.setEventFieldSize("data", dataSize);
|
||||
const value = line.toString("utf8", valueStart);
|
||||
if (event.data === void 0) {
|
||||
event.data = value;
|
||||
@@ -18459,27 +18522,38 @@ var require_eventsource_stream = __commonJS({
|
||||
event.data += `
|
||||
${value}`;
|
||||
}
|
||||
this.dataLineCount++;
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, RETRY)) {
|
||||
if (isASCIINumberBytes(line, valueStart)) {
|
||||
this.setEventFieldSize("retry", line.length - valueStart);
|
||||
event.retry = line.toString("utf8", valueStart);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, ID)) {
|
||||
if (isValidLastEventIdBytes(line, valueStart)) {
|
||||
this.setEventFieldSize("id", line.length - valueStart);
|
||||
event.id = line.toString("utf8", valueStart);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, EVENT)) {
|
||||
const value = line.toString("utf8", valueStart);
|
||||
if (value.length > 0) {
|
||||
event.event = value;
|
||||
if (valueStart < line.length) {
|
||||
this.setEventFieldSize("event", line.length - valueStart);
|
||||
event.event = line.toString("utf8", valueStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
setEventFieldSize(field, size) {
|
||||
const eventSize = this.eventSize - this.eventFieldSizes[field] + size;
|
||||
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
||||
throw createMaxEventSizeExceededError();
|
||||
}
|
||||
this.eventSize = eventSize;
|
||||
this.eventFieldSizes[field] = size;
|
||||
}
|
||||
/**
|
||||
* @param {EventSourceStreamEvent} event
|
||||
*/
|
||||
@@ -18506,6 +18580,12 @@ ${value}`;
|
||||
this.event.event = void 0;
|
||||
this.event.id = void 0;
|
||||
this.event.retry = void 0;
|
||||
this.eventSize = 0;
|
||||
this.dataLineCount = 0;
|
||||
this.eventFieldSizes.data = 0;
|
||||
this.eventFieldSizes.event = 0;
|
||||
this.eventFieldSizes.id = 0;
|
||||
this.eventFieldSizes.retry = 0;
|
||||
}
|
||||
hasPendingEvent() {
|
||||
return this.event.data !== void 0 || this.event.event !== void 0 || this.event.id !== void 0 || this.event.retry !== void 0;
|
||||
@@ -18530,13 +18610,15 @@ ${value}`;
|
||||
syncLineStartToCursor() {
|
||||
this.lineChunkIndex = this.chunkIndex;
|
||||
this.linePos = this.pos;
|
||||
this.lineLength = 0;
|
||||
this.dropConsumedChunks();
|
||||
}
|
||||
dropConsumedChunks() {
|
||||
while (this.lineChunkIndex > 0) {
|
||||
this.chunks.shift();
|
||||
this.lineChunkIndex--;
|
||||
this.chunkIndex--;
|
||||
if (this.lineChunkIndex > 0) {
|
||||
const consumed = this.lineChunkIndex;
|
||||
this.chunks.splice(0, consumed);
|
||||
this.lineChunkIndex = 0;
|
||||
this.chunkIndex -= consumed;
|
||||
}
|
||||
if (this.chunkIndex === this.chunks.length) {
|
||||
this.chunks.length = 0;
|
||||
@@ -18639,6 +18721,7 @@ var require_eventsource = __commonJS({
|
||||
var { delay } = require_util8();
|
||||
var { kEnumerableProperty } = require_util();
|
||||
var { environmentSettingsObject } = require_util2();
|
||||
var { getGlobalDispatcher } = require_global2();
|
||||
var experimentalWarned = false;
|
||||
var defaultReconnectionTime = 3e3;
|
||||
var CONNECTING = 0;
|
||||
@@ -18779,6 +18862,7 @@ var require_eventsource = __commonJS({
|
||||
this.#state.origin = response.urlList[response.urlList.length - 1].origin;
|
||||
const eventSourceStream = new EventSourceStream({
|
||||
eventSourceSettings: this.#state,
|
||||
maxEventSize: this.#dispatcher.eventSourceOptions?.maxEventSize,
|
||||
push: (event) => {
|
||||
this.dispatchEvent(createFastMessageEvent(
|
||||
event.type,
|
||||
@@ -18911,7 +18995,8 @@ var require_eventsource = __commonJS({
|
||||
{
|
||||
key: "dispatcher",
|
||||
// undici only
|
||||
converter: webidl.converters.any
|
||||
converter: webidl.converters.any,
|
||||
defaultValue: () => getGlobalDispatcher()
|
||||
}
|
||||
]);
|
||||
module2.exports = {
|
||||
@@ -23806,54 +23891,60 @@ function validateRetries(retries) {
|
||||
throw new TypeError("Expected `retries` to be a number or Infinity.");
|
||||
}
|
||||
}
|
||||
function validateNumberOption(name, value, { min = 0, allowInfinity = false } = {}) {
|
||||
if (value === void 0) {
|
||||
return;
|
||||
}
|
||||
function validateNumberOption(name, value, { allowInfinity = false } = {}) {
|
||||
if (typeof value !== "number" || Number.isNaN(value)) {
|
||||
throw new TypeError(`Expected \`${name}\` to be a number${allowInfinity ? " or Infinity" : ""}.`);
|
||||
}
|
||||
if (!allowInfinity && !Number.isFinite(value)) {
|
||||
throw new TypeError(`Expected \`${name}\` to be a finite number.`);
|
||||
}
|
||||
if (value < min) {
|
||||
throw new TypeError(`Expected \`${name}\` to be \u2265 ${min}.`);
|
||||
if (value < 0) {
|
||||
throw new TypeError(`Expected \`${name}\` to be \u2265 0.`);
|
||||
}
|
||||
}
|
||||
function validateFunctionOption(name, value) {
|
||||
if (value === void 0) {
|
||||
function validateOption(name, value, type) {
|
||||
if (value === void 0 || value === null) {
|
||||
return;
|
||||
}
|
||||
if (typeof value !== "function") {
|
||||
throw new TypeError(`Expected \`${name}\` to be a function.`);
|
||||
if (typeof value !== type) {
|
||||
throw new TypeError(`Expected \`${name}\` to be a ${type}.`);
|
||||
}
|
||||
}
|
||||
var AbortError = class extends Error {
|
||||
function validateSignal(value) {
|
||||
if (value === void 0 || value === null) {
|
||||
return;
|
||||
}
|
||||
if (typeof value.throwIfAborted !== "function" || typeof value.addEventListener !== "function" || typeof value.removeEventListener !== "function") {
|
||||
throw new TypeError("Expected `signal` to be an AbortSignal.");
|
||||
}
|
||||
}
|
||||
var AbortError = class _AbortError extends Error {
|
||||
constructor(message) {
|
||||
super();
|
||||
super(typeof message === "string" ? message : void 0);
|
||||
this.name = "AbortError";
|
||||
if (message instanceof Error) {
|
||||
this.originalError = message;
|
||||
({ message } = message);
|
||||
} else {
|
||||
this.originalError = new Error(message);
|
||||
this.originalError.stack = this.stack;
|
||||
({ message } = this.originalError);
|
||||
Error.captureStackTrace?.(this.originalError, _AbortError);
|
||||
}
|
||||
this.name = "AbortError";
|
||||
this.message = message;
|
||||
}
|
||||
};
|
||||
var maximumDelay = 2 ** 31 - 1;
|
||||
function calculateDelay(retriesConsumed, options) {
|
||||
const attempt = Math.max(1, retriesConsumed + 1);
|
||||
if (options.minTimeout === 0) {
|
||||
return 0;
|
||||
}
|
||||
const attempt = retriesConsumed + 1;
|
||||
const random = options.randomize ? Math.random() + 1 : 1;
|
||||
let timeout = Math.round(random * options.minTimeout * options.factor ** (attempt - 1));
|
||||
timeout = Math.min(timeout, options.maxTimeout);
|
||||
return timeout;
|
||||
const timeout = Math.round(random * options.minTimeout * options.factor ** (attempt - 1));
|
||||
return Math.min(timeout, Math.ceil(options.maxTimeout), maximumDelay);
|
||||
}
|
||||
function calculateRemainingTime(start, max) {
|
||||
if (!Number.isFinite(max)) {
|
||||
return max;
|
||||
}
|
||||
return max - (performance.now() - start);
|
||||
return Number.isFinite(max) ? max - (performance.now() - start) : max;
|
||||
}
|
||||
async function delayForRetry(delay, options) {
|
||||
if (delay <= 0) {
|
||||
@@ -23862,7 +23953,6 @@ async function delayForRetry(delay, options) {
|
||||
await new Promise((resolve2, reject) => {
|
||||
const onAbort = () => {
|
||||
clearTimeout(timeoutToken);
|
||||
options.signal?.removeEventListener("abort", onAbort);
|
||||
reject(options.signal.reason);
|
||||
};
|
||||
const timeoutToken = setTimeout(() => {
|
||||
@@ -23875,35 +23965,43 @@ async function delayForRetry(delay, options) {
|
||||
options.signal?.addEventListener("abort", onAbort, { once: true });
|
||||
});
|
||||
}
|
||||
function stringifyThrownValue(value) {
|
||||
try {
|
||||
return String(value);
|
||||
} catch {
|
||||
return Object.prototype.toString.call(value);
|
||||
}
|
||||
}
|
||||
function unwrapAbortError(error2) {
|
||||
let cause = error2;
|
||||
while (cause instanceof AbortError && cause.originalError instanceof Error) {
|
||||
cause = cause.originalError;
|
||||
}
|
||||
return cause;
|
||||
}
|
||||
async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed, startTime, options }) {
|
||||
const normalizedError = error2 instanceof Error ? error2 : new TypeError(`Non-error was thrown: "${error2}". You should only throw errors.`);
|
||||
const abortIfNeeded = () => {
|
||||
options.signal?.throwIfAborted();
|
||||
};
|
||||
const normalizedError = error2 instanceof Error ? error2 : new TypeError(`Non-error was thrown: "${stringifyThrownValue(error2)}". You should only throw errors.`);
|
||||
abortIfNeeded();
|
||||
if (normalizedError instanceof AbortError) {
|
||||
throw normalizedError.originalError;
|
||||
}
|
||||
const retriesLeft = Number.isFinite(options.retries) ? Math.max(0, options.retries - retriesConsumed) : options.retries;
|
||||
const maxRetryTime = options.maxRetryTime ?? Number.POSITIVE_INFINITY;
|
||||
const delayTime = calculateDelay(retriesConsumed, options);
|
||||
const remainingTimeBeforeCallbacks = calculateRemainingTime(startTime, maxRetryTime);
|
||||
if (remainingTimeBeforeCallbacks <= 0) {
|
||||
const context2 = Object.freeze({
|
||||
error: normalizedError,
|
||||
attemptNumber,
|
||||
retriesLeft,
|
||||
retriesConsumed,
|
||||
retryDelay: 0
|
||||
});
|
||||
await options.onFailedAttempt(context2);
|
||||
throw normalizedError;
|
||||
throw unwrapAbortError(normalizedError);
|
||||
}
|
||||
const retriesLeft = options.retries - retriesConsumed;
|
||||
const isRetriableError = !(normalizedError instanceof TypeError) || isNetworkError(normalizedError);
|
||||
const timeLeft = calculateRemainingTime(startTime, options.maxRetryTime);
|
||||
const delayTime = isRetriableError && timeLeft > 0 && retriesLeft > 0 ? calculateDelay(retriesConsumed, options) : 0;
|
||||
const consumeRetryContext = Object.freeze({
|
||||
error: normalizedError,
|
||||
attemptNumber,
|
||||
retriesLeft,
|
||||
retriesConsumed,
|
||||
retryDelay: retriesLeft > 0 ? delayTime : 0
|
||||
retryDelay: delayTime
|
||||
});
|
||||
const consumeRetry = await options.shouldConsumeRetry(consumeRetryContext);
|
||||
const effectiveDelay = consumeRetry && retriesLeft > 0 ? delayTime : 0;
|
||||
const consumeRetry = await options.shouldConsumeRetry(consumeRetryContext) ?? true;
|
||||
abortIfNeeded();
|
||||
const effectiveDelay = consumeRetry ? delayTime : 0;
|
||||
const context = Object.freeze({
|
||||
error: normalizedError,
|
||||
attemptNumber,
|
||||
@@ -23912,64 +24010,60 @@ async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed,
|
||||
retryDelay: effectiveDelay
|
||||
});
|
||||
await options.onFailedAttempt(context);
|
||||
if (calculateRemainingTime(startTime, maxRetryTime) <= 0) {
|
||||
abortIfNeeded();
|
||||
const remainingTime = calculateRemainingTime(startTime, options.maxRetryTime);
|
||||
if (!isRetriableError || remainingTime <= 0 || retriesLeft <= 0) {
|
||||
throw normalizedError;
|
||||
}
|
||||
const remainingTime = calculateRemainingTime(startTime, maxRetryTime);
|
||||
if (remainingTime <= 0 || retriesLeft <= 0) {
|
||||
const shouldRetry = await options.shouldRetry(context);
|
||||
abortIfNeeded();
|
||||
if (!shouldRetry) {
|
||||
throw normalizedError;
|
||||
}
|
||||
if (normalizedError instanceof TypeError && !isNetworkError(normalizedError)) {
|
||||
throw normalizedError;
|
||||
}
|
||||
if (!await options.shouldRetry(context)) {
|
||||
throw normalizedError;
|
||||
}
|
||||
const remainingTimeAfterShouldRetry = calculateRemainingTime(startTime, maxRetryTime);
|
||||
const remainingTimeAfterShouldRetry = calculateRemainingTime(startTime, options.maxRetryTime);
|
||||
if (remainingTimeAfterShouldRetry <= 0) {
|
||||
throw normalizedError;
|
||||
}
|
||||
if (!consumeRetry) {
|
||||
options.signal?.throwIfAborted();
|
||||
return false;
|
||||
}
|
||||
const finalDelay = Math.min(effectiveDelay, remainingTimeAfterShouldRetry);
|
||||
options.signal?.throwIfAborted();
|
||||
await delayForRetry(finalDelay, options);
|
||||
options.signal?.throwIfAborted();
|
||||
await delayForRetry(Math.min(effectiveDelay, remainingTimeAfterShouldRetry), options);
|
||||
return true;
|
||||
}
|
||||
async function pRetry(input, options = {}) {
|
||||
options = { ...options };
|
||||
options.retries ??= 10;
|
||||
validateRetries(options.retries);
|
||||
if (Object.hasOwn(options, "forever")) {
|
||||
throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");
|
||||
}
|
||||
options.retries ??= 10;
|
||||
options.factor ??= 2;
|
||||
options.minTimeout ??= 1e3;
|
||||
options.maxTimeout ??= Number.POSITIVE_INFINITY;
|
||||
options.maxRetryTime ??= Number.POSITIVE_INFINITY;
|
||||
options.maxTimeout ??= Infinity;
|
||||
options.maxRetryTime ??= Infinity;
|
||||
options.randomize ??= false;
|
||||
options.onFailedAttempt ??= () => {
|
||||
};
|
||||
options.shouldRetry ??= () => true;
|
||||
options.shouldConsumeRetry ??= () => true;
|
||||
validateFunctionOption("onFailedAttempt", options.onFailedAttempt);
|
||||
validateFunctionOption("shouldRetry", options.shouldRetry);
|
||||
validateFunctionOption("shouldConsumeRetry", options.shouldConsumeRetry);
|
||||
validateNumberOption("factor", options.factor, { min: 0, allowInfinity: false });
|
||||
validateNumberOption("minTimeout", options.minTimeout, { min: 0, allowInfinity: false });
|
||||
validateNumberOption("maxTimeout", options.maxTimeout, { min: 0, allowInfinity: true });
|
||||
validateNumberOption("maxRetryTime", options.maxRetryTime, { min: 0, allowInfinity: true });
|
||||
if (!(options.factor > 0)) {
|
||||
validateOption("onFailedAttempt", options.onFailedAttempt, "function");
|
||||
validateOption("shouldRetry", options.shouldRetry, "function");
|
||||
validateOption("shouldConsumeRetry", options.shouldConsumeRetry, "function");
|
||||
validateOption("randomize", options.randomize, "boolean");
|
||||
validateOption("unref", options.unref, "boolean");
|
||||
validateSignal(options.signal);
|
||||
validateNumberOption("factor", options.factor);
|
||||
validateNumberOption("minTimeout", options.minTimeout);
|
||||
validateNumberOption("maxTimeout", options.maxTimeout, { allowInfinity: true });
|
||||
validateNumberOption("maxRetryTime", options.maxRetryTime, { allowInfinity: true });
|
||||
if (options.factor === 0) {
|
||||
options.factor = 1;
|
||||
}
|
||||
options.signal?.throwIfAborted();
|
||||
let attemptNumber = 0;
|
||||
let retriesConsumed = 0;
|
||||
const startTime = performance.now();
|
||||
while (Number.isFinite(options.retries) ? retriesConsumed <= options.retries : true) {
|
||||
while (retriesConsumed <= options.retries) {
|
||||
attemptNumber++;
|
||||
try {
|
||||
options.signal?.throwIfAborted();
|
||||
|
||||
Vendored
+116
-31
@@ -2101,6 +2101,7 @@ var require_dispatcher = __commonJS({
|
||||
var require_dispatcher_base = __commonJS({
|
||||
"node_modules/@actions/http-client/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var buffer = require("node:buffer");
|
||||
var Dispatcher = require_dispatcher();
|
||||
var {
|
||||
ClientDestroyedError,
|
||||
@@ -2112,6 +2113,7 @@ var require_dispatcher_base = __commonJS({
|
||||
var kOnClosed = /* @__PURE__ */ Symbol("onClosed");
|
||||
var kInterceptedDispatch = /* @__PURE__ */ Symbol("Intercepted Dispatch");
|
||||
var kWebSocketOptions = /* @__PURE__ */ Symbol("webSocketOptions");
|
||||
var kEventSourceOptions = /* @__PURE__ */ Symbol("eventSourceOptions");
|
||||
var DispatcherBase = class extends Dispatcher {
|
||||
constructor(opts) {
|
||||
super();
|
||||
@@ -2120,6 +2122,7 @@ var require_dispatcher_base = __commonJS({
|
||||
this[kClosed] = false;
|
||||
this[kOnClosed] = [];
|
||||
this[kWebSocketOptions] = opts?.webSocket ?? {};
|
||||
this[kEventSourceOptions] = opts?.eventSource ?? {};
|
||||
}
|
||||
get webSocketOptions() {
|
||||
return {
|
||||
@@ -2127,6 +2130,11 @@ var require_dispatcher_base = __commonJS({
|
||||
maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024
|
||||
};
|
||||
}
|
||||
get eventSourceOptions() {
|
||||
return {
|
||||
maxEventSize: this[kEventSourceOptions].maxEventSize ?? buffer.kStringMaxLength
|
||||
};
|
||||
}
|
||||
get destroyed() {
|
||||
return this[kDestroyed];
|
||||
}
|
||||
@@ -6274,7 +6282,6 @@ var require_client_h1 = __commonJS({
|
||||
socket[kSocketUsed] = false;
|
||||
socket[kParser] = new Parser(client, socket, llhttpInstance);
|
||||
addListener(socket, "error", function(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
const parser = this[kParser];
|
||||
if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) {
|
||||
const parserErr = parser.finish();
|
||||
@@ -6958,7 +6965,6 @@ var require_client_h2 = __commonJS({
|
||||
client[kHTTP2Session] = session;
|
||||
socket[kHTTP2Session] = session;
|
||||
util.addListener(socket, "error", function(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
this[kError] = err;
|
||||
this[kClient][kOnError](err);
|
||||
});
|
||||
@@ -7017,7 +7023,6 @@ var require_client_h2 = __commonJS({
|
||||
}
|
||||
}
|
||||
function onHttp2SessionError(err) {
|
||||
assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID");
|
||||
this[kSocket][kError] = err;
|
||||
this[kClient][kOnError](err);
|
||||
}
|
||||
@@ -7711,9 +7716,10 @@ var require_client = __commonJS({
|
||||
// h2
|
||||
maxConcurrentStreams,
|
||||
allowH2,
|
||||
webSocket
|
||||
webSocket,
|
||||
eventSource
|
||||
} = {}) {
|
||||
super({ webSocket });
|
||||
super({ webSocket, eventSource });
|
||||
if (keepAlive !== void 0) {
|
||||
throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead");
|
||||
}
|
||||
@@ -8610,7 +8616,7 @@ var require_agent = __commonJS({
|
||||
return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts);
|
||||
}
|
||||
var Agent3 = class extends DispatcherBase {
|
||||
constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) {
|
||||
constructor({ factory = defaultFactory, maxRedirections = 0, connect, tls, ...options } = {}) {
|
||||
if (typeof factory !== "function") {
|
||||
throw new InvalidArgumentError("factory must be a function.");
|
||||
}
|
||||
@@ -8624,8 +8630,11 @@ var require_agent = __commonJS({
|
||||
if (connect && typeof connect !== "function") {
|
||||
connect = { ...connect };
|
||||
}
|
||||
if (tls && typeof tls !== "function") {
|
||||
tls = { ...tls };
|
||||
}
|
||||
this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })];
|
||||
this[kOptions] = { ...util.deepClone(options), connect };
|
||||
this[kOptions] = { ...util.deepClone(options), connect, tls };
|
||||
this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0;
|
||||
this[kMaxRedirections] = maxRedirections;
|
||||
this[kFactory] = factory;
|
||||
@@ -14353,8 +14362,9 @@ var require_fetch = __commonJS({
|
||||
}
|
||||
);
|
||||
response.body = { stream, source: null, length: null };
|
||||
fetchParams.controller.onAborted = onAborted;
|
||||
fetchParams.controller.on("terminated", onAborted);
|
||||
if (!fetchParams.controller.resume) {
|
||||
fetchParams.controller.on("terminated", onAborted);
|
||||
}
|
||||
fetchParams.controller.resume = async () => {
|
||||
while (true) {
|
||||
let bytes;
|
||||
@@ -14454,7 +14464,6 @@ var require_fetch = __commonJS({
|
||||
headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true);
|
||||
}
|
||||
location = headersList.get("location", true);
|
||||
this.body = new Readable({ read: resume });
|
||||
const decoders = [];
|
||||
const willFollow = location && request2.redirect === "follow" && redirectStatusSet.has(status);
|
||||
if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
||||
@@ -14462,7 +14471,7 @@ var require_fetch = __commonJS({
|
||||
const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : [];
|
||||
const maxContentEncodings = 5;
|
||||
if (codings.length > maxContentEncodings) {
|
||||
reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
||||
this.abort(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`));
|
||||
return true;
|
||||
}
|
||||
for (let i = codings.length - 1; i >= 0; --i) {
|
||||
@@ -14492,6 +14501,7 @@ var require_fetch = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
this.body = new Readable({ read: resume });
|
||||
const onError = this.onError.bind(this);
|
||||
resolve2({
|
||||
status,
|
||||
@@ -14517,9 +14527,6 @@ var require_fetch = __commonJS({
|
||||
if (this.abort) {
|
||||
fetchParams.controller.off("terminated", this.abort);
|
||||
}
|
||||
if (fetchParams.controller.onAborted) {
|
||||
fetchParams.controller.off("terminated", fetchParams.controller.onAborted);
|
||||
}
|
||||
fetchParams.controller.ended = true;
|
||||
this.body.push(null);
|
||||
},
|
||||
@@ -17593,6 +17600,16 @@ var require_receiver = __commonJS({
|
||||
if (isControlFrame(this.#info.opcode)) {
|
||||
this.#loop = this.parseControlFrame(body);
|
||||
this.#state = parserStates.INFO;
|
||||
const socket = this.ws[kResponse].socket;
|
||||
if (this.#loop && socket.writableNeedDrain) {
|
||||
this.#loop = false;
|
||||
socket.once("drain", () => {
|
||||
if (this.destroyed) return;
|
||||
this.#loop = true;
|
||||
this.run(callback);
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!this.#info.compressed) {
|
||||
if (!this.writeFragments(body)) {
|
||||
@@ -18286,6 +18303,7 @@ var require_util8 = __commonJS({
|
||||
var require_eventsource_stream = __commonJS({
|
||||
"node_modules/@actions/http-client/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var buffer = require("node:buffer");
|
||||
var { Transform } = require("node:stream");
|
||||
var { isASCIINumber, isValidLastEventId } = require_util8();
|
||||
var BOM = [239, 187, 191];
|
||||
@@ -18293,24 +18311,28 @@ var require_eventsource_stream = __commonJS({
|
||||
var CR = 13;
|
||||
var COLON = 58;
|
||||
var SPACE = 32;
|
||||
var defaultMaxEventSize = buffer.kStringMaxLength;
|
||||
var DATA = Buffer.from("data");
|
||||
var EVENT = Buffer.from("event");
|
||||
var ID = Buffer.from("id");
|
||||
var RETRY = Buffer.from("retry");
|
||||
function isASCIINumberBytes(buffer, start) {
|
||||
if (start >= buffer.length) {
|
||||
var minParserItems = 1024;
|
||||
var maxParserItems = 131072;
|
||||
var bytesPerParserItem = 128;
|
||||
function isASCIINumberBytes(buffer2, start) {
|
||||
if (start >= buffer2.length) {
|
||||
return false;
|
||||
}
|
||||
for (let i = start; i < buffer.length; i++) {
|
||||
if (buffer[i] < 48 || buffer[i] > 57) {
|
||||
for (let i = start; i < buffer2.length; i++) {
|
||||
if (buffer2[i] < 48 || buffer2[i] > 57) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function isValidLastEventIdBytes(buffer, start) {
|
||||
for (let i = start; i < buffer.length; i++) {
|
||||
if (buffer[i] === 0) {
|
||||
function isValidLastEventIdBytes(buffer2, start) {
|
||||
for (let i = start; i < buffer2.length; i++) {
|
||||
if (buffer2[i] === 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -18327,6 +18349,11 @@ var require_eventsource_stream = __commonJS({
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function createMaxEventSizeExceededError() {
|
||||
const error2 = new Error("EventSource message size exceeded");
|
||||
error2.aborted = false;
|
||||
return error2;
|
||||
}
|
||||
var EventSourceStream = class extends Transform {
|
||||
/**
|
||||
* @type {eventSourceSettings}
|
||||
@@ -18353,6 +18380,13 @@ var require_eventsource_stream = __commonJS({
|
||||
pos = 0;
|
||||
lineChunkIndex = 0;
|
||||
linePos = 0;
|
||||
lineLength = 0;
|
||||
eventSize = 0;
|
||||
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 };
|
||||
dataLineCount = 0;
|
||||
maxEventSize;
|
||||
maxDataLines;
|
||||
maxBufferedChunks;
|
||||
event = {
|
||||
data: void 0,
|
||||
event: void 0,
|
||||
@@ -18361,6 +18395,7 @@ var require_eventsource_stream = __commonJS({
|
||||
};
|
||||
/**
|
||||
* @param {object} options
|
||||
* @param {number} [options.maxEventSize]
|
||||
* @param {eventSourceSettings} options.eventSourceSettings
|
||||
* @param {Function} [options.push]
|
||||
*/
|
||||
@@ -18368,6 +18403,10 @@ var require_eventsource_stream = __commonJS({
|
||||
options.readableObjectMode = true;
|
||||
super(options);
|
||||
this.state = options.eventSourceSettings || {};
|
||||
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize;
|
||||
const parserItemLimit = this.maxEventSize > 0 ? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem))) : 0;
|
||||
this.maxDataLines = parserItemLimit;
|
||||
this.maxBufferedChunks = parserItemLimit;
|
||||
if (options.push) {
|
||||
this.push = options.push;
|
||||
}
|
||||
@@ -18383,6 +18422,10 @@ var require_eventsource_stream = __commonJS({
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
if (this.maxEventSize > 0 && this.chunks.length >= this.maxBufferedChunks && chunk[0] !== LF && chunk[0] !== CR) {
|
||||
callback(createMaxEventSizeExceededError());
|
||||
return;
|
||||
}
|
||||
this.chunks.push(chunk);
|
||||
if (this.checkBOM) {
|
||||
if (this.handleBOM()) {
|
||||
@@ -18419,18 +18462,32 @@ var require_eventsource_stream = __commonJS({
|
||||
if (byte === CR) {
|
||||
this.crlfCheck = true;
|
||||
}
|
||||
this.parseLine(this.readLine(), this.event);
|
||||
try {
|
||||
this.parseLine(this.readLine(), this.event);
|
||||
} catch (error2) {
|
||||
callback(error2);
|
||||
return;
|
||||
}
|
||||
this.consumeCurrentByte();
|
||||
this.eventEndCheck = true;
|
||||
continue;
|
||||
}
|
||||
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
||||
callback(createMaxEventSizeExceededError());
|
||||
return;
|
||||
}
|
||||
this.advanceCursor();
|
||||
}
|
||||
callback();
|
||||
}
|
||||
_destroy(error2, callback) {
|
||||
this.chunks.length = 0;
|
||||
this.clearEvent();
|
||||
super._destroy(error2, callback);
|
||||
}
|
||||
/**
|
||||
* @param {Buffer} line
|
||||
* @param {EventStreamEvent} event
|
||||
* @param {EventSourceStreamEvent} event
|
||||
*/
|
||||
parseLine(line, event) {
|
||||
if (line.length === 0) {
|
||||
@@ -18450,6 +18507,12 @@ var require_eventsource_stream = __commonJS({
|
||||
}
|
||||
}
|
||||
if (isFieldName(line, fieldLength, DATA)) {
|
||||
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
||||
throw createMaxEventSizeExceededError();
|
||||
}
|
||||
const valueBytes = line.length - valueStart;
|
||||
const dataSize = this.eventFieldSizes.data + (event.data === void 0 ? 0 : 1) + valueBytes;
|
||||
this.setEventFieldSize("data", dataSize);
|
||||
const value = line.toString("utf8", valueStart);
|
||||
if (event.data === void 0) {
|
||||
event.data = value;
|
||||
@@ -18457,27 +18520,38 @@ var require_eventsource_stream = __commonJS({
|
||||
event.data += `
|
||||
${value}`;
|
||||
}
|
||||
this.dataLineCount++;
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, RETRY)) {
|
||||
if (isASCIINumberBytes(line, valueStart)) {
|
||||
this.setEventFieldSize("retry", line.length - valueStart);
|
||||
event.retry = line.toString("utf8", valueStart);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, ID)) {
|
||||
if (isValidLastEventIdBytes(line, valueStart)) {
|
||||
this.setEventFieldSize("id", line.length - valueStart);
|
||||
event.id = line.toString("utf8", valueStart);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isFieldName(line, fieldLength, EVENT)) {
|
||||
const value = line.toString("utf8", valueStart);
|
||||
if (value.length > 0) {
|
||||
event.event = value;
|
||||
if (valueStart < line.length) {
|
||||
this.setEventFieldSize("event", line.length - valueStart);
|
||||
event.event = line.toString("utf8", valueStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
setEventFieldSize(field, size) {
|
||||
const eventSize = this.eventSize - this.eventFieldSizes[field] + size;
|
||||
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
||||
throw createMaxEventSizeExceededError();
|
||||
}
|
||||
this.eventSize = eventSize;
|
||||
this.eventFieldSizes[field] = size;
|
||||
}
|
||||
/**
|
||||
* @param {EventSourceStreamEvent} event
|
||||
*/
|
||||
@@ -18504,6 +18578,12 @@ ${value}`;
|
||||
this.event.event = void 0;
|
||||
this.event.id = void 0;
|
||||
this.event.retry = void 0;
|
||||
this.eventSize = 0;
|
||||
this.dataLineCount = 0;
|
||||
this.eventFieldSizes.data = 0;
|
||||
this.eventFieldSizes.event = 0;
|
||||
this.eventFieldSizes.id = 0;
|
||||
this.eventFieldSizes.retry = 0;
|
||||
}
|
||||
hasPendingEvent() {
|
||||
return this.event.data !== void 0 || this.event.event !== void 0 || this.event.id !== void 0 || this.event.retry !== void 0;
|
||||
@@ -18528,13 +18608,15 @@ ${value}`;
|
||||
syncLineStartToCursor() {
|
||||
this.lineChunkIndex = this.chunkIndex;
|
||||
this.linePos = this.pos;
|
||||
this.lineLength = 0;
|
||||
this.dropConsumedChunks();
|
||||
}
|
||||
dropConsumedChunks() {
|
||||
while (this.lineChunkIndex > 0) {
|
||||
this.chunks.shift();
|
||||
this.lineChunkIndex--;
|
||||
this.chunkIndex--;
|
||||
if (this.lineChunkIndex > 0) {
|
||||
const consumed = this.lineChunkIndex;
|
||||
this.chunks.splice(0, consumed);
|
||||
this.lineChunkIndex = 0;
|
||||
this.chunkIndex -= consumed;
|
||||
}
|
||||
if (this.chunkIndex === this.chunks.length) {
|
||||
this.chunks.length = 0;
|
||||
@@ -18637,6 +18719,7 @@ var require_eventsource = __commonJS({
|
||||
var { delay } = require_util8();
|
||||
var { kEnumerableProperty } = require_util();
|
||||
var { environmentSettingsObject } = require_util2();
|
||||
var { getGlobalDispatcher } = require_global2();
|
||||
var experimentalWarned = false;
|
||||
var defaultReconnectionTime = 3e3;
|
||||
var CONNECTING = 0;
|
||||
@@ -18777,6 +18860,7 @@ var require_eventsource = __commonJS({
|
||||
this.#state.origin = response.urlList[response.urlList.length - 1].origin;
|
||||
const eventSourceStream = new EventSourceStream({
|
||||
eventSourceSettings: this.#state,
|
||||
maxEventSize: this.#dispatcher.eventSourceOptions?.maxEventSize,
|
||||
push: (event) => {
|
||||
this.dispatchEvent(createFastMessageEvent(
|
||||
event.type,
|
||||
@@ -18909,7 +18993,8 @@ var require_eventsource = __commonJS({
|
||||
{
|
||||
key: "dispatcher",
|
||||
// undici only
|
||||
converter: webidl.converters.any
|
||||
converter: webidl.converters.any,
|
||||
defaultValue: () => getGlobalDispatcher()
|
||||
}
|
||||
]);
|
||||
module2.exports = {
|
||||
|
||||
Generated
+14
-14
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"name": "create-github-app-token",
|
||||
"version": "3.3.0",
|
||||
"version": "3.4.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "create-github-app-token",
|
||||
"version": "3.3.0",
|
||||
"version": "3.4.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^3.0.1",
|
||||
"@octokit/auth-app": "^8.3.1",
|
||||
"@octokit/request": "^10.0.8",
|
||||
"is-network-error": "^1.3.2",
|
||||
"p-retry": "^8.0.1"
|
||||
"p-retry": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@octokit/openapi": "^24.0.0",
|
||||
"c8": "^12.0.0",
|
||||
"esbuild": "^0.28.2",
|
||||
"open-cli": "^9.0.0",
|
||||
"undici": "^8.11.2",
|
||||
"undici": "^8.14.0",
|
||||
"yaml": "^2.9.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -57,9 +57,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client/node_modules/undici": {
|
||||
"version": "6.29.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.0.tgz",
|
||||
"integrity": "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==",
|
||||
"version": "6.29.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
|
||||
"integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
@@ -1498,12 +1498,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/p-retry": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-8.0.1.tgz",
|
||||
"integrity": "sha512-NAigyu8hfvJe7MsS18mnc4is0MZtau3QMdBklaJKK23oBQb6occO3UPM3vHmTckW8KhfyjMZaUOqdTFEYliHgg==",
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-9.0.0.tgz",
|
||||
"integrity": "sha512-HuEats8gYn/UUYa5uyveyQGv75mQmwdFtuMgnZlS12dj/7bdnJSO6keaTjgcZUhvkANTj5EO3lACUmV3xmgj0Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-network-error": "^1.3.0"
|
||||
"is-network-error": "^1.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
@@ -1806,9 +1806,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "8.11.2",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz",
|
||||
"integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==",
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-8.14.0.tgz",
|
||||
"integrity": "sha512-MqM6wqORYo0jb1WFUwFKZTFWFz6VeBMPj9op5Hq+RvlrQjISQCyLEfx5+/iqOLWC/LL1HliJ5t0NP1BgYpXeVQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
"name": "create-github-app-token",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "3.3.0",
|
||||
"version": "3.4.1",
|
||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||
"engines": {
|
||||
"node": ">=24.4.0"
|
||||
@@ -20,14 +20,14 @@
|
||||
"@octokit/auth-app": "^8.3.1",
|
||||
"@octokit/request": "^10.0.8",
|
||||
"is-network-error": "^1.3.2",
|
||||
"p-retry": "^8.0.1"
|
||||
"p-retry": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@octokit/openapi": "^24.0.0",
|
||||
"c8": "^12.0.0",
|
||||
"esbuild": "^0.28.2",
|
||||
"open-cli": "^9.0.0",
|
||||
"undici": "^8.11.2",
|
||||
"undici": "^8.14.0",
|
||||
"yaml": "^2.9.1"
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { readdirSync } from "node:fs";
|
||||
import { execFile } from "node:child_process";
|
||||
import { promisify } from "node:util";
|
||||
import { promisify, stripVTControlCharacters } from "node:util";
|
||||
|
||||
import { snapshot, test } from "node:test";
|
||||
|
||||
@@ -60,8 +60,8 @@ for (const file of testFiles) {
|
||||
|
||||
({ stderr, stdout } = error);
|
||||
}
|
||||
const trimmedStderr = stderr.replace(/\r?\n$/, "");
|
||||
const trimmedStdout = stdout.replace(/\r?\n$/, "");
|
||||
const trimmedStderr = stripVTControlCharacters(stderr).replace(/\r?\n$/, "");
|
||||
const trimmedStdout = stripVTControlCharacters(stdout).replace(/\r?\n$/, "");
|
||||
await t.test("stderr", (t) => {
|
||||
if (trimmedStderr) t.assert.snapshot(trimmedStderr);
|
||||
else t.assert.strictEqual(trimmedStderr, "");
|
||||
|
||||
@@ -514,7 +514,7 @@ exports[`post-proxy-requires-native-support.test.js > stdout 1`] = `
|
||||
`;
|
||||
|
||||
exports[`post-revoke-token-fail-response.test.js > stdout 1`] = `
|
||||
::warning::Token revocation failed: Bad credentials
|
||||
::warning::Token revocation failed:
|
||||
`;
|
||||
|
||||
exports[`post-token-expired.test.js > stdout 1`] = `
|
||||
|
||||
@@ -28,6 +28,6 @@ mockPool
|
||||
authorization: "token secret123",
|
||||
},
|
||||
})
|
||||
.reply(401, "Bad credentials");
|
||||
.reply(401);
|
||||
|
||||
await import("../post.js");
|
||||
Reference in new issue
Block a user