Skip to content

Commit 15db94d

Browse files
angular-robotjosephperrott
authored andcommitted
build: lock file maintenance (#2555)
PR Close #2555
1 parent 9f28d6e commit 15db94d

File tree

15 files changed

+569
-1304
lines changed

15 files changed

+569
-1304
lines changed

.github/local-actions/branch-manager/main.js

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34220,15 +34220,15 @@ var require_jsonc_parser = __commonJS({
3422034220
throw earlyReturnException;
3422134221
}
3422234222
},
34223-
onSeparator: (sep2, offset, length) => {
34223+
onSeparator: (sep3, offset, length) => {
3422434224
if (position <= offset) {
3422534225
throw earlyReturnException;
3422634226
}
34227-
if (sep2 === ":" && previousNode && previousNode.type === "property") {
34227+
if (sep3 === ":" && previousNode && previousNode.type === "property") {
3422834228
previousNode.colonOffset = offset;
3422934229
isAtPropertyKey = false;
3423034230
previousNode = void 0;
34231-
} else if (sep2 === ",") {
34231+
} else if (sep3 === ",") {
3423234232
const last = segments[segments.length - 1];
3423334233
if (typeof last === "number") {
3423434234
segments[segments.length - 1] = last + 1;
@@ -34343,11 +34343,11 @@ var require_jsonc_parser = __commonJS({
3434334343
onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
3434434344
ensurePropertyComplete(offset + length);
3434534345
},
34346-
onSeparator: (sep2, offset, length) => {
34346+
onSeparator: (sep3, offset, length) => {
3434734347
if (currentParent.type === "property") {
34348-
if (sep2 === ":") {
34348+
if (sep3 === ":") {
3434934349
currentParent.colonOffset = offset;
34350-
} else if (sep2 === ",") {
34350+
} else if (sep3 === ",") {
3435134351
ensurePropertyComplete(offset);
3435234352
}
3435334353
}
@@ -55258,13 +55258,13 @@ var require_dist_node8 = __commonJS({
5525855258
createTokenAuth: () => createTokenAuth3
5525955259
});
5526055260
module.exports = __toCommonJS(dist_src_exports);
55261-
var REGEX_IS_INSTALLATION_LEGACY2 = /^v1\./;
55262-
var REGEX_IS_INSTALLATION2 = /^ghs_/;
55263-
var REGEX_IS_USER_TO_SERVER2 = /^ghu_/;
55261+
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
55262+
var REGEX_IS_INSTALLATION = /^ghs_/;
55263+
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
5526455264
async function auth6(token2) {
5526555265
const isApp = token2.split(/\./).length === 3;
55266-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY2.test(token2) || REGEX_IS_INSTALLATION2.test(token2);
55267-
const isUserToServer = REGEX_IS_USER_TO_SERVER2.test(token2);
55266+
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token2) || REGEX_IS_INSTALLATION.test(token2);
55267+
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token2);
5526855268
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
5526955269
return {
5527055270
type: "token",
@@ -61972,7 +61972,7 @@ async function getResponseData(response) {
6197261972
return response.text().catch(() => "");
6197361973
}
6197461974
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
61975-
if (mimetype.type === "application/json") {
61975+
if (isJSONResponse(mimetype)) {
6197661976
let text = "";
6197761977
try {
6197861978
text = await response.text();
@@ -61986,6 +61986,9 @@ async function getResponseData(response) {
6198661986
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
6198761987
}
6198861988
}
61989+
function isJSONResponse(mimetype) {
61990+
return mimetype.type === "application/json" || mimetype.type === "application/scim+json";
61991+
}
6198961992
function toErrorMessage(data) {
6199061993
if (typeof data === "string") {
6199161994
return data;
@@ -64760,13 +64763,14 @@ function Collection() {
6476064763
var before_after_hook_default = { Singular, Collection };
6476164764

6476264765
//
64763-
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
64764-
var REGEX_IS_INSTALLATION = /^ghs_/;
64765-
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
64766+
var b64url = "(?:[a-zA-Z0-9_-]+)";
64767+
var sep2 = "\\.";
64768+
var jwtRE = new RegExp(`^${b64url}${sep2}${b64url}${sep2}${b64url}$`);
64769+
var isJWT = jwtRE.test.bind(jwtRE);
6476664770
async function auth(token2) {
64767-
const isApp = token2.split(/\./).length === 3;
64768-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token2) || REGEX_IS_INSTALLATION.test(token2);
64769-
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token2);
64771+
const isApp = isJWT(token2);
64772+
const isInstallation = token2.startsWith("v1.") || token2.startsWith("ghs_");
64773+
const isUserToServer = token2.startsWith("ghu_");
6477064774
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
6477164775
return {
6477264776
type: "token",

.github/local-actions/labels-sync/main.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39672,13 +39672,13 @@ var require_dist_node8 = __commonJS({
3967239672
createTokenAuth: () => createTokenAuth3
3967339673
});
3967439674
module.exports = __toCommonJS(dist_src_exports);
39675-
var REGEX_IS_INSTALLATION_LEGACY2 = /^v1\./;
39676-
var REGEX_IS_INSTALLATION2 = /^ghs_/;
39677-
var REGEX_IS_USER_TO_SERVER2 = /^ghu_/;
39675+
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
39676+
var REGEX_IS_INSTALLATION = /^ghs_/;
39677+
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
3967839678
async function auth6(token) {
3967939679
const isApp = token.split(/\./).length === 3;
39680-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY2.test(token) || REGEX_IS_INSTALLATION2.test(token);
39681-
const isUserToServer = REGEX_IS_USER_TO_SERVER2.test(token);
39680+
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
39681+
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
3968239682
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
3968339683
return {
3968439684
type: "token",
@@ -43203,7 +43203,7 @@ async function getResponseData(response) {
4320343203
return response.text().catch(() => "");
4320443204
}
4320543205
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
43206-
if (mimetype.type === "application/json") {
43206+
if (isJSONResponse(mimetype)) {
4320743207
let text = "";
4320843208
try {
4320943209
text = await response.text();
@@ -43217,6 +43217,9 @@ async function getResponseData(response) {
4321743217
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
4321843218
}
4321943219
}
43220+
function isJSONResponse(mimetype) {
43221+
return mimetype.type === "application/json" || mimetype.type === "application/scim+json";
43222+
}
4322043223
function toErrorMessage(data) {
4322143224
if (typeof data === "string") {
4322243225
return data;
@@ -43363,13 +43366,14 @@ function withCustomRequest(customRequest) {
4336343366
}
4336443367

4336543368
//
43366-
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
43367-
var REGEX_IS_INSTALLATION = /^ghs_/;
43368-
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
43369+
var b64url = "(?:[a-zA-Z0-9_-]+)";
43370+
var sep = "\\.";
43371+
var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`);
43372+
var isJWT = jwtRE.test.bind(jwtRE);
4336943373
async function auth(token) {
43370-
const isApp = token.split(/\./).length === 3;
43371-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
43372-
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
43374+
const isApp = isJWT(token);
43375+
const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_");
43376+
const isUserToServer = token.startsWith("ghu_");
4337343377
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
4337443378
return {
4337543379
type: "token",

.github/local-actions/lock-closed/main.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39672,13 +39672,13 @@ var require_dist_node8 = __commonJS({
3967239672
createTokenAuth: () => createTokenAuth3
3967339673
});
3967439674
module.exports = __toCommonJS(dist_src_exports);
39675-
var REGEX_IS_INSTALLATION_LEGACY2 = /^v1\./;
39676-
var REGEX_IS_INSTALLATION2 = /^ghs_/;
39677-
var REGEX_IS_USER_TO_SERVER2 = /^ghu_/;
39675+
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
39676+
var REGEX_IS_INSTALLATION = /^ghs_/;
39677+
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
3967839678
async function auth6(token) {
3967939679
const isApp = token.split(/\./).length === 3;
39680-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY2.test(token) || REGEX_IS_INSTALLATION2.test(token);
39681-
const isUserToServer = REGEX_IS_USER_TO_SERVER2.test(token);
39680+
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
39681+
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
3968239682
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
3968339683
return {
3968439684
type: "token",
@@ -43203,7 +43203,7 @@ async function getResponseData(response) {
4320343203
return response.text().catch(() => "");
4320443204
}
4320543205
const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType);
43206-
if (mimetype.type === "application/json") {
43206+
if (isJSONResponse(mimetype)) {
4320743207
let text = "";
4320843208
try {
4320943209
text = await response.text();
@@ -43217,6 +43217,9 @@ async function getResponseData(response) {
4321743217
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
4321843218
}
4321943219
}
43220+
function isJSONResponse(mimetype) {
43221+
return mimetype.type === "application/json" || mimetype.type === "application/scim+json";
43222+
}
4322043223
function toErrorMessage(data) {
4322143224
if (typeof data === "string") {
4322243225
return data;
@@ -43363,13 +43366,14 @@ function withCustomRequest(customRequest) {
4336343366
}
4336443367

4336543368
//
43366-
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
43367-
var REGEX_IS_INSTALLATION = /^ghs_/;
43368-
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
43369+
var b64url = "(?:[a-zA-Z0-9_-]+)";
43370+
var sep = "\\.";
43371+
var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`);
43372+
var isJWT = jwtRE.test.bind(jwtRE);
4336943373
async function auth(token) {
43370-
const isApp = token.split(/\./).length === 3;
43371-
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
43372-
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
43374+
const isApp = isJWT(token);
43375+
const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_");
43376+
const isUserToServer = token.startsWith("ghu_");
4337343377
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
4337443378
return {
4337543379
type: "token",

0 commit comments

Comments
 (0)