mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Update bindings generator to generate bindings in packages and files.
Remove unused JavaScript files Update tests. Update v3 docs
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').main.Person} mainPerson
|
||||
*/
|
||||
|
||||
export const GreetService = {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet does XYZ
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
* NewPerson creates a new person
|
||||
* @param name {string}
|
||||
* @returns {Promise<mainPerson>}
|
||||
**/
|
||||
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
};
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').services.Address} servicesAddress
|
||||
*/
|
||||
|
||||
export const OtherService = {
|
||||
|
||||
/**
|
||||
* OtherService.Yay
|
||||
*
|
||||
*
|
||||
* @returns {Promise<servicesAddress>}
|
||||
**/
|
||||
|
||||
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },};
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').services.Address} servicesAddress
|
||||
*/
|
||||
|
||||
export const OtherService = {
|
||||
|
||||
/**
|
||||
* OtherService.Yay
|
||||
*
|
||||
*
|
||||
* @returns {Promise<servicesAddress>}
|
||||
**/
|
||||
Yay: function() { return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
};
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
map[string]map[string][]*parser.BoundMethod{"github.com/wailsapp/wails/v3/internal/parser/testdata/function_from_imported_package/services":map[string][]*parser.BoundMethod{"OtherService":[]*parser.BoundMethod{(*parser.BoundMethod)(0xc000148000)}}, "main":map[string][]*parser.BoundMethod{"GreetService":[]*parser.BoundMethod{(*parser.BoundMethod)(0xc0000c8a80), (*parser.BoundMethod)(0xc0000c8b00)}}}
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Person} Person
|
||||
*/
|
||||
|
||||
/**
|
||||
* Greet does XYZ
|
||||
* @function Greet
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export function Greet(name) {
|
||||
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* NewPerson creates a new person
|
||||
* @function NewPerson
|
||||
* @param name {string}
|
||||
* @returns {Promise<Person>}
|
||||
**/
|
||||
export function NewPerson(name) {
|
||||
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Person} Person
|
||||
*/
|
||||
|
||||
/**
|
||||
* Greet does XYZ
|
||||
* @function Greet
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export function Greet(name) {
|
||||
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* NewPerson creates a new person
|
||||
* @function NewPerson
|
||||
* @param name {string}
|
||||
* @returns {Promise<Person>}
|
||||
**/
|
||||
export function NewPerson(name) {
|
||||
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import * as services from "../services/models";
|
||||
|
||||
// Person is a person
|
||||
export interface Person {
|
||||
name: string;
|
||||
address: services.Address;
|
||||
}
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('../services/models').Address} servicesAddress
|
||||
*/
|
||||
|
||||
// Person is a person
|
||||
export const Person = class {
|
||||
/**
|
||||
* Creates a new Person instance.
|
||||
* @constructor
|
||||
* @param {Object} source - The source object to create the Person.
|
||||
* @param {string} source.Name
|
||||
* @param {servicesAddress} source.Address
|
||||
*/
|
||||
constructor(source = {}) {
|
||||
const { name = "", address = null } = source;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Person instance from a string or object.
|
||||
* @param {string|object} source - The source data to create a Person instance from.
|
||||
* @returns {Person} A new Person instance.
|
||||
*/
|
||||
static createFrom(source) {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Person(parsedSource);
|
||||
}
|
||||
};
|
||||
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import * as services from "../services/models";
|
||||
|
||||
// Person is a person
|
||||
export class Person {
|
||||
name: string;
|
||||
address: services.Address;
|
||||
|
||||
constructor(source: Partial<Person> = {}) {
|
||||
const {name = "", address = null} = source;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Person {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Person(parsedSource as Partial<Person>);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Address} Address
|
||||
*/
|
||||
|
||||
/**
|
||||
* Yay does this and that
|
||||
* @function Yay
|
||||
* @returns {Promise<Address>}
|
||||
**/
|
||||
export function Yay() {
|
||||
return wails.CallByID(1592414782, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Address} Address
|
||||
*/
|
||||
|
||||
/**
|
||||
* Yay does this and that
|
||||
* @function Yay
|
||||
* @returns {Promise<Address>}
|
||||
**/
|
||||
export function Yay() {
|
||||
return wails.CallByName("services.OtherService.Yay", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
|
||||
export interface Address {
|
||||
street: string;
|
||||
state: string;
|
||||
country: string;
|
||||
}
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export const Address = class {
|
||||
/**
|
||||
* Creates a new Address instance.
|
||||
* @constructor
|
||||
* @param {Object} source - The source object to create the Address.
|
||||
* @param {string} source.Street
|
||||
* @param {string} source.State
|
||||
* @param {string} source.Country
|
||||
*/
|
||||
constructor(source = {}) {
|
||||
const { street = "", state = "", country = "" } = source;
|
||||
this.street = street;
|
||||
this.state = state;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Address instance from a string or object.
|
||||
* @param {string|object} source - The source data to create a Address instance from.
|
||||
* @returns {Address} A new Address instance.
|
||||
*/
|
||||
static createFrom(source) {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Address(parsedSource);
|
||||
}
|
||||
};
|
||||
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
|
||||
export class Address {
|
||||
street: string;
|
||||
state: string;
|
||||
country: string;
|
||||
|
||||
constructor(source: Partial<Address> = {}) {
|
||||
const {street = "", state = "", country = ""} = source;
|
||||
this.street = street;
|
||||
this.state = state;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Address {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Address(parsedSource as Partial<Address>);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"github.com/wailsapp/wails/v3/internal/parser/testdata/variable_single_from_other_function/services"
|
||||
"github.com/wailsapp/wails/v3/internal/parser/testdata/function_from_imported_package/services"
|
||||
"log"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
@@ -15,6 +15,7 @@ type GreetService struct {
|
||||
target *Person
|
||||
}
|
||||
|
||||
// Person is a person
|
||||
type Person struct {
|
||||
Name string
|
||||
Address *services.Address
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// Defining the main namespace
|
||||
export const main = {};
|
||||
|
||||
main.Person = class {
|
||||
/**
|
||||
* Creates a new Person instance.
|
||||
* @constructor
|
||||
* @param {Object} source - The source object to create the Person.
|
||||
* @param {string} source.Name
|
||||
* @param {services.Address} source.Address
|
||||
*/
|
||||
constructor(source = {}) {
|
||||
const { name = "", address = null } = source;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Person instance from a string or object.
|
||||
* @param {string|object} source - The source data to create a Person instance from.
|
||||
* @returns main.Person A new Person instance.
|
||||
*/
|
||||
static createFrom(source = {}) {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new main.Person(parsedSource);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Defining the services namespace
|
||||
export const services = {};
|
||||
|
||||
services.Address = class {
|
||||
/**
|
||||
* Creates a new Address instance.
|
||||
* @constructor
|
||||
* @param {Object} source - The source object to create the Address.
|
||||
* @param {string} source.Street
|
||||
* @param {string} source.State
|
||||
* @param {string} source.Country
|
||||
*/
|
||||
constructor(source = {}) {
|
||||
const { street = "", state = "", country = "" } = source;
|
||||
this.street = street;
|
||||
this.state = state;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Address instance from a string or object.
|
||||
* @param {string|object} source - The source data to create a Address instance from.
|
||||
* @returns services.Address A new Address instance.
|
||||
*/
|
||||
static createFrom(source = {}) {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new services.Address(parsedSource);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export namespace main {
|
||||
|
||||
|
||||
export class Person {
|
||||
name: string;
|
||||
address: services.Address;
|
||||
|
||||
constructor(source: Partial<Person> = {}) {
|
||||
const { name = "", address = null } = source;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Person {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Person(parsedSource as Partial<Person>);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
export namespace services {
|
||||
|
||||
|
||||
export class Address {
|
||||
street: string;
|
||||
state: string;
|
||||
country: string;
|
||||
|
||||
constructor(source: Partial<Address> = {}) {
|
||||
const { street = "", state = "", country = "" } = source;
|
||||
this.street = street;
|
||||
this.state = state;
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Address {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Address(parsedSource as Partial<Address>);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user