build: refresh notification Wails bindings

This commit is contained in:
mirivlad 2026-07-14 02:59:38 +08:00
parent 8e3dedf0c5
commit fe912c9659
5 changed files with 263 additions and 181 deletions

View File

@ -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');

View File

@ -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>;

View File

@ -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);
}

View File

@ -1,5 +1,5 @@
export namespace api {
export class FlatContextMenuEntry {
pluginId: string;
id: string;
@ -8,11 +8,11 @@ export namespace api {
group?: string;
capability?: string;
handler?: string;
static createFrom(source: any = {}) {
return new FlatContextMenuEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -31,11 +31,11 @@ export namespace api {
icon?: string;
capability?: string;
handler?: string;
static createFrom(source: any = {}) {
return new FlatAction(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -52,11 +52,11 @@ export namespace api {
title: string;
icon?: string;
component: string;
static createFrom(source: any = {}) {
return new FlatWorkspaceItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -72,11 +72,11 @@ export namespace api {
extensions?: string[];
contexts?: string[];
modes?: string[];
static createFrom(source: any = {}) {
return new FlatOpenProviderSupport(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.kind = source["kind"];
@ -93,11 +93,11 @@ export namespace api {
priority?: number;
component: string;
supports: FlatOpenProviderSupport[];
static createFrom(source: any = {}) {
return new FlatOpenProvider(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -107,7 +107,7 @@ export namespace api {
this.component = source["component"];
this.supports = this.convertValues(source["supports"], FlatOpenProviderSupport);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -132,11 +132,11 @@ export namespace api {
label: string;
position?: string;
handler?: string;
static createFrom(source: any = {}) {
return new FlatStatusBarItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -153,11 +153,11 @@ export namespace api {
icon?: string;
view: string;
position?: number;
static createFrom(source: any = {}) {
return new FlatSidebarItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -174,11 +174,11 @@ export namespace api {
title: string;
icon?: string;
component: string;
static createFrom(source: any = {}) {
return new FlatSettingsPanel(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -193,11 +193,11 @@ export namespace api {
id: string;
label: string;
handler: string;
static createFrom(source: any = {}) {
return new FlatSearchProvider(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -212,11 +212,11 @@ export namespace api {
title: string;
icon?: string;
handler?: string;
static createFrom(source: any = {}) {
return new FlatCommand(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -232,11 +232,11 @@ export namespace api {
title: string;
icon?: string;
component: string;
static createFrom(source: any = {}) {
return new FlatView(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.pluginId = source["pluginId"];
@ -258,11 +258,11 @@ export namespace api {
fileActions: FlatAction[];
noteActions: FlatAction[];
contextMenuEntries: FlatContextMenuEntry[];
static createFrom(source: any = {}) {
return new ContributionSummary(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.views = this.convertValues(source["views"], FlatView);
@ -277,7 +277,7 @@ export namespace api {
this.noteActions = this.convertValues(source["noteActions"], FlatAction);
this.contextMenuEntries = this.convertValues(source["contextMenuEntries"], FlatContextMenuEntry);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -296,17 +296,17 @@ export namespace api {
return a;
}
}
export class SyncStatusDTO {
configured: boolean;
serverUrl: string;
@ -320,11 +320,11 @@ export namespace api {
syncInterval: number;
lastError: string;
statusLabel: string;
static createFrom(source: any = {}) {
return new SyncStatusDTO(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.configured = source["configured"];
@ -345,17 +345,17 @@ export namespace api {
}
export namespace capability {
export class Entry {
name: string;
description?: string;
pluginId: string;
status: string;
static createFrom(source: any = {}) {
return new Entry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@ -368,17 +368,17 @@ export namespace capability {
}
export namespace files {
export class FileBytes {
relativePath: string;
size: number;
mimeHint: string;
dataBase64: string;
static createFrom(source: any = {}) {
return new FileBytes(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.relativePath = source["relativePath"];
@ -398,11 +398,11 @@ export namespace files {
isReserved: boolean;
canRead: boolean;
canWrite: boolean;
static createFrom(source: any = {}) {
return new FileEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@ -430,11 +430,11 @@ export namespace files {
isReserved: boolean;
canRead: boolean;
canWrite: boolean;
static createFrom(source: any = {}) {
return new FileMetadata(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.relativePath = source["relativePath"];
@ -453,11 +453,11 @@ export namespace files {
}
export class MoveOptions {
overwrite: boolean;
static createFrom(source: any = {}) {
return new MoveOptions(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.overwrite = source["overwrite"];
@ -466,11 +466,11 @@ export namespace files {
export class RestoreOptions {
targetPath?: string;
overwrite: boolean;
static createFrom(source: any = {}) {
return new RestoreOptions(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.targetPath = source["targetPath"];
@ -485,11 +485,11 @@ export namespace files {
originalType: string;
basename: string;
size: number;
static createFrom(source: any = {}) {
return new TrashEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.originalPath = source["originalPath"];
@ -507,11 +507,11 @@ export namespace files {
trashId: string;
deletedAt: string;
size: number;
static createFrom(source: any = {}) {
return new TrashResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.originalPath = source["originalPath"];
@ -524,11 +524,11 @@ export namespace files {
export class WriteOptions {
createIfMissing: boolean;
overwrite: boolean;
static createFrom(source: any = {}) {
return new WriteOptions(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.createIfMissing = source["createIfMissing"];
@ -538,17 +538,40 @@ 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 {
name: string;
description: string;
dangerous: boolean;
static createFrom(source: any = {}) {
return new Entry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@ -560,15 +583,15 @@ export namespace permissions {
}
export namespace plugin {
export class HealthCheckConfig {
type?: string;
timeout?: number;
static createFrom(source: any = {}) {
return new HealthCheckConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.type = source["type"];
@ -579,18 +602,18 @@ export namespace plugin {
type: string;
entry: Record<string, string>;
healthCheck?: HealthCheckConfig;
static createFrom(source: any = {}) {
return new BackendConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.type = source["type"];
this.entry = source["entry"];
this.healthCheck = this.convertValues(source["healthCheck"], HealthCheckConfig);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -615,11 +638,11 @@ export namespace plugin {
icon?: string;
capability?: string;
handler?: string;
static createFrom(source: any = {}) {
return new ContributionAction(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -633,11 +656,11 @@ export namespace plugin {
id: string;
events?: string[];
handler: string;
static createFrom(source: any = {}) {
return new ContributionActivityProvider(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -651,11 +674,11 @@ export namespace plugin {
keybinding?: string;
icon?: string;
handler?: string;
static createFrom(source: any = {}) {
return new ContributionCommand(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -672,11 +695,11 @@ export namespace plugin {
group?: string;
capability?: string;
handler?: string;
static createFrom(source: any = {}) {
return new ContributionContextMenuEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -693,11 +716,11 @@ export namespace plugin {
extensions?: string[];
contexts?: string[];
modes?: string[];
static createFrom(source: any = {}) {
return new OpenProviderSupport(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.kind = source["kind"];
@ -713,11 +736,11 @@ export namespace plugin {
priority?: number;
component: string;
supports: OpenProviderSupport[];
static createFrom(source: any = {}) {
return new ContributionOpenProvider(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -726,7 +749,7 @@ export namespace plugin {
this.component = source["component"];
this.supports = this.convertValues(source["supports"], OpenProviderSupport);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -749,11 +772,11 @@ export namespace plugin {
id: string;
label: string;
handler: string;
static createFrom(source: any = {}) {
return new ContributionSearchProvider(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -766,11 +789,11 @@ export namespace plugin {
title: string;
component: string;
icon?: string;
static createFrom(source: any = {}) {
return new ContributionSettingsPanel(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -785,11 +808,11 @@ export namespace plugin {
icon?: string;
view: string;
position?: number;
static createFrom(source: any = {}) {
return new ContributionSidebarItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -804,11 +827,11 @@ export namespace plugin {
label: string;
position?: string;
handler?: string;
static createFrom(source: any = {}) {
return new ContributionStatusBarItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -822,11 +845,11 @@ export namespace plugin {
title: string;
icon?: string;
component: string;
static createFrom(source: any = {}) {
return new ContributionView(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -840,11 +863,11 @@ export namespace plugin {
title: string;
icon?: string;
component: string;
static createFrom(source: any = {}) {
return new ContributionWorkspaceItem(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -866,11 +889,11 @@ export namespace plugin {
statusBarItems?: ContributionStatusBarItem[];
openProviders?: ContributionOpenProvider[];
workspaceItems?: ContributionWorkspaceItem[];
static createFrom(source: any = {}) {
return new Contributions(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.views = this.convertValues(source["views"], ContributionView);
@ -886,7 +909,7 @@ export namespace plugin {
this.openProviders = this.convertValues(source["openProviders"], ContributionOpenProvider);
this.workspaceItems = this.convertValues(source["workspaceItems"], ContributionWorkspaceItem);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -908,18 +931,18 @@ export namespace plugin {
export class FrontendConfig {
entry: string;
style?: string;
static createFrom(source: any = {}) {
return new FrontendConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.entry = source["entry"];
this.style = source["style"];
}
}
export class LocalizationConfig {
defaultLocale: string;
locales: Record<string, string>;
@ -937,11 +960,11 @@ export namespace plugin {
export class SyncConfig {
namespaces?: string[];
participate?: boolean;
static createFrom(source: any = {}) {
return new SyncConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.namespaces = source["namespaces"];
@ -950,11 +973,11 @@ export namespace plugin {
}
export class MigrationConfig {
path?: string;
static createFrom(source: any = {}) {
return new MigrationConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
@ -979,11 +1002,11 @@ export namespace plugin {
migrations?: MigrationConfig;
contributes?: Contributions;
sync?: SyncConfig;
static createFrom(source: any = {}) {
return new Manifest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.schemaVersion = source["schemaVersion"];
@ -1005,7 +1028,7 @@ export namespace plugin {
this.contributes = this.convertValues(source["contributes"], Contributions);
this.sync = this.convertValues(source["sync"], SyncConfig);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1024,19 +1047,19 @@ export namespace plugin {
return a;
}
}
export class Plugin {
manifest: Manifest;
status: string;
error?: string;
enabled: boolean;
rootPath: string;
static createFrom(source: any = {}) {
return new Plugin(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.manifest = this.convertValues(source["manifest"], Manifest);
@ -1045,7 +1068,7 @@ export namespace plugin {
this.enabled = source["enabled"];
this.rootPath = source["rootPath"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1068,18 +1091,18 @@ export namespace plugin {
}
export namespace workbench {
export class OpenResourceContext {
sourcePluginId?: string;
sourceView?: string;
isInsideNotesFolder?: boolean;
notesScopePath?: string;
notesMode?: boolean;
static createFrom(source: any = {}) {
return new OpenResourceContext(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.sourcePluginId = source["sourcePluginId"];
@ -1096,11 +1119,11 @@ export namespace workbench {
mime?: string;
extension?: string;
context?: OpenResourceContext;
static createFrom(source: any = {}) {
return new OpenResourceRequest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.kind = source["kind"];
@ -1110,7 +1133,7 @@ export namespace workbench {
this.extension = source["extension"];
this.context = this.convertValues(source["context"], OpenResourceContext);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1136,11 +1159,11 @@ export namespace workbench {
providerComponent?: string;
request: OpenResourceRequest;
message?: string;
static createFrom(source: any = {}) {
return new OpenResourceResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.status = source["status"];
@ -1150,7 +1173,7 @@ export namespace workbench {
this.request = this.convertValues(source["request"], OpenResourceRequest);
this.message = source["message"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1176,11 +1199,11 @@ export namespace workbench {
providerComponent: string;
request: OpenResourceRequest;
openedAt: string;
static createFrom(source: any = {}) {
return new OpenedResource(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -1190,7 +1213,7 @@ export namespace workbench {
this.request = this.convertValues(source["request"], OpenResourceRequest);
this.openedAt = source["openedAt"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1213,11 +1236,11 @@ export namespace workbench {
defaultTextEditorProvider?: string;
defaultMarkdownEditorProvider?: string;
defaultNotesMarkdownEditorProvider?: string;
static createFrom(source: any = {}) {
return new Preferences(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.defaultTextEditorProvider = source["defaultTextEditorProvider"];
@ -1230,38 +1253,17 @@ 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;
templateVersion: number;
appliedAt: string;
workspaceTools?: string[];
static createFrom(source: any = {}) {
return new TemplateSnapshot(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.templateId = source["templateId"];
@ -1279,11 +1281,11 @@ export namespace workspace {
folders?: Record<string, string>;
workspaceTools?: string[];
updatedAt?: string;
static createFrom(source: any = {}) {
return new Metadata(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.workspaceId = source["workspaceId"];
@ -1294,7 +1296,7 @@ export namespace workspace {
this.workspaceTools = source["workspaceTools"];
this.updatedAt = source["updatedAt"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@ -1316,29 +1318,29 @@ export namespace workspace {
export class MetadataPatch {
features?: Record<string, boolean>;
folders?: Record<string, string>;
static createFrom(source: any = {}) {
return new MetadataPatch(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.features = source["features"];
this.folders = source["folders"];
}
}
export class TrashResult {
workspaceId: string;
originalPath: string;
trashPath: string;
trashId: string;
deletedAt: string;
static createFrom(source: any = {}) {
return new TrashResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.workspaceId = source["workspaceId"];
@ -1352,11 +1354,11 @@ export namespace workspace {
id: string;
name: string;
rootPath: string;
static createFrom(source: any = {}) {
return new Workspace(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@ -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"];
}
}
}

View File

@ -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