Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Typescript #152

Merged
merged 86 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
b9264f3
Remove JS files and add typescript config
Half-Shot Jun 30, 2019
dca9211
WIP set of Typescript files
Half-Shot Jun 30, 2019
19850ff
Convert Main to typescript
Half-Shot Jul 1, 2019
bf57fa8
Use tslint
Half-Shot Jul 1, 2019
3996ed7
Remove bluebird since we no longer use it
Half-Shot Jul 2, 2019
1f5eacf
Misc cleanup
Half-Shot Jul 2, 2019
8f67c61
Use yargs for command handling, refactor command system
Half-Shot Jul 3, 2019
2530988
Autofix some linting issues
Half-Shot Jul 3, 2019
35172e5
Handle errors when parsing commands
Half-Shot Jul 3, 2019
a494403
Handle help
Half-Shot Jul 3, 2019
efcb46b
Twiddle requires into imports and switch to request-promise-native
Half-Shot Jul 3, 2019
6769bff
Typescriptify app.js and update README
Half-Shot Jul 3, 2019
7839e75
More typescript fixes
Half-Shot Jul 3, 2019
4093b53
Remaining typescript work completed
Half-Shot Jul 3, 2019
137a7db
Move StateStorage declaration
Half-Shot Jul 3, 2019
dc31532
Fix command options
Half-Shot Jul 3, 2019
6cff1e4
Write our own help
Half-Shot Jul 4, 2019
a4b9b09
Tidy up command help
Half-Shot Jul 4, 2019
a84149b
Tune command handling logging
Half-Shot Jul 4, 2019
c937991
Prettier command formatting
Half-Shot Jul 4, 2019
cc9831b
Tidy up admin response some more
Half-Shot Jul 4, 2019
9d17e2f
Remove userid from response
Half-Shot Jul 4, 2019
471779e
Fix event parsing for channel id
Half-Shot Jul 4, 2019
10aed92
Proper error logging
Half-Shot Jul 4, 2019
1d7a6e2
Rework message handling replacement logic
Half-Shot Jul 4, 2019
f2ba975
Always return the message object
Half-Shot Jul 4, 2019
ded35dd
Always return message and improve types
Half-Shot Jul 4, 2019
7c32067
Log incoming requests
Half-Shot Jul 4, 2019
3b3188b
Stop slack from spamming us
Half-Shot Jul 4, 2019
d42c744
More debug lines for ghost fetching
Half-Shot Jul 4, 2019
91b7a9a
Don't update user profile info on startup
Half-Shot Jul 4, 2019
66a89bf
Shuffle requirements around
Half-Shot Jul 5, 2019
61dbf75
Merge branch 'develop' into hs/typescript
Half-Shot Jul 7, 2019
ae8e625
I forgot to commit the TS changes
Half-Shot Jul 7, 2019
bcc41cc
Lint all the things
Half-Shot Jul 7, 2019
b319960
Linting
Half-Shot Jul 10, 2019
ebc23c1
Create tests
Half-Shot Jul 10, 2019
27717cf
Add buildkite
Half-Shot Jul 10, 2019
3d61eaf
Ensure tests build
Half-Shot Jul 10, 2019
80ea97a
Fix build
Half-Shot Jul 10, 2019
5cfa77c
Fix sub test
Half-Shot Jul 11, 2019
a02c20a
More linting madness
Half-Shot Jul 11, 2019
2ee6306
Apply teams.db fix to typescript branch
Half-Shot Jul 11, 2019
9bccdbf
Linted everything except a few anys
Half-Shot Jul 11, 2019
ec0d15b
Merge branch 'develop' into hs/typescript
Half-Shot Jul 12, 2019
b7381dc
Fix backticks
Half-Shot Jul 15, 2019
6501c27
fix linting
Half-Shot Jul 24, 2019
c5c4c6c
tidy tsconfig.json
Half-Shot Jul 24, 2019
ebc9d5d
use alice,bob..
Half-Shot Jul 24, 2019
ea5a6b3
tidy tests/
Half-Shot Jul 24, 2019
15ddb69
s/user id/user ID/
Half-Shot Jul 24, 2019
6254b5e
Types for displaymap
Half-Shot Jul 24, 2019
cb73eae
fix awful template string
Half-Shot Jul 24, 2019
fe07e81
types for subs
Half-Shot Jul 24, 2019
78e0d22
Remove no-magic-numbers tslint rule
Half-Shot Jul 24, 2019
1baa445
Replace issue # with urls
Half-Shot Jul 24, 2019
49f4178
Fix dev packaging
Half-Shot Jul 25, 2019
b94ce2c
Add copyright headers
Half-Shot Jul 25, 2019
41b4440
s/Id/ID/
Half-Shot Jul 25, 2019
8bc4e3e
linting fixes for BaseSlackHandler
Half-Shot Jul 25, 2019
76de5cd
disable max-file-line-count
Half-Shot Jul 25, 2019
910fb03
Typing fixes
Half-Shot Jul 26, 2019
4a14263
Oauth typing
Half-Shot Jul 26, 2019
5834947
Fix weird syntax
Half-Shot Jul 26, 2019
79f39c9
Fix imports
Half-Shot Jul 26, 2019
58b7221
s/scalar/integration manager
Half-Shot Jul 26, 2019
9f0a398
Shift url where appropriate
Half-Shot Jul 26, 2019
eef5588
Add parameters for SlackHookHandler.handle
Half-Shot Jul 26, 2019
6bb61bd
Move authorize so it makes more sense
Half-Shot Jul 26, 2019
67da7d6
Explain unknown cludge
Half-Shot Jul 26, 2019
4692fbc
Reuse RoomIdDef
Half-Shot Jul 26, 2019
9ba3f8a
Fix channel_rename
Half-Shot Jul 26, 2019
cb2bc52
Remove bot scope seperation
Half-Shot Jul 26, 2019
f0169c5
Merge remote-tracking branch 'origin/develop' into hs/typescript
Half-Shot Aug 8, 2019
5b3df20
Pointless comment
Half-Shot Aug 8, 2019
374f667
Minor things
Half-Shot Aug 12, 2019
31b4884
iiiiiiiiiiindent
Half-Shot Aug 12, 2019
023db92
indentation------------
Half-Shot Aug 12, 2019
c580693
Update package-lock.json
Half-Shot Aug 16, 2019
6c230ac
Merge in some fixes applied during testing
Half-Shot Aug 16, 2019
9ce018f
s/RoomIdDef/RoomIdCommandOption
Half-Shot Aug 27, 2019
0f01094
Indent
Half-Shot Aug 27, 2019
b73ab7b
Remove blank line
Half-Shot Aug 27, 2019
f902e2c
Clarify if statement
Half-Shot Aug 27, 2019
e756fda
We never use this boolean
Half-Shot Aug 27, 2019
b2bd113
Ensure typescript is built in docker image
Half-Shot Aug 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
steps:
- label: ":eslint: Lint"
Half-Shot marked this conversation as resolved.
Show resolved Hide resolved
command:
- "npm install"
- "npm run lint"
plugins:
- docker#v3.0.1:
image: "node:12"

