Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit 681c881

Browse files
authored
chore: Add TS check, sort package.json (#6)
1 parent 804bcc1 commit 681c881

File tree

718 files changed

+29
-160110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

718 files changed

+29
-160110
lines changed

index.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
//@ts-check
12
const core = require('@actions/core');
2-
const github = require('@actions/github');
33

44
const {Bot} = require('@wireapp/bot-api');
55
const {MemoryEngine} = require('@wireapp/store-engine');
6+
const {ClientType} = require('@wireapp/api-client/dist/client/');
67

78
require('dotenv').config();
89

910
const {WIRE_CONVERSATION, WIRE_EMAIL, WIRE_PASSWORD, WIRE_TEXT} = process.env;
1011

12+
/** @type {import('@wireapp/bot-api').BotConfig} */
1113
const config = {
1214
backend: 'production',
13-
clientType: 'temporary',
15+
clientType: ClientType.TEMPORARY,
1416
conversations: [],
1517
owners: [],
1618
};
1719

20+
/**
21+
* @param {Bot} bot
22+
* @param {import('@wireapp/store-engine').CRUDEngine} storeEngine
23+
*/
1824
const loginBot = async (bot, storeEngine) => {
1925
await bot.start(storeEngine);
2026
if (bot.account) {
@@ -35,6 +41,10 @@ const loginBot = async (bot, storeEngine) => {
3541
return bot;
3642
};
3743

44+
/**
45+
* @param {Bot} bot
46+
* @param {import('@wireapp/store-engine').CRUDEngine} storeEngine
47+
*/
3848
const startBot = async (bot, storeEngine) => {
3949
try {
4050
return await loginBot(bot, storeEngine);
@@ -68,7 +78,7 @@ const startBot = async (bot, storeEngine) => {
6878
try {
6979
await bot.sendText(conversation, text);
7080
console.info('Message sent', text);
71-
process.exit(0)
81+
process.exit(0);
7282
} catch (error) {
7383
console.error('sendText', error);
7484
core.setFailed(error);

node_modules/.bin/semver

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/which

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.yarn-integrity

Lines changed: 7 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/github/README.md

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)