This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
I added a credentialManager.ts to set and retrieve the ClientId and Token from the users keychain (credential store). This uses a node module (keytar) but loads it using VSCode's version of Node.
Changed files
package.json
I added 4 commands:
twitchhighlighter.setTwitchClientId
twitchhighlighter.removeTwitchClientId
twitchhighlighter.setTwitchPassword
twitchhighlighter.removeTwitchPassword
I removed the twitchhighlighter.password extension setting because the password will no longer be saved there
extension.ts
I setup the registration of the commands and created the handlers
I changed the startChatHandler to first retrieve the TwitchCredentials from the CredentialManager before starting the client
server.ts
I declared the ttvChatClient within the connection.onInitialize function so we can initialize the twitchCredentials prior to retrieving the twitch chat options
I changed the getTwitchChatOptions function to get the password and clientId from twitchCredentials
Added files
credentialManager.ts
I added a credentialManager.ts to set and retrieve the ClientId and Token from the users keychain (credential store). This uses a node module (keytar) but loads it using VSCode's version of Node.
Changed files
package.json
I added 4 commands:
twitchhighlighter.removeTwitchPassword
I removed the
twitchhighlighter.password
extension setting because the password will no longer be saved thereextension.ts
I setup the registration of the commands and created the handlers I changed the
startChatHandler
to first retrieve theTwitchCredentials
from theCredentialManager
before starting the clientserver.ts
I declared the
ttvChatClient
within theconnection.onInitialize
function so we can initialize thetwitchCredentials
prior to retrieving the twitch chat options I changed thegetTwitchChatOptions
function to get the password and clientId fromtwitchCredentials