- label: ":jasmine: Tests Node 10"
command:
- "npm install"
- "npm run build"
- "npm run test"
plugins:
- docker#v3.0.1:
image: "node:10"

- label: ":jasmine: Tests Node 12"
command:
- "npm install"
- "npm run build"
- "npm run test"
plugins:
- docker#v3.0.1:
image: "node:12"

# No coverage yet
# - label: ":nyc: Coverage"
# command:
# - "npm install"
# - "npm run ci-test"
# plugins:
# - docker#v3.0.1:
# image: "node:12"
76 changes: 0 additions & 76 deletions .eslintrc

This file was deleted.

7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ coverage

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# typescript
lib

11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# matrix-appservice-slack
A Matrix <--> Slack bridge

This is currently a very barebones bridge, it just does basic text in
pre-enumerated channels. It will become more exciting.
This bridge allows you to connect Slack channels to Matrix rooms.


Installation
------------
Expand All @@ -11,6 +11,7 @@ Installation
$ git clone ...
$ cd matrix-appservice-slack
$ npm install
$ npm run build
```


Expand Down Expand Up @@ -49,19 +50,19 @@ Setup
on the same server you can use `localhost` as the `$HOST` name):

```sh
$ node app.js -r -c config.yaml -u "http://$HOST:$MATRIX_PORT"
$ npm start -- -r -c config.yaml -u "http://$HOST:$MATRIX_PORT"
```

1. Start the actual application service. You can use forever

```sh
$ forever start app.js -c config.yaml -p $MATRIX_PORT
$ forever start ./lib/app.js -c config.yaml -p $MATRIX_PORT
```

or node

```sh
$ node app.js -c config.yaml -p $MATRIX_PORT
$ npm start -- -c config.yaml -p $MATRIX_PORT
```

1. Copy the newly-generated `slack-registration.yaml` file to the homeserver.
Expand Down
30 changes: 0 additions & 30 deletions app.js

This file was deleted.

137 changes: 0 additions & 137 deletions lib/AdminCommand.js

This file was deleted.

Loading