Compare commits

..

1 Commits

Author SHA1 Message Date
Lea Anthony a422d3c504 Update SECURITY.md 2024-02-14 18:14:28 +11:00
638 changed files with 1932 additions and 43018 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
node-version: [16.x]
steps:
- name: Checkout code
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
- name: Set Node
uses: actions/setup-node@v2
with:
node-version: 20.x
node-version: 16.x
- name: Update Sponsors
run: cd scripts/sponsors && chmod 755 ./generate-sponsor-image.sh && ./generate-sponsor-image.sh
@@ -15,7 +15,7 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 20.x
node-version: 18.x
- name: Install Task
uses: arduino/setup-task@v1
@@ -25,7 +25,7 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 20.x
node-version: 18.x
- name: Setup Task
uses: arduino/setup-task@v1
+1428 -516
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -10,6 +10,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"sponsorkit": "^0.9.3"
"sponsorkit": "^0.8.2"
}
}
+1
View File
@@ -25,6 +25,7 @@ type Build struct {
BuildCommon
NoPackage bool `name:"noPackage" description:"Skips platform specific packaging"`
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
Upx bool `description:"Compress final binary with UPX (if installed)"`
UpxFlags string `description:"Flags to pass to upx"`
Platform string `description:"Platform to target. Comma separate multiple platforms"`
-1
View File
@@ -9,7 +9,6 @@ type BuildCommon struct {
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
NoSyncGoMod bool `description:"Don't sync go.mod"`
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
}
func (c BuildCommon) Default() BuildCommon {
-17
View File
@@ -125,12 +125,6 @@ func initProject(f *flags.Init) error {
return err
}
// Change the module name to project name
err = updateModuleNameToProjectName(options, quiet)
if err != nil {
return err
}
if !f.CIMode {
// Run `go mod tidy` to ensure `go.sum` is up to date
cmd := exec.Command("go", "mod", "tidy")
@@ -282,14 +276,3 @@ func updateReplaceLine(targetPath string) {
fatal(err.Error())
}
}
func updateModuleNameToProjectName(options *templates.Options, quiet bool) error {
cmd := exec.Command("go", "mod", "edit", "-module", options.ProjectName)
cmd.Dir = options.TargetDir
cmd.Stderr = os.Stderr
if !quiet {
cmd.Stdout = os.Stdout
}
return cmd.Run()
}
+4 -6
View File
@@ -60,12 +60,10 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
return err
}
if !f.SkipModTidy {
// Run go mod tidy to ensure we're up-to-date
err = runCommand(cwd, false, f.Compiler, "mod", "tidy")
if err != nil {
return err
}
// Run go mod tidy to ensure we're up-to-date
err = runCommand(cwd, false, f.Compiler, "mod", "tidy")
if err != nil {
return err
}
buildOptions := f.GenerateBuildOptions()
+1 -1
View File
@@ -1 +1 @@
v2.8.1
v2.8.0
+1 -1
View File
@@ -19,7 +19,7 @@ func isFunction(value interface{}) bool {
return reflect.ValueOf(value).Kind() == reflect.Func
}
// isStruct returns true if the value given is a struct
// isStructPtr returns true if the value given is a struct
func isStruct(value interface{}) bool {
return reflect.ValueOf(value).Kind() == reflect.Struct
}
@@ -17,7 +17,7 @@
#define WindowStartsMinimised 2
#define WindowStartsFullscreen 3
WailsContext* Create(const char* title, int width, int height, int frameless, int resizable, int zoomable, int fullscreen, int fullSizeContent, int hideTitleBar, int titlebarAppearsTransparent, int hideTitle, int useToolbar, int hideToolbarSeparator, int webviewIsTransparent, int alwaysOnTop, int hideWindowOnClose, const char *appearance, int windowIsTranslucent, int devtoolsEnabled, int defaultContextMenuEnabled, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled, struct Preferences preferences, int singleInstanceEnabled, const char* singleInstanceUniqueId);
WailsContext* Create(const char* title, int width, int height, int frameless, int resizable, int fullscreen, int fullSizeContent, int hideTitleBar, int titlebarAppearsTransparent, int hideTitle, int useToolbar, int hideToolbarSeparator, int webviewIsTransparent, int alwaysOnTop, int hideWindowOnClose, const char *appearance, int windowIsTranslucent, int devtoolsEnabled, int defaultContextMenuEnabled, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled, struct Preferences preferences, int singleInstanceEnabled, const char* singleInstanceUniqueId);
void Run(void*, const char* url);
void SetTitle(void* ctx, const char *title);
@@ -14,7 +14,7 @@
#import "WailsMenu.h"
#import "WailsMenuItem.h"
WailsContext* Create(const char* title, int width, int height, int frameless, int resizable, int zoomable, int fullscreen, int fullSizeContent, int hideTitleBar, int titlebarAppearsTransparent, int hideTitle, int useToolbar, int hideToolbarSeparator, int webviewIsTransparent, int alwaysOnTop, int hideWindowOnClose, const char *appearance, int windowIsTranslucent, int devtoolsEnabled, int defaultContextMenuEnabled, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled, struct Preferences preferences, int singleInstanceLockEnabled, const char* singleInstanceUniqueId) {
WailsContext* Create(const char* title, int width, int height, int frameless, int resizable, int fullscreen, int fullSizeContent, int hideTitleBar, int titlebarAppearsTransparent, int hideTitle, int useToolbar, int hideToolbarSeparator, int webviewIsTransparent, int alwaysOnTop, int hideWindowOnClose, const char *appearance, int windowIsTranslucent, int devtoolsEnabled, int defaultContextMenuEnabled, int windowStartState, int startsHidden, int minWidth, int minHeight, int maxWidth, int maxHeight, bool fraudulentWebsiteWarningEnabled, struct Preferences preferences, int singleInstanceLockEnabled, const char* singleInstanceUniqueId) {
[NSApplication sharedApplication];
@@ -27,7 +27,7 @@ WailsContext* Create(const char* title, int width, int height, int frameless, in
fullscreen = 1;
}
[result CreateWindow:width :height :frameless :resizable :zoomable :fullscreen :fullSizeContent :hideTitleBar :titlebarAppearsTransparent :hideTitle :useToolbar :hideToolbarSeparator :webviewIsTransparent :hideWindowOnClose :safeInit(appearance) :windowIsTranslucent :minWidth :minHeight :maxWidth :maxHeight :fraudulentWebsiteWarningEnabled :preferences];
[result CreateWindow:width :height :frameless :resizable :fullscreen :fullSizeContent :hideTitleBar :titlebarAppearsTransparent :hideTitle :useToolbar :hideToolbarSeparator :webviewIsTransparent :hideWindowOnClose :safeInit(appearance) :windowIsTranslucent :minWidth :minHeight :maxWidth :maxHeight :fraudulentWebsiteWarningEnabled :preferences];
[result SetTitle:safeInit(title)];
[result Center];
@@ -64,7 +64,7 @@ struct Preferences {
bool *fullscreenEnabled;
};
- (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable :(bool)zoomable :(bool)fullscreen :(bool)fullSizeContent :(bool)hideTitleBar :(bool)titlebarAppearsTransparent :(bool)hideTitle :(bool)useToolbar :(bool)hideToolbarSeparator :(bool)webviewIsTransparent :(bool)hideWindowOnClose :(NSString *)appearance :(bool)windowIsTranslucent :(int)minWidth :(int)minHeight :(int)maxWidth :(int)maxHeight :(bool)fraudulentWebsiteWarningEnabled :(struct Preferences)preferences;
- (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable :(bool)fullscreen :(bool)fullSizeContent :(bool)hideTitleBar :(bool)titlebarAppearsTransparent :(bool)hideTitle :(bool)useToolbar :(bool)hideToolbarSeparator :(bool)webviewIsTransparent :(bool)hideWindowOnClose :(NSString *)appearance :(bool)windowIsTranslucent :(int)minWidth :(int)minHeight :(int)maxWidth :(int)maxHeight :(bool)fraudulentWebsiteWarningEnabled :(struct Preferences)preferences;
- (void) SetSize:(int)width :(int)height;
- (void) SetPosition:(int)x :(int) y;
- (void) SetMinSize:(int)minWidth :(int)minHeight;
@@ -136,7 +136,7 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
return NO;
}
- (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable :(bool)zoomable :(bool)fullscreen :(bool)fullSizeContent :(bool)hideTitleBar :(bool)titlebarAppearsTransparent :(bool)hideTitle :(bool)useToolbar :(bool)hideToolbarSeparator :(bool)webviewIsTransparent :(bool)hideWindowOnClose :(NSString*)appearance :(bool)windowIsTranslucent :(int)minWidth :(int)minHeight :(int)maxWidth :(int)maxHeight :(bool)fraudulentWebsiteWarningEnabled :(struct Preferences)preferences {
- (void) CreateWindow:(int)width :(int)height :(bool)frameless :(bool)resizable :(bool)fullscreen :(bool)fullSizeContent :(bool)hideTitleBar :(bool)titlebarAppearsTransparent :(bool)hideTitle :(bool)useToolbar :(bool)hideToolbarSeparator :(bool)webviewIsTransparent :(bool)hideWindowOnClose :(NSString*)appearance :(bool)windowIsTranslucent :(int)minWidth :(int)minHeight :(int)maxWidth :(int)maxHeight :(bool)fraudulentWebsiteWarningEnabled :(struct Preferences)preferences {
NSWindowStyleMask styleMask = 0;
if( !frameless ) {
@@ -158,6 +158,7 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
self.mainWindow = [[WailsWindow alloc] initWithContentRect:NSMakeRect(0, 0, width, height)
styleMask:styleMask backing:NSBackingStoreBuffered defer:NO];
if (!frameless && useToolbar) {
id toolbar = [[NSToolbar alloc] initWithIdentifier:@"wails.toolbar"];
[toolbar autorelease];
@@ -187,10 +188,6 @@ typedef void (^schemeTaskCaller)(id<WKURLSchemeTask>);
[self.mainWindow setAppearance:nsAppearance];
}
if (!zoomable && resizable) {
NSButton *button = [self.mainWindow standardWindowButton:NSWindowZoomButton];
[button setEnabled: NO];
}
NSSize minSize = { minWidth, minHeight };
NSSize maxSize = { maxWidth, maxHeight };
@@ -10,7 +10,5 @@ import (
// BrowserOpenURL Use the default browser to open the url
func (f *Frontend) BrowserOpenURL(url string) {
// Specific method implementation
if err := browser.OpenURL(url); err != nil {
f.logger.Error("Unable to open default system browser")
}
_ = browser.OpenURL(url)
}
+1 -2
View File
@@ -203,7 +203,6 @@ int main(int argc, const char * argv[]) {
// insert code here...
int frameless = 0;
int resizable = 1;
int zoomable = 0;
int fullscreen = 1;
int fullSizeContent = 1;
int hideTitleBar = 0;
@@ -220,7 +219,7 @@ int main(int argc, const char * argv[]) {
int defaultContextMenuEnabled = 1;
int windowStartState = 0;
int startsHidden = 0;
WailsContext *result = Create("OI OI!",400,400, frameless, resizable, zoomable, fullscreen, fullSizeContent, hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent, alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, devtoolsEnabled, defaultContextMenuEnabled, windowStartState,
WailsContext *result = Create("OI OI!",400,400, frameless, resizable, fullscreen, fullSizeContent, hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent, alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, devtoolsEnabled, defaultContextMenuEnabled, windowStartState,
startsHidden, 400, 400, 600, 600, false);
SetBackgroundColour(result, 255, 0, 0, 255);
void *m = NewMenu("");
@@ -60,7 +60,7 @@ func NewWindow(frontendOptions *options.App, debug bool, devtools bool) *Window
defaultContextMenuEnabled := bool2Cint(debug || frontendOptions.EnableDefaultContextMenu)
singleInstanceEnabled := bool2Cint(frontendOptions.SingleInstanceLock != nil)
var fullSizeContent, hideTitleBar, zoomable, hideTitle, useToolbar, webviewIsTransparent C.int
var fullSizeContent, hideTitleBar, hideTitle, useToolbar, webviewIsTransparent C.int
var titlebarAppearsTransparent, hideToolbarSeparator, windowIsTranslucent C.int
var appearance, title *C.char
var preferences C.struct_Preferences
@@ -108,14 +108,12 @@ func NewWindow(frontendOptions *options.App, debug bool, devtools bool) *Window
}
}
zoomable = bool2Cint(!frontendOptions.Mac.DisableZoom)
windowIsTranslucent = bool2Cint(mac.WindowIsTranslucent)
webviewIsTransparent = bool2Cint(mac.WebviewIsTransparent)
appearance = c.String(string(mac.Appearance))
}
var context *C.WailsContext = C.Create(title, width, height, frameless, resizable, zoomable, fullscreen, fullSizeContent,
var context *C.WailsContext = C.Create(title, width, height, frameless, resizable, fullscreen, fullSizeContent,
hideTitleBar, titlebarAppearsTransparent, hideTitle, useToolbar, hideToolbarSeparator, webviewIsTransparent,
alwaysOnTop, hideWindowOnClose, appearance, windowIsTranslucent, devtoolsEnabled, defaultContextMenuEnabled,
windowStartState, startsHidden, minWidth, minHeight, maxWidth, maxHeight, enableFraudulentWebsiteWarnings,
@@ -8,7 +8,5 @@ import "github.com/pkg/browser"
// BrowserOpenURL Use the default browser to open the url
func (f *Frontend) BrowserOpenURL(url string) {
// Specific method implementation
if err := browser.OpenURL(url); err != nil {
f.logger.Error("Unable to open default system browser")
}
_ = browser.OpenURL(url)
}

Some files were not shown because too many files have changed in this diff Show More