@agentconnect.md/setup 1.34.0-rc.16 → 1.34.0-rc.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60530,7 +60530,7 @@ const GITHUB_APP_PERMISSIONS = {
|
|
|
60530
60530
|
actions: "write",
|
|
60531
60531
|
checks: "write",
|
|
60532
60532
|
workflows: "write",
|
|
60533
|
-
|
|
60533
|
+
emails: "read"
|
|
60534
60534
|
};
|
|
60535
60535
|
const GITHUB_APP_EVENTS = [
|
|
60536
60536
|
"push",
|
|
@@ -60611,9 +60611,6 @@ function sameRecord(left, right) {
|
|
|
60611
60611
|
const expectedKeys = Object.keys(right).sort();
|
|
60612
60612
|
return JSON.stringify(actualKeys) === JSON.stringify(expectedKeys) && expectedKeys.every((key) => actual[key] === right[key]);
|
|
60613
60613
|
}
|
|
60614
|
-
function githubApiPermissions(manifestPermissions) {
|
|
60615
|
-
return Object.fromEntries(Object.entries(manifestPermissions).map(([key, value]) => [key === "email_addresses" ? "emails" : key, value]));
|
|
60616
|
-
}
|
|
60617
60614
|
function sameStringSet(left, right) {
|
|
60618
60615
|
if (!Array.isArray(left) || !left.every((value) => typeof value === "string")) return false;
|
|
60619
60616
|
return JSON.stringify([...left].sort()) === JSON.stringify([...right].sort());
|
|
@@ -60652,7 +60649,7 @@ async function auditGithubApp(identity, privateKeyBase64, expectedManifest, fetc
|
|
|
60652
60649
|
};
|
|
60653
60650
|
if (app.id !== identity.appId || app.slug !== identity.slug || identity.clientId !== null && app.client_id !== identity.clientId) addDiff("identity", "App identity", currentIdentity, expectedIdentity);
|
|
60654
60651
|
if (app.external_url !== expectedManifest.url) addDiff("external_url", "Homepage URL", app.external_url ?? null, expectedManifest.url ?? null);
|
|
60655
|
-
const expectedPermissions =
|
|
60652
|
+
const expectedPermissions = GITHUB_APP_PERMISSIONS;
|
|
60656
60653
|
if (!sameRecord(app.permissions, expectedPermissions)) addDiff("permissions", "Repository permissions", asRecord$3(app.permissions), expectedPermissions);
|
|
60657
60654
|
const expectedEvents = Array.isArray(expectedManifest.default_events) ? expectedManifest.default_events.filter((event) => typeof event === "string") : [];
|
|
60658
60655
|
if (!sameStringSet(app.events, expectedEvents)) addDiff("events", "Webhook events", Array.isArray(app.events) ? app.events : [], expectedEvents);
|