Merge pull request #800 from wailsapp/test-update-runtime

[v2] Update Workflows + runtime
This commit is contained in:
Lea Anthony
2021-09-13 20:14:35 +10:00
committed by GitHub
12 changed files with 37 additions and 35 deletions
+8 -5
View File
@@ -1,6 +1,6 @@
name: Runtime
on:
pull_request:
push:
branches:
- v2-alpha
paths:
@@ -14,14 +14,17 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.17.6
# cache: 'npm'
# cache-dependency-path: v2/internal/frontend/runtime/package-lock.json
cache: 'npm'
cache-dependency-path: v2/internal/frontend/runtime/package-lock.json
- run: npm install
working-directory: v2/internal/frontend/runtime
- run: npm run build
working-directory: v2/internal/frontend/runtime
- name: Commit changes
uses: elstudio/actions-js-build/commit@v4
uses: devops-infra/action-commit-push@master
with:
commitMessage: Rebuild runtime
github_token: "${{ secrets.GITHUB_TOKEN }}"
add_timestamp: true
commit_prefix: "[AUTO]"
commit_message: "The runtime was rebuilt"
+2 -1
View File
@@ -2,4 +2,5 @@
This branch contains WORK IN PROGRESS! There are no guarantees. Use at your peril!
This document will be updated as progress is made.
This document will be updated as progress is made.
@@ -36,6 +36,9 @@ func (d *Dispatcher) ProcessMessage(message string, sender frontend.Frontend) (s
return d.processCallMessage(message, sender)
case 'W':
return d.processWindowMessage(message, sender)
case 'Q':
sender.Quit()
return "", nil
default:
return "", errors.New("Unknown message from front end: " + message)
}
@@ -71,8 +71,6 @@ func (d *Dispatcher) processWindowMessage(message string, sender frontend.Fronte
w := d.mustAtoI(parts[0])
h := d.mustAtoI(parts[1])
go sender.WindowSetMinSize(w, h)
case 'C':
sender.Quit()
default:
d.log.Error("unknown Window message: %s", message)
}
@@ -14,6 +14,11 @@ import {Callback, callbacks} from './calls';
import {SetBindings} from "./bindings";
import * as Window from "./window";
export function Quit() {
window.WailsInvoke('Q');
}
// The JS runtime
window.runtime = {
...Log,
@@ -23,6 +28,7 @@ window.runtime = {
EventsOnMultiple,
EventsEmit,
EventsOff,
Quit
};
// Internal wails endpoints
@@ -185,12 +185,3 @@ export function WindowSetRGBA(RGBA) {
window.WailsInvoke('Wr:' + rgba);
}
/**
* Close the Window
*
* @export
*/
export function WindowClose() {
window.WailsInvoke('WC');
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -13,8 +13,14 @@ import * as Log from "./log";
import * as Events from './events';
import * as Window from './window';
export function Quit() {
window.runtime.Quit();
}
export default {
...Log,
...Events,
...Window,
Quit
};
+1 -1
View File
@@ -73,7 +73,7 @@ interface runtime {
WindowSetRGBA(rgba: RGBA): void;
WindowClose(): void
Quit(): void
}
declare global {
File diff suppressed because one or more lines are too long
@@ -185,12 +185,3 @@ export function WindowUnminimise() {
export function WindowSetRGBA(RGBA) {
window.runtime.WindowSetRGBA(RGBA);
}
/**
* Close the Window
*
* @export
*/
export function WindowClose() {
window.runtime.WindowClose();
}