diff --git a/harmony.ipkg b/harmony.ipkg index 9c34254..b9934bd 100644 --- a/harmony.ipkg +++ b/harmony.ipkg @@ -1,5 +1,5 @@ package harmony -version = 2.5.0 +version = 2.6.0 authors = "Mathew Polzin" license = "MIT" -- brief = diff --git a/package-lock.json b/package-lock.json index 66902f1..94878b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,11 +30,11 @@ "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, "node_modules/@octokit/app": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/@octokit/app/-/app-13.1.2.tgz", - "integrity": "sha512-Kf+h5sa1SOI33hFsuHvTsWj1jUrjp1x4MuiJBq7U/NicfEGa6nArPUoDnyfP/YTmcQ5cQ5yvOgoIBkbwPg6kzQ==", + "version": "13.1.8", + "resolved": "https://registry.npmjs.org/@octokit/app/-/app-13.1.8.tgz", + "integrity": "sha512-bCncePMguVyFpdBbnceFKfmPOuUD94T189GuQ0l00ZcQ+mX4hyPqnaWJlsXE2HSdA71eV7p8GPDZ+ErplTkzow==", "dependencies": { - "@octokit/auth-app": "^4.0.8", + "@octokit/auth-app": "^4.0.13", "@octokit/auth-unauthenticated": "^3.0.0", "@octokit/core": "^4.0.0", "@octokit/oauth-app": "^4.0.7", @@ -47,18 +47,17 @@ } }, "node_modules/@octokit/auth-app": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-4.0.9.tgz", - "integrity": "sha512-VFpKIXhHO+kVJtane5cEvdYPtjDKCOI0uKsRrsZfJP+uEu7rcPbQCLCcRKgyT+mUIzGr1IIOmwP/lFqSip1dXA==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-4.0.13.tgz", + "integrity": "sha512-NBQkmR/Zsc+8fWcVIFrwDgNXS7f4XDrkd9LHdi9DPQw1NdGHLviLzRO2ZBwTtepnwHXW5VTrVU9eFGijMUqllg==", "dependencies": { "@octokit/auth-oauth-app": "^5.0.0", "@octokit/auth-oauth-user": "^2.0.0", "@octokit/request": "^6.0.0", "@octokit/request-error": "^3.0.0", "@octokit/types": "^9.0.0", - "@types/lru-cache": "^5.1.0", "deprecation": "^2.3.1", - "lru-cache": "^6.0.0", + "lru-cache": "^9.0.0", "universal-github-app-jwt": "^1.1.1", "universal-user-agent": "^6.0.0" }, @@ -67,9 +66,9 @@ } }, "node_modules/@octokit/auth-oauth-app": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-5.0.5.tgz", - "integrity": "sha512-UPX1su6XpseaeLVCi78s9droxpGtBWIgz9XhXAx9VXabksoF0MyI5vaa1zo1njyYt6VaAjFisC2A2Wchcu2WmQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-5.0.6.tgz", + "integrity": "sha512-SxyfIBfeFcWd9Z/m1xa4LENTQ3l1y6Nrg31k2Dcb1jS5ov7pmwMJZ6OGX8q3K9slRgVpeAjNA1ipOAMHkieqyw==", "dependencies": { "@octokit/auth-oauth-device": "^4.0.0", "@octokit/auth-oauth-user": "^2.0.0", @@ -84,9 +83,9 @@ } }, "node_modules/@octokit/auth-oauth-device": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-4.0.4.tgz", - "integrity": "sha512-Xl85BZYfqCMv+Uvz33nVVUjE7I/PVySNaK6dRRqlkvYcArSr9vRcZC9KVjXYObGRTCN6mISeYdakAZvWEN4+Jw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-4.0.5.tgz", + "integrity": "sha512-XyhoWRTzf2ZX0aZ52a6Ew5S5VBAfwwx1QnC2Np6Et3MWQpZjlREIcbcvVZtkNuXp6Z9EeiSLSDUqm3C+aMEHzQ==", "dependencies": { "@octokit/oauth-methods": "^2.0.0", "@octokit/request": "^6.0.0", @@ -98,9 +97,9 @@ } }, "node_modules/@octokit/auth-oauth-user": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-2.1.1.tgz", - "integrity": "sha512-JgqnNNPf9CaWLxWm9uh2WgxcaVYhxBR09NVIPTiMU2dVZ3FObOHs3njBiLNw+zq84k+rEdm5Y7AsiASrZ84Apg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-2.1.2.tgz", + "integrity": "sha512-kkRqNmFe7s5GQcojE3nSlF+AzYPpPv7kvP/xYEnE57584pixaFBH8Vovt+w5Y3E4zWUEOxjdLItmBTFAWECPAg==", "dependencies": { "@octokit/auth-oauth-device": "^4.0.0", "@octokit/oauth-methods": "^2.0.0", @@ -114,20 +113,17 @@ } }, "node_modules/@octokit/auth-token": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz", - "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==", - "dependencies": { - "@octokit/types": "^9.0.0" - }, + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz", + "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==", "engines": { "node": ">= 14" } }, "node_modules/@octokit/auth-unauthenticated": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-3.0.4.tgz", - "integrity": "sha512-AT74XGBylcLr4lmUp1s6mjSUgphGdlse21Qjtv5DzpX1YOl5FXKwvNcZWESdhyBbpDT8VkVyLFqa/7a7eqpPNw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-3.0.5.tgz", + "integrity": "sha512-yH2GPFcjrTvDWPwJWWCh0tPPtTL5SMgivgKPA+6v/XmYN6hGQkAto8JtZibSKOpf8ipmeYhLNWQ2UgW0GYILCw==", "dependencies": { "@octokit/request-error": "^3.0.0", "@octokit/types": "^9.0.0" @@ -137,9 +133,9 @@ } }, "node_modules/@octokit/core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz", - "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz", + "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==", "dependencies": { "@octokit/auth-token": "^3.0.0", "@octokit/graphql": "^5.0.0", @@ -154,9 +150,9 @@ } }, "node_modules/@octokit/endpoint": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz", - "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", + "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==", "dependencies": { "@octokit/types": "^9.0.0", "is-plain-object": "^5.0.0", @@ -167,9 +163,9 @@ } }, "node_modules/@octokit/graphql": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz", - "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz", + "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==", "dependencies": { "@octokit/request": "^6.0.0", "@octokit/types": "^9.0.0", @@ -180,9 +176,9 @@ } }, "node_modules/@octokit/oauth-app": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-4.2.0.tgz", - "integrity": "sha512-gyGclT77RQMkVUEW3YBeAKY+LBSc5u3eC9Wn/Uwt3WhuKuu9mrV18EnNpDqmeNll+mdV02yyBROU29Tlili6gg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-4.2.4.tgz", + "integrity": "sha512-iuOVFrmm5ZKNavRtYu5bZTtmlKLc5uVgpqTfMEqYYf2OkieV6VdxKZAb5qLVdEPL8LU2lMWcGpavPBV835cgoA==", "dependencies": { "@octokit/auth-oauth-app": "^5.0.0", "@octokit/auth-oauth-user": "^2.0.0", @@ -207,9 +203,9 @@ } }, "node_modules/@octokit/oauth-methods": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-2.0.5.tgz", - "integrity": "sha512-yQP6B5gE3axNxuM3U9KqWs/ErAQ+WLPaPgC/7EjsZsQibkf8sjdAfF8/y/EJW+Dd05XQvadX4WhQZPMnO1SE1A==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-2.0.6.tgz", + "integrity": "sha512-l9Uml2iGN2aTWLZcm8hV+neBiFXAQ9+3sKiQe/sgumHlL6HDg0AQ8/l16xX/5jJvfxueqTW5CWbzd0MjnlfHZw==", "dependencies": { "@octokit/oauth-authorization-url": "^5.0.0", "@octokit/request": "^6.2.3", @@ -222,16 +218,17 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz", - "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==" + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.0.0.tgz", + "integrity": "sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz", - "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz", + "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==", "dependencies": { - "@octokit/types": "^9.0.0" + "@octokit/tsconfig": "^1.0.2", + "@octokit/types": "^9.2.3" }, "engines": { "node": ">= 14" @@ -241,12 +238,11 @@ } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz", - "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz", + "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==", "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.3.1" + "@octokit/types": "^10.0.0" }, "engines": { "node": ">= 14" @@ -255,10 +251,18 @@ "@octokit/core": ">=3" } }, + "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz", + "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/@octokit/plugin-retry": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.1.tgz", - "integrity": "sha512-iR7rg5KRSl6L6RELTQQ3CYeNgeBJyuAmP95odzcQ/zyefnRT/Peo8rWeky4z7V/+/oPWqOL4I5Z+V8KtjpHCJw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.6.tgz", + "integrity": "sha512-obkYzIgEC75r8+9Pnfiiqy3y/x1bc3QLE5B7qvv9wi9Kj0R5tGQFC6QMBg1154WQ9lAVypuQDGyp3hNpp15gQQ==", "dependencies": { "@octokit/types": "^9.0.0", "bottleneck": "^2.15.3" @@ -271,9 +275,9 @@ } }, "node_modules/@octokit/plugin-throttling": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-5.0.1.tgz", - "integrity": "sha512-I4qxs7wYvYlFuY3PAUGWAVPhFXG3RwnvTiSr5Fu/Auz7bYhDLnzS2MjwV8nGLq/FPrWwYiweeZrI5yjs1YG4tQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-5.2.3.tgz", + "integrity": "sha512-C9CFg9mrf6cugneKiaI841iG8DOv6P5XXkjmiNNut+swePxQ7RWEdAZRp5rJoE1hjsIqiYcKa/ZkOQ+ujPI39Q==", "dependencies": { "@octokit/types": "^9.0.0", "bottleneck": "^2.15.3" @@ -286,9 +290,9 @@ } }, "node_modules/@octokit/request": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz", - "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==", + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz", + "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==", "dependencies": { "@octokit/endpoint": "^7.0.0", "@octokit/request-error": "^3.0.0", @@ -314,22 +318,27 @@ "node": ">= 14" } }, + "node_modules/@octokit/tsconfig": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz", + "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==" + }, "node_modules/@octokit/types": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz", - "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", "dependencies": { - "@octokit/openapi-types": "^16.0.0" + "@octokit/openapi-types": "^18.0.0" } }, "node_modules/@octokit/webhooks": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-10.7.0.tgz", - "integrity": "sha512-zZBbQMpXXnK/ki/utrFG/TuWv9545XCSLibfDTxrYqR1PmU6zel02ebTOrA7t5XIGHzlEOc/NgISUIBUe7pMFA==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-10.9.1.tgz", + "integrity": "sha512-5NXU4VfsNOo2VSU/SrLrpPH2Z1ZVDOWFcET4EpnEBX1uh/v8Uz65UVuHIRx5TZiXhnWyRE9AO1PXHa+M/iWwZA==", "dependencies": { "@octokit/request-error": "^3.0.0", "@octokit/webhooks-methods": "^3.0.0", - "@octokit/webhooks-types": "6.10.0", + "@octokit/webhooks-types": "6.11.0", "aggregate-error": "^3.1.0" }, "engines": { @@ -337,22 +346,22 @@ } }, "node_modules/@octokit/webhooks-methods": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-3.0.2.tgz", - "integrity": "sha512-Vlnv5WBscf07tyAvfDbp7pTkMZUwk7z7VwEF32x6HqI+55QRwBTcT+D7DDjZXtad/1dU9E32x0HmtDlF9VIRaQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-3.0.3.tgz", + "integrity": "sha512-2vM+DCNTJ5vL62O5LagMru6XnYhV4fJslK+5YUkTa6rWlW2S+Tqs1lF9Wr9OGqHfVwpBj3TeztWfVON/eUoW1Q==", "engines": { "node": ">= 14" } }, "node_modules/@octokit/webhooks-types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.10.0.tgz", - "integrity": "sha512-lDNv83BeEyxxukdQ0UttiUXawk9+6DkdjjFtm2GFED+24IQhTVaoSbwV9vWWKONyGLzRmCQqZmoEWkDhkEmPlw==" + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.11.0.tgz", + "integrity": "sha512-AanzbulOHljrku1NGfafxdpTCfw2ENaWzH01N2vqQM+cUFbk868Cgh0xylz0JIM9BoKbfI++bdD6EYX0Q/UTEw==" }, "node_modules/@types/aws-lambda": { - "version": "8.10.110", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.110.tgz", - "integrity": "sha512-r6egf2Cwv/JaFTTrF9OXFVUB3j/SXTgM9BwrlbBRjWAa2Tu6GWoDoLflppAZ8uSfbUJdXvC7Br3DjuN9pQ2NUQ==" + "version": "8.10.119", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.119.tgz", + "integrity": "sha512-Vqm22aZrCvCd6I5g1SvpW151jfqwTzEZ7XJ3yZ6xaZG31nUEOEyzzVImjRcsN8Wi/QyPxId/x8GTtgIbsy8kEw==" }, "node_modules/@types/btoa-lite": { "version": "1.0.0", @@ -360,22 +369,17 @@ "integrity": "sha512-wJsiX1tosQ+J5+bY5LrSahHxr2wT+uME5UDwdN1kg4frt40euqA+wzECkmq4t5QbveHiJepfdThgQrPw6KiSlg==" }, "node_modules/@types/jsonwebtoken": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", - "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==" - }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz", + "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==" }, "node_modules/aggregate-error": { "version": "3.1.0", @@ -482,9 +486,9 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", "dependencies": { "jws": "^3.2.2", "lodash": "^4.17.21", @@ -521,14 +525,11 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", "engines": { - "node": ">=10" + "node": "14 || >=16.14" } }, "node_modules/ms": { @@ -537,9 +538,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/node-fetch": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", - "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -556,18 +557,19 @@ } }, "node_modules/octokit": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.14.tgz", - "integrity": "sha512-z6cgZBFxirpFEQ1La8Lg83GCs5hOV2EPpkYYdjsGNbfQMv8qUGjq294MiRBCbZqLufviakGsPUxaNKe3JrPmsA==", - "dependencies": { - "@octokit/app": "^13.1.1", - "@octokit/core": "^4.0.4", - "@octokit/oauth-app": "^4.0.6", - "@octokit/plugin-paginate-rest": "^6.0.0", - "@octokit/plugin-rest-endpoint-methods": "^7.0.0", - "@octokit/plugin-retry": "^4.0.3", - "@octokit/plugin-throttling": "^5.0.0", - "@octokit/types": "^9.0.0" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/octokit/-/octokit-2.1.0.tgz", + "integrity": "sha512-Pxi6uKTjBRZWgAwsw1NgHdRlL+QASCN35OYS7X79o7PtBME0CLXEroZmPtEwlWZbPTP+iDbEy2wCbSOgm0uGIQ==", + "dependencies": { + "@octokit/app": "^13.1.5", + "@octokit/core": "^4.2.1", + "@octokit/oauth-app": "^4.2.1", + "@octokit/plugin-paginate-rest": "^6.1.0", + "@octokit/plugin-rest-endpoint-methods": "^7.1.1", + "@octokit/plugin-retry": "^4.1.3", + "@octokit/plugin-throttling": "^5.2.2", + "@octokit/request-error": "^v3.0.3", + "@octokit/types": "^9.2.2" }, "engines": { "node": ">= 14" @@ -601,9 +603,9 @@ ] }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -614,10 +616,21 @@ "node": ">=10" } }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/simple-git": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.0.tgz", - "integrity": "sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==", + "version": "3.19.1", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.19.1.tgz", + "integrity": "sha512-Ck+rcjVaE1HotraRAS8u/+xgTvToTuoMkT9/l9lvuP5jftwnYUp6DwuJzsKErHgfyRk8IB8pqGHWEbM3tLgV1w==", "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", diff --git a/package.json b/package.json index cb34ead..a5b386d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mattpolzin/harmony", - "version": "2.5.0", + "version": "2.6.0", "publishConfig": { "access": "public" }, diff --git a/src/AppVersion.idr b/src/AppVersion.idr index b027063..2b0ac75 100644 --- a/src/AppVersion.idr +++ b/src/AppVersion.idr @@ -4,7 +4,7 @@ module AppVersion export appVersion : String -appVersion = "2.5.0" +appVersion = "2.6.0" export printVersion : HasIO io => io () diff --git a/src/Config.idr b/src/Config.idr index 32eee41..92a7a4a 100644 --- a/src/Config.idr +++ b/src/Config.idr @@ -215,14 +215,14 @@ createConfig envGithubPAT terminalColors editor = do putStrLn "What GitHub remote repo would you like to use harmony for\{remoteDefaultStr}?" defaultRemote <- Just . orIfEmpty (Just remoteGuess) . trim <$> getLine - putStr "Would you like harmony to comment when it assigns reviewers? [Y/n] " - commentOnAssign <- yesUnlessNo . trim <$> getLine + commentOnAssign <- + yesNoPrompt "Would you like harmony to comment when it assigns reviewers?" - putStr "Would you like harmony to assign teams when it assigns reviewers? [Y/n] " - assignTeams <- yesUnlessNo . trim <$> getLine + assignTeams <- + yesNoPrompt "Would you like harmony to assign teams when it assigns reviewers?" - putStr "Would you like harmony to assign individual users when it assigns reviewers? [Y/n] " - assignUsers <- yesUnlessNo . trim <$> getLine + assignUsers <- + yesNoPrompt "Would you like harmony to assign individual users when it assigns reviewers?" _ <- liftIO $ octokit pat putStrLn "Creating config..." @@ -263,12 +263,6 @@ createConfig envGithubPAT terminalColors editor = do orIfEmpty (Just y) "" = y orIfEmpty (Just _) x = x - yesUnlessNo : String -> Bool - yesUnlessNo answer with (toLower answer) - _ | "n" = False - _ | "no" = False - _ | _ = True - org : Maybe GitRemote -> Maybe String org = map (.org) diff --git a/src/FFI/Git.idr b/src/FFI/Git.idr index 7d7a0e2..3c96138 100644 --- a/src/FFI/Git.idr +++ b/src/FFI/Git.idr @@ -56,6 +56,16 @@ pushNewBranch : Git => (remoteName : String) -> (branch : String) -> Promise () pushNewBranch @{G ptr} remoteName branch = ignore . promiseIO $ prim__pushNewBranch ptr remoteName branch +%foreign git_ffi "push" +prim__push : Ptr GitRef + -> (onSuccess : String -> PrimIO ()) + -> (onFailure : String -> PrimIO ()) + -> PrimIO () + +export +push : Git => Promise () +push @{G ptr} = ignore . promiseIO $ prim__push ptr + %foreign git_ffi "list_remotes" prim__listRemotes : Ptr GitRef -> (onSuccess : String -> PrimIO ()) @@ -89,12 +99,64 @@ prim__remoteTrackingBranch : Ptr GitRef export remoteTrackingBranch : Git => Promise (Maybe String) -remoteTrackingBranch @{G ptr} = - do str <- promiseIO $ prim__remoteTrackingBranch ptr - pure $ - case strM str of - StrNil => Nothing - (StrCons x xs) => Just str +remoteTrackingBranch @{G ptr} = do + str <- promiseIO $ prim__remoteTrackingBranch ptr + pure $ + case strM str of + StrNil => Nothing + (StrCons x xs) => Just str + +%foreign git_ffi "uncommitted_changes" +prim__uncommittedChanges : Ptr GitRef + -> (onSuccess : String -> PrimIO ()) + -> (onFailure : String -> PrimIO ()) + -> PrimIO () + +||| Get the Git output for filenames with uncommitted changes. If there +||| are no files with uncommitted changes, returns @Nothing@. +export +uncommittedChanges : Git => Promise (Maybe String) +uncommittedChanges @{G ptr} = do + str <- promiseIO $ prim__uncommittedChanges ptr + pure $ + case strM str of + StrNil => Nothing + (StrCons x xs) => Just str + +%foreign git_ffi "staged_changes" +prim__stagedChanges : Ptr GitRef + -> (onSuccess : String -> PrimIO ()) + -> (onFailure : String -> PrimIO ()) + -> PrimIO () + +||| Get the Git output for filenames with staged changes. If there +||| are no files with staged changes, returns @Nothing@. +export +stagedChanges : Git => Promise (Maybe String) +stagedChanges @{G ptr} = do + str <- promiseIO $ prim__stagedChanges ptr + pure $ + case strM str of + StrNil => Nothing + (StrCons x xs) => Just str + +%foreign git_ffi "unpushed_commits" +prim__unpushedCommits : Ptr GitRef + -> (onSuccess : String -> PrimIO ()) + -> (onFailure : String -> PrimIO ()) + -> PrimIO () + +||| Get the Git output for unpushed commits (multiple lines per +||| commit including the ref, author, and commit message). If there +||| are no unpushed commits, returns @Nothing@. +export +unpushedCommits : Git => Promise (Maybe String) +unpushedCommits @{G ptr} = do + str <- promiseIO $ prim__unpushedCommits ptr + pure $ + case strM str of + StrNil => Nothing + (StrCons x xs) => Just str %foreign git_ffi "user_email" prim__userEmail : Ptr GitRef diff --git a/src/PullRequest.idr b/src/PullRequest.idr index 0c5a639..a361108 100644 --- a/src/PullRequest.idr +++ b/src/PullRequest.idr @@ -274,11 +274,47 @@ identifyOrCreatePR @{config} {isDraft} branch = do ignore $ removeFile "pr_description.tmp.md" pure description + continueGivenUncommittedChanges : Promise Bool + continueGivenUncommittedChanges = do + case !uncommittedChanges of + Just files => do + putStrLn "The following files have uncommitted changes:" + putStrLn files + yesNoPrompt "Would you like to continue creating a Pull Request anyway?" + Nothing => pure True + + continueGivenStagedChanges : Promise Bool + continueGivenStagedChanges = do + case !stagedChanges of + Just files => do + putStrLn "The following files have staged but uncommitted changes:" + putStrLn files + yesNoPrompt "Would you like to continue creating a Pull Request anyway?" + Nothing => pure True + createPR : Promise PullRequest createPR = do - when (!remoteTrackingBranch == Nothing) $ - do putStrLn "Creating a new remote branch..." - pushNewBranch (fromMaybe "origin" config.defaultRemote) branch + -- create a remote tracking branch if needed + whenNothing !remoteTrackingBranch $ do + putStrLn "Creating a new remote branch..." + pushNewBranch (fromMaybe "origin" config.defaultRemote) branch + + -- ask if we should continue despite uncommitted changes + True <- continueGivenUncommittedChanges + | False => reject "Not creating a PR (for now)..." + True <- continueGivenStagedChanges + | False => reject "Not creating a PR (for now)..." + + -- ask if unpushed commits should be pushed + whenJust !unpushedCommits $ \unpushedString => do + putStrLn "The following commits have not been pushed:\n" + putStrLn unpushedString + putStrLn "\n" + pushUnpushedChanges <- + yesNoPrompt "Would you like to push these changes before creating a PR?" + when pushUnpushedChanges push + + -- proceed to creating a PR putStrLn "Creating a new PR for the current branch (\{branch})." putStrLn "What branch are you merging into (ENTER for default: \{config.mainBranch})?" baseBranchInput <- trim <$> getLine diff --git a/src/Util.idr b/src/Util.idr index f3404cd..0735b52 100644 --- a/src/Util.idr +++ b/src/Util.idr @@ -12,6 +12,13 @@ import Text.PrettyPrint.Prettyprinter.Render.Terminal %default total +||| Run the given applicative when the input is @Nothing@. +||| The dual of @whenJust@. +export +whenNothing : Applicative f => Maybe a -> f () -> f () +whenNothing Nothing x = x +whenNothing (Just _) _ = pure () + ||| Render with or without color based on configuration export renderString : Config => Doc AnsiStyle -> String @@ -39,6 +46,21 @@ getManyLines = getMoreLines [] ("" :: rest, "") => pure (reverse rest) _ => getMoreLines (line :: acc) fuel +||| Ask a question and receive a yes/no response with yes being the default. +||| You probably want your question String to end with a question mark; +||| @yesNoPrompt@ will append "[Y/n]" to the end of your question for you. +export +yesNoPrompt : HasIO io => (question : String) -> io Bool +yesNoPrompt question = do + putStr "\{question} [Y/n] " + yesUnlessNo . trim <$> getLine + where + yesUnlessNo : String -> Bool + yesUnlessNo answer with (toLower answer) + _ | "n" = False + _ | "no" = False + _ | _ = True + ||| Get an absolute path for the given directory or file assuming the ||| given path is relative to the root of the Git repository. export diff --git a/support/js/git.js b/support/js/git.js index f93a391..3257786 100644 --- a/support/js/git.js +++ b/support/js/git.js @@ -7,12 +7,15 @@ const git_git = () => const idris__git_unpromisify = (promise, onSuccess, onFailure) => promise.then(r => onSuccess(r)(), e => onFailure(e)()) +// trim a result (second argument) and pass it to the given callback (first argument). +const idris__git_trim = callback => value => callback(value.trim()) + // current branch // @Returns String const git_current_branch = (git, onSuccess, onFailure) => idris__git_unpromisify( git.raw('branch', '--show-current'), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), onFailure ) @@ -32,18 +35,25 @@ const git_push_new_branch = (git, remoteName, branch, onSuccess, onFailure) => onFailure ) +const git_push = (git, onSuccess, onFailure) => + idris__git_unpromisify( + git.raw('push'), + r => onSuccess(''), + onFailure + ) + // remote URI const git_remote_uri = (git, remoteName, onSuccess, onFailure) => idris__git_unpromisify( git.raw('remote', 'get-url', remoteName), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), onFailure ) const git_list_remotes = (git, onSuccess, onFailure) => idris__git_unpromisify( git.raw('remote'), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), onFailure ) @@ -56,21 +66,42 @@ const git_remote_tracking_branch = (git, onSuccess, onFailure) => .then(headRef => git.raw('for-each-ref', '--format', '%(upstream:short)', `${headRef.trim()}`), onFailure), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), + onFailure + ) + +const git_uncommitted_changes = (git, onSuccess, onFailure) => + idris__git_unpromisify( + git.raw('diff', '--name-only'), + idris__git_trim(onSuccess), + onFailure + ) + +const git_staged_changes = (git, onSuccess, onFailure) => + idris__git_unpromisify( + git.raw('diff', '--staged', '--name-only'), + idris__git_trim(onSuccess), + onFailure + ) + +const git_unpushed_commits = (git, onSuccess, onFailure) => + idris__git_unpromisify( + git.raw('log', '@{push}..'), + idris__git_trim(onSuccess), onFailure ) const git_user_email = (git, onSuccess, onFailure) => idris__git_unpromisify( git.raw('config', '--get', 'user.email'), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), onFailure ) const git_root_dir = (git, onSuccess, onFailure) => idris__git_unpromisify( git.raw('rev-parse', '--show-toplevel'), - r => onSuccess(r.trim()), + idris__git_trim(onSuccess), onFailure )