feat: ci pipeline for debug image

This commit is contained in:
Gheorghe 2021-02-26 14:34:14 +01:00
parent e1e7e0ba21
commit c8cf5ed621
7 changed files with 725 additions and 734 deletions

1
.gitattributes vendored
View File

@ -1 +0,0 @@
* text=auto

View File

@ -22,4 +22,5 @@
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": true
}, },
} }

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:14-buster-slim
COPY . /app
WORKDIR /app
RUN npm i
EXPOSE 8080
CMD [ "npm", "run", "serve" ]

1336
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,33 +17,34 @@
"build": "vue-cli-service build --target lib --name neko ./src/index.ts" "build": "vue-cli-service build --target lib --name neko ./src/index.ts"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.2",
"axios": "^0.21.1", "axios": "^0.21.1",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"vue": "^2.6.12", "vue": "^2.6.12",
"vue-class-component": "^7.2.6", "vue-class-component": "^7.2.6",
"vue-context": "^6.0.0",
"vue-property-decorator": "^9.1.2" "vue-property-decorator": "^9.1.2"
}, },
"devDependencies": { "devDependencies": {
"@fortawesome/fontawesome-free": "^5.15.2", "@types/node": "^14.14.22",
"@types/node": "^14.14.31",
"@types/vue": "^2.0.0", "@types/vue": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.15.1", "@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.15.1", "@typescript-eslint/parser": "^4.14.0",
"@vue/cli-plugin-babel": "^4.5.11", "@vue/cli-plugin-babel": "^4.5.10",
"@vue/cli-plugin-eslint": "^4.5.11", "@vue/cli-plugin-eslint": "^4.5.10",
"@vue/cli-plugin-typescript": "^4.5.11", "@vue/cli-plugin-typescript": "^4.5.10",
"@vue/cli-service": "^4.5.11", "@vue/cli-service": "^4.5.10",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0", "@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^7.20.0", "eslint": "^7.18.0",
"eslint-plugin-prettier": "^3.3.1", "eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.6.0", "eslint-plugin-vue": "^7.4.1",
"node-sass": "^5.0.0", "node-sass": "^5.0.0",
"prettier": "^2.2.1", "prettier": "^2.2.1",
"sass-loader": "^10.1.1", "sass-loader": "^10.1.1",
"ts-node": "^9.1.1", "ts-node": "^9.1.1",
"typescript": "^4.1.5", "typescript": "^4.1.3",
"vue-template-compiler": "^2.6.12" "vue-template-compiler": "^2.6.12"
}, },
"files": [ "files": [

View File

@ -6,8 +6,6 @@ export const OPCODE = {
SCROLL: 0x02, SCROLL: 0x02,
KEY_DOWN: 0x03, KEY_DOWN: 0x03,
KEY_UP: 0x04, KEY_UP: 0x04,
BTN_DOWN: 0x05,
BTN_UP: 0x06,
} as const } as const
export interface WebRTCStats { export interface WebRTCStats {
@ -185,32 +183,20 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
payload.setInt16(5, data.y) payload.setInt16(5, data.y)
break break
case 'keydown': case 'keydown':
buffer = new ArrayBuffer(7) case 'mousedown':
buffer = new ArrayBuffer(11)
payload = new DataView(buffer) payload = new DataView(buffer)
payload.setUint8(0, OPCODE.KEY_DOWN) payload.setUint8(0, OPCODE.KEY_DOWN)
payload.setUint16(1, 4) payload.setUint16(1, 8)
payload.setUint32(3, data.key) payload.setBigUint64(3, BigInt(data.key))
break break
case 'keyup': case 'keyup':
buffer = new ArrayBuffer(7) case 'mouseup':
buffer = new ArrayBuffer(11)
payload = new DataView(buffer) payload = new DataView(buffer)
payload.setUint8(0, OPCODE.KEY_UP) payload.setUint8(0, OPCODE.KEY_UP)
payload.setUint16(1, 4) payload.setUint16(1, 8)
payload.setUint32(3, data.key) payload.setBigUint64(3, BigInt(data.key))
break
case 'mousedown':
buffer = new ArrayBuffer(7)
payload = new DataView(buffer)
payload.setUint8(0, OPCODE.BTN_DOWN)
payload.setUint16(1, 4)
payload.setUint32(3, data.key)
break
case 'mouseup':
buffer = new ArrayBuffer(7)
payload = new DataView(buffer)
payload.setUint8(0, OPCODE.BTN_UP)
payload.setUint16(1, 4)
payload.setUint32(3, data.key)
break break
default: default:
this._log.warn(`unknown data event: ${event}`) this._log.warn(`unknown data event: ${event}`)

View File

@ -280,7 +280,14 @@
@Watch('cursorTag') @Watch('cursorTag')
onCursorTagChange() { onCursorTagChange() {
if (!this.isControling) { this.canvasRedraw()
}
@Watch('screenSize')
onScreenSizeChange() {
if (this.isControling) {
this.canvasClear()
} else {
this.canvasRedraw() this.canvasRedraw()
} }
} }