mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
feat: ci pipeline for debug image
This commit is contained in:
parent
e1e7e0ba21
commit
c8cf5ed621
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
|||||||
* text=auto
|
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -22,4 +22,5 @@
|
|||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
11
Dockerfile
Normal file
11
Dockerfile
Normal 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
1336
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@ -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": [
|
||||||
|
@ -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}`)
|
||||||
|
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user