build: refresh notification Wails bindings
This commit is contained in:
parent
8e3dedf0c5
commit
fe912c9659
|
|
@ -0,0 +1,13 @@
|
|||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
const bindingsPath = path.resolve('frontend/wailsjs/go/api/App.js');
|
||||
const bindings = fs.readFileSync(bindingsPath, 'utf8');
|
||||
|
||||
for (const method of ['ReplacePluginNotifications', 'ClearPluginNotifications']) {
|
||||
if (!bindings.includes(`export function ${method}(`)) {
|
||||
throw new Error(`Wails binding does not export ${method}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Wails notification bindings are present');
|
||||
|
|
@ -1,15 +1,19 @@
|
|||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {workspace} from '../models';
|
||||
import {context} from '../models';
|
||||
import {workbench} from '../models';
|
||||
import {capability} from '../models';
|
||||
import {api} from '../models';
|
||||
import {permissions} from '../models';
|
||||
import {plugin} from '../models';
|
||||
import {files} from '../models';
|
||||
import {notifications} from '../models';
|
||||
|
||||
export function ArchiveWorkspaceNode(arg1:string):Promise<string>;
|
||||
|
||||
export function ClearPluginNotifications(arg1:string):Promise<string>;
|
||||
|
||||
export function CloseVault():Promise<void>;
|
||||
|
||||
export function CreateVault(arg1:string):Promise<void>;
|
||||
|
|
@ -24,6 +28,8 @@ export function DeleteVaultTrash(arg1:string,arg2:string):Promise<string>;
|
|||
|
||||
export function DisablePlugin(arg1:string):Promise<string>;
|
||||
|
||||
export function DomReady(arg1:context.Context):Promise<void>;
|
||||
|
||||
export function EditWorkbenchResource(arg1:string,arg2:Record<string, any>):Promise<workbench.OpenResourceResult|string>;
|
||||
|
||||
export function EnablePlugin(arg1:string):Promise<string>;
|
||||
|
|
@ -72,22 +78,22 @@ export function ListVaultFiles(arg1:string,arg2:string):Promise<Array<files.File
|
|||
|
||||
export function ListVaultTrash(arg1:string):Promise<Array<files.TrashEntry>|string>;
|
||||
|
||||
export function ListWorkspaces():Promise<Array<workspace.Workspace>|string>;
|
||||
|
||||
export function ListWorkspaceIdentities():Promise<Array<workspace.WorkspaceIdentity>|string>;
|
||||
|
||||
export function ListWorkspaceTemplates():Promise<Array<workspace.WorkspaceTemplate>|string>;
|
||||
|
||||
export function ListWorkspaces():Promise<Array<workspace.Workspace>|string>;
|
||||
|
||||
export function MoveVaultPath(arg1:string,arg2:string,arg3:string,arg4:files.MoveOptions):Promise<string>;
|
||||
|
||||
export function MoveWorkspaceNode(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function OpenExternalURL(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function OpenVault(arg1:string):Promise<void>;
|
||||
|
||||
export function OpenVaultPathExternal(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function OpenExternalURL(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function OpenWorkbenchResource(arg1:string,arg2:Record<string, any>):Promise<workbench.OpenResourceResult|string>;
|
||||
|
||||
export function PluginBrowserReceiverPairing(arg1:string):Promise<Record<string, string>|string>;
|
||||
|
|
@ -124,6 +130,10 @@ export function PluginSyncTestConnection(arg1:string,arg2:string,arg3:string,arg
|
|||
|
||||
export function PublishPluginEvent(arg1:string,arg2:string,arg3:Record<string, any>):Promise<string>;
|
||||
|
||||
export function PurgeWorkspaceTrash(arg1:string):Promise<string>;
|
||||
|
||||
export function Quit():Promise<void>;
|
||||
|
||||
export function ReadPluginDataJSON(arg1:string,arg2:string):Promise<Record<string, any>>;
|
||||
|
||||
export function ReadPluginDataNDJSON(arg1:string,arg2:string):Promise<Array<Record<string, any>>>;
|
||||
|
|
@ -142,9 +152,11 @@ export function ReloadPlugins():Promise<number|string>;
|
|||
|
||||
export function RenameWorkspace(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function RenameWorkspaceNode(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function RepairWorkspaceIdentity(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function RenameWorkspaceNode(arg1:string,arg2:string):Promise<string>;
|
||||
export function ReplacePluginNotifications(arg1:string,arg2:Array<notifications.Request>):Promise<string>;
|
||||
|
||||
export function RestoreVaultTrash(arg1:string,arg2:string,arg3:files.RestoreOptions):Promise<string|string>;
|
||||
|
||||
|
|
@ -152,8 +164,6 @@ export function RestoreWorkspaceTrash(arg1:string,arg2:string):Promise<workspace
|
|||
|
||||
export function SelectDirectory():Promise<string>;
|
||||
|
||||
export function PurgeWorkspaceTrash(arg1:string):Promise<string>;
|
||||
|
||||
export function SelectVaultForOpen():Promise<string>;
|
||||
|
||||
export function SetCurrentVault(arg1:string):Promise<string>;
|
||||
|
|
@ -162,8 +172,14 @@ export function SetCurrentWorkspace(arg1:string):Promise<string>;
|
|||
|
||||
export function SetCurrentWorkspaceNode(arg1:string):Promise<string>;
|
||||
|
||||
export function SetNotificationService(arg1:api.notificationService):Promise<void>;
|
||||
|
||||
export function ShowVaultPathInFolder(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function ShowWindow():Promise<void>;
|
||||
|
||||
export function Shutdown(arg1:context.Context):Promise<void>;
|
||||
|
||||
export function SubscribePluginEvent(arg1:string,arg2:string):Promise<string>;
|
||||
|
||||
export function TrashVaultPath(arg1:string,arg2:string):Promise<files.TrashResult|string>;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ export function ArchiveWorkspaceNode(arg1) {
|
|||
return window['go']['api']['App']['ArchiveWorkspaceNode'](arg1);
|
||||
}
|
||||
|
||||
export function ClearPluginNotifications(arg1) {
|
||||
return window['go']['api']['App']['ClearPluginNotifications'](arg1);
|
||||
}
|
||||
|
||||
export function CloseVault() {
|
||||
return window['go']['api']['App']['CloseVault']();
|
||||
}
|
||||
|
|
@ -34,6 +38,10 @@ export function DisablePlugin(arg1) {
|
|||
return window['go']['api']['App']['DisablePlugin'](arg1);
|
||||
}
|
||||
|
||||
export function DomReady(arg1) {
|
||||
return window['go']['api']['App']['DomReady'](arg1);
|
||||
}
|
||||
|
||||
export function EditWorkbenchResource(arg1, arg2) {
|
||||
return window['go']['api']['App']['EditWorkbenchResource'](arg1, arg2);
|
||||
}
|
||||
|
|
@ -130,10 +138,6 @@ export function ListVaultTrash(arg1) {
|
|||
return window['go']['api']['App']['ListVaultTrash'](arg1);
|
||||
}
|
||||
|
||||
export function ListWorkspaces() {
|
||||
return window['go']['api']['App']['ListWorkspaces']();
|
||||
}
|
||||
|
||||
export function ListWorkspaceIdentities() {
|
||||
return window['go']['api']['App']['ListWorkspaceIdentities']();
|
||||
}
|
||||
|
|
@ -142,6 +146,10 @@ export function ListWorkspaceTemplates() {
|
|||
return window['go']['api']['App']['ListWorkspaceTemplates']();
|
||||
}
|
||||
|
||||
export function ListWorkspaces() {
|
||||
return window['go']['api']['App']['ListWorkspaces']();
|
||||
}
|
||||
|
||||
export function MoveVaultPath(arg1, arg2, arg3, arg4) {
|
||||
return window['go']['api']['App']['MoveVaultPath'](arg1, arg2, arg3, arg4);
|
||||
}
|
||||
|
|
@ -150,6 +158,10 @@ export function MoveWorkspaceNode(arg1, arg2) {
|
|||
return window['go']['api']['App']['MoveWorkspaceNode'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function OpenExternalURL(arg1, arg2) {
|
||||
return window['go']['api']['App']['OpenExternalURL'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function OpenVault(arg1) {
|
||||
return window['go']['api']['App']['OpenVault'](arg1);
|
||||
}
|
||||
|
|
@ -158,10 +170,6 @@ export function OpenVaultPathExternal(arg1, arg2) {
|
|||
return window['go']['api']['App']['OpenVaultPathExternal'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function OpenExternalURL(arg1, arg2) {
|
||||
return window['go']['api']['App']['OpenExternalURL'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function OpenWorkbenchResource(arg1, arg2) {
|
||||
return window['go']['api']['App']['OpenWorkbenchResource'](arg1, arg2);
|
||||
}
|
||||
|
|
@ -234,6 +242,14 @@ export function PublishPluginEvent(arg1, arg2, arg3) {
|
|||
return window['go']['api']['App']['PublishPluginEvent'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function PurgeWorkspaceTrash(arg1) {
|
||||
return window['go']['api']['App']['PurgeWorkspaceTrash'](arg1);
|
||||
}
|
||||
|
||||
export function Quit() {
|
||||
return window['go']['api']['App']['Quit']();
|
||||
}
|
||||
|
||||
export function ReadPluginDataJSON(arg1, arg2) {
|
||||
return window['go']['api']['App']['ReadPluginDataJSON'](arg1, arg2);
|
||||
}
|
||||
|
|
@ -270,12 +286,16 @@ export function RenameWorkspace(arg1, arg2) {
|
|||
return window['go']['api']['App']['RenameWorkspace'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RenameWorkspaceNode(arg1, arg2) {
|
||||
return window['go']['api']['App']['RenameWorkspaceNode'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RepairWorkspaceIdentity(arg1, arg2) {
|
||||
return window['go']['api']['App']['RepairWorkspaceIdentity'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RenameWorkspaceNode(arg1, arg2) {
|
||||
return window['go']['api']['App']['RenameWorkspaceNode'](arg1, arg2);
|
||||
export function ReplacePluginNotifications(arg1, arg2) {
|
||||
return window['go']['api']['App']['ReplacePluginNotifications'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RestoreVaultTrash(arg1, arg2, arg3) {
|
||||
|
|
@ -290,10 +310,6 @@ export function SelectDirectory() {
|
|||
return window['go']['api']['App']['SelectDirectory']();
|
||||
}
|
||||
|
||||
export function PurgeWorkspaceTrash(arg1) {
|
||||
return window['go']['api']['App']['PurgeWorkspaceTrash'](arg1);
|
||||
}
|
||||
|
||||
export function SelectVaultForOpen() {
|
||||
return window['go']['api']['App']['SelectVaultForOpen']();
|
||||
}
|
||||
|
|
@ -310,10 +326,22 @@ export function SetCurrentWorkspaceNode(arg1) {
|
|||
return window['go']['api']['App']['SetCurrentWorkspaceNode'](arg1);
|
||||
}
|
||||
|
||||
export function SetNotificationService(arg1) {
|
||||
return window['go']['api']['App']['SetNotificationService'](arg1);
|
||||
}
|
||||
|
||||
export function ShowVaultPathInFolder(arg1, arg2) {
|
||||
return window['go']['api']['App']['ShowVaultPathInFolder'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ShowWindow() {
|
||||
return window['go']['api']['App']['ShowWindow']();
|
||||
}
|
||||
|
||||
export function Shutdown(arg1) {
|
||||
return window['go']['api']['App']['Shutdown'](arg1);
|
||||
}
|
||||
|
||||
export function SubscribePluginEvent(arg1, arg2) {
|
||||
return window['go']['api']['App']['SubscribePluginEvent'](arg1, arg2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -538,6 +538,29 @@ export namespace files {
|
|||
|
||||
}
|
||||
|
||||
export namespace notifications {
|
||||
|
||||
export class Request {
|
||||
id: string;
|
||||
dueAt: string;
|
||||
title: string;
|
||||
body?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Request(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.dueAt = source["dueAt"];
|
||||
this.title = source["title"];
|
||||
this.body = source["body"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace permissions {
|
||||
|
||||
export class Entry {
|
||||
|
|
@ -1230,27 +1253,6 @@ export namespace workbench {
|
|||
|
||||
export namespace workspace {
|
||||
|
||||
export class WorkspaceTemplate {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
version: number;
|
||||
workspaceTools: string[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WorkspaceTemplate(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.name = source["name"];
|
||||
this.description = source["description"];
|
||||
this.version = source["version"];
|
||||
this.workspaceTools = source["workspaceTools"];
|
||||
}
|
||||
}
|
||||
|
||||
export class TemplateSnapshot {
|
||||
templateId: string;
|
||||
templateName: string;
|
||||
|
|
@ -1364,7 +1366,6 @@ export namespace workspace {
|
|||
this.rootPath = source["rootPath"];
|
||||
}
|
||||
}
|
||||
|
||||
export class WorkspaceIdentity {
|
||||
workspaceId: string;
|
||||
rootPath: string;
|
||||
|
|
@ -1381,5 +1382,25 @@ export namespace workspace {
|
|||
this.state = source["state"];
|
||||
}
|
||||
}
|
||||
export class WorkspaceTemplate {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
version: number;
|
||||
workspaceTools: string[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WorkspaceTemplate(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.name = source["name"];
|
||||
this.description = source["description"];
|
||||
this.version = source["version"];
|
||||
this.workspaceTools = source["workspaceTools"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ OUTPUT=$(cd "$ROOT" && go test -count=1 -v ./... 2>&1) || GO_TEST_STATUS=$?
|
|||
echo "$OUTPUT" | grep -E '(FAIL|PASS|---)' || true
|
||||
report "go test" "$GO_TEST_STATUS"
|
||||
|
||||
WAILS_BINDINGS_STATUS=0
|
||||
(cd "$ROOT" && node frontend/tests/wails-bindings-test.mjs) || WAILS_BINDINGS_STATUS=$?
|
||||
report "Wails notification bindings" "$WAILS_BINDINGS_STATUS"
|
||||
|
||||
# ── Frontend tests ──
|
||||
echo "[frontend]"
|
||||
if ensure_npm_deps "$ROOT/frontend"; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue