This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { OnApplicationBootstrap, UseGuards } from '@nestjs/common'; | |
import { | |
SubscribeMessage, | |
WebSocketGateway, | |
WebSocketServer, | |
} from '@nestjs/websockets'; | |
import { Server } from 'ws'; | |
import { JwtWsAuthGuard } from '../auth/jwt-auth-ws.guard'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WsAdapter } from '@nestjs/platform-ws'; | |
import { MessageMappingProperties } from '@nestjs/websockets'; | |
import { EMPTY as empty, Observable } from 'rxjs'; | |
export class CustomWsAdapter extends WsAdapter { | |
public bindMessageHandler( | |
buffer: any, | |
handlers: MessageMappingProperties[], | |
transform: (data: any) => Observable<any>, | |
): Observable<any> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Current test | |
assert.isTrue( | |
stripeHelper.customer.calledOnceWith({ | |
uid: reqOpts.query.uid, | |
email: reqOpts.query.email, | |
}), | |
'customer not called as expected' | |
); | |
# Better test because we see the difference in calls, vs "Expected 'true' got 'false'" above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create | |
definer = root@`%` procedure emailRecord_5_explain(IN inEmail varchar(255) CHARACTER SET utf8 COLLATE utf8_bin) | |
BEGIN | |
SELECT | |
a.uid, | |
a.email, | |
a.normalizedEmail, | |
a.emailVerified, | |
a.emailCode, | |
a.kA, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AuthBaseModel } from './auth-base'; | |
import { Emails } from './emails'; | |
export class Account extends AuthBaseModel { | |
public static tableName = 'accounts'; | |
public static idColumn = 'uid'; | |
protected uuidFields = ['uid']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Mocha Local Tests", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Current AuthServer Local Test", | |
"type": "shell", | |
"command": "./scripts/mocha-coverage.js", | |
"args": [ | |
"-R", | |
"dot", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "tsc-watch", | |
"command": "npm", | |
"args": ["run", "watch"], | |
"type": "shell", | |
"isBackground": true, | |
"group": "build", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: unifi-video-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: unifi-video | |
template: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: unifi-controller-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: unifi-controller | |
template: |
NewerOlder