mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Update dependencies
This commit is contained in:
parent
becba83765
commit
b77916f425
49
package.json
49
package.json
@ -29,54 +29,53 @@
|
|||||||
"generate-default-config": "node lib/Config/Defaults.js --config > config.sample.yml"
|
"generate-default-config": "node lib/Config/Defaults.js --config > config.sample.yml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@node-rs/helper": "^1.2.1",
|
|
||||||
"@octokit/auth-app": "^3.3.0",
|
"@octokit/auth-app": "^3.3.0",
|
||||||
"@octokit/auth-token": "^2.4.5",
|
"@octokit/auth-token": "^2.4.5",
|
||||||
"@octokit/rest": "^18.10.0",
|
"@octokit/rest": "^18.10.0",
|
||||||
"@octokit/webhooks": "^9.1.2",
|
"@octokit/webhooks": "^9.1.2",
|
||||||
"axios": "^0.21.2",
|
"axios": "^0.24.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"ioredis": "^4.26.0",
|
"ioredis": "^4.28.0",
|
||||||
"markdown-it": "^12.0.4",
|
"markdown-it": "^12.2.0",
|
||||||
"matrix-bot-sdk": "^0.5.19",
|
"matrix-bot-sdk": "^0.5.19",
|
||||||
"matrix-widget-api": "^0.1.0-beta.13",
|
"matrix-widget-api": "^0.1.0-beta.17",
|
||||||
"micromatch": "^4.0.4",
|
"micromatch": "^4.0.4",
|
||||||
"mime": "^2.5.2",
|
"mime": "^3.0.0",
|
||||||
"mocha": "^8.2.1",
|
"node-emoji": "^1.11.0",
|
||||||
"node-emoji": "^1.10.0",
|
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"source-map-support": "^0.5.19",
|
"source-map-support": "^0.5.21",
|
||||||
"string-argv": "^0.3.1",
|
"string-argv": "^0.3.1",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"winston": "^3.3.3",
|
"winston": "^3.3.3",
|
||||||
"yaml": "^1.10.0"
|
"yaml": "^1.10.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fontsource/open-sans": "^4.2.2",
|
"@fontsource/open-sans": "^4.2.2",
|
||||||
"@napi-rs/cli": "^1.3.5",
|
"@napi-rs/cli": "^1.3.5",
|
||||||
"@prefresh/snowpack": "^3.1.2",
|
"@prefresh/snowpack": "^3.1.2",
|
||||||
"@snowpack/plugin-typescript": "^1.2.1",
|
"@snowpack/plugin-typescript": "^1.2.1",
|
||||||
"@types/chai": "^4.2.16",
|
"@types/chai": "^4.2.22",
|
||||||
"@types/cors": "^2.8.10",
|
"@types/cors": "^2.8.12",
|
||||||
"@types/express": "^4.17.11",
|
"@types/express": "^4.17.13",
|
||||||
"@types/ioredis": "^4.22.3",
|
"@types/ioredis": "^4.28.1",
|
||||||
"@types/markdown-it": "^12.0.1",
|
"@types/markdown-it": "^12.2.3",
|
||||||
"@types/micromatch": "^4.0.1",
|
"@types/micromatch": "^4.0.1",
|
||||||
"@types/mime": "^2.0.3",
|
"@types/mime": "^2.0.3",
|
||||||
"@types/mocha": "^8.2.2",
|
"@types/mocha": "^9.0.0",
|
||||||
"@types/node-emoji": "^1.8.1",
|
|
||||||
"@types/node": "^12",
|
"@types/node": "^12",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/node-emoji": "^1.8.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.21.0",
|
"@types/uuid": "^8.3.3",
|
||||||
"@typescript-eslint/parser": "^4.21.0",
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||||
|
"@typescript-eslint/parser": "^5.4.0",
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
"eslint-plugin-mocha": "^8.1.0",
|
"eslint": "^8.3.0",
|
||||||
"eslint": "^7.24.0",
|
"eslint-plugin-mocha": "^9.0.0",
|
||||||
"mini.css": "^3.0.1",
|
"mini.css": "^3.0.1",
|
||||||
"preact": "^10.5.13",
|
"mocha": "^8.2.1",
|
||||||
|
"preact": "^10.5.15",
|
||||||
"snowpack": "^3.8.8",
|
"snowpack": "^3.8.8",
|
||||||
"ts-node": "^9.1.1",
|
"ts-node": "^10.4.0",
|
||||||
"typescript": "^4.2.4"
|
"typescript": "^4.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import markdown from "markdown-it";
|
import markdown from "markdown-it";
|
||||||
import stringArgv from "string-argv";
|
import stringArgv from "string-argv";
|
||||||
|
import { CommandError } from "./errors";
|
||||||
import { MatrixMessageContent } from "./MatrixEvent";
|
import { MatrixMessageContent } from "./MatrixEvent";
|
||||||
|
|
||||||
const md = new markdown();
|
const md = new markdown();
|
||||||
@ -77,7 +78,8 @@ export async function handleCommand(userId: string, command: string, botCommands
|
|||||||
await botCommands[prefix].fn.apply(obj, args);
|
await botCommands[prefix].fn.apply(obj, args);
|
||||||
return {handled: true};
|
return {handled: true};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
return {handled: true, error: ex.message, humanError: ex.humanError};
|
const commandError = ex as CommandError;
|
||||||
|
return {handled: true, error: commandError.message, humanError: commandError.humanError};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,8 @@ export class GithubGraphQLClient {
|
|||||||
|
|
||||||
private async query(request: string, variables: Record<string, string|number>) {
|
private async query(request: string, variables: Record<string, string|number>) {
|
||||||
log.debug(`GraphQL Query: ${request}`);
|
log.debug(`GraphQL Query: ${request}`);
|
||||||
return this.octokit.graphql(`${request}`, {
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
return this.octokit.graphql<Record<string, any>>(`${request}`, {
|
||||||
headers: GithubGraphQLClient.headers,
|
headers: GithubGraphQLClient.headers,
|
||||||
...variables,
|
...variables,
|
||||||
});
|
});
|
||||||
@ -74,7 +75,7 @@ query($name: String!, $owner: String!, $number: Int!) {
|
|||||||
${DiscussionQL}
|
${DiscussionQL}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`, {name, owner, number}) as any;
|
}`, {name, owner, number});
|
||||||
return result.repository.discussion as DiscussionQLResponse;
|
return result.repository.discussion as DiscussionQLResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +87,7 @@ mutation addDiscussionComment($discussionId: ID!, $body: String!) {
|
|||||||
id
|
id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`, {discussionId, body}) as any;
|
}`, {discussionId, body});
|
||||||
return result.addDiscussionComment.comment.id as string;
|
return result.addDiscussionComment.comment.id as string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ export class GitHubWatcher extends EventEmitter implements NotificationWatcherTa
|
|||||||
// To avoid a bouncing issue, gradually reduce the failure count.
|
// To avoid a bouncing issue, gradually reduce the failure count.
|
||||||
GitHubWatcher.apiFailureCount = Math.max(0, GitHubWatcher.apiFailureCount - 2);
|
GitHubWatcher.apiFailureCount = Math.max(0, GitHubWatcher.apiFailureCount - 2);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
await this.handleGitHubFailure(ex);
|
await this.handleGitHubFailure(ex as RequestError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastReadTs = Date.now();
|
this.lastReadTs = Date.now();
|
||||||
|
@ -7,7 +7,7 @@ import markdown from "markdown-it";
|
|||||||
import { FormatUtil } from "./FormatUtil";
|
import { FormatUtil } from "./FormatUtil";
|
||||||
import { PullGetResponseData, IssuesGetResponseData, PullsListRequestedReviewersResponseData, PullsListReviewsResponseData, IssuesGetCommentResponseData } from "./Github/Types";
|
import { PullGetResponseData, IssuesGetResponseData, PullsListRequestedReviewersResponseData, PullsListReviewsResponseData, IssuesGetCommentResponseData } from "./Github/Types";
|
||||||
import { GitHubUserNotification } from "./Github/Types";
|
import { GitHubUserNotification } from "./Github/Types";
|
||||||
import { components } from "@octokit/openapi-types/dist-types/generated/types";
|
import { components } from "@octokit/openapi-types/types";
|
||||||
import { NotifFilter } from "./NotificationFilters";
|
import { NotifFilter } from "./NotificationFilters";
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ const md = new markdown();
|
|||||||
|
|
||||||
export interface IssueDiff {
|
export interface IssueDiff {
|
||||||
state: null|string;
|
state: null|string;
|
||||||
assignee: null|(components["schemas"]["simple-user"][]);
|
assignee: null|(components["schemas"]["nullable-simple-user"][]);
|
||||||
title: null|string;
|
title: null|string;
|
||||||
merged: boolean;
|
merged: boolean;
|
||||||
mergedBy: null|{
|
mergedBy: null|{
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
// TODO: Type errors
|
||||||
|
"useUnknownInCatchVariables": false,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user